A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: ClearInterval that was set inside a movieclip?

Threaded View

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    8

    Question ClearInterval that was set inside a movieclip?

    I have a movieclip where I have lots of code, because its kind of a module. Inside it have have some AS2 code inside a movieclip called "mymodule"
    Code:
    var myinterval;
    
    some_movieclip.onRelease = function(){
    	clearInterval(myinterval);
    	myinterval = setInterval(myfunction, 200);
    };
    However, when I go to another "section" in my Flash, I need to make sure all intervals are cleared, because a user could easily click on another section while something is running and it needs to clear them.

    But I cant figure out how to kill intervals I have set.

    The following doesn't work of course
    Code:
    mymodule.clearInterval(myinterval);
    And this dont work either
    Code:
    clearInterval(mymodule["myinterval"]);
    Any ideas? Thanks in advance
    Last edited by pers0n; 04-28-2009 at 12:52 AM.

Tags for this Thread

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