Hello everyone,
I’m having issue with the onKeyDown and addListener. When I export my movie, it work perfectly. But when I embed the movie in a web page, I need to click on the Stage to be able to use the Keyboard. :crazy:
Here’s a preview link: http://www.satissdesign.com/onKeyDown/
Try to use the keyboard arrow… it work only if you click on the stage one shot before.
Here the AS2 code:
watchKeyBoard = new Object();
watchKeyBoard.onKeyDown = function() {
if (Key.isDown(Key.LEFT)) {
myText.text = "LEFT";
}
if (Key.isDown(Key.RIGHT)) {
myText.text = "RIGHT";
}
if (Key.isDown(Key.UP)) {
myText.text = "UP";
}
if (Key.isDown(Key.DOWN)) {
myText.text = "DOWN";
}
};
Key.addListener(watchKeyBoard);
Does someone already saw that problem before?
Marc