Hi list...

I'm trying to add a property to an object in a Flash Sprite, but this
seems to consistently crash Director.  The object in the Flash sprite is
_root.gData, which initially has no properties.  In other words, it's
{}.

First, I can't seem to efficiently test if the property exists or is
undefined. I have to convert the result to a string and test if it's
"<Null>" to avoid a crash.  Second, once I've found it doesn't exist in
the Flash variable, Director crashes when I try to add a property to
that object. 

thePropExists = string(sprite(me.spriteNum)._root.gData["dog"]) --
"<Null>"
if thePropExists = "<Null>" then
        sprite(me.spriteNum)._root.gData[stringProp] =
theRecordedAnswers[i] -- this crashes Director
end if


Any hints are naturally greatly appreciated.  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!]

Reply via email to