ForumsProgramming ForumAS3 Understanding

2 2248
4 posts

What's up Armor Games. I see some people are having major problems on programming, and have seen my last post about links and stuff. Well, the question that they ask is, How do I program with AS3 myself?. This post focuses on that, so let me just go straight into topic.

Requirements :
- Adobe Flash CC or below

What is AS3?

Well, AS3 is a format based on making interactive files and games, such as the ones that people produce on Armor Games. There is also HTML 5 related to AS3, but not alot of people use it, since they find AS3. Most people have heard of it, which makes it better for all of us.

What are the fundamentals?

The three main fundamentals would be :
- Variables
- Functions
- Events

Variables consists of naming custom codes and names for functions and events. They can be public, private, constant, etc. There would be alot of them to offer. You can name a variable practically anything!

Functions are just like events. They control the code and they make use for buttons, preloaders, etc. You can also use functions for your own guns, weapons, or anything you'd like. It is all based on the code.

Events are for frames, keyboard buttons, mouse clicks, etc. Frames are for making custom frames without wasting your time animating a bunch of frames and calculating them all. Keyboard buttons are for making directional buttons functional. EX :

var testVar:Boolean = false;

stage.addEventListener(KeyboardEvent.KEY_DOWN, testVar);
function testVar(event:KeyboardEvent):void {
if(event.keyCode == 37) {
testVar = true;

Now, that all means if the left key is pushed down, an action is called. If you want to make all those actions possible, you need to create a Movie Clip. To create one, just draw anything you need to. Then, right click the drawing and click "Convert to symbol". Name it anything you'd like. There! Now you have finished creating your movie clip! To add it to your code, create a new layer called "actions". It HAS to be actions. On the right side of the screen, there is a page called "Properties". Below it, it will say . Name it the same as your movie clip. Then, if you don't have a section that says actions in the layers part, just click "Window" and click actions. That's where you begin all your code. Now that I have gave you a sample of it's time to get down to the business. But, sadly, I cannot teach that. But, I can give you a link, and some tips.


1. Always start with simple projects. When you begin learning the coding language, do not start big projects. That is a real set back for you, so you don't learn the best codes.

2. NEVER copy and paste tutorial codes. If you type it manually, you can get used to it in your mind and you will know what to type. I copied and pasted once, and the time I wanted to do it all by myself, I was stuck like a worm in the dirt. It really wasn't fun, so I advice you to do it manually.

3. Always grab a friend to learn with you. Once you know all you need to and start big projects, never work alone. You can even teach your friends so it would be easier for you to make codes for games.


Have fun and stay coding my fellow friends.

  • 2 Replies
1,305 posts

personally I don't like using the actions panel. I prefer using classes.

THIS TUTORIAL written by Michael James Williams is really good.

4 posts

Thanks wierdlike!

Showing 1-2 of 2