Hey there! I'm trying to retrieve the value of an array element in a trace statement...how do I go about this? I've had a look through the AS reference manual but can't work out what should follow the dot '.'?
trace(currentBall.name + " is in " + zone[i]./* something here to retrieve array element value */);
zone[i] alone will retrieve the value stored in whatever the "i" index is of the zone array. You do not use dots to acquire the values in an array, just specify the index in the brackets.
IF zone is storing something other than individual values, such as it is storing objects, then retrieving the values of parameters in those objects would require dots.
Thanks Ned....you've jogged my memory.
What I wanted to do was retrieve the name of the zone...however, I hadn't actually given the zone's an individual name in the first place, so when I used the '.name' property it was coming back with 'undefined'.