Introduction to ActionScript Tutorial > Control the flow of the movie |
![]() ![]() ![]() |
Control the flow of the movie
Without ActionScript, a movie plays from Frame 1 to the last frame and either repeats from Frame 1 or stops. You can use ActionScript to control the progression of a movie more precisely; you can also use it to give the user control. For example, you could place an action in Frame 5 that stops the movie until a user presses a Play button. This is a simple example of controlling the flow of a movie.
You can use the if
, else
, and else if
actions (also called statements) to create a more complex movie flow called logic. These three actions perform the following tasks:
![]() |
The |
![]() |
The |
![]() |
The |
![]() ![]() ![]() |