Skip navigation

So, action script 2.0, we meet again!

Turns out you can’t use getAscii properly with unreal, so it’s getKeyCode() instead, which isnt so bad, except for the fact it expects a manual check for every keypress otherwise epic spam!

var One:Object = new Object();
var OneUsed:Boolean = false;
//get ASCII Doesnt Work under Unreal
//KeyPress1
One.onKeyDown = function () {
if (Key.getCode() == 49 && OneUsed == false) { 
ExternalInterface.call( "Spell1" ); 
trace("Keypress#1!");
OneUsed=True; //bool check
MC_SP1.gotoAndPlay(2);
}
}
Key.addListener(One);
One.onKeyUp = function () {
OneUsed=false; //bool check
}

Oh well, it works now, still, you’d think there’d be a better way than manual bool checks per button otherwise spam!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: