Hofmann
05-14-2004, 08:30 AM
Hi, im trying to attach a MC to a OBJECT in an ARRAY ive created like this:
Enemies = new Array(NumEnemies);
For (i=0;i<NumEnemies;i++){
Enemies[i] = new Object;
Enemies[i].obj = ????? <----attach the "ship" MC from the library
The .obj is what i WANT and HOPE to be the MC of the enemy, but im
running into problems with the INSTANCE... I dont care what the instance name is as long as I can referre to the enemy ship image by Enemies[num].obj... Is this even possible or how can I work around it?
Its important to me to keep my setup of arrays and stuff cause of a little flash game...
Enemies = new Array(NumEnemies);
For (i=0;i<NumEnemies;i++){
Enemies[i] = new Object;
Enemies[i].obj = ????? <----attach the "ship" MC from the library
The .obj is what i WANT and HOPE to be the MC of the enemy, but im
running into problems with the INSTANCE... I dont care what the instance name is as long as I can referre to the enemy ship image by Enemies[num].obj... Is this even possible or how can I work around it?
Its important to me to keep my setup of arrays and stuff cause of a little flash game...