-
how to cancel a function
I have made an animation loop by putting it inside of a function and then calling it again at the end of the function. The problem is when I navigate away from that frame and then back again it seams the the function is still running and then is fired again by the repeated visit to that frame. I think if I could cancel the original function once the button is pressed to return to that frame that would solve theproblem but I can't find anywhere "how to cancel a function". Does this make sense? or is there a better way to go about this?
as always input is greatly appreciated
-M
-
Senior Member
All of this depends on how your function is called; which event calls it.
If it is an onEnterFrame, it can be deleted (delete clip.onEnterFrame), if not you can always place an if condition.
-
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
|