Jump to content
Search Community

I want to loadermax supported to flex module

fuli7 test
Moderator Tag

Recommended Posts

I work with flex project,use flex modules.the code like follows:

 

private function init():void {
   var info:IModuleInfo = ModuleManager.getModule("something.swf");
   info.addEventListener(ModuleEvent.READY, modEventHandler);  
   info.load();
}
private function modEventHandler(e:ModuleEvent):void {
   addChild(e.module.factory.create() as DisplayObject);
}

but now,I want to use loaderMax with this project,and the problem is how can I load the modules swf file into the flex framework with loaderMax.

I try like follows:

 

private function init():void {
   var loader:SWFLoader = new SWFLoader("something.swf", {onComplete:onLoadSWF});
   loader.load();
}
private function onLoadSWF(event:LoaderEvent):void {     
  var mc:MovieClip = loader.content;
 addChild(mc);
}

 

as I expected,it's not success.

this object on loaded by flex ModuleManager must be a interface of IModuleInfo,and i can't get the IModuleInfo by loaderMax.

so,i search for the forums want to find the answer.

I see the page http://forums.greensock.com/viewtopic.php?f=6&t=4258&p=17080&hilit=flex#p17080,and i cry ^_^.

so i want to loaderMax supported to flex module,please.it's very very useful.and if it support,it's more perfect,very very thanks.

 

(I am from China,sorry for my bad English ^_^)

Link to comment
Share on other sites

sorry for the bad news, but from reading the post you linked to, it seems that there is really nothing that can get around specific flash player / module restrictions noted in that post. LoaderMax can only make use of features that are baked into Flash Player :(

Link to comment
Share on other sites

sorry for the bad news, but from reading the post you linked to, it seems that there is really nothing that can get around specific flash player / module restrictions noted in that post. LoaderMax can only make use of features that are baked into Flash Player :(

yes,it's a bad news.........

Link to comment
Share on other sites

Don't know if with Flex project is the same, but, I use modules for ActionScript projects,

I don't need to use the ModuleManager, apparently, is just for load and to keep some information (this is what I think, I never see the code inside ModuleManager).

 

I load the modules normally with LoaderMax, and works fine.

The libraries with I use in the module, know who was in the Main.swf, no problem, no more weight.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...