Share this Page URL
Help

Chapter 15. Using Basic ActionScripts > Viewing the Actions Panel - Pg. 440

Using Basic ActionScripts 440 The good news is that once you master the language and the syntax, the full power of Flash is available to you. You can create ActionScripts that are triggered (the event), by specific data, or information typed in by a visitor. You can even create ActionScripts that are sensitive to variables such as: date and time. Flash helps you by giving you functions (English-like script) and as your ActionScript skills grow, you can even create and call your own functions. Flash MX 2004 utilizes ActionScript 2.0, which moves the scripting language closer to JavaScript. The power of Flash is fully realized when you write ActionScripts, and incorporate them in your Flash documents. Using Object-Oriented Programming Objects are the key to understanding object-oriented programming. In object-oriented programming, an object is just as real as an object in this world. For example, your dog, or even your computer are objects that exist in the real world. Real-world objects share two characteristics with objects in the computer world: They have a specific state and behavior. For example, dogs have a state such as their name, color, breed, and if they're hungry. Dog behaviors would be: barking, fetching, and wagging their tails. All objects in the real and computer world have a behavior and a state. Computer objects are modeled after real-world objects in that they also have a specific state and behavior. A software object maintains its state using one or more variables. A variable is an item of data named by an identifier, and a software object performs its behavior with methods. A method is a function associated with an object. Everything a software object understands (its state) and what it can do (its behavior) is expressed by the variables and the methods within that object. A software object that represents a speeding car would have variables that instruct the object as to speed, direction, and color. These variables are known as instance variables because they contain the state for a particular object, and in object-oriented terminology, a particular object is called an instance. In addition to its variables, the car would have methods assigned to change speed, and turn on the lights. These methods are formally known as instance methods because they inspect or change the state of a particular instance. Viewing the Actions Panel The Action panel is where the Flash designer gains control of a Flash document, by allowing you to create and edit actions for an object or frame. To use the Actions panel, first select an object on the stage, or select a frame on the Timeline, then click the Window menu, point to Development Panels, and then click Actions. Scripts can be typed directly into the Actions panel using the Script pane, or augmented by using a list of installed Actions in the Toolbox. · Toolbox.Supplies a list of all installed actions, organized into a folder.