" />

GDT 260 Animation for the Web: Winter 2002

2.26.02

Actions & Interactions

Download digihit_02.aif

Interactivity: the ability of the movie to respond to user actions. In Flash, all interactivity is accomplished by ActionScript.

Events

Flash and actionScript are event-driven: something needs to happen, and Flash will handle that event and execute an action.

Event
something that happens, for example, a mouse click, or the movie enters a certain frame, or the user hits a certain key.
Event Handler
the movie's response to an event, in the form of on (event) { do some stuff }; Basically a set of instructions to watch for an event and then do something when that event occurs.

The most straightforward event-sensitive element is a button, which already has different visual states that respond to events. By adding an event handler to a button, the button will watch for the specified event, and follow the directions when it happens.

Buttons aren't inherently interactive - need actionScript to tell them what to do.

ActionScript allows non-linear timeline - decision-making & choice by user

Timeline vs Instances

ActionScript can be attached to the timeline or to instances of symbols

Button Events

Actions attached to buttons on the stage are attached to that instance only, not to the item in the library