سؤال

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?

هل كانت مفيدة؟

المحلول

Nevermind, the HTML needs <param name="allowFullScreenInteractive" value="true" /> instead to make it work with full keyboard input.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top