-
Senior Member
[RESOLVED] function question
how do i tell a function to wait a few seconds before executing?
-
-
Senior Member
yeah i know that but it causes it to execute every three seconds....I only want it to wait 3 seconds execute then stop executing
-
use clearInterval in the function to stop it executing more than once...
code:
myFunction=function(){
trace("myfunction called");
clearInterval(myInterval);
}
myInterval=setInterval(this,"myFunction",3000);
K.
-
Senior Member
ok i see i can use clear Interval to stop the interval but i have no idea how to write the setInterval and clearInterval....could you give me an example?
-
Senior Member
nevermind you already did it
-
Senior Member
ok that seems to work but how do I know the interval is no longer executing?
-
Senior Member
never mind i figured out a way to see if it stops the Interval....thanks for your time.
-
Senior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|