undefined
undefined

Reputation: 5328

What are the options for passing variables from AS2 swf to AS3 swf on AS3 button press?

I have 2 swfs, one image loader which I built a while ago and will eventually update to AS3 and a newer swf I built in AS3. I want to be able to 'pull' a variable from the AS2 swf when a button on the AS3 swf is pressed. How might i be able to do this. LocalConnection wont do it I dont think - i cant load the AS2 swf into the AS3 swf and obviously cant do the reverse though this would be the way to do it if it were possible.

So when a button in the AS3 swf is pressed I want to call the AS2 swf and return a variable from the AS2 swf (the filename of the current image). Would both swfs sharing ExternalInterface work?

any suggestions?

Upvotes: 0

Views: 601

Answers (2)

Manish
Manish

Reputation: 3522

As noted above, LocalConnection may not be the most reliable: http://bugs.adobe.com/jira/browse/FP-371

An alternative would be to do a combination of fscommand() and ExternalInterface via JavaScript.

Upvotes: 0

weltraumpirat
weltraumpirat

Reputation: 22604

You can use LocalConnection. Or better yet: Use SWFBridge

Upvotes: 2

Related Questions