すでにLinuxはあまり関係ないから題から外す。
wonderfl build flash online | 面白法人カヤック
import flash.display.Sprite;
import flash.events.Event;
class FlashTest2 extends Sprite {
var sp:Sprite;
var t :Int;
public function new() {
super();
sp = new Sprite();
sp.graphics.beginFill(0xffcc00, 1);
sp.graphics.drawCircle(0, 0, 50);
addChild(sp);
sp.addEventListener(Event.ENTER_FRAME, handler);
}
private function handler(e:Event) {
t = t + 1;
if(t > 62) t = 0;
sp.x = Math.cos(t*0.1)*100 + 200;
sp.y = Math.sin(t*0.1)*100 + 200;
}
public static function main() {
flash.Lib.current.addChild(new FlashTest2());
}
}haxe -swf9 test2.swf -main FlashTest2.hx -swf-header 465:465:30:FFFFFF
円が円を描いてぐるぐる回る。(私が適当にアニメーションさせるときは、まずぐるぐる回る動きをやります。)
uint→Int。