i’m using AS like
onClipEvent (enterFrame) {
if (key.isdown(key.LEFT)) {
_x-= speed;
}
to move an object left, what would LEFT be replaced with, to make the letter ‘a’ move the object left?
i’m using AS like
onClipEvent (enterFrame) {
if (key.isdown(key.LEFT)) {
_x-= speed;
}
to move an object left, what would LEFT be replaced with, to make the letter ‘a’ move the object left?
(“A”).charCodeAt(0)
onClipEvent (enterFrame) {
if (key.isdown(key.(“A”)charCodeAt(0)) {
_x-= speed;
}
not right?
no key.
Another way is like this:
if(Key.isDown(Key.getCode("a")){
...
}
thanks guys
:: Copyright KIRUPA 2024 //--