0 Replies Latest reply on Jun 25, 2009 6:58 AM by esteimle

    htmlloader flash content blank popup max OSX

    esteimle Level 2

      Ok this is driving me crazy if anyone has any ideas I'd really appreciate the help.   I have a flex app that loads some external pages with an htmlloader.  Whenever there is flash content on those pages a blank (all white with minimize, maximize, close buttons) popup window comes up.   This happens on any page with flash content, if I close the window the flash content stops.     I feel like that didn't always happen but I can't remember, does anyone have any ideas. 

       

      Thanks for any help you can give.

       

      Here's the code for the page:

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="1366" height="700" scaleX="1" scaleY="1">
         
      <mx:Script>
          <![CDATA[
          import flash.html.HTMLLoader;
          import flash.net.URLRequest;
          import com.desktop.event.gameLoadEvent;
          import com.desktop.model.DesktopModelLocator;
         
         
          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 = 700;
              webPage.width = 1366;
              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>   
         
      </mx:Canvas>