Passing variables between swf's

Hello All,

Beginning with flash only a few weeks ago, I have had to jump right into some pretty tricky areas...  At the moment, my sticking point is trying to pass variables between two swf files.

(Main SWF Loaded From Browser)
        (Child MC in library)
              (Child MC loaded from external)

It is the bottom most SWF which needs the data located in the Main SWF.  In the main swf I have an array defined as:

_global.ArrayObj = new Array();
ArrayObj[0] = new Array({item1:Value, item2:Value, n...})


_global.ArrayObj = new Array();
ArrayObj[0] = new Array(Value1, Value2, n...})

I have also tried several different options such as references using _root with lockroot, direct calls to _parent._parent etc, but nothing appears to work.  However one strange instance, it appears as though when calling this from the bottom most child:

_global.ArrayObj[0] is returns [object Object] however when referencing the items both by name .item1 or by number [0] it returns undefined.

Does anyone have any ideas?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dushan De SilvaTechnology ArchitectCommented:
Aneesh ChopraCommented:

you are getting _global.ArrayObj[0] as [object Object], that clearly means you are getting the array object.

I think everything is fine and you are getting the array object.. just not using it with correct syntax

if this is your array on main SWF...
_global.ArrayObj = new Array();
ArrayObj[0] = new Array({item1:Value, item2:Value, n...})
I hope you can access it as shown below:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Anubis2005Author Commented:
Thank you for your quick comments.

Looking at it again this morning with fresh eyes, I noticed the very trailing end of the array.  It appears as though the items being loaded into the array are being undefined when set and consequentally undefined when being called.  It had me stumped cause I was sure (as is true) that I had the code correct.

Thank you again.
Asked by Author to reopen question. Said he wished to split points.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.