stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeys)
function checkKeys(event:KeyboardEvent):void {
if(event.keyCode == 48) {
zero_mc.gotoAndPlay(2);
}
}
zero_btn.addEventListener(MouseEvent.CLICK, launchZero);
function launchZero(event:MouseEvent):void {
zero_mc.gotoAndPlay(2);
}
When I press the ‘0’ key it makes the movie play. When I click the actual button it also makes the movie play. But how do I make it so that when I type ‘0’ the overstate of the button becomes activated? In this way keyboard detection and mouse_down would work together.
Thanks for any help.