(Flash 5/Flash MX)
How do I delay/pause using actionscript?
I have tried using a for loop for a time delay like this:
for(i=0;i<1000000;i++){
}
BUT IT DOES NOT WORK!
Flash gives an error like: Time-consuming actionscript. Abort running script? OR the loop simply does not produce a noticeable delay.
Could you please show me how I can introduce a time-delay or a pause using actionscript?
run a search in the forums, javadi82. there a several threads about this. :-\
see this: http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary646.html
and here’s a quick example:
// stop movie
stop();
// play movie after 10 seconds
var myInterval = setInterval(function(){play(),clearInterval(myInterval)}, 10000);

could u give the urls to those posts here?
i have tried typing time-delay and pause in the upper right hand corner but that does not help.
thanks anyway.
-
The link in Kaxs thread (disguised as the word “setInteval”, you really need to stop doing that kax, it gets confusing
) is pretty much all you need.
-
Your using the wrong search field. In the upper left corner there is a button that looks like this…

Click on the button (the one in the corner, not the one in my post) to use the forum search feature.

yeah… i think i should, anyone sees those links. :-\
or maybe something like…
setInterval (the word setInterval is a link!!)
would do… 
LOL, I think I am the only one that notices you ever do that 
but I see it as setInterval . there is no setInteval there.
right ?
anyway thanks for showing me the right ‘search’ button.
and to imagine that i visit kirupa.com thrice a day…!
Originally posted by javadi82
**anyway thanks for showing me the right ‘search’ button.
and to imagine that i visit kirupa.com thrice a day…!**
so you found it out, did you? 
Originally posted by lostinbeta
LOL, I think I am the only one that notices you ever do that 
that’s because we are smart people…

system
10
*Originally posted by javadi82 *
**but I see it as setInterval . there is no setInteval there.
right ? **
Click on the word “setInterval” in kax’s original post where it says
see this: setInterval
that word is a link to the macromedia actionscript dictionary of what setInterval is and how it works.
system
11
ok… post edited.
now you can clearly see the stupid link. :hair: 
system
12
lol, now you see why I always post my links like that 
system
13
yup… if i ever do that again, please edit my post. 