How can AS3 swf hosting AS2 swf share the same array?

I have an AS2 swf that has an array that updates when the user clicks on items on the screen. The array stores the selected items. This As2 swf is hosted in an AS3 swf environment loaded using the Loader class, and the local connection between them is managed by swfBridge.

I want to know what is the best way for ASF and AS2 swfs to share this array? or how can I call a function in swf AS2 (client) and return the array to swf AS3 (host) when it needs to read elements from the array?

0


a source to share


1 answer


you can use a local connection and provide a specially crafted swfBridge for this purpose:

http://www.gskinner.com/blog/archives/2007/07/swfbridge_easie.html



if you run into any quarks while working with arrays, I remember how strange things like length were the value in it when executed for each loop ... just heads-up.

+1


a source







All Articles