Professional Documents
Culture Documents
20080912120912chapter J
20080912120912chapter J
ATTACHING BEHAVIORS
Chapter Lessons
Attach built-in behaviors Create a behavior Add and modify a behavior Open a movie with a behavior
Attaching Behaviors
Chapter J
Chapter Lessons
Create a dropdown list with a behavior Add keyboard navigation with a behavior Change text to speech with a behavior Insert and modify a Flash component
Attaching Behaviors Chapter J 3
Attaching Behaviors
A behavior is a prewritten script that adds interactivity to a movie Can use built-in behaviors or create your own You do not have to write or understand Lingo or JavaScript syntax to create behaviors
Attaching Behaviors Chapter J 4
Attaching Behaviors
Built-in behaviors are grouped by category
Components 3D Accessibility Animation Controls Internet Media Navigation Paintbox Text
Chapter J 5
Attaching Behaviors
Attaching Behaviors
Components library allows you to insert Flash components Behaviors in 3D library perform actions on 3D objects based on triggers Accessibility library makes movies accessible for hearing- and visually-impaired Animation library makes sprites move with or without user input Controls library allows you to create and control user interface elements
Attaching Behaviors Chapter J 6
Attaching Behaviors
Internet library controls activities on the Web Media library controls playback for Flash, QuickTime, RealMedia, and Sound media Navigation library allows you to control movement and location of playback head Paintbox library allows you to create and modify bitmap images Text library allows you to format numbers, force uppercase or lowercase characters, and create hypertext
Attaching Behaviors Chapter J 7
Attaching Behaviors
Chapter J
10
Create a Behavior
Can use Behavior inspector to create simple behaviors Must understand and write Lingo scripts to create complex behaviors Behaviors perform two functions:
Detect a specified event Perform one or more actions in response
Attaching Behaviors Chapter J 11
Create a Behavior
Behavior inspector lists most common events and actions used in behaviors
Attaching Behaviors
Chapter J
12
Attaching Behaviors
Chapter J
13
Modifying a Behavior
Use behavior Inspector to modify a behavior To modify a behavior throughout entire movie, double-click behavior in Cast window to open Behavior Inspector and make changes To modify a behavior for a specific sprite, select sprite in Score or on Stage, open Behavior Inspector, select behavior, and make changes
Attaching Behaviors Chapter J 14
Modifying a Behavior
In Behavior Inspector, you can add events and actions to an existing behavior Cannot directly modify existing events and actions associated with a behavior Remove events and actions you want to change from the editing panes and create new ones Can also use Behavior tab to make make changes
Attaching Behaviors Chapter J 15
Behavior Inspector
Restore Cursor behavior
Behavior event
Behavior action
Attaching Behaviors
Chapter J
16
Attaching Behaviors
Chapter J
21
Attaching Behaviors
Chapter J
22
Make movies more accessible to hearingand visually-impaired users Behaviors are available on Library palette
Attaching Behaviors Chapter J 23
Attaching Behaviors
Chapter J
24
[Ctrl][Page Down] (Win) Go to the last item on the Stage [control][page down] (Mac) [Enter] (Win) [return] (Mac)
Attaching Behaviors
Attaching Behaviors
Chapter J
28
Attaching Behaviors
Chapter J
29
Attaching Behaviors
Chapter J
32
Flash components
Attaching Behaviors
Chapter J
33
Chapter J Summary
Attach built-in behaviors Create a behavior Add and modify a behavior Open a movie with a behavior Create a dropdown list with a behavior
Attaching Behaviors
Chapter J
34
Chapter J Summary
Add keyboard navigation with a behavior Change text to speech with a behavior Insert and modify a Flash component
Attaching Behaviors
Chapter J
35