-Edit-
This is going to be a whole lot more complicated than a simple "the syntax in AS3 replaces x with y", so I'm going to have to find more in depth help than a single post can do. Thanks though.
Hey guys,
I entertain myself from time to time by making simple video games in languages I used to know better like Visual Basic and Java. Recently, I thought it would be clever to get Flash CS4 and make games there so if any turned out nicely I could publish them to one of the millions of sites out there.
Problem is, at some point things changed from Actionscript 2 to Actionscript 3. And though there are many nice tutorials for how to get started with AS2, I'm having difficulty finding them for AS3. This is pretty frustrating because as soon as I get the basic grasp of how to put a project together I'll be able to do much more complicated things.
So could you guys redirect me to some nice AS3 flash game tutorials, or explain how this process works?
Let's say I want something very basic. I want to have a ball that just moves across the screen to the right.
In AS2, I would make a shape on the Stage, convert it to a MovieClip, then make a new Actionfile with the same name as the MovieClip is and have something like this in it:
class BallBall extends MovieClip
{
var velocity;
function onLoad()
{
velocity = 10;
}
function onEnterFrame()
{
_x = _x + velocity;
}
}
Apparently, things aren't like this in Actionscript 3... and the more I delve into it, the more it looks like things are quite different.
So can someone get me going in the right direction? What do I need to do for this very elementary project to work and have the shape move to the right?
Posts
Check "Export for Actionscript" and set the Base Class to the name of class you made...
as long as the FLA and the AS file are in the same folder, no further work is required.