Skip to main content
Participant
June 7, 2006
Question

enter frame event

  • June 7, 2006
  • 2 replies
  • 158 views
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.
This topic has been closed for replies.

2 replies

June 7, 2006
Edit:

So, if you have 12 fps, the onEnterFrame should be roughly called 12 times PER SECOND.
June 7, 2006
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.