I got two AS3 functions. One that toggles fullscreen and one that is called with javascript with ExternalInterface that only logs "Hello World".
Both works well in the browser, but if I try to call the fullscreen function with javascript the same way, i get an error like this:
Error calling method on NPObject!
I googled that problem but that only had something to do with same domain access, and sinced it worked with the other function, it has to be something else.
What am I doing wrong?
The fullscreen mode can only be set by user input. So I'm affraid calling it from javascript is not allowed.
Full-screen mode is initiated in response to a mouse click or key press by the user; the movie cannot change Stage.displayState without user input. Flash runtimes restrict keyboard input in full-screen mode. Acceptable keys include keyboard shortcuts that terminate full-screen mode and non-printing keys such as arrows, space, Shift, and Tab keys. Keyboard shortcuts that terminate full-screen mode are: Escape (Windows, Linux, and Mac), Control+W (Windows), Command+W (Mac), and Alt+F4.