Hi Brian,
  I think what you're talking about is a different phenomenon.

  The Flash Player always uses the _first version_ of any class that
it loads. So if your parent movie has a class com.mydomain.SomeClass,
and your .swf that loads into your parten movie has a different class
com.mydomain.SomeClass, then the first one will always be the one
used.

  So be very careful with package naming. :-)

  There is a way around it, if you really need to get around it:
before loading your second .swf, call:

delete _global.com.mydomain.SomeClass;

  Any instances of SomeClass which already exist in the parent will
be fine. And the loaded .swf will use the 'right' version of the
class.

 But it's not without dangers - you can never create an instance of
the original version of the class again. I'd only use that trick if
you really really need it.

 In short - be careful what you're doing with naming. :-) Avoid name
collisions.

Cheers,
  Ian

On 3/3/07, Brian Williams <[EMAIL PROTECTED]> wrote:
Yes, I've noticed that too.  Classes are only loaded once, so if swf A uses
class Foo, and then loads swf B into a lockroot, if swf B also has a class
Foo, it's going to be using the class defined in swf A (with the wrong
root).  Note:  it's not just the interpretation of _root.  class Foo from
swf A might be a totally different (older, for example) version, but that's
what swf B will see.

--Brian
_______________________________________________
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