• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using Behaviors

You've got enough of the basics of scripting down to move on to behaviors. I realize that behaviors are intended to make programming easier for novices, but in my opinion, you'll get a lot more out of them if you understand what they're doing. Behaviors simply insert several lines of ActionScript in one swoop. For scripts that require you to specify parameters, the behavior will prompt you for data. Another interesting feature of behaviors is that even after you've inserted a complete script, you can come back and make edits to it without touching the code. That is, you can use the Behaviors panel as your interface to edit the underlying code.

All this can make a programmer very nervous because she can feel out of control. In any event, I do believe it's important to see what's happening. For that reason, during the following discussion and tasks, be sure to keep open your Actions panel and watch the changes that occur in the Actions panel when you make changes to the Behaviors panel. Let's first take a tour of the Behaviors panel. Open the Behaviors panel (by pressing Shift+F3 or selecting Window, Development Panels, Behaviors) and take a look at Figure 15.11.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint