MadWilson
05-27-2003, 07:29 PM
I am trying to get my key presses to work right for game I am making.
The up arrow moves forward and the M key fires. What I would like to do is make it possible to use the Up arrow and M key at the same time so I can move and fire. But it seams to make me move faster. Ideas welcome.
Thanks
madwilson
her is the code
if (Key.isDown(Key.UP)) {
_root.Person.gotoAndPlay("Walking") ;
if (_root.StopX){
this._x = 5;
}
if (_root.StopY){
this._y = 5;
}
}else{
_root.Person.gotoAndStop("stand_still") ;
}
if (Key.isDown(Key.UP) && Key.isDown(77)) {
_root.Person.gotoAndStop("puntch") ;
if (_root.StopX){
this._x = 5 ;
}
if (_root.StopY){
this._y = 5 ;
}
}
The up arrow moves forward and the M key fires. What I would like to do is make it possible to use the Up arrow and M key at the same time so I can move and fire. But it seams to make me move faster. Ideas welcome.
Thanks
madwilson
her is the code
if (Key.isDown(Key.UP)) {
_root.Person.gotoAndPlay("Walking") ;
if (_root.StopX){
this._x = 5;
}
if (_root.StopY){
this._y = 5;
}
}else{
_root.Person.gotoAndStop("stand_still") ;
}
if (Key.isDown(Key.UP) && Key.isDown(77)) {
_root.Person.gotoAndStop("puntch") ;
if (_root.StopX){
this._x = 5 ;
}
if (_root.StopY){
this._y = 5 ;
}
}