Question
Expression issue
Hi to all,
I'm trying to save layers position's to an array and, later, recover them on depending of layer index and a random number pick up on a Null layer.
The expresion is this:
myArray=[];
for (var i = 1; i<=24;i++) {myArray.push(thisComp.layer(i).position.key(1));
}
res=chequeo();
function chequeo(){
var pos,x;
sliderNulo = thisComp.layer("Null 1").effect("01")("Slider");
miIndex = thisLayer.index;
if (sliderNulo+miIndex >= 24){
x=(sliderNulo+miIndex) - 24;
pos=x;
} else {
pos=sliderNulo+miIndex;
}
return pos;
}
myArray[res];
and the random number expression is this:
posterizeTime(3);
Math.abs(Math.floor(random(0,23)));
Thank you in advance