Here it is. My masterpiece.
Dodge the Boxes (25 lines):
[FONT=Courier New][/FONT]
hitsLeft = _root.createTextField("hitsLeft", 3, 10, 368, 400, 22);
_root.stuff = {alive:true, age:0, score:0, hits:0, gameOver:[[196, 144], [196, 136], [188, 136], [180, 136], [172, 136], [164, 136], [164, 144], [164, 152], [164, 160], [164, 168], [164, 176], [172, 176], [180, 176], [188, 176], [196, 176], [196, 168], [196, 160], [188, 160], [212, 176], [216, 168], [220, 160], [224, 152], [228, 144], [232, 136], [236, 144], [240, 152], [244, 160], [248, 168], [256, 176], [228, 160], [236, 160], [268, 176], [272, 168], [276, 160], [280, 152], [284, 144], [288, 136], [292, 144], [296, 152], [300, 160], [304, 168], [308, 176], [312, 168], [316, 160], [320, 152], [324, 144], [328, 136], [332, 144], [336, 152], [340, 160], [344, 168], [348, 176], [364, 136], [372, 136], [380, 136], [388, 136], [396, 136], [364, 144], [364, 152], [372, 156], [380, 156], [388, 156], [364, 160], [364, 168], [364, 176], [372, 176], [380, 176], [388, 176], [396, 176], [188, 192], [196, 192], [204, 192], [212, 192], [220, 192], [188, 200], [220, 200], [188, 208], [220, 208], [188, 216], [220, 216], [188, 224], [220, 224], [188, 232], [196, 232], [204, 232], [212, 232], [220, 232], [236, 192], [240, 200], [244, 208], [248, 216], [252, 224], [256, 232], [260, 224], [264, 216], [268, 208], [272, 200], [276, 192], [292, 192], [300, 192], [308, 192], [316, 192], [324, 192], [292, 200], [292, 208], [300, 212], [308, 212], [316, 212], [292, 216], [292, 224], [292, 232], [300, 232], [308, 232], [316, 232], [324, 232], [340, 192], [348, 192], [356, 192], [364, 192], [372, 192], [340, 200], [372, 200], [340, 208], [372, 208], [340, 216], [348, 216], [356, 216], [364, 216], [372, 216], [340, 224], [368, 224], [340, 232], [372, 232]]};
(_root.createEmptyMovieClip("holder", 1)).attachBitmap((all=new flash.display.BitmapData(550, 400, true)), 1);
drawBox((box=holder.createEmptyMovieClip("box", 2)));
onEnterFrame = function () {
if (Math.random()*100>Math.max(40, 100-((_root.stuff.age++)/15)) && _root.stuff.alive) {
drawBox((temp=holder.box.duplicateMovieClip("box"+holder.getNextHighestDepth(), holder.getNextHighestDepth(), {_x:550, _y:Math.random()*380, speed:Math.random()*5+5, _alpha:Math.random()*70+30})), true);
temp.onEnterFrame = function() {
(this.hitTest(_root.holder.box)) ? explode(this) : null;
(this._x<-20 && _root.stuff.alive) ? _root.stuff.score++ : null;
(this._x<-20) ? this.removeMovieClip() : this._x -= this.speed;
};
}
holder.box._y += (Math.max(0, Math.min(400, _root._ymouse-10))-box._y)/10;
holder.box._x += (Math.max(0, Math.min(550, _root._xmouse-10))-box._x)/10;
all.draw(new flash.display.BitmapData(550, 400, true, 0x44FFFFFF));
all.draw(holder);
hitsLeft.text = "Score: "+_root.stuff.score+" Hits Remaining: "+((_root.stuff.hits == undefined) ? 0 : (17-_root.stuff.hits));
};
function explode(clip) {
for (var i = 0; i<25; i++) {
drawBox((particle=holder.box.duplicateMovieClip("particle"+_root.holder.getNextHighestDepth(), _root.holder.getNextHighestDepth(), {_x:clip._x, _y:clip._y, vx:Math.random()*20-5, vy:-(Math.random()*10+10), _xscale:20, _yscale:20})), true);
particle.onEnterFrame = function() {
(this._x>550 || this._x<0) ? this.removeMovieClip() : this._x += this.vx;
(this._y>400) ? this.removeMovieClip() : this._y += (this.vy += 3);
};
}
((_root.stuff.hits++)>15) ? die((_root.stuff.alive=false)) : clip.removeMovieClip();
}
function die(bool) {
for (var i = 0; i<_root.stuff.gameOver.length; i++) {
drawBox((particle=holder.box.duplicateMovieClip("particle"+_root.holder.getNextHighestDepth(), _root.holder.getNextHighestDepth(), {_x:clip._x, _y:clip._y, vx:Math.random()*20-5, vy:-(Math.random()*10+10), _xscale:20, _yscale:20, tx:_root.stuff.gameOver*[0], ty:_root.stuff.gameOver*[1]})), false);
particle.onEnterFrame = function() {
this._x += ((this.tx-this._x)/15)+Math.max(0, this.vx -= .3);
this._y += ((this.ty-this._y)/15)+Math.max(0, this.vy -= .3);
};
}
holder.box.removeMovieClip();
}
function drawBox(clip, rand) {
clip.attachBitmap(new flash.display.BitmapData(20, 20, false, ((rand) ? Math.random()*0xFFFFFF : 0x000000)), 1);
}
EDIT: Added score counter
EDIT 2: Fixed score display problem
EDIT 3: My best score is 1616 (before I got bored)