topical media & game development
lib-flex-animation-code-02-ArriveTest.ax
lib-flex-animation-code-02-ArriveTest.ax
(swf
)
[ flash
]
flex
package
{
import com.foed.SteeredVehicle;
import com.foed.Vector2D;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
public class @ax-lib-flex-animation-code-02-ArriveTest extends Sprite
{
private var _vehicle:SteeredVehicle;
public function @ax-lib-flex-animation-code-02-ArriveTest()
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
_vehicle = new SteeredVehicle();
addChild(_vehicle);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(event:Event):void
{
_vehicle.arrive(new Vector2D(mouseX, mouseY));
_vehicle.update();
}
}
}
(C) Æliens
18/6/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.