-
1. Re: accessing an array
Ned Murphy Jul 27, 2012 6:25 PM (in response to codeBeastAdobe)It is possibly making use of bracket notation to target an object with an instance name "mc" that is a child of whatever object _definitionsArray[_selectedBubble] is.
_definitionsArray[_selectedBubble] could be an associative array or it could be a normal array... it really depends on what _selectableBubble's value is.
-
2. Re: accessing an array
Ned Murphy Jul 27, 2012 6:54 PM (in response to codeBeastAdobe)I should add that _definitionsArray[_selectedBubble] could also be making use of the bracket notation to target an object, although the use of "Array" in the name causes me to think _definitionsArray is an actual array.
If you aren't familiar with using bracket notation to target objects, what it does for you is allows you to use strings to target objects, which becomes very useful in dynamic applications.
Here is a brief example... suppose you have an object with an instance name "mc", then suppose you have that as a child of another object with an instance name "container". One way you are probably familiar with for targeting the "mc" object would be...
container.mc as in container.mc.x = 200;
using bracket notation you could also use...
container["mc"] or
this["container"].mc or
this["container"]["mc"]
They all target the same "mc" object
-
3. Re: accessing an array
codeBeastAdobe Jul 28, 2012 12:07 AM (in response to Ned Murphy)Thank you very much, really helpful
-
4. Re: accessing an array
Ned Murphy Jul 28, 2012 4:29 AM (in response to codeBeastAdobe)You're welcome