I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).
I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.
Thanks in advance… 🙂
in your init handler, it should be something like:
where
myLoadHandleris the event handler for theEvent.INITevent (COMPLETEis fired when all the bytes are loaded,INITis fired after the SWF is initialized and its members are accessible), andmyDataInstanceis the public reference to yourMyDatainstance inside your child SWF.