ah… I’m wrong… I don’t have these documents here at work. Well bear with me and I’ll try to explain what I can. Tomarrow I should be able to post more, or perhaps even send you my docs directly.
The first thing that you should know about a/s is that it is based off of the same core language as both Javascript and php. The similarities are limited, but at least you can rest in the knowledge that as you learn a/s it is helping you to learn these other languages. In general, all programing contains similar concepts that are also learned just by doing.
Action script is an OOP. That is to say that everything that you do will either be, reading the properties of, setting the properties of, or otherwise manipulating in some way, an object. Objects are refered to by dot syntax in strings which show the path to that object starting from the “root” of the Flash movie. (I said bear with me… I’ll explain all that in a minute.
)
Objects can be many things, but the three main ones that you will encounter in the beginning are “Movie Clips”, “Buttons”, and “Graphics” graphics are a specific object in Flash, and are not to be confused with the normal word “graphic” which applies to many things on the web. I’m assuming at this point that you’ve create a movie clip before. You should know that it has it’s own timeline which is independent of the main or _root timeline.
The other thing you need to know right off the bat is the three locations where actionscript can be placed. You can place actionscript in a Frame, or you can attach actionscript to a button or Movieclip. When looking at the “actions panel” you will see at the top it says either “Frame actions” or “object actions”. This is a good indicator. Often we think that we have an object selected only to find that the code we just spent all that time working on is placed in a frame instead. Errors will be caused by attempting to add “frame actions” to an object, or “object actions” to a frame.
If we want to do anything with an object, we have to know where that object is located. Because you could have a movie clip that contains movie clips which in turn contain movie clips, the Flash player will not just instantly know where to look for stuff. You must address it properly in your OOP strings. The following is an example of an OOP string.
_root.david.torso.arm.hand.pinky
_root tells the player to begin the oop string at the lowest level of the player. That is, the movie timeline that contains everything else in the movie. Next there is a period. This is a separator, Flash uses periods(other programs may use other symbols as a separator, but most use the period). Next is “david”. We must assume, if this is all we saw of the code, that david is a movie clip that rests on the main timeline. Inside david, the player is directed to look for an object called torso, and in that, arm, and in that, hand, and finally the pinky object. Some may wonder why objects are within each other at all. As you progress you’ll understand more, but the basic reasoning is that any change that you effect to any object, will subsiquently be applied to every object it contains. That is to say, if we look at our example, that the “hand” object is aligned in it’s position based upon the angle of the arm itself. If we move the arm upwards, the hand follows. This adds to animation imensely as we can have any number of objects being carried around by a single object, but also moving independently of the original object.
note: when using object names in an oop, we are talking about an objects “instance” name. All the movie clips, buttons, and graphics you create will have a name in the library, but in order to manipulate an object on stage, that object must have an instance name. When an object is selected, you will see a spot open up on the properties panel, for an instance name.
Perhaps that’s an unnecessary explination, but I think it illustrates the oop string pretty well, so I’ll leave it as is for now. 