I have an issue of RSL with Module.
code snippet
-----------------------------------------
private var moduleInfo:IModuleInfo;
public var moduleURL : String = "MyPersonalHomePage.swf";
moduleInfo = ModuleManager.getModule( moduleURL );
moduleInfo.addEventListener( ModuleEvent.READY, onModuleReady );
moduleInfo.addEventListener( ModuleEvent.ERROR, onModuleError );
moduleInfo.load();
protected function onModuleReady( moduleEvent:ModuleEvent ):void
{
var moduleInfo:IModuleInfo = moduleEvent.module;
var objModuleInfo : Object = moduleInfo.factory.info();
//var dictionaryOfModule : Dictionary = moduleInfo.factory.preloadedRSLs;
// upto above point things are fine ( in debug I can see that module is
loaded="true" ready="true" )
// - as soon as I run the below line ( create() on factory ) the module
instance returned ' null '
// can some one explain me what's going wrong internally
var moduleObject: Object = moduleInfo.factory.create();
if(moduleObject != null)
{
if(moduleObject is IDummyInterface)
{
var dummyContent: IDummyInterface = moduleObject as IDummyInterface;
dummyContent.setParameter("xyzstring");
dummyContent.setDP(testXML);
}
else
{
Alert.show(" +-+-+-+-+-+ module is not available +-+-+-+-+-+");
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module : MyPersonalHomePage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
implements="IDummyInterface"
focusEnabled="true" >
// some open sournce flex libraries are used here
// e.g. Papervision, Tweener, Degrafa etc.
</mx:Module>
------------------------------------------------------------
Mayur