onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+10;
}
}
I cannot get this to work in KM. I am trying to move an object when the arrow keys are pressed.
Printable View
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+10;
}
}
I cannot get this to work in KM. I am trying to move an object when the arrow keys are pressed.
I would use this indtead;
onClipEvent(keyDown) {
if (Key.getCode() == Key.RIGHT) {
this._x+=5;
}
}
but that's me...
Your script is working in the Flash 5 Player standalone for me. It should work.
I modified it slightly though per my own tastes... this is what I used:
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += 10;
}
}
had the same problem till i clicked on the flash file in the browser. then everything seemed to start to work.
seems the focus doesnt come automatically to the flash on the web page. IS there any way I can get the focus and not have to first click the flash, for key strokes.