Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1354
  • Last Modified:

add a delay in flash action script

How do i add a delay say for 1000 milliseconds in my flash action script??
0
netmahesh
Asked:
netmahesh
3 Solutions
 
RohitmrCommented:
Do you want the flash to stop playing or the actionscript to wait for 1000 ms

you can use the 'setInterval' keyword that calls a function after a certain time. Remember to save the id generated by setInterval and then clear the Interval using "clearInterval" and that id

function wait(){
   play();
   clearInterval(_level0.IntervalID)
}
stop;
_level0.IntervalID = setInterval(wait,1000);

0
 
chrome_geckoCommented:
this.onPress=function(){
this.setPause(1000);
}

you can remove the onPress function
0
 
rexmorCommented:
hello,

how about not using the actionscript but using the frames of a movieClip... just extend it...( applicable only to simple timer).


rexmor
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now