AIR 3.7 Problem Loading Multiple Similar SWFs On iOS
I'm running into an issue with loading multiple SWFs using AIR 3.7 on iOS. The exact same code works fine on Android.
The issue is that if I include 2 specific SWFs then neither of them will load correctly. When I include just one of the SWFs it works great. I've also tried including a second SWF which is pretty much empty and that also works. Additionally, I've been able to load a MovieClip out of the first SWF IF addChild() was first used on myswf1 and that works even when the main SWF did not. Lastly if I include 2 of the exact same SWFs (with different filenames) that also works.
So my question is what is it about the two SWFs that causes it not to work? They are effectively the same except each has custom assets and custom class naming.
Both of them subclass off one main class like this:
class myswf1 extends mymain
class mymain extends MovieClip
class myswf2 extends mymain
class mymain extends MovieClip
So both SWFs contain mymain seperately from each other. Could that be the issue? Like when it compiles all the code into the package SWF the
two mymain root classes clash?
In the past it seems like that should still work it just uses the first loaded class and that is it.
The errors that I get seem to happen on lines like this:
selectableHudOptions.bonustime.mouseEnabled = false;
Where selectableHudOptions.bonustime is basically null. However, when I just have 1 SWF this line works fine. If I loop through selectableHudOptions's children it is blank when I am loading the two SWFs but it shows all of the children when just loading the one SWF.
Another theory I have about it is that it seems like addChild() has to be used on the objects and frames have to go by before the children are visible. Like addChild() is being delayed somehow because of the multiple SWFs. Or addChild() is behaving asyncronously and my code is running syncronously.
I think Nimisha from Adobe has worked on these multiple SWF issues before.
