Step 1
Create a square, (eg. 50*50)then make it 3d, offsetting the z anchor point by half the cube size (eg, 25)then duplicate it 5 times
Step 2
For the first,leave it as it is
For the second, change the x orientation to 90
For the third, change the x orientation to 270
For the fourth, change the y orientation to 90
For the fifth, change the y orientation to 270
For the sixth, change the y orientation to 180
Step 2 .Alt
After step 1, make sure the 6 copies are on the top of the timeline, or simply precompose them. Then add the code to the orientation (havent tested the code, hope it works =P)
if(index = 1)
value + [0,90,0];
else if(index = 2)
value + [0,270,0]
;
else if(index = 3)
value + [90,0,0]
;
else if(index = 4)
value + [270,0,0];
;
else if(index = 5)
value + [0,180,0]
;
else if(index = 6)
value
;
else value;