flash time delay help
flash time delay help
- Started
- Last post
- 5 Responses
- Momentum2
Hey guys... can I get some help.
I want to rotate about 4 images each holding for 5 seconds. Is the best way to set a counter and when it hits 5 to go play next frame?
How would that look scripted! Thanks for the help.
- Milan0
look up setInterval in Flash help for an example.
- enjine0
AS 2.0 = setInterval:
http://www.adobe.com/support/fla…AS 3.0 = flash.utils.Timer / flash.events.TimerEvent classes
- Momentum20
ah, thanks
- CyBrain0
wait = function() {
// STATEMENTS YOU WANT AFTER 5 SECONDS
// ONLY EXECUTE THIS ONCE, SO CLEAR INTERVAL RIGHT AWAY
clearInterval(waitID);
}
// FIRST PARAMETER IS THE FUNCTION YOU WANT TO CALL
// SECOND PARAMETER IS THE HOW OFTEN YOU WANT TO CALL IT. (5 TIMES 1000 MILLISECONDS
waitID = setInterval(wait, 5 * 1000);
- Momentum20
thanks cy!