// forked from awef's 回転ネスト // でかくした // rotationZじゃなくてrotationをいじるようにした // TweenerからTweenMaxにした package { import flash.display.Sprite; [SWF(frameRate = "60")] public class main extends Sprite { public function main() { addChild(new ball(stage.stageWidth / 2, stage.stageHeight / 2, 400)); } } } import flash.display.Sprite; import gs.TweenMax; import gs.easing.*; class ball extends Sprite { function ball(arg_x:int, arg_y:int, arg_r:uint) { x = arg_x; y = arg_y; graphics.beginFill(0xFFFFFF); graphics.drawCircle(0, 0, arg_r /10 * 8); graphics.endFill(); graphics.beginFill(0); graphics.drawCircle(0, arg_r /10 * 2, arg_r /10 * 8); graphics.endFill(); TweenMax.to(this, Math.random() * 3 + 3, { rotation : 360, loop : 0, ease : Linear.easeNone } ); if(arg_r >= 10) addChild(new ball(0, arg_r /10 * 2, arg_r / 10 * 8)) } } forked from: 回転ネスト