3 Replies Latest reply on Jan 5, 2007 7:22 AM by kglad

    Need Help with Pause and Play Function

    Time Indicator
      HI,

      I have a pause/play button in my fla. The problem that I am having is that it does not pause the animation on the root timeline. However, pause and play is working fine for event based sound. I am not sure where the problem is occurring. I even tried stopping all the functions of the movie clip, but it doesn't seem to work. Can someone please help me with this.

      Here is the code that I have on a dual pause/play button:

      I have this code on on the pause function:

      on (press) {
      tellTarget("_root") {
      stop();
      stopAllSounds();
      soundposition= my_sounds.position;
      my_sounds.stop();
      _root.intro.stop();
      _root.run.stop();
      _root.walk.stop();
      this.gotoAndStop("play");
      }
      }


      I have this code on the play function:

      on (press) {
      tellTarget("_root") {
      play();
      var secondOffset = soundpos
      var sec = secondOffset/1000
      my_sounds.start(sec,1);
      _root.intro.play();
      _root.run.play();
      _root.walk.play();
      this.gotoAndStop("pause");
      }
      }


      Thanks.