2 Replies Latest reply on Jun 7, 2006 4:02 PM by NSurveyor

    enter frame event

    tylerbryanj
      what actionscript would I use if my movie has many different scenes. I am about 3 scenes into my movie and when a certain frame is entered I want Scene 1 to go to a certain frame. I cant seem to get the actionscript right.
        • 1. Re: enter frame event
          NSurveyor Level 2
          onEnterFrame is misleadingly named. It actually is an event that occurs repeatedly at the rate of the FPS. So, if you have 12 frames per second, the onEnterFrame should be roughly called 12 times.

          I guess putting code directly on a frame is what you want. Click on the frame that you want to leave from. Open the Actions Panel. Type in:

          _root.gotoAndStop(FRAMENUMBER);

          where FRAMENUMBER is the frame to go to. However, if you are using multiple scenes, it might be easier to give your frame, what is called a "Frame Label". Click on the destination frame. In the properties Panel, type in redirectFrame for the <Frame Label>. Then, go back to the other frame where the code was to be applied, and use:

          _root.gotoAndStop("redirectFrame");

          And of course if you want the movie to PLAY from the redirect frame, use gotoAndPlay instead of gotoAndStop.
          • 2. Re: enter frame event
            NSurveyor Level 2
            Edit:

            So, if you have 12 fps, the onEnterFrame should be roughly called 12 times PER SECOND.