losowe video z kompozycji

myComp = comp(name);

n = myComp.numLayers;

seedRandom(index+101,true);

theLayers = [];

for (i = 1; i <= n; i++) theLayers[theLayers.length] = i;

for (i = 0; i < theLayers.length; i++){

idx = i + Math.floor(random(theLayers.length - i));

temp = theLayers[i];

theLayers[i] = theLayers[idx];

theLayers[idx] = temp;

}

accumDur = 0;

for (i = 0; i < n; i++){

myLayer = myComp.layer(theLayers[i]);

nextDur = myLayer.outPoint - myLayer.inPoint;

if ((time >=