i want to take this layer (which is now a precomp) and precomp it.
![Smile :)](./images/smilies/icon_smile.gif)
//select layerComp layer in the timeline
//given myComp is the active comp item
//and layerComp is a precomp within myComp
//select the correct layer to precomp in the timeline:
var myNewLayers = myComp.layers;
var newChosenLayer = myNewLayers.byName(layerComp.name);
newChosenLayer.selected = true;
alert(newChosenLayer.name); //so i can tell it's selecting the correct one
var layerIndices = new Array();
for (var i = 0; i < newChosenLayer.length; i++)
{
layerIndices[layerIndices.length] = newChosenLayer.index;
}
var shadedComp = newChosenLayer.precompose(layerIndices, Name, false);
i keep getting an error saying the the precompose function is undefined, and i can't figure out why, as it looks legal to me.
any clues?
thanks guys.