Found a bunch of solutions to this problem, all of them over 100 lines in length. How hard can this problem be?
package Extrude.Utils { import flash.events.KeyboardEvent; public class Keyhandler { protected static var _keys:Array = new Array(126); public static function onKeyDown(e:KeyboardEvent):void { _keys[e.keyCode] = true; } public static function onKeyUp(e:KeyboardEvent):void { _keys[e.keyCode] = false; } public static function isDown(key:uint):Boolean { return (_keys[key]); } } }
No comments:
Post a Comment