I’m developing a Adobe Air application that should make use of a SWF file using LocalConnection.
I’ve never used LocalConnection before, but from what I understood from the online reference, I need to specify the same connection name on both the sender and the receiver.
Since I don’t have access to this component source code, how can I find out what connection name should I use?
I do have access to some JavaScript files that use the same SWF, but since I have no experience with JavaScript I wouldn’t know where to start looking for. Could I figure something out from there?
… or am I missing something?
There is no way to query from ActionScript what the
connectionNameis. The reason being it would open up a myriad of security holes. If this is mentioned in the documentation of the SWF you want to talk to — check it out.The whole LocalConnection business, though not difficult, is complicated by the fact that the documentation is flaky, to say the least. And very, very confusing. You should read it very carefully before attempting to do anything. I’ve burnt my fingers there.
Check this out first:
Is the AIR app on different computer than the SWF? You’re out of luck otherwise. Because:
Does the SWF have a LocalConnection object? If no, you’re out of luck.
connect()to connect to the SWF.allowDomain(*);Now, give it your best shot and let us know where you get stuck. Best of luck!