SORRY ! this code is a pure **** hacked in a few minutes on a previous quick try to bit101 25lines contest which I discovered just after it was closed. That’s why it so obfuscated (I removed some most obscure lines though) set to 50 fps and a 0xcccccc background.
use shift to toggle negative depth visibility and space to toggle sinusoidal gig.
clips=[];
nbx=4;
nby=3;
nbz=3;
nbclip=nbx*nby*nbz;
_x+=Stage.width/2;
_y+=Stage.height/2;
tx=0;
ty=0;
tz=0;
x=0;
y=0;
z=-50;
for (var i=0;i < nbclip;i++) clips.push(createEmptyMovieClip("o"+i,i+1));
for (var i in clips) {
clips*.lineStyle(10,0xffffff,100);
clips*.lineTo(0.2,0,0);
clips*.lineStyle(8,0xcccccc,100);
clips*.lineTo(0,0,0);
clips*.x=-Stage.width/4+tx*Stage.width/2/nbx;
clips*.y=-Stage.height/4+ty*Stage.height/2/nby;
clips*.z=tz;
clips*.i=i;
clips*.rotation=Math.random()*360-180;
if (++tx ==nbx) {
tx=0;
if (++ty == nby) {
ty=0;
tz+=0.25;
}
}
}
target=nbclips-1;
this.onEnterFrame=function() {
_rotation=rotation+=(eval("o"+target).rotation-rotation)/20;
x+=(eval("o"+target).x-x)/20;
y+=(eval("o"+target).y-y)/25;
z+=(eval("o"+target).z-0.2-z)/30;
for(var i in clips) {
var mc=clips*;
mc._x=(x-mc.x)/(dz=mc.z-z);
mc._y=(y-mc.y)/(dz);
mc._xscale=mc._yscale=200/(clips*.z-z)* (Key.isToggled(Key.SPACE) ? (Math.sin((mc.i=(mc.i+1)%(nbclip))*2*Math.PI/(nbclip))/2+1) : 1 );
clips*.swapDepths(clips*._xscale);
clips*._visible=Key.isToggled(Key.shift) || clips*._xscale>0;
target= Math.abs(z+0.2-eval("o"+target).z) < 0.05 ? Math.floor(Math.random()*nbclip) : target;
}
};
I wondered: does it correspond to the contest rules ? can someone tell me more about this contest ? I don’t really catch its goal. (pom?)