NOTICE: ActionScipt No Longer Supported
These blog posts are for ActionScript, which is a programming language for Adobe Flash Player. Unfortunately, Adobe Flash is no longer supported for web applications, so this information is likely not very useful to most developers. We are keeping it for those who still enjoy ActionScript and for posterity. We named our company after it, after all.
ActionScript Basics – StructureLeave a Reply
My Last Post discussed ActionScript Variables. Now I’m going to do a quick run down about ActionScript Structure.
You will notice that many different programming languages have a similar format. PHP and ActionScript, for example, have a very similar syntax. A lot of functions are written exactly the same for both of them. There is one very unique thing about ActionScript: Symbols can be inside Symbols inside Symbols inside Symbols. (A symbol is either a Graphic, Movie Clip or Button. F8 will turn the selected items into a symbol of your choice.)
This structure is very useful for animating in Flash (and a lot more). You can also store variables within movie clips. Lets say you had a movie clip called “ball”.
//This is programmed onto the first frame of your movie.
x = 3;
ball.x = 4;
That code will store two different variables. Even though the variables have the same name, they are located in different places, so the second variable wouldn’t overwrite the first one.
-Yes, this is very basic.