Skip to content

Instantly share code, notes, and snippets.

@keyle
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save keyle/c7db0f78a3bb7a4a8bfb to your computer and use it in GitHub Desktop.

Select an option

Save keyle/c7db0f78a3bb7a4a8bfb to your computer and use it in GitHub Desktop.
wrong FPS way
// listening to flash stage...
// can't figure out the MouseCollision thing
Main.stage.addEventListener(MouseEvent.MOUSE_MOVE, mousemove, false, 0, true);
// ...
private var tally:Number = 0;
private function mousemove(event:MouseEvent):void
{
tally = (event.movementX) / 8.5;
}
private function update(event:Event):void
{
player.rotateY(tally);
tally = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment