Flash Tutorials - Herong's Tutorial Examples - Version 3.02, by Dr. Herong Yang
Flash Player Supports Dynamic Actions
This section describes dynamic actions associated Flash Player frames that are used to modify the frame display and/or change the show frame timeline.
Flash Player can also allow you to dynamic actions inside DOACTION tags in SWF files. Actions are executed by Flash Player using a concept called Action List.
Action List - A set of predefined actions associated with each Show Frame event. When a Show Frame event is trigger, all actions in its associated action list will be executed after the display list is rendered.
There are two main types of actions supported by the Flash Player:
If actions are used, the Flash Player's processing lifecycle become not so simple:
1. Set up the frame rate given in the SWF file. For example, frame rate = 24 fps.
2. Prepare a display list with items to be rendered.
3. Show the initial frame by rendering all items in the display list, including showing graphics and/or playing sounds. Then execute all actions in the action list of the current frame. This could leads to abandon the current frame and jump forward or backward to a different frame in the timeline.
4. Wait for the next show-frame time, which the previous Show Frame time plus the frame rate interval time. For example, if frame rate is 24 fps, the wait time is about 1/24 seconds (about 0.04 seconds).
5. While waiting, update the display list by removing existing items and adding new items
6. At next Show Frame time, render all items in the display list. Then execute all actions in the action list of the current frame. This could leads to abandon the current frame and jump forward or backward to a different frame in the timeline.
7. Continue with step 4.
The picture below illustrates the Flash Player's processing timeline that could be altered by a GotoFrame action:
Last update: 2014.
Table of Contents