Built this one for previous employer. Dynamic (XML) Flash 3D template for photographer portfolio sites. Some fun math!

Includes user-defined colorshifting and speed/duration of animation. Unfortunately that company no longer supports flash. So no guarantees how long the following link will exist…

The math “sort of” explained (this is from my “wall” class, a UI Resizable Object):

// first determine new Xs and Zs //

var __x:Number = __screenWidth * Math.cos(angle1 * Math.PI / 180);

var __z:Number = __screenWidth * Math.sin(angle1 * Math.PI / 180);

var __x2:Number = __screenWidth * Math.cos(angle2 * Math.PI / 180);

var __z2:Number = __screenWidth * Math.sin(angle2 * Math.PI / 180);

// apply to wall “blocks”, left to right //

// block 0 //

var x0:Number = __positionX – __x – __x2 – __screenWidth;

var z0:Number = __z + __z2;

var r0:Number = 0;

// block 1 //

var x1:Number = __positionX – __x – __x2;

var z1:Number = __z + __z2;

var r1:Number = angle2;

// block 2 //

var x2:Number = __positionX – __x;

var z2:Number = __z;

var r2:Number = angle1;

// block 3 //

var x3:Number = __positionX;

var z3:Number = 0;

var r3:Number = 0;

// block 4 //

var x4:Number = __positionX + __screenWidth;

var z4:Number = 0;

var r4:Number = -angle1;

// block 5 //

var x5:Number = __positionX + __screenWidth + (__screenWidth * Math.cos(-angle1 * Math.PI / 180));

var z5:Number = __z;

var r5:Number = -angle2;

// block 6 //

var x6:Number = x5 + (__screenWidth * Math.cos(-angle2 * Math.PI / 180));

var z6:Number = __z + __z2;

var r6:Number = 0;

// set up matrix to be grabbed anywhere in app [x position, z position, y rotation] //

position[0] = [x0, z0, r0];

position[1] = [x1, z1, r1];

position[2] = [x2, z2, r2];

position[3] = [x3, z3, r3];

position[4] = [x4, z4, r4];

position[5] = [x5, z5, r5];

position[6] = [x6, z6, r6];

Sadly, I can’t show you the animation code from the View. I earned this one so I’m keeping it for now. Ping me for details. Later.