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
KeyManager.init(stage);

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

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

1 Comments:

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

モンクレールとバーバリークローゼットを見つけることはそれほど難しくありませんあなたは簡単に任意の店でまたはインターネット経由でそれらの服を見つけることができます

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

 

Post a Comment

<< Home