Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use JavaScript GetVariable to read Flash Array

Status
Not open for further replies.
Jun 23, 2002
15
0
0
US
Hey guys. I am having a problem while using GetVariable from Javascript to read an ActionScript array. For testing purposes I placed the following code in the first frame of the Flash movie:

cow = new String();
cow = "Moo";

When using GetVariable as follows, the string "Moo" was properly retrieved:

var cowsays = thisMovie("searchbar").GetVariable("cow");

Here's where I'm having the problem. What I am trying to do is read a value from an array in Flash. I changed the code in the first frame of the Flash movie to:

cow = new Array("moo");

However, the following JavaScript code simply returns NULL and can't read the array:

var cowsays = thisMovie("searchbar").GetVariable("cow[0]");

Is it even possible to read an ActionScript array (using GetVariable) from JavaScript or am I doing something wrong? Thanks in advance for your help.

Skylar Givens
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top