| Flash Tutorial: How to Stop and Start a Movie Clip | |  Check out the swf file - Start a new document in Flash.
- Go to Insert -> New Symbol -> Choose Graphic, name it 'circle' and press OK.
- Create a ball using the Oval Tool; choose no stroke.
- Select the ball on stage and convert it to a symbol; choose Insert -> Convert to Symbol --> Choose Movie Clip, name it 'ball' and press OK.
- Create a simple tween; select frame 20 and choose Insert -> Keyframe.
- Drag the ball to another place on stage.
- Select frame 1 and choose Insert -> Create Motion Tween.
- Go back to Scene 1 and create 3 layers: name the layers 'button', 'text', and 'ball'.
- Choose the 'ball' layer and open up the Library and drag out the movie clip you just created (you should have named it 'ball').
- Select the ball on stage and open the Instance Panel and name the instance 'ball'.
- Open the Buttons Library: go to Window -> Common Libraries -> choose Buttons.
- Choose the 'button' layer and drag any two buttons from the Button Library out onto the stage.
- On the 'text' layer, choose the Text Tool; type stop and place next to one of the buttons, then type start and place this next to the other button.
- Select the button next to the stop text, right click (or Mac users should ctrl click) and choose Actions.
- In the Actions Panel, click on the arrow in the upper right hand corner and choose Expert Mode and type the following code into the window:
on (release) { ball.stop(); } - Back on the stage choose the other button (start button) and bring up the Actions Panel.
- In the Actions Panel, click on the arrow in the upper right hand corner and choose Expert Mode and type the following code into the window:
on (release) { ball.gotoAndPlay (1); } - Test movie! (go to Control -> Test Movie)
Download the free .fla file | | | . | |