Question
Pass Array From ActionScript to JavaScript
Hi, All:
Can anyone explain how to pass an array into JavaScript using the getURL function? Current code looks something like this, but it does not work:
getURL("javascript: myFunc(" + myArray + ");")
However, this call seems to produce this actual code in both IE and Firefox:
getURL("javascript: myFunc([object Object]);")
Both browsers choke on [object Object]. In Firefox, it explicitly thinks some other delimiter should appear around [object Object].
I searched the knowledge base and it says that arrays can be passed between JavaScript and Flash without any problem, so I am not sure exactly what we re doing wrong in this call. Any help would be appreciated. Thanks!
AJK
Can anyone explain how to pass an array into JavaScript using the getURL function? Current code looks something like this, but it does not work:
getURL("javascript: myFunc(" + myArray + ");")
However, this call seems to produce this actual code in both IE and Firefox:
getURL("javascript: myFunc([object Object]);")
Both browsers choke on [object Object]. In Firefox, it explicitly thinks some other delimiter should appear around [object Object].
I searched the knowledge base and it says that arrays can be passed between JavaScript and Flash without any problem, so I am not sure exactly what we re doing wrong in this call. Any help would be appreciated. Thanks!
AJK