9 Replies Latest reply on Jan 17, 2011 10:35 AM by Flex harUI

    Load module in new separate ApplicationDomain Fail

    andres margalef

      I have this application:

       

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

      <s:Application

      xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="library://ns.adobe.com/flex/spark"

      xmlns:mx="library://ns.adobe.com/flex/mx">

      <fx:Script>

      <![CDATA[

      import mx.modules.Module;

       

      private var mod:Module;

       

      public function load():void {

      appLoader.applicationDomain = new ApplicationDomain();

      appLoader.loadModule("com/scanntech/Charts.swf");

      }

      ]]>

      </fx:Script>

       

      <s:layout>

      <s:VerticalLayout/>

      </s:layout>

       

      <s:Button id="btnLoad" label="load" click="load()"/>

      <mx:ModuleLoader id="appLoader" width="100%" height="100%" />

      </s:Application>

       

      And the module:

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

      <mx:Module

      xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="library://ns.adobe.com/flex/spark"

      xmlns:mx="library://ns.adobe.com/flex/mx"

      >

      </mx:Module>

       

      When i load the module i get this error:

       

      VerifyError: Error #1014: No se encontro clase mx.modules::Module.

       

      atflash.display::MovieClip/nextFrame()

      atmx.core::FlexModuleFactory/deferredNextFrame()[E:\dev\4.x\frameworks\projects\framework\ src\mx\core\FlexModuleFactory.as:631]

      atmx.core::FlexModuleFactory/update()[E:\dev\4.x\frameworks\projects\framework\src\mx\core \FlexModuleFactory.as:401]

      atmx.core::FlexModuleFactory/timerHandler()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\FlexModuleFactory.as:732]

      atflash.utils::Timer/_timerDispatch()

      atflash.utils::Timer/tick()

       

      why is that?