Hi, Im stuck in this actionscript code that ive been working on for 3 days now…
(new to AS 3 by the way)
What im trying to do here is use an external as file and linked it to the normal fla, inside this fla is one MC named movieclip. with the code below im trying to spawn the mc multiple times on the position where the mouse moves and the next mc on the next x/y here is the code:
var spawnx=mouseX;
var spawny=mouseY;
addEventListener(MouseEvent.MOUSE_MOVE, movement);
function movement(event:Event):void {
for (var i:Number=0; i<10; i++) {
var movieclip:MovieClip=new MovieClip();
addChild(movieclip);
movieclip.x = spawnx;
movieclip.y = spawny;
}
}
I know that this code will cause chaos in the fla but im planning on adding a timer later on if i can get this one right…
Anyone know what im doing wrong?
p.s dont know if subject has been done before