Home / Articles / Adobe Flash / Interactivity in Flash

Interactivity in Flash

Contents

  1. Introduction
  2. Events
  3. Keyboard events
  4. Frame events (frame actions)
  5. Targets
  6. Actions

Article Description

Three things are needed to make interactivity work in Flash. Learn what they are and how they apply to Flash in this article by Derick Franklin and Brooks Patton.

Frame events (frame actions)

Whereas user interaction triggers mouse and keyboard events, the timeline triggers frame events, which are also known as frame actions because they are attached to frames and always trigger an action.

Frame events—which are always placed at keyframes—are useful for actions that you want to occur at certain points in time. For example, a Stop action will cause your movie to halt, and a Go To action will cause your movie to jump to another frame or scene on the timeline.

To create a frame event that triggers an action:

  1. Double-click the keyframe where you would like the frame event to occur.

    The Frame Properties dialog box appears.

  2. Click the Action tab.

  3. Click the plus sign ("+") to assign an action or actions that you want triggered when the timeline reaches this keyframe.

  4. For our demonstration, choose the Stop action, which will cause your movie to stop playing.

    The Actions pane displays your completed ActionScript. Notice that even though this is the same action that was assigned to the mouse event we configured earlier, the script is different: It lacks the On (Release) and End On statements, which are only required to define mouse or keyboard events (because both can take so many forms). A frame event can only be triggered one way—by the timeline reaching that frame.

  5. Click OK.

    When the movie is played, it will perform the action when the timeline reaches this keyframe.