Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Basic Interactivity > Customizing the Actions Panel

Customizing the Actions Panel

The Actions panel takes up a good deal of room on your screen. You can resize the panel and its panes or collapse panes completely. You can customize the way scripts appear in the Script pane to view them in the smallest typeface you can read, for example (or, if you’ve spent long hours staring at tiny onscreen type, you can make scripts display in nice large letters). You can choose settings for font and type size; you can set Flash to highlight different types of script elements in different colors; you can control the number of spaces Flash uses to indent with each tab you type; and you can turn code hints on or off.

Two Types of Actions

This book uses two types of scripts: scripts that attach to keyframes and scripts that attach to objects. You can create both types by entering code directly in the Script pane of the Actions panel or by using Script Assist or the Behaviors panel. Before entering a script or choosing a behavior to create a script for you, first select the keyframe or object to which the script belongs.

Frame-based scripts are sets of actions attached to a keyframe. In the final exported movie, when the playhead reaches a keyframe that contains a script, Flash carries out the script’s instructions. More advanced ActionScripters can create frame-based scripts that control all interactivity in the movie, responding not only to frame-based cues but also to object-based events, for example, a user clicking a button.

Object-based scripts are sets of actions attached to buttons, movie clips, or components (compiled clips). Actions attached to buttons usually require input from someone who is viewing the movie. In a text-heavy frame, for example, you can make the movie pause until the user clicks a button that instructs Flash to resume playback. Actions attached to movie clips and components can also respond to user input.

More advanced scripters can use ActionScript to trigger movie-clip actions without user intervention—for example, to make all sounds stop playing when a movie clip first appears. In addition, advanced ActionScripters can create scripts that target text fields, performing operations that modify them or retrieve information from them. Text fields on their own, however, can’t have attached scripts.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint