回転ネスト2
/**
* Copyright awef ( http://wonderfl.net/user/awef )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/1JEq
*/
// forked from awef's flash on 2009-3-21
package
{
import flash.display.Sprite;
[SWF(backgroundColor="0x000000")]
public class main extends Sprite
{
public function main()
{
addChild(new ball(stage.stageWidth / 2, stage.stageHeight / 2, 100));
}
}
}
import flash.display.Sprite;
import caurina.transitions.Tweener;
class ball extends Sprite
{
function ball(arg_x:int, arg_y:int, r:uint)
{
x = arg_x;
y = arg_y;
graphics.beginFill(0);
graphics.drawCircle(0, 0, r);
graphics.endFill();
graphics.beginFill(0xFFFFFF);
graphics.drawCircle(0, r / 10 * 1, r /10 * 9);
graphics.endFill();
run();
if(r >= 20)
{
addChild(new ball(0, 0, r * 0.9))
}
}
public function run():void
{
rotationZ = 0;
Tweener.addTween(this, {rotationZ : 360, time : 3, transition : "linear", onComplete : run});
}
}