An array of generic objects (one for each label) with a “name” property and a “time” property in the order they occur in the TimelineMax.
GreenSock Docs (HTML5/JS)
TimelineMax
.getLabelsArray()
.getLabelsArray( ) : Array
Returns an Array of label objects, each with a "time" and "name" property, in the order that they occur in the timeline.
Returns : Array

Details
Returns an Array of label objects, each with a "time" and "name" property, in the order that they occur in the timeline. For example, to loop through all the labels in order and console.log()
them to the screen:
var labels = myTimeline.getLabelsArray();
for (var i = 0; i < labels.length; i++) {
console.log("label name: " + labels[i].name + ", time: " + labels[i].time);
}
Note: changing the values in this array will have no effect on the actual labels inside the TimelineMax. To add/remove labels, use the corresponding methods (addLabel(), removeLabel()
).