Working with Movie Clips > Using actions and methods to control Timelines > Assigning an action or method

Assigning an action or method

Actions and methods can be assigned to a button or frame in a Timeline, or to a movie clip instance.

To assign an action or method to a movie clip instance you must use an onClipEvent handler. All actions attached to the instance are nested inside an onClipEvent handler and execute after it is triggered. The onClipEvent action is triggered by either Timeline events (such as loading a movie) or user events (such as a mouse click or keypress). For example, onClipEvent(mouseMove) triggers an action every time the user moves the mouse.

The onClipEvent action is assigned to an instance on the Stage. The onClipEvent events are listed in the Parameters pane in the Actions panel.