Question : as3 access an object inside a loaded swf

Hi, I have two swf, one loads the other using a Loader class, in the loaded swf I have a NetConnection object which I need to access from the host swf, but I can't, if I debug the app, I see the obejct is there, but I can't access it, if I try to set a variable like

loadedSWF = connectorLoader.content (connectorLoader is the Loader object)

loadedSWF is always null

I have try to use Security.allowDomain("*") in both swf to be sure, but nothing, I thought that only doing the allowDomain method I will have access to the loaded SWF objects

I'm usign Flas Player version 10.1

thanks! for any help

Answer : as3 access an object inside a loaded swf

Hi, well finally found the solution, it took me a while, but I did it, ok the thing is maybe there is something with the classes when I'm try the casting, for some reason, flash believe they are different and when I cast it, give some error that were showing me like null, not sure, really, but at the end I found a way to access the variables without the cast like this

nc = connectorLoader.content["conn"] as NetConnection;

and only cast the object I want, instead of the whole class, still not sure why this is the only way but at the end, I was able to see the object and now all is working fine, maybe there is something with the way the swf are in different security domains, but if this works, I'm ok, thanks to all for trying to resolve
Random Solutions  
 
programming4us programming4us