accessing elements in arrays: confusing
hi, accessing elements in array fundamental i'm confused because thought had use getchildat(i) in loop etc... access them , "do them". however, have code doesn't use getchildat - loops through array. why use getchildat if do't have to???
a 'child' display object added display object. e.g. if had cat sprite , added hat onto (using addchild function) hat sprite child of cat sprite. happens children of display object stored in array.
if you're looping through array you'll want use simple loop function
e.g.
for(var i:uint = 0; < myarray.length; i++)
{
myarray[i].dosomething();
}
More discussions in ActionScript 3
adobe
Comments
Post a Comment