-
Accesing composition layers position
Hello,
I am trying to make an expression, which would take picture from composition “layer_1” and move it from one corner of the screen to another in main comp. 1st layer go to the next corner, 2nd layer start moving near first one, then third one starts.. coordinates are just optional.
The reason why I am asking for help, is because I am not sure whether it is possible to do so as I want. In composition “layer_1” there are 4 layers with pictures, but no matter what layer index I put into layer(i), it still shows me the first one… So maybe layers length should be different, from marker to market… or what?
Could someone give me a shot whether I am doing something wrong?
Thanks.
x1=width-width/9;
y1=50;x2=50;
y2=height-130;timeInterval = 90;
startPosition = [x1,y1,0];
endPosition = [x2,y2,0];for (i = 1; i <=comp("layer_1").numLayers; i++){
comp("layer_1").layer(i).position;
linear(time,0,0+framesToTime(timeInterval),startPosition,endPosition);
}