Learning about ActionScript 2.0

ActionScript 2.0 is an object-oriented scripting language. Object-oriented languages are designed to make the lives of scripters and programmers as easy as possible by taking certain types of functionality and organizing them into these things called classes, which then serve as templates more or less for items that need to use all that functionality. When you want to use a class, you make an instance of it, which is also referred to as an object. The object inherits all the instructions in the class, so it more or less knows what it is and what it can do out of the box. Objects have methods, which are things that objects do, properties, which more or less define the object, and events that they can either broadcast or respond to. More on that stuff a little later. Right now, we just need to know that this is part of how ActionScript 2.0 works.

ActionScript 2.0 is case-sensitive, which means that when you create things like variables, functions, and instance names with uppercase and lowercase letters, all your references to those items have to match exactly for them to be recognized. What's more, the methods, properties, and events used by ActionScript objects have to match exactly, too. The method getURL() is not the same thing as getUrl(). If you don't capitalize the R and the L, Flash will have no earthly clue what you're talking about and what it is you are trying to accomplish. It is case-sensitive.

Lastly, ActionScript 2.0 is extensible. What that means in human language is that you can make it do things that it doesn't do out of the box. Flash 8 Basic comes with only so many classes and capabilities. Fancy-pants functionality such as complex employee data management needs to be created by some very brainy developer who understands these things. The developer can create his or her own classes, objects, methods, and events to handle data in Flash in whichever way that individual wants to handle it. This isn't to say that you can make ActionScript 2.0 do everything, but you sure as heck can come close. Not only that, but he or she can turn their ActionScripts into behaviors, components, or menu commands that can be installed with Extension Manager (see Appendix A for more on the Extension Manager).


The creation of classes, methods, properties, and custom objects is beyond the scope of this book, although we do cover the concepts here. Please see Macromedia Flash 8 ActionScript: Training from the Source, ISBN 0-321-33619-4 to learn how to make your own classes, methods, and properties.

Macromedia Flash 8. Training from the Source
Macromedia Flash 8: Training from the Source
ISBN: 0321336291
EAN: 2147483647
Year: 2004
Pages: 230
Authors: James English

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net