PDA

View Full Version : calling flex from AS3 using ModuleLoad()


dhagan
08-20-2008, 02:37 AM
Hi Folks, I'm trying create an ultra lightweight loader and load a flex application. Are there any suggestions on how to go about doing this? What are the tradeoffs using the SWFLoader class, how robust is it, and why should one choose it over the ModuleManager()? Thanks at all.



public var info:IModuleInfo;

private function initApp():void {

info = ModuleManager.getModule("http://" + domain + "Viewer.swf");
info.load();
}

public var ourViewerModule : DisplayObject;
private function onReadyHandler(e:ModuleEvent):void {
ourViewerModule = info.factory.create() as DisplayObject;
ourCanvas.addChild(ourViewer3DModule);
}