Keydown event listener not working in Animate 2021
Hi all,
I have many programs that were working with keydown event listeners, but none of them work now in Adobe Animate 2021. Some are fully working games. Below is an example of the code used. This is a simple left key press to play a walk animation.
I tried to attach two different an Animate .fla file to this post but received an error message saying that the content type didn't match the file extension. Both open in Animate though.
import flash.events.KeyboardEvent;
stage.addEventListener(KeyboardEvent.KEY_DOWN, onkeydown);
function onkeydown(e:KeyboardEvent){
if(e.keyCode == 37){
ninjacat.gotoAndPlay("walk");
}
}
