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

Some History

The terms script and behavior have historical connotations that have disappeared (thankfully) with Director 8. To the Lingo programmer, scripts and behaviors are identical: both are a series of instructions written in Lingo. Prior to Director 8, there was a distinction among custom scripts, scripts attached to cast members (versus behaviors attached to sprites or in the behavior channel), behaviors created using the Behavior Inspector, and behaviors supplied through the Library Palette. Now every set of instructions using Lingo is considered a behavior—and also a script. In keeping with this new terminology, you should be prepared to consider every set of Lingo instructions both a script and a behavior. For the remainder of this book, the two terms will be used interchangeably. You may, however, find some documentation still treating scripts and behaviors in slightly different ways.

Note

Sticklers for details may claim that there really is a difference between scripts and behaviors—that all behaviors are scripts, but not all scripts are behaviors. To their way of thinking, a behavior must be written according to the rules of object-oriented programming (OOP) and be a reusable, customizable object with parameters that can be set independently for each instance of the object. There is nothing wrong with this distinction. It would be useful, in fact, if it were universally applied. Since the distinction is so blurred, however, both by documentation and Director's interface, you should suspend any objections and treat scripts and behaviors the same—at least until you use OOP and can decide for yourself.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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