Here's a nice little script I know you guys will like...
Just put this on a blank frame and set the framerate to 20:
_global.sw = Stage.width;
_global.sh = Stage.height;
this.createEmptyMovieClip("border", 0);
with (border) {
lineStyle(3, 0xCCCCCC, 75);
lineTo(sw, 0);
lineTo(sw, sh);
lineTo(0, sh);
lineTo(0, 0);
}
this.createEmptyMovieClip("ship", 1);
with (ship) {
beginFill(0x333366, 85);
lineStyle(1, 0x000000);
moveTo(0, -15);
lineTo(-10, 15);
curveTo(0, 5, 10, 15);
lineTo(0, -15);
endFill();
this.onEnterFrame = function() {
if (Key.isDown(Key.LEFT)) _rotation -= 7;
if (Key.isDown(Key.RIGHT)) _rotation += 7;
gx = Math.cos((_rotation - 90) * (Math.PI / 180));
gy = Math.sin((_rotation - 90) * (Math.PI / 180));
if (Key.isDown(Key.UP)) {
ax += gx * 2;
ay += gy * 2;
} else {
ax *= .9;
ay *= .9;
}
_x += ax;
_y += ay;
if (_x < 0) _x = sw;
if (_x > sw) _x = 0;
if (_y < 0) _y = sh;
if (_y > sh) _y = 0;
if (ax > 15) ax = 15;
if (ay > 15) ay = 15;
if (ax < -15) ax = -15;
if (ay < -15) ay = -15;
};
}
Move with arrow keys.