Home / Tutorials / Navigation / Scrolling Menus /

Flash Tutorials

Scrolling Menus - Step Five: The Controller

Posted by : PhilS on Aug 01, 2008

 

5.0/5

I am not aware of an ActionScript command that will make a movie play backwards. To do this you need to create a controller that will manages the movement.

  1. Go to: Insert - New Symbol Name: Controller MC Behavior: Movie Clip
  2. In frame 1 place the following ActionScript:

    stop();

  3. In frame 2 place the following ActionScript:

    _root.prevFrame();

    This will make the movie go back one frame. Nearly playing backwards but not quite.

  4. In frame 3 place the following ActionScript:

    gotoAndPlay (2);

    This will repeat the action of the previous frame. It is this loop which will make the movie play backwards.

  5. Click the tab to go back to the main stage.

  6. Create a new Layer called: Controller MC
  7. In this layer right click on frame 2 and select: Insert Blank Keyframe
  8. Drag the Controller MC onto the main stage in frame 2.

    Note: The Controller MC can be placed anywhere on the stage or to the side of the stage but it must start on frame 2 and remain on stage until the last frame. If the controller is placed in frame 1 you may get errors !! Once the controller is active it will trap you in frame 1 because it is always be sending you backwards.

The controller starts on frame 2 and is placed to the right of the main stage (the white dot).

9. In the Property panel give the Controller MC an instance name: controller

no comment

Add comment

Please login to post comments.