I have a Flash application which loads in external .swf files for drawing 
charts. My main .swf is compiled for the Flash 7 player, while the loaded .swf 
files are compiled for the Flash 6 player. The Flash 6 .swf is not able to 
access variables or functions which are defined in the _global context of the 
Flash 7 .swf file. But if I have two Flash 7 movies, or two  Flash 6 movies, 
things work fine.

Is there some known interaction I should know about? Specifically, shouldn't 
two .swf files compiled for different versions player still share the same 
_global scope?


As an example, I've created flash6.fla and flash7.fla. They have the following 
action script:


---flash7.fla---

_global.callbackFunction = function() { trace("Got Callback"); }

loader_mc = _root.createEmptyMovieClip("loader_mc", 3);
loader_mc.loadMovie("flash6.swf");

---flash6.fla---

trace("Loaded Flash6.swf");
trace("_global.callbackFunction: " + _global.callbackFunction);

---------------

The trace function shows me that _global.callbackFunction is defined if 
flash6.fla is published for Flash 7 players. But if I republish, targeting the 
Flash 6 player, the function is longer defined. It is like they have totally 
separate _global scopes. If I switch from _global to _root, however, things 
work fine. So, I can work around the issue. But it strikes me as real odd that 
the two .swf files don't share the same _global variable space. 

Clues?

                
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
_______________________________________________
[email protected]
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