UNE_UNE
/**
* Copyright gaina ( http://wonderfl.net/user/gaina )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/aDxn
*/
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;
[SWF(width=465,height=465)]
public class Main extends Sprite
{
private var haba:int = 10;
private var takasa:int = 10
private var rot:Number = 0;
private var kyori:Number = 5;
public function Main():void
{
init();
}
private function init(e:Event = null):void
{
for (var i:int = 0; i < stage.stageWidth / takasa; i++)
{
for (var j:int = 0; j < stage.stageHeight / haba; j++)
{
var pt:Point = new Point(haba * j, takasa * i);
var sp:Sprite = new Sprite;
sp.graphics.beginFill(0);
sp.graphics.drawCircle(pt.x, pt.y, 1);
sp.graphics.endFill();
addChild(sp);
sp.addEventListener(Event.ENTER_FRAME, roundaroun);
}
}
}
private function roundaroun(e:Event):void
{
rot += 2 % 360;
e.target.z += kyori * Math.cos(rot * Math.PI / 180);
e.target.x += kyori * Math.sin(rot + Math.PI / 180);
}
}
}