A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how to cancel a function

  1. #1
    Senior Member
    Join Date
    Nov 2003
    Posts
    385

    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

  2. #2
    Senior Member Ovaire d'Oz's Avatar
    Join Date
    May 2006
    Location
    France
    Posts
    148
    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.

  3. #3
    Senior Member
    Join Date
    Nov 2003
    Posts
    385

    thanks!

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center