07/05/16 10:24:10 ntySUtr/
>>331の見て個別に円回転するmcを10個作ろうと思ったがもうだめだ。
どうしていいのかわからなくなってきた。
function moveBall(rot,radius) {
trace(this);
rot = rot + 10;
if (rot > 360) {
rot -= 360;
}
rad = rot * Math.PI / 180;
this.x = Math.cos(rad) * radius;
this.y = Math.sin(rad) * radius;
}
for (var i:Number = 0; i<10; i++) {
this["ballMc"+i] = new ball();
rotInit = 0;
radiusInit = 100;
this["ballMc"+i].x = Math.random()*300;
this["ballMc"+i].y = Math.random()*300;
this["ballMc"+i] = addEventListener(Event.ENTER_FRAME, moveBall(rotInit,radiusInit));
this.addChild(this["ballMc"+i]);
}