mon but est d'avoir plusieurs objets (animés) chargés dans ma scène comme un MovieClip trought un tableau.Tableaux comme "movieclip" actionscript 3.0
Mon code actuel:
var vijand:Array;
vijand = new Array ;
vijand.push(new Vijand(-580,-200));
vijand.push(new Vijand(-500,-200));
vijand.push(new Vijand(-420,-200));
for (var n:int = 0; n < vijand.length; n++)
{
this.addChild(vijand[n]);
}
//not working part. They do load on my stage. But I cant control the animation within the file(its a .SWF file I load)
for (var n:int = 0; n < vijand; n++){
gotoAndStop(1)
}
Donc, fondamentalement, ma question est de savoir comment puis-je obtenir tous ces faire l'animation avec "gotoAndStop (1)" et ou "gotoAndStop (2)", ainsi de suite et ainsi de suite .
EDIT: le fichier externe pour le charger, dans le Code
public function Vijand(positieX:int, positieY:int)
{
vijand = new Loader();
vijand.load(new URLRequest("resources/vijand.swf"))
this.addChild(vijand);
vijand.x = positieX;
vijand.y = positieY;
}
Le problème est que le .swf chargé n'est pas un MovieClip et donc je ne peux pas contrôler. – PlayerX
S'il vous plaît jeter un oeil à la réponse mise à jour ... – strah
Merci. Ça marche! – PlayerX