This content has been marked as final. Show 5 replies
There are some examples out there like:
However, I'm not sure if that works when the other SWF is another Flex app. I tried it but was never able to get it to work in that case.
I have a related issue with LocalConnection between 2 Flex apps, one SWFLoader'd by the other. The problem is I need to set up a unique LC channel between the two apps, but I also have multiple instances of the child app ( a movie player). Even if my app only has one player, if the app is loaded on 2 different tabs, the LocalConnection still only talks to the one. It seems this would always be the case, but that somehow this is never discussed in any of the examples.
You can access public members of the loaded swf using s1.content.myPublicMember.
You can access members in the parent app using parentApplication.
Be careful of timing issues.
I have a full example on cflex.net, search for swfloader
Yes I found:
last night, and that worked for me on a Flex app. The only change I had to make was to turn strict type checking off in the compiler options and get rid of the SWFLoaded() cast. Wasn't enough of a guru to figure out how to get the type info from the other app into parent.
So that does bring up the question, if you wanted to leave strict typing on, how would you include the other apps mxml 'header' definition? So that SWFLoaded(_appLoaded).some_method(); would work? Just not familiar enough with actionscript to answer that one.
Edit: So not necessarily the answer to my question, but you can use
to disable strict type checking for a single variable, while leaving it ennabled elsewhere.
Yes, I have it kind of working but am experiencing the same problem with the cast as well and even if I disable the strict compiler option I get runtime errors.
Has anyone figured out how the correct way to call the inner function from the outer?