Hi Team

How to show the module second time?

I have a button. On click event i load the module. Now if i again 
click the same button again after say 2 min. I do not want to load 
the module again but i want to use the loaded module.

I am storing the module into array with url as index(Associated 
Array).

code:

var module:ModuleLoader = arr[moduleName];
if( module )
{
        showContent.removeAllChildren();
        showContent.addChild(module);
        showContent.invalidateDisplayList();
}
else
{
        moduleLoader.percentHeight = 100;
        moduleLoader.percentWidth = 100;
        moduleLoader.url = String(moduleName);
        moduleLoader.loadModule();
}

//event listener function on module.Ready event
public function addModuleToView(event:ModuleEvent):void
{
  showContent.removeAllChildren();
  module[event.module.url] = moduleView);
  showContent.addChild(moduleView);
}

i want to add the module to showContent container when button is 
clicked second time.

But i do not see the module added to contianer second time?

Can anybody please give any pointers??????
I have spend lot of time but no clue.

Thanks
ilikeflex

Reply via email to