Random Stills


This is an expression will generate a sequence of random cuts between layers. Arrange your graphic layers (movies, stills, etc.) at the top of the stack. Add a null layer at the bottom of the stack.

Add a slider control to the null layer.

Add the following expression to the slider control:


duration=.125; //length of each cut (seconds)
 
seed=Math.floor(time/duration)+1; 
seed_random(seed,true); 
Math.floor(random(1,index)) 

Add the following expression for opacity to each of the graphic layers:


if(index==this_comp.layer("Null 1").effect("Slider Control").param("Slider")){ 
  100 
}else{ 
  0 
} 

Adjust the duration parameter to suit your needs.