- Flash actionscript 3.0 tutorial how to#
- Flash actionscript 3.0 tutorial code#
- Flash actionscript 3.0 tutorial plus#
You can always change this later, so don’t fret too much over it. I’ve stuck with the grey, but gone for the oldschool-TV-ratio dimensions of 400 by 300 pixels. Frozen Haddock gave his a size of 300 by 300 pixels, and a grey background. Click *Modify > Document* and set it up however you like. Next we’ll alter the properties of the game itself.
Flash actionscript 3.0 tutorial code#
This tells Flash that we are going to store the code that we write in the *Classes* folder we made earlier, so it should check in there if it can’t find any code that it needs.Īlso, tick the box marked, “Automatically declare stage instances”, if it’s not already ticked.
Flash actionscript 3.0 tutorial plus#
Click the *Flash* tab, if it’s not already selected, then click the *Settings* button next to the *ActionScript Version* drop-down list:Ĭlick the little plus icon above the *Classpaths* box, and type *./Classes/* in the textbox that appears. There are some default settings we need to alter before we can start on the game proper. Finally, enter a name for your FLA file (I used *AvoiderGame-MJW.fla*) and save it - in the main folder, not the *Classes* folder.
Create a new folder, inside this folder, called *Classes*. For reference, I’m calling mine *AvoiderGame-MJW*. I recommend using your name or initials in the folder’s name as this will make it easier to share with other people later.
Boot up your copy of Adobe Flash CS3 (or later, if you’re reading this from the future) and select *File > New > Flash File (ActionScript 3.0)*.Ĭlick *File > Save* and create a new folder somewhere where you can store all the game’s files. To see just how basic, check it out by clicking the image below:Īnd by the end of this 12-part tutorial, it’ll look like this, with keyboard controls, multiple levels, sounds, and more: In this part of the tutorial, we’ll just be setting everything up and putting in some very basic game mechanics.
We’ll also be using classes and events and OOP and all sorts of nice programmer things. We’ll cross that bridge when we come to it. These rules might have to be bent a little when it comes to adding a preloader. (If you’ve never used Flash to create a game before, the above will probably mean nothing to you. I’ll be redesigning the code to follow good AS3 practices, which means: Thanks, Frozen Haddock! This is not a direct port of his tutorial, however. I will be pointing out some of the major differences between AS2 and AS3 for the benefit of those Flash developers making the switch, but I’m not going to focus on these changes.įrozen Haddock has been kind enough to let me rewrite his ActionScript 2 Avoiding Game Tutorial in ActionScript 3. You’ll find it easier if you already know the basics of some programming language, like variables, if statements, loops, and functions, but don’t worry if that’s not the case. Conversely, a lot of programmers of other languages find ActionScript 3 quite intuitive, but hate ActionScript 2! This tutorial does not require you to know AS2, or even have used Flash before.
Flash actionscript 3.0 tutorial how to#
It still works, but if you want a more up-to-date guide to learning Flash, I recommend reading my post How to Learn Flash and AS3 for Game Development.Ī lot of Flash developers find the jump from ActionScript 2 to ActionScript 3 very daunting. This tutorial’s getting a little old now. I’ve also started re-writing it for HTML5.)*
*(This tutorial is also available in Spanish, Polish, Italian, French, Turkish, and Russian.