4 Replies Latest reply on Jan 2, 2009 12:10 PM by Ned Murphy

    Stop Frame

    dstx Level 1
      How do I apply stop() Actionscript to last frame of timeline so playhead stops there and doesn't return to first frame?

      I'm trying to follow this tutorial:
      Using Flash for the first time – Part 2: Adding symbols, animation, and ActionScript
      http://www.adobe.com/designcenter/flash/articles/flacs3it_firstflash_pt2_print.html

      Which states:
      You can stop the playhead from looping by adding a single line of ActionScript. For example, if you add this ActionScript to a frame, the playhead stops when it reaches that frame: stop();

      But when I do so, stop() Actionscript shows in every frame together with all my scripts, and returns to frame 1 as indicated in this tutorial:
      http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14189

      I have working buttons with instance names that use Actionscripts.
      All scripts are as below:

      stop();
      rewindBtn.onPress = function () {
      gotoAndStop(1);
      };
      stopBtn.onPress = function () {
      stop();
      };
      playBtn.onPress = function () {
      play();
      };
      endBtn.onPress = function () {
      gotoAndStop(_totalFrames);
      };
      pauseBtn.onRelease = function () {
      (toggle = (toggle) ? false : true) ? stop() : play();
      };