加载 Flash 内容时 Flex Air HTMLLoader 空白弹出窗口 [英] Flex Air HTMLLoader blank pop up window when flash content is loaded

查看:20
本文介绍了加载 Flash 内容时 Flex Air HTMLLoader 空白弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 HTMLLoader 加载外部内容的 flex Air 程序.现在出于某种原因,每当我加载一个包含任何 Flash 内容的页面时,都会在我的程序之外弹出一个空白的系统窗口.它是完全空白的,全是白色的,带有最小、最大和关闭按钮.如果我关闭它,我加载的任何 Flash 内容都会停止工作.在我的一生中,我无法弄清楚发生了什么,控制台中没有消息,窗口也没有标题.

I have a flex Air program that loads external content with the HTMLLoader. Now for some reason whenever I load a page that has any flash content a blank system window pops up outside of my program. It's completely blank, all white with min, max and close buttons. If I close it any flash content I loaded stops working. For the life of my I can't figure out what's happening and there's no messages in the console and no title for the window.

有人有什么想法吗?我很感激你能提供的任何帮助.这是我正在使用的代码:

Does anyone have any ideas? I appreciate any help you can give. Here's the code I'm using:

private var webPage:HTMLLoader;


private function registerEvents():void
{
    this.addEventListener(gameLoadEvent.GAME_LOAD, gameLoad);
    //webPage = new HTMLLoader();

}

//function called back from Game Command to load correct game
private function gameLoad(event:Event):void
{
    var gameEvent:gameLoadEvent = event as gameLoadEvent;
    loadgame(gameEvent.url, gameEvent.variables);

}


private function loadgame(url:String, variableString:String):void
{
    DesktopModelLocator.getInstance().scaleX = 1;
    DesktopModelLocator.getInstance().scaleY = 1;

    //var url:String = "http://pro-us.sbt-corp.com/aspx/member/LaunchGame.aspx";
    var request:URLRequest = new URLRequest(url);
    //var variables:URLVariables = new URLVariables("gameNum=17&as=as1&t=demo&package=a&btnQuit=0");

  if(variableString != null && variableString != ""){
    var variables:URLVariables = new URLVariables(variableString);
    variables.exampleSessionId = new Date().getTime();
    variables.exampleUserLabel = "guest";
    request.data = variables;
  }

    webPage = HTMLLoader.createRootWindow(true, null, true, null);
    webPage.height = systemManager.stage.nativeWindow.height - 66;
    webPage.width = systemManager.stage.nativeWindow.width;
    webPage.load(request);
    webPage.navigateInSystemBrowser = false;

    flexBrowser.addChild(webPage);      
}

]]>
</mx:Script>


<mx:HTML id="flexBrowser" width="1366" height="658" backgroundAlpha="0.45" creationComplete="registerEvents();" x="0" y="0">
</mx:HTML>  

推荐答案

此问题已在 AIR 1.5.2 中修复:

This problem has been fixed in AIR 1.5.2:

在 AIR 1.5.2 之前,无法显示嵌入在透明窗口中的 HTML 容器中的 SWF 内容.使用 AIR 1.5.2,可以使用某些 wmode 设置显示 SWF 内容.

Before AIR 1.5.2, SWF content embedded in and HTML container in a transparent window could not be displayed. With AIR 1.5.2, SWF content can be displayed with certain wmode settings.

这篇关于加载 Flash 内容时 Flex Air HTMLLoader 空白弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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