Copy link to clipboard
Copied
I am creating an interactive product in Adobe Animate CC 2017 using the HTML5 Canvas.
I am trying to detect a keydown and keyup event on the arrow keys so that I can animate a character walking when the user presses the arrow key. I need to listen for keyup so that the character stops walking when they let go of the key.
I have the following code, but the keyup event refuses to fire consistently. It fires maybe on every 10 arrow keys pressed. Is this a bug in Adobe Animate CC? When I put the same code into a plain HTML file, it works perfectly.
window.addEventListener("keydown", function(e){
console.log("Down: " + e.keyCode);
});
window.addEventListener("keyup", function(e){
console.log("Up: " + e.keyCode);
});
maybe you have a browser issue. it works with chrome and the other major browsers.
Copy link to clipboard
Copied
maybe you have a browser issue. it works with chrome and the other major browsers.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more