2 Replies Latest reply on May 11, 2011 8:13 AM by Ned Murphy

    Help noob with simple issue. Thanks!


      Hey guys!

      I am a first time flash-maker, and I sure how to get things to work as planned.


      I have written the following code:

      import flash.events.MouseEvent;
      Weightlifting_btn.addEventListener(MouseEvent.CLICK, CursorClick);
      function CursorClick(event:MouseEvent):void{

      But my problem is that i have a motion tween that startes at frame 5 and ends at frame 25. And the code says that at will go to and stop at frame 25.

      what I really want it to do, is to go to frame 5, play the motion, and stop at frame 25.


      How can I do this?


      Thanks in advance

        • 1. Re: Help noob with simple issue. Thanks!
          kglad Adobe Community Professional & MVP

          that's as3 code so if you're publishing for as1/as2, it won't work.


          in either case, use




          to play frame 5 to the timeline contains a stop().

          • 2. Re: Help noob with simple issue. Thanks!
            Ned Murphy Adobe Community Professional & MVP

            That is AS3 code, so you should have posted in the AS3 forum.  To make it start playing at frame 5, tell it to do that.  If you want it to stop at frame 25, then place a stop() command at frame 25.



            Weightlifting_btn.addEventListener(MouseEvent.CLICK, CursorClick);
            function CursorClick(event:MouseEvent):void{
                gotoAndPlay(5);  // no quotes for frame numbers



            (It looks like it's another one of those missing postings days... there were no responses showing here when I started here, but there should have been.  And I'm noticing a good number of what has been posted today in the AS3 forum was missing when I last checked)