Quote Originally Posted by cresquin View Post
This is the situation?
PHP Code:
import Test;
var 
myPlayer = new Test();
var 
yourPlayer createEmptyMovieClip();
attachMovie(yourPlayergetNextHighestDepth());
myPlayer.movePlayer yourPlayer;
//traces 0 
i have this in .as

PHP Code:
class Test{
     public var 
_First:Number;
     public var 
_Playah:MovieClip
     
public function get movePlayer():Void {
          
trace(_Playah._x);
          
trace(_Playah);
     }
     public function 
get bibe():Void {
        
trace("TeST");
     }

and in fla

PHP Code:
var Group:Array = new Array();

//this creates an array of objects (found this on google)
//because there should be more than one "player"
for (var 0i<4i++) {
    var 
carTest:Test = new Test();
    
carTest._First i;
    
Group.push(carTest);
}

Group[0]._Playah "blob"//blob is MC instance name
Group[0].bibe(); // traces TeST
Group[0].movePlayer(); //traces p-undefined in the first line, and in another line blob 
and MC blob is just a small red round circle

and let me explain the game im working on
First of all, i want to make something like a car based game. Nobody could drive these cars and this game would be like a "live preview" of a race.
With class (thats why i created an array of objects) i'll pass the coordinates by which cars should move (coordinates are held in XML file)
Coordinates represent path, and are generated with php.
Also, besides coordinates, another information should be added, such as speed on specific location (for each car), name of map and so on..)

So, is this the right way to create such a game ? Are there any additional things i should pay attantion on ?