2 Replies Latest reply on Jun 1, 2006 9:37 AM by respondplease

    Pause button doesn't pause consistently

    respondplease Level 1
      Hello,

      My pause button does work, but not really how I would like it to. When I press on it once, my movie pauses, but in order to un-pause it or continue playing I need to double-click it or even sometimes triple-click it. Either way it isn't as consistent as I would like it to be. What I would like it to do is pause once after clicking and then continue playing after I click it again. Below is the code I've put on my pause movie clip.Additional info regarding the script: "screen" is the frame label on my main timeline where I've placed my main movie clip (the pause button I've placed on my main timeline before the "screen" frame):

      // ======== PAUSE BUTTON =========
      var state:Number = 0;
      this.onPress = function(){
      if (state == 0) {
      _root.screen.stop();
      state = 1
      }
      else {
      _root.screen.play();
      state = 0
      }
      }

      Any suggestions on how to make my pause button work correctly would be appreciated.

      Thanks