You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by jfb <j....@verizon.net> on 2015/04/23 23:59:23 UTC

Help with modules

Hi All,
Trying to organize an app in flex 3 before migrate to the new SDK. I have an
issue:
I have a module as:

private function loadModuleToStage(moduleName:String):void{
	msgBdLoader.unloadModule();
	msgBdLoader.url = Global.appURL + moduleName+'?_ts='+ new Date().getTime();
	msgBdLoader.loadModule();
}

<mx:State name="MSGBoardView">
			<mx:AddChild position="lastChild" relativeTo="{body}">
					<mx:ModuleLoader label="Message" id="myLoader" width="100%"
height="100%" cachePolicy="off" cacheAsBitmap="false"/>
			</mx:AddChild>
		</mx:State>
It loads ok for pages that use mx:Module, but I want to load an external
application movie (swf file) and load into the module place. How can I do
this?
Thanks in advanced.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Help with modules

Posted by jfb <j....@verizon.net>.
Thanks Scott,
I will try this.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161p10297.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Help with modules

Posted by Scott Matheson <sm...@intralinks.com>.
Hi
   i have 2 prts, the first loa the module the seconds removes 

loading

                         if (_myModuleLoaderLesson != null) {

				_myModuleLesson = null;
			}
			_myModuleLoaderLesson = ModuleManager.getModule('com/peach/uofs/lesson/ModuleLesson.swf');
			_myModuleLoaderLesson.addEventListener(ModuleEvent.READY, onModuleReadyLesson);
			_myModuleLoaderLesson.load(null, null, null, this.moduleFactory);


----------------  function to handler the Add Event Listner 


		private function onModuleReadyLesson(e:ModuleEvent):void {
			_myModuleLesson = _myModuleLoaderLesson.factory.create() as Module;
			this.addElement(_myModuleLesson);
		}


-------------------------

Removal


if (_myModuleLoaderLesson) {  // if myModuleLoder is null then no module to unload
				_myModuleLoaderLesson.unload();

				try {
					this.removeElement(_myModuleLesson);

				}
				catch (error:Error) {
					// do nother this is becuse theye clicn 2 time on home button
				}

			}


________________________________________
From: jfb [j.balladares@verizon.net]
Sent: Friday, April 24, 2015 2:27 PM
To: users@flex.apache.org
Subject: Re: Help with modules

Thanks for your reply and help.
Anyone have a code in how to work with SWFLoader programmatically?
Best,



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161p10168.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. 


Re: Help with modules

Posted by jfb <j....@verizon.net>.
Thanks for your reply and help.
Anyone have a code in how to work with SWFLoader programmatically?
Best,



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161p10168.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Help with modules

Posted by "pkumar.flex" <pr...@gmail.com>.
use SWFLoader for loading external application.

On Fri, Apr 24, 2015 at 3:29 AM, jfb [via Apache Flex Users] <
ml-node+s2333346n10161h76@n4.nabble.com> wrote:

> Hi All,
> Trying to organize an app in flex 3 before migrate to the new SDK. I have
> an issue:
> I have a module as:
>
> private function loadModuleToStage(moduleName:String):void{
>         msgBdLoader.unloadModule();
>         msgBdLoader.url = Global.appURL + moduleName+'?_ts='+ new
> Date().getTime();
>         msgBdLoader.loadModule();
> }
>
> <mx:State name="MSGBoardView">
>                         <mx:AddChild position="lastChild"
> relativeTo="{body}">
>                                         <mx:ModuleLoader label="Message"
> id="myLoader" width="100%" height="100%" cachePolicy="off"
> cacheAsBitmap="false"/>
>                         </mx:AddChild>
>                 </mx:State>
> It loads ok for pages that use mx:Module, but I want to load an external
> application movie (swf file) and load into the module place. How can I do
> this?
> Thanks in advanced.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161.html
>  To unsubscribe from Apache Flex Users, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
*Regards,*
Prashant Kumar* | *Mob.: +91 8408811225




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161p10163.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Help with modules

Posted by Alex Harui <ah...@adobe.com>.
Not sure I understood the question.  Modules are essentially runtime
loadable libraries, applications are generally different as they come with
bootstrapping code. So, you can’t load a Flex app with ModuleLoader.

-Alex

On 4/23/15, 2:59 PM, "jfb" <j....@verizon.net> wrote:

>Hi All,
>Trying to organize an app in flex 3 before migrate to the new SDK. I have
>an
>issue:
>I have a module as:
>
>private function loadModuleToStage(moduleName:String):void{
>	msgBdLoader.unloadModule();
>	msgBdLoader.url = Global.appURL + moduleName+'?_ts='+ new
>Date().getTime();
>	msgBdLoader.loadModule();
>}
>
><mx:State name="MSGBoardView">
>			<mx:AddChild position="lastChild" relativeTo="{body}">
>					<mx:ModuleLoader label="Message" id="myLoader" width="100%"
>height="100%" cachePolicy="off" cacheAsBitmap="false"/>
>			</mx:AddChild>
>		</mx:State>
>It loads ok for pages that use mx:Module, but I want to load an external
>application movie (swf file) and load into the module place. How can I do
>this?
>Thanks in advanced.
>
>
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Help-with-modules-tp10161.h
>tml
>Sent from the Apache Flex Users mailing list archive at Nabble.com.