User Guide

298 Chapter 3: Objects
Example
The following example obtains and shows the number of layers that the selected movie clip in the
library contains:
var tl = fl.getDocumentDOM().library.getSelectedItems()[0].timeline;
alert(tl.layerCount);