Frame 1
speed = 0;
i = 0;
timer = 0;
abort = false;
stage.stop();
cleanStage = false;
onEnterFrame = function () {
if ((0 < timer) and (abort == false)) {
timer = timer - 1;
}
if ((!Key.isDown(Key.DOWN)) and (!Key.isDown(Key.UP))) {
stat = "idle";
}
if ((stat == "idle") and (0 < speed)) {
speed--;
}
if (speed == 0) {
speedometer.needle._rotation = -90;
}
if ((1 >= speed) and (0 < speed)) {
speedometer.needle._rotation = -75;
}
if ((2 >= speed) and (1 < speed)) {
speedometer.needle._rotation = -50;
}
if ((3 >= speed) and (2 < speed)) {
speedometer.needle._rotation = -25;
}
if ((4 >= speed) and (3 < speed)) {
speedometer.needle._rotation = 0;
}
if (Key.isDown(Key.UP)) {
stat = "forward";
if (((-6) < speed) and (speed < 6)) {
speed = speed + 0.5;
}
vehicle._x = vehicle._x + (Math.sin((vehicle._rotation * Math.PI) / 180) * speed);
vehicle._y = vehicle._y + (Math.cos((vehicle._rotation * Math.PI) / 180) * (-speed));
}
if (Key.isDown(Key.DOWN)) {
stat = "reverse";
if (speed < 4) {
speed = speed + 0.5;
}
vehicle._x = vehicle._x + (Math.sin((vehicle._rotation * Math.PI) / 180) * (-speed));
vehicle._y = vehicle._y + (Math.cos((vehicle._rotation * Math.PI) / 180) * speed);
}
if (Key.isDown(Key.LEFT)) {
if (0 < speed) {
stat = "left";
vehicle._rotation = vehicle._rotation - 4;
}
}
if (Key.isDown(Key.RIGHT)) {
if (0 < speed) {
stat = "right";
vehicle._rotation = vehicle._rotation + 4;
}
}
};
Instance of Symbol 101 MovieClip "mc4" in Frame 1
on (press) {
_root.cleanStage = true;
_root.stage.nextFrame();
}
on (release) {
_root.cleanStage = false;
}
Instance of Symbol 103 MovieClip "mc5" in Frame 1
on (press) {
_root.cleanStage = true;
_root.stage.prevFrame();
}
on (release) {
_root.cleanStage = false;
}
Instance of Symbol 109 MovieClip "mc6" in Frame 1
on (press) {
_root.cleanStage = true;
_root.stage.resetLevel();
_root.stage.resetCar();
}
on (release) {
_root.cleanStage = false;
}
Symbol 69 MovieClip Frame 1
_root.mc8._visible = true;
onEnterFrame = function () {
if (_root.vehicle.bounds.hitTest(mc1)) {
mc1._rotation = _root.vehicle._rotation;
mc1._x = mc1._x + (Math.sin((mc1._rotation * Math.PI) / 180) * _root.speed);
mc1._y = mc1._y + (Math.cos((mc1._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc2)) {
mc2._rotation = _root.vehicle._rotation;
mc2._x = mc2._x + (Math.sin((mc2._rotation * Math.PI) / 180) * _root.speed);
mc2._y = mc2._y + (Math.cos((mc2._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc3)) {
mc3._rotation = _root.vehicle._rotation;
mc3._x = mc3._x + (Math.sin((mc3._rotation * Math.PI) / 180) * _root.speed);
mc3._y = mc3._y + (Math.cos((mc3._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc4)) {
mc4._rotation = _root.vehicle._rotation;
mc4._x = mc4._x + (Math.sin((mc4._rotation * Math.PI) / 180) * _root.speed);
mc4._y = mc4._y + (Math.cos((mc4._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc5)) {
mc5._rotation = _root.vehicle.bounds._rotation;
mc5._x = mc5._x + (Math.sin((mc5._rotation * Math.PI) / 180) * _root.speed);
mc5._y = mc5._y + (Math.cos((mc5._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc6)) {
mc6._rotation = _root.vehicle._rotation;
mc6._x = mc6._x + (Math.sin((mc6._rotation * Math.PI) / 180) * _root.speed);
mc6._y = mc6._y + (Math.cos((mc6._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc7)) {
mc7._rotation = _root.vehicle._rotation;
mc7._x = mc7._x + (Math.sin((mc7._rotation * Math.PI) / 180) * _root.speed);
mc7._y = mc7._y + (Math.cos((mc7._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc8)) {
mc8._rotation = _root.vehicle._rotation;
mc8._x = mc8._x + (Math.sin((mc8._rotation * Math.PI) / 180) * _root.speed);
mc8._y = mc8._y + (Math.cos((mc8._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc9)) {
mc9._rotation = _root.vehicle._rotation;
mc9._x = mc9._x + (Math.sin((mc9._rotation * Math.PI) / 180) * _root.speed);
mc9._y = mc9._y + (Math.cos((mc9._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc10)) {
mc10._rotation = _root.vehicle._rotation;
mc10._x = mc10._x + (Math.sin((mc10._rotation * Math.PI) / 180) * _root.speed);
mc10._y = mc10._y + (Math.cos((mc10._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc11)) {
mc11._rotation = _root.vehicle._rotation;
mc11._x = mc11._x + (Math.sin((mc11._rotation * Math.PI) / 180) * _root.speed);
mc11._y = mc11._y + (Math.cos((mc11._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc12)) {
mc12._rotation = _root.vehicle._rotation;
mc12._x = mc12._x + (Math.sin((mc12._rotation * Math.PI) / 180) * _root.speed);
mc12._y = mc12._y + (Math.cos((mc12._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc13)) {
mc13._rotation = _root.vehicle._rotation;
mc13._x = mc13._x + (Math.sin((mc13._rotation * Math.PI) / 180) * _root.speed);
mc13._y = mc13._y + (Math.cos((mc13._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bounds.hitTest(mc14)) {
mc14._rotation = _root.vehicle._rotation;
mc14._x = mc14._x + (Math.sin((mc14._rotation * Math.PI) / 180) * _root.speed);
mc14._y = mc14._y + (Math.cos((mc14._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc1)) {
mc1._rotation = _root.vehicle._rotation;
mc1._x = mc1._x + (Math.sin((mc1._rotation * Math.PI) / 180) * _root.speed);
mc1._y = mc1._y + (Math.cos((mc1._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc2)) {
mc2._rotation = _root.vehicle._rotation;
mc2._x = mc2._x + (Math.sin((mc2._rotation * Math.PI) / 180) * _root.speed);
mc2._y = mc2._y + (Math.cos((mc2._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc3)) {
mc3._rotation = _root.vehicle._rotation;
mc3._x = mc3._x + (Math.sin((mc3._rotation * Math.PI) / 180) * _root.speed);
mc3._y = mc3._y + (Math.cos((mc3._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc4)) {
mc4._rotation = _root.vehicle._rotation;
mc4._x = mc4._x + (Math.sin((mc4._rotation * Math.PI) / 180) * _root.speed);
mc4._y = mc4._y + (Math.cos((mc4._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc5)) {
mc5._rotation = _root.vehicle.bound._rotation;
mc5._x = mc5._x + (Math.sin((mc5._rotation * Math.PI) / 180) * _root.speed);
mc5._y = mc5._y + (Math.cos((mc5._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc6)) {
mc6._rotation = _root.vehicle._rotation;
mc6._x = mc6._x + (Math.sin((mc6._rotation * Math.PI) / 180) * _root.speed);
mc6._y = mc6._y + (Math.cos((mc6._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc7)) {
mc7._rotation = _root.vehicle._rotation;
mc7._x = mc7._x + (Math.sin((mc7._rotation * Math.PI) / 180) * _root.speed);
mc7._y = mc7._y + (Math.cos((mc7._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc8)) {
mc8._rotation = _root.vehicle._rotation;
mc8._x = mc8._x + (Math.sin((mc8._rotation * Math.PI) / 180) * _root.speed);
mc8._y = mc8._y + (Math.cos((mc8._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc9)) {
mc9._rotation = _root.vehicle._rotation;
mc9._x = mc9._x + (Math.sin((mc9._rotation * Math.PI) / 180) * _root.speed);
mc9._y = mc9._y + (Math.cos((mc9._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc10)) {
mc10._rotation = _root.vehicle._rotation;
mc10._x = mc10._x + (Math.sin((mc10._rotation * Math.PI) / 180) * _root.speed);
mc10._y = mc10._y + (Math.cos((mc10._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc11)) {
mc11._rotation = _root.vehicle._rotation;
mc11._x = mc11._x + (Math.sin((mc11._rotation * Math.PI) / 180) * _root.speed);
mc11._y = mc11._y + (Math.cos((mc11._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc12)) {
mc12._rotation = _root.vehicle._rotation;
mc12._x = mc12._x + (Math.sin((mc12._rotation * Math.PI) / 180) * _root.speed);
mc12._y = mc12._y + (Math.cos((mc12._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc13)) {
mc13._rotation = _root.vehicle._rotation;
mc13._x = mc13._x + (Math.sin((mc13._rotation * Math.PI) / 180) * _root.speed);
mc13._y = mc13._y + (Math.cos((mc13._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(mc14)) {
mc14._rotation = _root.vehicle._rotation;
mc14._x = mc14._x + (Math.sin((mc14._rotation * Math.PI) / 180) * _root.speed);
mc14._y = mc14._y + (Math.cos((mc14._rotation * Math.PI) / 180) * _root.speed);
}
};
Symbol 69 MovieClip Frame 2
function resetLevel() {
mc1._x = -102;
mc1._y = 104;
mc2._x = -37;
mc2._y = 42;
mc3._x = 31;
mc3._y = 104;
mc4._x = 106;
mc4._y = 104;
mc5._x = 106;
mc5._y = 44;
mc10._x = -72;
mc10._y = -118;
mc9._x = -38;
mc9._y = -118;
mc8._x = -38;
mc8._y = -95;
mc7._x = -38;
mc7._y = -74;
mc6._x = -38;
mc6._y = -53;
mc11._x = -102;
mc11._y = -118;
mc12._x = -102;
mc12._y = -95;
mc13._x = -102;
mc13._y = -74;
mc14._x = -102;
mc14._y = -53;
}
function resetCar() {
_root.vehicle._x = 264;
_root.vehicle._y = 312;
_root.vehicle._rotation = 0;
}
_root.mc8._visible = false;
resetLevel();
resetCar();
Instance of Symbol 13 MovieClip "mc15" in Symbol 69 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.vehicle.bound)) {
_root.abort = true;
}
}
Symbol 69 MovieClip Frame 3
function resetLevel() {
mc3._x = 135;
mc3._y = 100;
mc2._x = 64;
mc2._y = 100;
mc6._x = -7;
mc6._y = 100;
mc14._x = -80;
mc14._y = 100;
mc5._x = -80;
mc5._y = 70;
mc4._x = 135;
mc4._y = 70;
mc10._x = 135;
mc10._y = 38;
mc13._x = 64;
mc13._y = 38;
mc1._x = -80;
mc1._y = 38;
mc7._x = -7;
mc7._y = 38;
mc12._x = -7;
mc12._y = -29;
mc8._x = 64;
mc8._y = -29;
mc9._x = 64;
mc9._y = -100;
mc11._x = -7;
mc11._y = -100;
}
function resetCar() {
_root.vehicle._x = 220;
_root.vehicle._y = 295;
_root.vehicle._rotation = 0;
}
_root.mc8._visible = false;
resetLevel();
resetCar();
Symbol 88 MovieClip Frame 1
_root.carInfo = "Fjord Prescott";
Instance of Symbol 115 MovieClip "mc7" in Symbol 119 MovieClip Frame 1
on (press) {
xPos = Math.random() * 100;
yPos = Math.random() * 100;
_root.i = _root.i + 1;
(_root.stage.attachMovie("cone", "cone" + _root.i, _root.i, {_x:xPos, _y:yPos}));// not popped
}
Symbol 122 MovieClip [cone] Frame 1
onEnterFrame = function () {
if (_root.vehicle.bounds.hitTest(this)) {
this._rotation = _root.vehicle._rotation;
this._x = this._x + (Math.sin((this._rotation * Math.PI) / 180) * _root.speed);
this._y = this._y + (Math.cos((this._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.vehicle.bound.hitTest(this)) {
this._rotation = _root.vehicle._rotation;
this._x = this._x + (Math.sin((this._rotation * Math.PI) / 180) * _root.speed);
this._y = this._y + (Math.cos((this._rotation * Math.PI) / 180) * _root.speed);
}
if (_root.cleanStage == true) {
this.removeMovieClip();
}
};