Phosphoer
11-29-2008, 02:27 AM
Hey guys, I'm fairly new to actionscript, I made a few games in Flash CS3 using AS 2.0, but 3.0 seems to be a whole new deal. I'm more familiar with c++ than I am with actionscript.
Anyways, I'm working with Flash Develop, and I have a question about classes. In my practice project, I have a ball class, and the application class. The application class creates some number of balls, and the ball class directs the balls to crowd around the mouse and bounce off the edges of the screen. My question is how would I add collision with other instances of the ball, or even just other objects that I add in later? ( platforms.. etc) Is there some way to refer to other instances of the ball class from within it's own class?
My code structure looks something like this:
Application class
{
Create Balls
}
Ball Class
{
Constructor
Move Ball
Collide with screen edges
}
Thanks in advance :)
Anyways, I'm working with Flash Develop, and I have a question about classes. In my practice project, I have a ball class, and the application class. The application class creates some number of balls, and the ball class directs the balls to crowd around the mouse and bounce off the edges of the screen. My question is how would I add collision with other instances of the ball, or even just other objects that I add in later? ( platforms.. etc) Is there some way to refer to other instances of the ball class from within it's own class?
My code structure looks something like this:
Application class
{
Create Balls
}
Ball Class
{
Constructor
Move Ball
Collide with screen edges
}
Thanks in advance :)