开发者

Can I have transparent background in fullscreen flash?

开发者 https://www.devze.com 2023-03-09 05:47 出处:网络
Is there a way to get transparent background when in fullscreen mode in flash? I tried the following:

Is there a way to get transparent background when in fullscreen mode in 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 flashV开发者_运维技巧ars = {};
    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:

<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

From the AS3 docs (link)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消