Useful Class for AS 3.0
April 30th, 2007 by awesty
Here is an awesome class someone at Kirupa has written that allows you to use Key.isDown in AS 3, since in AS 3 you can only check what the keys code.
http://www.kirupa.com/forum/sh…8269
Example of use:
import com.classes.Key;
Key.initialize(stage);
function test(event:Event){
if (Key.isDown(Keyboard.SPACE)) {
trace("Ch-Ch-Check-Ch-Check-Ch-Check it out");
}
}
stage.addEventListener(Event.ENTER_FRAME,test);
Key.initialize(stage);
function test(event:Event){
if (Key.isDown(Keyboard.SPACE)) {
trace("Ch-Ch-Check-Ch-Check-Ch-Check it out");
}
}
stage.addEventListener(Event.ENTER_FRAME,test);
Filed under Flash Resources, Flash Tips















123c480fadf3…
123c480fadf3db92c643…