If you have two applications that need to share the same variable, look into creating a RSL where the singleton can exist safely and everyone knows where to go get it.
If you're using an application shell and loading modules you can create a static class or variable to house the singleton. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: Wednesday, April 25, 2007 3:32 PM To: [email protected] Subject: Re: [flexcoders] One Singleton many application Why, this works perfectly well in flex 2.0. I don't remember if something changed in flex 2.01 but I don't think so. What does your getInstance() look like? On 4/25/07, nxzone <[EMAIL PROTECTED] <mailto:nxzone%40yahoo.ca> > wrote: > How can i have only one Singleton if i have two applications. I want > share the same singleton from the parent application > > Application1 > { > var singleton:ShareThis = ShareThis.getInstance() > > function init(){ > singleton.name="test" > SWFLoader.source="application2.swf" > } > > } > ----- > Application2 > { > var singleton:ShareThis = ShareThis.getInstance() > > function init(){ > trace(singleton.name) // give null > } > > } > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com <http://www.mail-archive.com/flexcoders%40yahoogroups.com> > Yahoo! Groups Links > > > > *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***

