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 use the same instance).  I
don't really understand what you're trying to do.

  -Andy


On 1/19/07, Wade Arnold <[EMAIL PROTECTED]> wrote:
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
and I can copy as many instances from the library I want and get the desired
result  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. Has anyone seen this? Can anyone explain how I can have my
compiled SWC components work like they do when they are just fla's in the
library? Is there a special way to build swc components other than right
click and export to SWC from the library in order to get this to work
properly amongst several components?



Thanks for your help!



Wade







_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to