flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devesh Mishra <Devesh.Mis...@mastek.com>
Subject RE: One of the parameters is invalid while loading a module
Date Wed, 13 Nov 2013 08:07:25 GMT

Thanks Alex to inform us. I am adding my same code below.

// Sample Code Start
package com
	import mx.core.IFlexDisplayObject;
	import mx.events.CloseEvent;
	import mx.events.ModuleEvent;
	import mx.managers.PopUpManager;
	import mx.modules.ModuleLoader;
	import spark.components.TitleWindow;
	public class LoadModule
		private var _moduleUrl:String;
		private var _moduleLoader:ModuleLoader;
		private var _popUpWindow:TitleWindow;

		public function LoadModule()
		private function openModule():void
			_moduleUrl = 'testModule.swf';
		private function openModuleAsPopUp():void
			_moduleLoader = new ModuleLoader();
			if(_popUpWindow == null){
				_popUpWindow = new TitleWindow();
		private function loadModule(moduleLoader:ModuleLoader):void
		private function onModuleLoadHandler(event:ModuleEvent):void
				case ModuleEvent.READY:
				case ModuleEvent.SETUP:
					 trace("Module Setup");
				case ModuleEvent.ERROR:
					 trace("Error while loading module");
				case ModuleEvent.PROGRESS:
					 trace("Module load in progress");
				case ModuleEvent.UNLOAD:
					 trace("Unloading module");
		private function onModuleUnloadComplete():void
		private function onModuleLoadComplete(child:*):void
			_moduleLoader.addChild(child as DisplayObject);
			PopUpManager.addPopUp(_popUpWindow as IFlexDisplayObject,FlexGlobals.topLevelApplication
as DisplayObject,true);
			PopUpManager.centerPopUp(_popUpWindow as IFlexDisplayObject);
		private function moduleCloseHandler(event:Event):void
			_popUpWindow = null;

// Sample Code End

-----Original Message-----
From: Devesh Mishra 
Sent: 13 November 2013 12:24
To: users@flex.apache.org
Subject: RE: One of the parameters is invalid while loading a module

Hi Darrel,

Good to listen from you. I have attached my action script sample class file in this email.
Hope it'll give you a more clarification.

Here are my explanation regarding your queries.

1) I have written PopUpManager.centerPopUp() on ready event, because I want to display my
popup only when my module get loads completely. Anyways i have already tried with something
else i.e. I have tried, just after the initialization of popup window. But still getting same

2) Yes, I am using moduleLoader.addChild(child), after ready event. You'll get more clarification
after looking into attached file.

Note: Again repeating, this is happening with only one module. Apart from that, I have lots
of module in my application and all are working fine. Module where I am getting this issue,
it contains only one <mx:Module> and inside module tag, there is one <s:VGroup width="100%"
height="100%" gap="10">

That's it inside my module where I am getting error.

In the US, we're called MAJESCOMASTEK

Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited,
unless specifically indicated to that effect. Mastek Limited does not accept any responsibility
or liability for it. This e-mail and attachments (if any) transmitted with it are confidential
and/or privileged and solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any action in reliance
upon this information by persons or entities other than the intended recipient is prohibited.
This e-mail and its attachments have been scanned for the presence of computer viruses. It
is the responsibility of the recipient to run the virus check on e-mails and attachments before
opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop
and server.

View raw message