Here is some code for finding the right ratio of size to distance in perspective. You can also use it for movement as the dif variable is used for in the box movie clip.
It doesn’t seem to matter that the triangle s,P,(x) isn’t right angled. It is only the difference between the angles that’s needed.
var a = 40;
var r = 90;
var s = 20;
var t = 180-(a+r+s);
var N = 40;
var g = 180-(a+t);
var h = 30;
for (i=0; i<N; i++) {
var P = 180-(((a/N)*i)+g);
var base = h/(Math.tan(P));
_root.attachMovie(“box”, “box”+i, i);
_root["box"+i]._xscale = base;
_root["box"+i]._yscale = base;
_root["box"+i].id = i;
_root["box"+i].dif = base;
}
Click here for the link to the swf
and here to download th fla file
