код АС3 работает, а haXe нет(не вращается box) ((((
в чем грабли?
не флешере не ответили :(
АС3 - работает, крутится, все гуд:
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
{
private var box:MovieClip;
private function draw():void {
with (box.graphics) {
beginFill(0xffff00);
lineStyle(3, 0x000000, 1);
drawRect( -100, -100, 200, 200);
endFill();
}
}
private function RotateBox(e:Event):void {
box.rotationX++;
box.rotationY++;
box.rotationZ++;
}
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
box = new MovieClip();
draw();