Chapter 6: Creating Interaction With Actionscript; About Events And Interaction - MACROMEDIA FLASH MX 2004-USING ACTIONSCRIPT IN FLASH Use Manual

Using actionscript in flash
Hide thumbs Also See for FLASH MX 2004-USING ACTIONSCRIPT IN FLASH:
Table of Contents

Advertisement

CHAPTER 6
Creating Interaction with ActionScript
In simple animations, Macromedia Flash Player plays the scenes and frames of a SWF file
sequentially. In an interactive SWF file, your audience uses the keyboard and mouse to jump to
different parts of a SWF file, move objects, enter information in forms, and perform many other
interactive operations.
You use ActionScript to create scripts that tell Flash Player what action to perform when an event
occurs. Some events that can trigger a script occur when the playhead reaches a frame, when a
movie clip loads or unloads, or when the user clicks a button or presses a key.
A script can consist of a single command, such as instructing a SWF file to stop playing, or a
series of commands and statements, such as first evaluating a condition and then performing an
action. Many ActionScript commands are simple and let you create basic controls for a SWF file.
Other actions require some familiarity with programming languages and are intended for
advanced development.

About events and interaction

Whenever a user clicks the mouse or presses a key, that action generates an event. These types of
events are generally called user events because they are generated in response to some action by the
user. You can write ActionScript to respond to, or handle, these events. For example, when a user
clicks a button, you might want to send the playhead to another frame in the SWF file or load a
new web page into the browser.
In a SWF file, buttons, movie clips, and text fields all generate events to which you can respond.
ActionScript provides three ways to handle events: event handler methods, event listeners, and
and
handlers. For more information about events and handling events, see
on()
onClipEvent()
Chapter 5, "Handling Events," on page
167.
179

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents