I've duplicate a series of MC, but the thing is i can't traced the position of the MC. Every position of x,y,z is 0
And I can't seems to assign a buttonMode to it. It will somehow assign the buttonMode to teverything on stage rather than a specific 1.
Code:
private function xmlLoaded(event:Event):void {
xml=XML(event.target.data);
xmlList=xml.children();
var picList:XMLList=xml.pic;//list for pic
for (var i:Number=0; i < picList.length(); i++) {
cube=new Cube(materials,40,5,42,10,10,10);
cube.name="cube" + i;// set instance name
trace(cube);
cube.x=Math.random() * 960 - 460;
cube.y=Math.random() * 710 - 330;
cube.z=-40;
cube.rotationZ=Math.random() * 360;
scene.addChild(cube);
}
addEventListener(MouseEvent.CLICK,objectPress);
}