View Full Version : actionscript for pause/time-delay?
javadi82
June 2nd, 2003, 01:32 AM
(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?
kode
June 2nd, 2003, 01:45 AM
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(myInte rval)}, 10000);
;)
javadi82
June 2nd, 2003, 02:15 AM
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.
lostinbeta
June 2nd, 2003, 02:21 AM
1) The link in Kaxs thread (disguised as the word "setInteval", you really need to stop doing that kax, it gets confusing :P ) is pretty much all you need.
2) Your using the wrong search field. In the upper left corner there is a button that looks like this...
http://www.kirupaforum.com/images/search_top.gif
Click on the button (the one in the corner, not the one in my post) to use the forum search feature.
kode
June 2nd, 2003, 02:25 AM
:P
yeah... i think i should, anyone sees those links. :-\
or maybe something like...
setInterval (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary646.html) (the word setInterval is a link!!)
would do... :P
lostinbeta
June 2nd, 2003, 02:39 AM
LOL, I think I am the only one that notices you ever do that :P
javadi82
June 2nd, 2003, 02:46 AM
but I see it as setInterval . there is no setInteval there.
right ?
javadi82
June 2nd, 2003, 02:46 AM
anyway thanks for showing me the right 'search' button.
and to imagine that i visit kirupa.com thrice a day.....!
kode
June 2nd, 2003, 02:55 AM
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 :P
that's because we are smart people... :P ;)
lostinbeta
June 2nd, 2003, 03:16 AM
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.
kode
June 2nd, 2003, 03:21 AM
ok... post edited.
now you can clearly see the stupid link. :hair: :P
lostinbeta
June 2nd, 2003, 03:23 AM
lol, now you see why I always post my links like that :P
kode
June 2nd, 2003, 03:24 AM
yup... if i ever do that again, please edit my post. ;)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.