A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Tricky Movie Pause Problem

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    21

    Tricky Movie Pause Problem

    Guys

    This is a tricky thing (for me anyway).

    I have a timeline with 5 movie clips on, they are all paused with a stop action on frame 1. On click of a button, one unpauses and plays until it reaches another stop action. Within this movie clip I want to do two things, I want the user to be able to close the movie clip early on click. but if they dont do this I want it to autoclose after 15 seconds.

    Currently when the activated movie clip reaches the point where I want it to stop, I am using this code.


    this.stop();
    pause = function () {
    play();
    clearInterval(pausei);
    }
    pausei = setInterval(pause, 15000);


    Now my problem is, if the user unpauses it early and closes the movie, this script continues and totally screws my movie up. Is there a way that onClick
    I can remove all record of this script ever being loaded and take it out of the memory?

    unfortunately, my movie is too big to upload to the forum now, but I am literally an hour away from completion of this project and have really hit a brick wall.

    Could really do with a bit of a boffin to help me out. Happy to send the FLA on.

  2. #2
    Senior Member
    Join Date
    Jun 2009
    Posts
    171
    Code:
    instanceName.onEnterFrame = function() {
         //place your loaded script here	
    }
    Code:
    delete onEnterFrame; //place where necessary

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