I'm giving it a go. I'm almost clueless to AS, so I took a tutorial file (1mb) and stripped it.
It's a classic catapult game, similar Hedgehog Launch.
After removing one power-up and unnecessary AS, shortening all the text, simplifying graphics and decreasing the size of the whole thing, I still can't get it below 2.15kb.
http://spamtheweb.com/ul/upload/011008/6 8491_43-catapult-small.php
var objectArray:Array = new Array();
var objectcount = 0;
var distance:Number = 0;
function newGame() {
for (var i = 0; i<objectArray.length; i++) {
removeMovieClip(objectArray[i].toString());
}
objectArray = [];
if (projectile) {
removeMovieClip("projectile");
}
createCatapult();
}
newGame();
function createCatapult() {
this.attachMovie("catapult", "catapult", this.getNextHighestDepth(), {_x:50, _y:100});
loadCatapult();
}
function loadCatapult() {
delete catapult.onEnterFrame;
catapult.onEnterFrame = function() {
catapult.arm._rotation -= 2;
if (catapult.arm._rotation<=-90) {
displayLaunchButton();
delete catapult.onEnterFrame;
}
};
}
function displayLaunchButton() {
this.attachMovie("launchbutton", "launchbutton", this.getNextHighestDepth(), {_x:0, _y:30});
launchbutton.onPress = function() {
releaseCatapult();
};
}
function releaseCatapult() {
distance = 0;
delete catapult.onEnterFrame;
catapult.onEnterFrame = function() {
catapult.arm._rotation += 15;
if (catapult.arm._rotation>=0) {
delete catapult.onEnterFrame;
fireprojectile();
}
};
}
function fireprojectile() {
removeMovieClip("catapult");
this.attachMovie("projectile", "projectile", this.getNextHighestDepth(), {_x:40, _y:100});
projectile.dx = launchbutton.highorlong.highorlongslider._x/3;
projectile.dy = 3-launchbutton.highorlong.highorlongslider._y/5;
launchbutton.removeMovieClip();
onEnterFrame = function () {
distance += projectile.dx;
dist = Math.floor(distance);
if (dist>bestdist) {
bestdist = dist;
}
projectile._x += projectile.dx;
projectile.dy -= .2;
projectile._y -= projectile.dy;
if (projectile._x>=Stage.width/2) {
shiftObjects(Stage.width/2-projectile._x);
projectile._x = Stage.width/2;
}
if (projectile._y>Stage.height-20) {
projectile._y = (Stage.height-20);
projectile.dy *= -0.8;
projectile.dx *= 0.8;
}
switch (Math.floor(Math.random()*2)) {
case 1 :
fancount = 0;
for (var i = 0; i<objectArray.length; i++) {
if (objectArray[i].indexOf("fan") != -1) {
fancount++;
}
}
if (fancount<4) {
addObject("fan");
}
break;
}
for (var i = 0; i<objectArray.length; i++) {
if (eval(objectArray[i].toString())._x+eval(objectArray[i].toString())._width<0) {
removeMovieClip(objectArray[i].toString());
objectArray.splice(i, 1);
} else if (objectArray[i].indexOf("trampoline") != -1) {
if (projectile.hitTest(eval(objectArray[i].toString()))) {
projectile.dy = Math.abs(projectile.dy*1.15);
}
} else if (objectArray[i].indexOf("fan") != -1) {
if (projectile.hitTest(eval(objectArray[i].toString()))) {
projectile.dx *= 1.2;
projectile.dy *= 1.15;
}
}
}
if (Math.abs(projectile.dy)<.5 && projectile.dx<.5) {
delete onEnterFrame;
loseGame();
}
};
}
function addObject(inputObject) {
objectArray.push((inputObject)+(++objectcount));
this.attachMovie(inputObject, (inputObject)+objectcount, this.getNextHighestDepth(), {_x:Stage.width+15, _y:Stage.height});
projectile.swapDepths(this.getNextHighestDepth());
}
function shiftObjects(shiftdistance) {
for (var i = 0; i<objectArray.length; i++) {
eval(objectArray[i])._x += shiftdistance;
}
}
//END
function loseGame() {
this.attachMovie("losescreen", "losescreen", this.getNextHighestDepth(), {_x:50, _y:50});
losescreen.score.text = Math.floor(distance);
losescreen.replay.onPress = function() {
newGame();
removeMovieClip(losescreen);
};
}