Hi Martin,
I've asked this question on flashcoders, but that list seems to be down. And it is relevant to your thread...
Regarding loading of classes via swf, you can run into a problem if you're in a large, complex environment. Consider the following...
- Assume a SWF, named 'loader.swf'
- loader.swf loads movieA.swf, which was compiled in 2003.
- movieA.swf uses a class called 'MyClass'.
- movieA's version of 'MyClass' is written into the Flash player's _global namespace.
- loader.swf loads movieB.swf, compiled in 2005.
- movieB.swf also uses 'MyClass', but a different version with an additional method.
- That additional method will not work, as the _global namespace for 'MyClass' has already been filled by the old, 'stale' 2003 version of 'MyClass'. The newer version is disregarded.
- loader.swf loads movieA.swf, which was compiled in 2003.
- movieA.swf uses a class called 'MyClass'.
- movieA's version of 'MyClass' is written into the Flash player's _global namespace.
- loader.swf loads movieB.swf, compiled in 2005.
- movieB.swf also uses 'MyClass', but a different version with an additional method.
- That additional method will not work, as the _global namespace for 'MyClass' has already been filled by the old, 'stale' 2003 version of 'MyClass'. The newer version is disregarded.
How can you handle the case where different versions of the same class are required when the VM keeps only the first version to get written to the global namespace?
Jim Kremens
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
