My second entry…
l = f=0;
function create(x, y, w, h, c) {
var k = _root.createEmptyMovieClip("square"+[++l], l);
k.beginFill(c);
k.moveTo(-(w/2), -(h/2));
k.lineTo(-(w/2), -(h/2));
k.lineTo(-(w/2), h/2);
k.lineTo(w/2, h/2);
k.lineTo(w/2, -(h/2));
k._y = x;
k._x = y;
}
setInterval(function () {
for (var i = 0; i<2; i++) {
square1.duplicateMovieClip("nesq"+[++f], getNextHighestDepth(), {_x:square1._x+random(10), _rotation:random(360), dir:random(2), _alpha:random(50)+50, xsp:Math.random()*5, ysp:-Math.random()*20-10, onEnterFrame:function () {
this.dir == 1 ? this._x -= this.xsp : this._x += this.xsp;
this._y>Stage.height ? this.removeMovieClip() : this._y += this.ysp;
!this.hitTest(square2) && !this.hitTest(square3) ? this.ysp++ : null;
while (this.hitTest(square2) || this.hitTest(square3)) {
this._y--;
}
}});
}
}, 10);
create(Stage.height, Stage.width/2, 4, 4, "0xEE0000");
create(Stage.height/1.4, 350, 60, 20, "0x000000");
create(Stage.height/1.4, 175, 60, 20, "0x000000");