Hi all,
I'm doing some scripting in AE, and need to iterate through an Array of Objects, so need to find out the number of items in the array in order to set up the loop.
I had expected to be able to get the number of items using myArray.length, but this gives an 'undefined' error in ExtendScript.
The array has been populated with a loop in the following manner:
for (var i=0; i < myWidthValues.length; i++)
{
myArray[i].width=myWidthValues[i];
myArray[i].height=myHeightValues[i];
}
(this isn't the real code, just a simplified example)
And the array is functioning as expected (so for example myArray[2].width gives the result I expect).
Is there a reason that an Array of Objects won't return a 'length' value?
(I know this question would be better suited to a general javascript forum, but I've trawled internet forums to no avail, and thought I'd ask here first in case it's a quirk specific to ExtendScript).
Any help much appreciated!
Phil