3 Replies Latest reply on Jan 5, 2011 9:22 AM by Flex harUI

    SWFLoader Problem

    dekel311

      Hello all,

      I'm trying to load a Flex application in another, and I can't seem to get it right.

      this is part of a popup component that tries to load the application:

       

      <fx:Script>

           <![CDATA[

                public function completeHandler(event:Event):void

                {

                     myGroup.addElement(myLoader.content as IVisualElement);

                }

           ]]>

      </fx:Script>

      <mx:SWFLoader id="myLoader" source="something.swf" autoLoad="false" complete="completeHandler(event)" />

      <s:Group id="myGroup" />

       

      my sub application starts with:

       

      <?xml version="1.0" encoding="utf-8" ?>

       

      <s:Group>

      ...

      ...

       

      I tried running the application on the parent with the s:Application tag but it just showed me the initial flex progress bar and it didn't load,

      when I use the s:group tag it does load but when I push a button it throws me an error on the ButtonBase class, when I debugged it I found there is no SystemManager object there (equals null). Can anyone tell me what I'm doing wrong?

       

      Thanks in advance,

      Dekel.