I have updated Fabrication to 0.4.1. This includes a minor fix to the FlexModule to support loading directly via the ModuleManager. If your are not using the FlexModuleLoader then you need to set the router and defaultRoute in your module’s ready handler. I have added an example project to showcase this. Check it out here.
The loading and ready handler from this example are shown below,
private function loadModule(moduleDescriptor:ModuleDescriptor):void {
var module:IModuleInfo = ModuleManager.getModule(moduleDescriptor.url);
module.data = moduleDescriptor;
module.addEventListener(ModuleEvent.READY, moduleReadyListener);
pendingModules.push(module);
module.load(ApplicationDomain.currentDomain);
}
private function moduleReadyListener(event:ModuleEvent):void {
var module:IModuleInfo = event.module;
var moduleDescriptor:ModuleDescriptor = event.module.data as ModuleDescriptor;
var moduleInstance:Object = event.module.factory.create();
moduleInstance.router = applicationRouter;
moduleInstance.defaultRouteAddress = applicationAddress;
moduleInstance.id = moduleDescriptor.getElementID();
moduleInstance.addEventListener(FabricatorEvent.FABRICATION_CREATED, moduleCreated);
moduleInstance.addEventListener(FabricatorEvent.FABRICATION_REMOVED, moduleRemoved);
modulesContainer.addChild(moduleInstance as DisplayObject);
}
Thanks to Ruben from the PureMVC forums for reporting this issue. You can download Fabrication 0.4.1 from here.

September 24th, 2009 11:56 am
First congratulations for Fabrication it is a great time saver!
)
I’ve worked on putting in a proxy the loading process of modules instead of in a mediator as you did in your code sample “SimpleRouting”.
I had then difficulties loading the module with sandbox problems. Whilst it worked with your mediator beforehand.
I found the official Adobe’s solution through using a URLLoader first and then using the byteloaded as a second argument in the lm.loadModule([url], [bytesfrommodule]);
Then I found that by using your pendingModules Array (and corresponding functions) and keeping reference to the module loading as you did, it works also. (I did things reverse
By curiosity what is the rational explanation behind this?