4 Replies Latest reply on Feb 13, 2007 9:08 PM by kglad

    Stopping one movieclip from another

    jrmcintosh
      This seems really simple but it's getting a bit frustrating for me.

      I have two separate movieclips on a stage. One has three graphics that are cycled through every 4 seconds using an interval. This movie is named adsmc. I have another movieclip called btnset that has a pause button in it. What I want btnset to do is that when pause is clicked adsmc stops completely. This doesn't currently happen, it continues to cycle. Now if I take the interval code out, the btnset stops adsmc when clicked. How can I stop the cycling of adsmc while keeping my time intervals? Actionscript included below...

      adsmc code(I have three actionscripts here on frames 1, 5, and 10, they are basically the same except for telling the movie what frame to go to.):

      stop();
      var interval:Number = setInterval(function () {
      gotoAndPlay(5);
      clearInterval(interval);
      }, 4000);


      btnset code:

      stop();

      btnpause.onPress = function () {
      trace(_root.adsmc._currentframe);
      _root.adsmc.stop();
      }