To extract the swf module from the zip I'm using the following code:

var zipFile:ZipFile = new ZipFile(loadedData);
var data:ByteArray;
for(var i:int = 0; i < zipFile.entries.length; i++)
{
     var entry:ZipEntry = zipFile.entries[i];
     data = zipFile.getInput(entry);
}

loader = new Loader( );
loader.contentLoaderInfo.addEventListener( Event.COMPLETE,
onLoadComplete );
var context : LoaderContext = new LoaderContext( );
context.applicationDomain = ApplicationDomain.currentDomain;
loader.loadBytes( data, context );

On the onLoadComplete the loader.content has:

_TestModule_mx_core_FlexModuleFactory (@17975f1)

which seems to be similar to the variable info.factory in
ModuleInfoProxy

you can see a screenshot of the debugger window in:

http://www.flickr.com/photos/[EMAIL PROTECTED]/2072440268/

Thanks for the help
Gus...






--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> can we see how you are getting the instance of the module factory?
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Gus
> Sent: Wednesday, November 28, 2007 8:59 AM
> To: [email protected]
> Subject: [flexcoders] Module Loader
>
>
>
> Hey all...
>
> is there a way to load a module not from an url but an object
instance?
>
> I have a zip file with a module, I unzipped it with the nochump zip
> libraries and obtain the instance of the factory for the module ( or
> at least is what it seems )... but then I can“t find a way to pass
it
> to the ModuleLoader... so, I'm stuck... don't know where to look...
>
> Any Ideas???
> Thanks in advance
>

Reply via email to