00:00
00:00
ACFan120onNewgrounds
I do a lot of art about my OCs, but I also post commissions a lot too. All characters are +18, I don't care if you think otherwise.

Age 31, Male

Artist / Animator

Joined on 1/30/09

Level:
10
Exp Points:
1,076 / 1,110
Exp Rank:
63,480
Vote Power:
5.25 votes
Rank:
Civilian
Global Rank:
> 100,000
Blams:
4
Saves:
36
B/P Bonus:
0%
Whistle:
Normal
Trophies:
3
Medals:
272
Gear:
1

Need a Programmer's Help

Posted by ACFan120onNewgrounds - July 19th, 2011


*Working with AS2*

I'm working on a game where the main game control is pushing any key on the keyboard. I have coding for moving the character when any key is held down, but what I want is for the character to move when the key is pushed, so you have to continue to push keys for the character to move. This is the code I have for just holding the key down (which I got from another site):

onClipEvent(enterframe){
keyListener = new Object();
keyListener.onKeyDown = function() {
x = Key.getAscii();
_x++
};
Key.addListener(keyListener);
}

At the moment, this is all I need, though I'll need help later...


Comments

Comments ain't a thing here.