ActionScript Basics – Structure

Published by Leave your thoughts

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.
-Ashton Sanders

Tags: , , , ,

Categorised in: Flash ActionScript

This post was written by Ashton