フラッシュでフルスクリーン モードのときに透明な背景を取得する方法はありますか? 私は次のことを試しました:
<!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>
幅 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>