Mat
Mat

Reputation: 4501

how to make flash object fullscreen in HTML?

how can I make a flashobject to display in fullscreen in HTML? (without having the flash source)

Upvotes: 2

Views: 7180

Answers (2)

shanethehat
shanethehat

Reputation: 15580

You can't do this from outside of Flash. Fullscreen mode is triggered by setting the fullScreen property of stage:

stage.displayState = "fullScreen";

Without being able to do this you can't use the fullscreen player. One option for you might be to create a wrapper SWF that loads in your existing content, opens into fullscreen mode, then scales your existing content to the full screen size by reading flash.system.Capabilities::screenResolutionX. Something like this:

//assume content SWF is already loaded and on the stage
function resize():void
{
    stage.displayState = "fullScreen";
    loadedSWF.x = 0;
    loadedSWF.y = 0;
    loadedSWF.width = flash.system.Capabilities.screenResolutionX;
    loadedSWF.width = flash.system.Capabilities.screenResolutionY;
}

How well this works will depend on the existing scaleMode setting of the SWF that you will be loading in.

Upvotes: 4

David
David

Reputation: 11

Make the width and height of the embedded code 100%.

Upvotes: 1

Related Questions