Check out the getVariable and setVariable Director commands. They allow you to get and set variables in a Flash sprite. Assuming your list is a Flash variable you can get and set it from Director.

sprite(whichFlashSprite).getVariable(variableName, stringOrReference)
sprite(whichFlashSprite).setVariable(variableName, newValue)

Jeremy Aker
Under the Hood
http://www.uthd.com/
mailto: [EMAIL PROTECTED]

On Dec 2, 2003, at 3:33 PM, Mendelsohn, Michael wrote:

Hi all...

Hope everyone is having an incredible day.

How exactly do I pass a property list back and forth between Director
and Flash?  I'm kind of stumped on this.

For example:

An array similar in format to this:
t = [#pGarbage:[#singer:"Shirley", #drummer:"Butch"]]
...needs to get into a Director global from either the Flash asset or
read in via FileIO.  If it's read in, I need to send this prop list to
the Flash asset.

Perhaps the flash object is something like:
t = new Object();
t["pGarbage"] = new Object();
t["pGarbage"]["singer"] = "Shirley";
t["pGarbage"]["drummer"] = "Butch";

It doesn't seem like the newObject() method works in this way (only
linear lists?).  Also, the number of properties is itself variable.
There might be 10 props in a prop list assigned to pGarbage, so how to
handle that?

I was thinking of changing the array to a string, but that doesn't seem
to make sense.  And, if anyone knows, how do you loop through all the
properties of a flash object?  In Lingo, it's obviously repeat with i =
1 to proplist.count.  But, what is it in actionscript?

thanks,
Michael M.

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to