Frame Events
Top  Previous  Next


Frame Events occur when a Scene or Sprite reaches a specified Frame.

The available Frame Events are as follows:

·onFrame: the Event is triggered just before the specified Frame is displayed  
·onLoad: the Event is triggered when a Sprite or Scene is first displayed. OnLoad Events are handled before any onEnterFrame or onFrame Events  
·onEnterFrame: the Event is triggered as each Frame is entered. OnEnterFrame Events are handled before any onFrame Events for a Frame.  

For Actions, other than the Preload Content and Set Label Actions, the Event is triggered just before the specified Frame is displayed. See the Preload Content and Set Label Actions for information about how they work.

You can insert a Frame Event either by:

·using the Timeline: selecting the Scene row and pressing Add Script. This will create an onFrame Event Handler for that Frame  
·using the Script Panel: selecting a Scene and pressing Add Script, and selecting Frame and the required Frame Event.