在浏览器中 Flash 到全屏 [英] Flash in a browser to full screen

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

问题描述

如何在全屏模式下在浏览器中制作我的 Flash 应用程序?我知道可以将舞台置于该模式,但是当我在任何浏览器中运行该应用程序时,这都不起作用.所以,这是可以做到的,但是怎么做?

How can i make my flash applications in a browser in full screen mode? I know that the stage can be put in that mode, but when i run the application in any browser this doesn't work. So, this can be done, but how?

推荐答案

在包含 Flash SWF 的 HTML 中,将以下参数添加到您的 <object>标签:

In the HTML including the Flash SWF, add the following parameter to your <object> tag:

<param name="allowFullScreen" value="true" />

和以下属性到您的 <embed>标签:

and the following attribute to your <embed> tag:

allowFullScreen="true"

或者,如果您使用的是 SWFObject(应该如此),请添加allowFullscreen 参数到您的嵌入代码.请参阅SWFObject 文档,了解实现此目的的各种方法.

Or, if you are using SWFObject (as you should be), add the allowFullscreen parameter to your embed code. See the SWFObject documentation for the various ways to this.

在您的 Flash/Flex 文件中,您需要为用户提供一种启动全屏模式的方法 - 您不能在没有用户启动的情况下强制全屏.无论您让用户做什么,请包含此代码作为对其的响应:

In your Flash/Flex file, you need to provide the user a way to initiate fullscreen mode - you cannot force fullscreen without the user initiating it. Whatever you have the user do, include this code as a response to it:

stage.displayState = StageDisplayState.FULL_SCREEN; //Flash
systemManager.stage.displayState = StageDisplayState.FULL_SCREEN; // Flex

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

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