0 Replies Latest reply on Jul 1, 2008 8:47 AM by Scott_Bonsteel

    Problems loading Flex3 swf into AIR app

    Scott_Bonsteel
      This is a challenging problem that I have reduced down to the bare minimum and it is still reproduceable. I have built a minimal AIR application and added a SWFLoader to it which loads a SWF file named "Junk.swf" using an absolute path.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" title="Hello World">
      <mx:Style>
      WindowedApplication {
      background-color:"0x999999";
      background-alpha:"0.5";
      }
      </mx:Style>
      <mx:SWFLoader source="C:/myProjectFolder/renderers/Junk.swf" width="100%" height="100%" />
      </mx:WindowedApplication>

      This works fine if I run the application from within Flex3, however when I build an installer, install the application to my windows vista system and execute it from the desktop the Junk.swf will not display. If I replace the Junk.swf with another SWF of the same name created in Flash CS3 then it will display properly when my test app is executed from either Flex or the desktop.

      The contents of the loaded SWF don't appear to be an issue since even the simplest of Flex3 SWFs fail to display.

      Interestingly when I add listeners to the SWFLoader to determine if any errors are happening no error events are sent, but I do receive both the INIT and COMPLETE events which tells me that the Junk.swf is found and loaded, just not displayed.

      Any assistance or even ideas that I could try would be appreciated.