[英]Can I have transparent background in fullscreen flash?
Is there a way to get transparent background when in fullscreen mode in flash?在 flash 中处于全屏模式时,有没有办法获得透明背景? I tried the following:
我尝试了以下方法:
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
body{background:#666;}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
<script type="text/javascript">
var flashVars = {};
var params = {
allowFullScreen: "true",
wmode: "transparent",
allowScriptAccess: "sameDomain"
};
swfobject.embedSWF( "fullscreen.swf", "swf", "400", "200", "10.0.0", "fullscreen.swf", flashVars, params );
</script>
</head>
<body>
<h1>Fullscreen Test</h1>
<div id="swf">
</div>
</body>
</html>
The fullscreen.swf I compiled width Flex 4.5:我编译宽度 Flex 4.5 的 fullscreen.swf:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" backgroundAlpha="0" >
<mx:Script>
<![CDATA[
public function toggleFullScreen():void {
if (this.stage.displayState == StageDisplayState.NORMAL) {
this.stage.displayState = StageDisplayState.FULL_SCREEN;
}
else {
this.stage.displayState = StageDisplayState.NORMAL;
}
}
]]>
</mx:Script>
<mx:Button label="Fullscreen" click="this.toggleFullScreen();"/>
</mx:Application>
I'm pretty sure that is not possible..我很确定这是不可能的..
EDIT: It isn't possible..编辑:这是不可能的..
EDIT2: Added a link EDIT2:添加了一个链接
From the AS3 docs ( link )来自 AS3 文档( 链接)
Note: If you set the Window Mode (wmode in the HTML) to Opaque Windowless (opaque) or Transparent Windowless (transparent), the full-screen window is always opaque注意:如果将Window Mode(HTML中的wmode)设置为Opaque Windowless(不透明)或Transparent Windowless(透明),则全屏window总是不透明的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.