Hello!
I have some problem with vars. The situation is the same I wrote here Re: External swf
I have public var (for example ZZZ) in code of MAIN.swf (main class is Main.as), and I want to access it from code of loaded EXTERNAL.swf.
But nothing helps, flash says:
there is no ZZZ in code of Main
there is no ZZZ on stage.root
there is no ZZZ in any parents.
But if a have ZZZ in code of EXTERNAL, and want to access it from MAIN, (the reverse situation), ZZZ is easily found. ![]()
public var ZZZ:Number = 9;
As I read now in Adobe's help : Loader has no root until it is added as a child (and i don't do that), and External has it's own root (and i don't add him either). May be I should pass to EXTERNAL
this
as exact pass, and then
ExactPass.ZZZ
would be found?
I have another idea: getDefinitionByName won't help External to find ZZZ in Main?
No, getDefinitionByName is not working, more then that, not only public vars are not seen by External, but also any public functions.I used
trace(Main.ZZZ);
trace(Main.someFunction());
So MAIN sees everything in EXTERNAL, and I can't make EXTERNAL see everything in MAIN so far... but library he sees.
North America
Europe, Middle East and Africa
Asia Pacific