PROTECTED] On Behalf Of eric dolecki
Sent: Friday, January 19, 2007 10:16 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Singleton class inside SWC components?
"Each of the components has a reference to a singleton class that it uses
for passing messages between each other.&qu
"Each of the components has a reference to a singleton class that it uses
for passing messages between each other."
Thats exactly what is happening, correct - what you intended. If each
instance component used a different instance of your "singleton" - how would
they communicate to one another?
I'm confused.
You said:
"However as soon as I compile them into an SWC and add more than one
of the same component onto the stage they all end up using the same instance
of that class."
Isn't that the definition of a Singleton? Something where only a
single instance ever exists (so they'd all u
I am working on a Flash 8 project that has several components. Each of the
components has a reference to a singleton class that it uses for passing
messages between each other. Before I compile the components into SWC files
I can use SingltonClass.getInstance().getMyInformation(). This works great
4 matches
Mail list logo