This content has been marked as final. Show 3 replies
if swf is generic file that has nothing to do with flex code then use it as swfLoader,
if swf asset is compiled flex code I would suggest using it as Module(you might have to modify and put it under mx:module tags) then you can exchange API and call functions etc inside that swf asset from main application and visa versa..
Thanks for the reply.
I've replaced my SWFLoader with a ModuleLoader and changed my swfs as Module instead of Application and it does work.
However, it also worked before. It is possible to call the functions of swf loaded with SWF Loader with something like this:
var loadedSM:SystemManager = SystemManager(swfLoader.content);
I guess using Module is a cleaner way of doing it, so I'm gonna stick with it, even though I'm not sure it is really better.
I have not used swfLoader , but with Module you can do a lot of fancy stuff like preload it and unload it as needed .I gues Swf is more general solution where you can load basically any kind of swlf right?
ooh and with module you can also remove unnecessary code for example : say if some resource as class, etc is already in main application you tell compiler to exclude that from module when it compiles it.