I was wondering if theres some code that makes it pause before going to the next line of code in actionscript 3!! I cant find anything, and the ones I do find are likek 100000 lines of code =_= I want something that just makes it not execute the next line of code for 3 seconds or something?!
Something as simple ass pause(3); would be nice but apparently they don't have that haha, I gonna be using quite a bit and I dont want to have 1000 lines of code for each pause I do.
Pausing
Started by l3lueMage, Jun 24 2009 10:53 PM
1 reply to this topic
#1
Posted 24 June 2009 - 10:53 PM
#2
Posted 19 August 2009 - 08:34 AM
Yes, there is a way, it is called a Timer event. Timer events are set up so that a line of code won't run for a certain period of time.
Hope this helps!
var timer:Timer = new Timer(2000, 3); /*First number is how long to wait in millisecond, second number is how many times you want this code to execute.*/
timer.addEventListener(TimerEvent.TIMER, timeThis);
timer.start();
function timeThis (event:TimerEvent):void {
//What ever code is in here will every 2000 milliseconds for 3 times.
}
Hope this helps!
Edited by GRIMESD, 19 August 2009 - 08:35 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
