topical media & game development
animation-ch05-RotationalVelocity.ax
animation-ch05-RotationalVelocity.ax
[swf]
[flash]
flex
package
{
import flash.display.Sprite;
import flash.events.Event;
public class @ax-animation-ch05-RotationalVelocity extends Sprite
{
private var arrow:animation_ch05_Arrow;
private var vr:Number = 5;
public function @ax-animation-ch05-RotationalVelocity()
{
init();
}
private function init():void
{
arrow = new animation_ch05_Arrow();
addChild(arrow);
arrow.x = stage.stageWidth / 2;
arrow.y = stage.stageHeight / 2;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(event:Event):void
{
arrow.rotation += vr;
}
}
}
(C) Æliens
04/09/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.