Nevermind, the HTML needs <param name="allowFullScreenInteractive" value="true" />
instead to make it work with full keyboard input.
AS3: Fullscreen button when SWF is embedded in HTML
-
12-10-2022 - |
سؤال
This is the callback function for my fullscreen button. It works if you play the SWF in a standalone player, but it doesn't do anything if it's embedded in an HTML.
var isFS:Boolean;
function toggleFS(evt:MouseEvent):void {
isFS = !isFS;
if (isFS) {
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
} else {
stage.displayState = StageDisplayState.NORMAL;
}
}
In the Flash Pro CS6 publish settings, I have the HTML wrapper Template setting on "Flash Only - Allow Full Screen". The HTML has the following code which should allow the SWF to go fullscreen:
<object ...>
<param name="allowFullScreen" value="true" />
I've tested it in Firefox, Chrome, and IE, and the fullscreen button won't work in any of those. Does anyone know what I'm doing wrong?
المحلول
لا تنتمي إلى StackOverflow