omega10mg
08-26-2003, 10:06 AM
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
this.gotoAndPlay(10);
}
if (Key.isDown(Key.LEFT)) {
this.gotoAndPlay(6);
}
if (Key.isDown(Key.RIGHT)) {
this.gotoAndPlay(2);
}
Key.A = 65;
if (Key.isDown(Key.A)) {
this._x -= 5;
}
Key.S = 83;
if (Key.isDown(Key.S)) {
this._x += 5;
}
}
thats my script as it is now. and it works =)
my question is, how can i make only the left, right and up keys work if I am not pressing A or S at the same time. you unedrstand.
You should only be able to do one action at the time. and when u release one key u can press another. how?
if (Key.isDown(Key.UP)) {
this.gotoAndPlay(10);
}
if (Key.isDown(Key.LEFT)) {
this.gotoAndPlay(6);
}
if (Key.isDown(Key.RIGHT)) {
this.gotoAndPlay(2);
}
Key.A = 65;
if (Key.isDown(Key.A)) {
this._x -= 5;
}
Key.S = 83;
if (Key.isDown(Key.S)) {
this._x += 5;
}
}
thats my script as it is now. and it works =)
my question is, how can i make only the left, right and up keys work if I am not pressing A or S at the same time. you unedrstand.
You should only be able to do one action at the time. and when u release one key u can press another. how?