Page 1 of 1

Keyboard events restrictions

Posted: Wed Jul 31, 2013 8:40 pm
by marcrock
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:

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");
}
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?

Re: Keyboard events restrictions

Posted: Thu Aug 01, 2013 4:01 am
by staff
Could you send a full sample that demonstrates what you are trying to accomplish to our support e-mail so that we could check it?

Re: Keyboard events restrictions

Posted: Thu Aug 01, 2013 2:03 pm
by marcrock
OK, thanks. I'm going to send you just now.

Regards.