如何使Flash对象在HTML中全屏? [英] how to make flash object fullscreen in HTML?

查看:206
本文介绍了如何使Flash对象在HTML中全屏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能让一个flashobject在HTML中全屏显示? (没有Flash源代码)

解决方案

你不能从Flash以外完成这个任务。全屏模式是通过设置stage的fullScreen属性来触发的:

  stage.displayState =fullScreen; 

不能使用全屏播放器。一个选项可能是创建一个包装SWF,加载到您的现有内容,打开到全屏模式,然后通过阅读 flash.system.Capabilities :: screenResolutionX 。就像这样:

  //假设内容SWF已经加载并且在舞台上
function resize():void
{
stage.displayState =fullScreen;
loadedSWF.x = 0;
loadedSWF.y = 0;
loadedSWF.width = flash.system.Capabilities.screenResolutionX;
loadedSWF.width = flash.system.Capabilities.screenResolutionY;



$ b $ p
$ b

这个工作的效果取决于你现有的SWF的scaleMode设置将被加载。


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

解决方案

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.

这篇关于如何使Flash对象在HTML中全屏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆