Action stop(); is used to stop running movie clip. For more details, see the following example:
- Make a ball with oval tool, then convert to symbol with the name ball_mc.
- Select ball_mc, then place it in the left of the stage.
- Click on frame 20, then add a keyframe by pressing F6. Then move ball_mc to the right stage.
- Right click on the timeline frame 10, then choose create motion tween.
- Run the movie by pressing Ctrl+Enter. It will get a ball movement from left to right in loops.
- Back to the stage by pressing the Ctrl + W, then add a new layer (action layer).
- Click the action layer frame 10, then input keyframe by pressing F6. Still frame 10 in selection, open the action panel and typing action stop ();
- Run movie by pressing the Ctrl+Enter, then the ball will stop when located in the center stage. This is caused due to the action stop (); so the movie stop.
- Save the file.
0 Comments