• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1370
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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