You should look into LoaderContext and ApplicationDomain.

I just finished battling a similar problem where flash would tell me at runtime.

"Cannot convert elements.gamescr...@b785a to elements.GameScreen"
You can control which class flash uses with the loaded class, by specifying it 
in the LoaderContext when you create  the loader.

Mario
http://onedayitwillmake.com

-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason
Sent: Tuesday, May 19, 2009 9:37 AM
To: Flash Coders List
Subject: RE: [Flashcoders] unexpected result with linked classes in embedded 
swfs

My understanding is that classes are only imported once and have a
single instance in the player - so if .swf A loads in .swf B, and both
use Class X, then if you change class X and re-publish only .swf A, you
will see the change in both .swf and .swf B.  I could be wrong, but that
is my understanding of how the player handles custom classes.


Jason Merrill

Bank of  America   Global Learning
Shared Services Solutions Development

Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community





-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Andrew
Sinning
Sent: Tuesday, May 19, 2009 9:28 AM
To: Flash Coders
Subject: [Flashcoders] unexpected result with linked classes in embedded
swfs

I'm working in AS2.

The skin-swf that I am embedding into my main movie contains symbols
that are linked to classes.

Objects in my main movie make calls to some of the classes that are
defined in the skin.  In order to get nice code-hinting in Flash Develop

and compile-checking, I import these same classes into some of the
objects in my main-movie.

If I make change to the AS file for a symbol defined in the skin-swf,
but ONLY recompile the main-movie and not the skin-swf, I wouldn't
expect the changes made to take effect, but they do.  Does this make
sense to anyone?

For example: if I add a new function to a class that is linked to a
symbol in the skin-swf, and I call that function from the main-movie.  I

would expect to have to recompile both the skin-swf and the main-movie.

However, what I've found is that I only have to recompile the
main-movie.

It seems that if the class is imported into the main-movie, then those
instructions override the instructions compiled into the skin-swf.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 4087 (20090519) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 4087 (20090519) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to