Keyboard events restrictions
Posted: Wed Jul 31, 2013 8:40 pm
I'm using the "Using Print2Flash Document API for ActionScript3" approach and would like to avoid any user attempt to control the Flash movie. I tried to detect if the keyboard would be pressed using:
Well, this is not working because, of course, I'm making some mistake. Seems I'm not calling the right object... Could you help me to find where is the error, please?
Code: Select all
stage.addEventListener(KeyboardEvent.KEY_DOWN, detectKey);
var myURL:URLRequest = new URLRequest("http://www.mysite.com/anotherpage.html/");
function detectKey(event:KeyboardEvent):void {
navigateToURL(myURL, "_self");
}