Tuesday, January 12, 2010

AS 3.0 Key Controller

A while ago I had posted a Key Controller for AS 3.0 on the newgrounds BBS. So for all of you who are having trouble with key events and managing key presses in AS 3.0, here is the source and example .

You can use the controller like this (also check the example flash develop project that comes with the source code):
import source.ui.keys.KeyAction;
import source.ui.keys.KeyManager;

// init keymanager

// bind some keys to the predefined gameactions
KeyManager.bind("UP", "w");
KeyManager.bind("UP", "UP_ARROW");

// in your enterframe / game loop
if (KeyAction.UP) {
Cheers and stay tuned!


At 10:54 PM, Anonymous Anonymous said...


Also visit my blog - バーバリー バッグ


Post a Comment

<< Home