A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: pause and play buttons

  1. #1
    Junior Member
    Join Date
    Apr 2000
    Posts
    9

    Post

    can anyone tell me how to set up pause and play (or rather, "continue") buttons for a flash animation.

  2. #2
    Member
    Join Date
    Mar 2000
    Posts
    34

    Post

    Assuming the movie is running from the beginning (no stop actions on the main timeline), you could set up a button to make the movie start and stop like this:

    Make a button symbol and put it on the main stage. Select the button and choose insert>convert to symbol and define it as a movie clip. Now it is a button inside a movie clip.

    Go into the editing environment for the movie clip. Add a layer to hold your frame actions. You use two frames for this MC--on the actions layer, put stop actions on both frames. On the layer that has your button, add another keyframe in frame 2.

    Now you add actions to the buttons: In the first frame select the button and add these actions to it:

    On (Release)
    Begin Tell Target ("../")
    Stop
    End Tell Target
    Begin Tell Target ("")
    Play
    End Tell Target
    End On

    (This tells the main timeline to stop playing and tells the movie clip that contains the button to play. The stop actions in the timeline of the MC will cause it to stop on frame 2).

    Now select the instance of the button in the second frame and add these actions to it:

    On (Release)
    Begin Tell Target ("../")
    Play
    End Tell Target
    Begin Tell Target ("")
    Play
    End Tell Target
    End On

    (This tells the main timeline to play. It also tells the MC that holds the button to play. This will cause it to loop back to frame 1, encounter the stop action and hold up there, taking you back to where you started).

    Hope that helps!
    </chris_d00d>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center