AS3 Boot Camp – Learn to program Flash games in 30 days

“The best education in film is to make one.”
– Stanley Kubrick

On Dec 1st, 2009, I hadn’t written a line of code since high school, way back in 1992. High School computer programming was done in BASIC and was taught by the drama instructor. It wasn’t exactly a solid programming foundation.

I knew that 2010 was the year I would go full time with Ninja Robot Dinosaur, making Flash games on my own. But without the ability to program, there wasn’t a lot I could do.

I needed to learn how to program Flash games – and fast.

Not only did I need to learn how to make them, I wanted to learn the right way. No mad hacks weak-sauce AS2 code that runs through some miracle of weirdness – I wanted to learn to write proper OOP code.

Dec 2009 was not going to be an easy month. I was in the middle of moving from the east coast of Canada to the west coast (Canada is really big), I was also working over-time, finaling Gundead Defense for iPhone and getting a milestone ready for a Wii game I was working on at Longtail Studios. For most people, relocating a family while crunching at work would be enough – but I thought ‘What the hell, I’m going to learn to program ActionScript 3 too.’

I set a sizable goal for myself – complete one AS3 Flash tutorial a day for 30 days.

I knew it wasn’t going to be easy.

This isn’t called ‘Boot Camp’ for nothing. It isn’t easy. Expect to spend 2-5 hours per tutorial (depending on the scale of the tutorial, your own experience and debugging ability).

Learning to program is like learning to speak a new language. There will be late nights, very late nights and a few early mornings.

    Step 1: Get your Software.


Download Flash and Flash Builder. Both have free trials and many tutorials are written so that you need one or the other.

If you are on a PC, you can get FlashDevelop for free. FlashDevelop is a suitable replacement for Flash Builder and many developers prefer it over Flash Builder.

    Step 2: Beginner Tutorials

The AS3 101 Tutorials by Dru Kepple are a great way to get your feet wet with the fundamentals of programming.

Tutorial Tip: Sometimes, when doing tutorials, there are typos. If you have completed everything and it’s still not working, don’t be afraid to download the demo code and compare it to your code.

Each tutorial covers a fundamental aspect of programming and gives you a project to complete based on the lesson.

AS3 101 – Variables
AS3 101 – Functions
AS3 101 – Branching
AS3 101 – Arrays
AS3 101 – Loops
AS3 101 – The Display List
Optional – AS3 101 – XML

The AS3 101 Tutorials will help you get oriented with coding in Flash and will give you a basic understanding of the building blocks of programming.

Tutorials – 6

Tutorial Tip: Cutting and pasting the code doesn’t teach you anything. It’s best to type in the code yourself. Not only will this force you to read every line of code, it will help you in finding typos – a handy skill to have when it comes to debugging your own original code.

    Step 3. Get your book on.

Even with all of the awesome tutorials available online for free, I still recommend working with a book or two. Online tutorials frequently have typos that can have you bashing your head against the wall (this comes from experience), while most books from reputable tech publishers are thoroughly proof-read and tested. This can save you a lot of agony.

These are the books that I found most helpful:

Get it on Amazon.ca

An easy read and a fantastic starting point for people who have no idea what they are doing when it comes to programming games. It has very little to do with ‘Design’ and really focuses on getting you up and running writing AS3 code and understanding the basics.

Tutorials – 5


Get it on Amazon.ca

A fantastic reference book, handy for looking up information. Not game focused, but very thorough, easy to read and infinitely useful.

If you order these books right away, chances are they’ll be on your doorstep after you’ve finished the AS3 101 tutorials in Step 2.

    Step 4: Beginner Game Tutorials

FlashGameTuts is both a blessing and a curse.

On the plus side, you get to build the basics of some core games – breakout, shooter, platformer and tower defense. On the downside, the code isn’t the cleanest, the comments aren’t the best, there are frequent typo’s and some functions don’t have any tutorial elements.

note: Some links to source files are broken on FlashGameTuts – but the correct links can be found on the creators homepage: http://www.mrsunstudios.com/tutorials/

Flash Game Tuts – Breakout
Flash Game Tuts – Winter Bells
Flash Game Tuts – Rhythm Game
Flash Game Tuts – Vertical Shooter
Flash Game Tuts – Platfomer
Flash Game Tuts – Tower Defence

Tutorials – 6

Doing these tutorials was a huge turning point in learning to program. Not only was I finally making games, the errors in the tutorials forced me to pay more attention to what I was doing and taught me how to debug. Prepare for frustration, but it’s definitely worth the effort.

    Step 5 – Let’s Meet Emanuele

Emanuele Feronato is a wonderful human being and his contributions to the Flash game scene cannot be understated. One day, I will meet him and buy him many beer.

Emanuele’s blog has many year’s worth of tutorials on making Flash games, both AS2 and AS3. He is especially adept at taking a popular game and building a prototype of that game with his own code.

Most of Emanuele’s tutorials are not thoroughly commented, but they give you a great idea of how to tackle tons of different game mechanics in Flash. The tutorials are also great for learning how to read code.

Tutorial Tip: I like to print out tutorials and read them the night before I do them. This helps me wrap my head around the whole tutorial. At the very least, I recommend reading the whole tutorial and making sure you understand the intent of the tutorial before opening Flash and building the game.

We’re going to go through 10 of Emanuele’s Tutorials. Here are the ones I did, but feel free to search the site and see if there are tutorials of games that are more interesting to you. Just make sure to do the AS3 version of the tutorial.

Make a Game Like Cirplosion
Build a Game Like Sproing
Create a Game Like Snowflakes
Chronotron Prototype
How to Use a Flash Tutorial to Make Your Own Game

Emanuel’s site is also a fantastic source for anyone looking at working with Box2D and Flash. (Box 2D is a physics engine for Flash). Here is a great starting point with Box2D:

Box 2D for Absolute Beginners Pt 1
Box 2D for Absolute Beginners Pt 2
Creation of a Flash Artillery Game with Box2D
Box2D Rope
Platform Game Basics Using Box2D

Tutorials – 10

The last group of tutorials focuses on the excellent set of game libraries from Adam Atomic called Flixel.

As I said in Flash Tactic’s post, I’m a big believer in using libraries like Flixel or Box2D to get your game up and running quickly.

Flixel for Absolute Beginners
Seifer Tim’s Flixel Tutorial
Multiple Rooms in Flixel

note: Flixel is a frequently updated library – and as such, the tutorials run the risk of being outdated. In this case, either check the Flixel forums for help (the Flixel community is nothing short of awesome) or, go through the excellent Flixel Documentation and see if you can solve the problem on your own.

While the BootCamp method is no replacement for an actual education in computer science, it did take me from a ‘White Belt’, not knowing anything about code to a ‘Yellow Belt’, able to read other people’s code and having a general idea of how to make things happen in a Flash game with code in a month.

It exposed me to multiple methods of programming and syntax so that I could figure out which ones worked best for me.

Best of luck in your Boot Camp. If you find any other additional tutorials are helpful links, please put them below in the comments and if you make it throught the boot camp, it’d be awesome if you could let me know.

Good luck!

3 Replies to “AS3 Boot Camp – Learn to program Flash games in 30 days”

  1. Hey man just wanted to say how much you helped me. this post was totally amazing I was really struggling with finding a good place to start with AS3 and this is it!

    thanks again!

Leave a Reply