Groups | Blog | Home
all groups > flash actionscript > october 2005 >

flash actionscript : passing a variable value to director


visan
10/27/2005 9:10:41 PM
hello,

i have generated an array on click of a button. i want to pass this array to
director. how do i do this.
i have tried ( getURL("Lingo: myArray=[value1,value2...]. but in director it
is not receiving the array.

help me out.

thanx
Jon Moyles
10/28/2005 12:00:00 AM
if your loading a swf into director then the director timeline is the
parent of that swf's main timeline. so:

_parent.myVariable = aValue;

is valid code that will put the variable on the director timeline.

but director doesnt support arrays, it uses lists (functionally
identical to arrays from memory) this may mean that you can access your
"list" in director. or you may have to pass your variables as a comma
diliminated list, or a number of indiviadual variables.

luck
John Doe
10/28/2005 12:00:00 AM
if you have Director MX2004 you can access Flash vars:

sprite("flashSprite").flashVar

don't know now how it'll be with arrays. in former version you need to
use setVariable()/getVariable()

[quoted text, click to view]
John Doe
10/28/2005 8:42:47 AM
also take into account that director lists begin with index=1

[quoted text, click to view]
AddThis Social Bookmark Button