This content has been marked as final. Show 3 replies
SWFLoader is your best chance here as the SWF is basically the equivalent of the .NET assembly.
You can pass params to the loaded SWF. Here's a link to livedocs that shows you how:
In this example, they load the swf using @embed. For my tests, I just put in the file path (i.e. "C:\\development\\..." etc)
The other gotcha is that the example has this strange cast "local()" and I wondered for a while what that was. But the class of the loaded app is local.mxml, which implies that you have to know the class name of the loaded app. But if you're loading dynamically without knowing the class name, that's plainly pants. Instead, I derived the loaded app from a base class that is known to both the container app and the loaded app. Then you have a sort of "Facade" for all your loaded components (look for Facade as a Design Pattern on the web). You can then reference all your loaded apps through the Facade class.
Hope this makes sense - I can actually send you my test app if you want....:-D
Well... I can't follow you in the second part of your reply. Can you send me you application so I'll be able to see the code?
I'm now trying to edit the Adobe documentation example to load a SWF file dynamically...
I'd be quite happy to send you the app that I created to test this out... but your profile isn't visible so I haven't got your email address. Go into your profile/personal options and set your profile and email to be visible....