how to make flash object fullscreen in HTML?

一个人想着一个人 提交于 2019-12-24 00:36:01

问题


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


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/8159351/how-to-make-flash-object-fullscreen-in-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!