Frame 132
dispatchEvent(new Event("ImDone"));
music_started = true;
Frame 133
sound_track = new Sound(this);
sound_track.attachSound("sound_track");
sound_track.stop();
track_started = false;
Frame 134
stop();
Mouse.show();
buildlevel(1);
enemy_drive.stop();
enemy_drive_started = false;
car_drive_started = false;
if (track_started == false) {
sound_track.start(0, 99);
track_started = true;
}
_root.attachMovie("splash", "splash", 999);
onEnterFrame = function () {
};
Frame 135
function buildlevel(thislevel) {
can_crash = true;
car_drive.stop("car_drive");
waypoint_x = new Array();
waypoint_y = new Array();
newpoint = 0;
car.speed = 1;
i = 0;
while (i < tyre_amount) {
removeMovieClip("tyre" + i);
i++;
}
tyre_amount = 0;
tyre_collected = 0;
point_distance = 101;
ink = 1000;
ink_pct = ink / 100;
go = false;
hit = "not";
i = 0;
while (i < enemy_amount) {
removeMovieClip("enemy" + i);
i++;
}
i = 0;
while (i < (point_amount + 1)) {
removeMovieClip("node" + i);
i++;
}
point_amount = 0;
enemy_amount = 0;
_root.attachMovie("level" + level, "level1", 1);
_root.attachMovie("park_spot", "park_spot", 2);
createEmptyMovieClip("line", 3);
_root.attachMovie("car", "car", 4);
_root.attachMovie("go_btn", "go_btn", 5);
_root.attachMovie("reset_btn", "reset_btn", 6);
_root.attachMovie("ink_bar2", "ink_bar2", 7, {_x:342, _y:5});
_root.attachMovie("ink_bar", "ink_bar", 8, {_x:342, _y:5});
_root.attachMovie("ink_bar3", "ink_bar3", 9, {_x:342, _y:5});
_root.attachMovie("pen", "pen", 10);
go_btn._x = 275;
go_btn._y = 10;
reset_btn._x = 375;
reset_btn._y = 10;
car.point_to_reach = 0;
line.lineStyle(5, 153, 100);
line.filters = new Array(my_glow_filter);
imdrawing = false;
hit_car = false;
switch (level) {
case 1 :
car._x = 297.5;
car._y = 134.5;
park_spot._x = 558;
park_spot._y = 398;
break;
case 2 :
enemy_amount = 1;
i = 0;
while (i < enemy_amount) {
enemy = attachMovie("enemy2", "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 222;
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 398.2;
car._y = 134.5;
park_spot._x = 262;
park_spot._y = 395;
break;
case 3 :
enemy_amount = 1;
i = 0;
while (i < enemy_amount) {
enemy = attachMovie("enemy3", "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 215;
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 297.5;
car._y = 134.5;
park_spot._x = 617;
park_spot._y = 395;
break;
case 4 :
enemy_amount = 2;
i = 0;
while (i < enemy_amount) {
enemy = attachMovie("enemy" + i, "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 225;
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 100);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * 300);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 297.5;
car._y = 134.5;
park_spot._x = 18;
park_spot._y = 395;
break;
case 5 :
tyre_amount = 2;
tyre_collected = 0;
enemy_amount = 2;
i = 0;
while (i < enemy_amount) {
_root.attachMovie("tyre", "tyre0", 12, {_x:185, _y:250});
_root.attachMovie("tyre", "tyre1", 13, {_x:500, _y:250});
enemy = attachMovie("enemy" + (i * 3), "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 222;
_root["enemy" + i]._x = 300;
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 85);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * -300);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 398.2;
car._y = 134.5;
park_spot._x = 365;
park_spot._y = 395;
break;
case 6 :
enemy_amount = 1;
tyre_amount = 1;
tyre_collected = 0;
i = 0;
while (i < enemy_amount) {
_root.attachMovie("tyre", "tyre0", 12, {_x:320, _y:215});
enemy = attachMovie("enemy" + i, "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 225;
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 591.2;
car._y = 134.5;
park_spot._x = 680;
park_spot._y = 415;
park_spot._rotation = 90;
break;
case 7 :
ink = 1500;
enemy_amount = 2;
i = 0;
while (i < enemy_amount) {
enemy = attachMovie("enemy" + i, "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 215;
_root["enemy" + i]._x = 0;
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 85);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * 350);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 658.5;
car._y = 134.5;
park_spot._x = 12;
park_spot._y = 395;
break;
case 9 :
enemy_amount = 2;
i = 0;
while (i < enemy_amount) {
enemy = attachMovie("enemy" + i, "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 225;
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 220);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * 200);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 591.2;
car._y = 134.5;
park_spot._x = 290;
park_spot._y = 415;
park_spot._rotation = 90;
break;
case 10 :
ink = 2000;
tyre_amount = 0;
tyre_collected = 0;
enemy_amount = 6;
a = 0;
i = 0;
while (i < enemy_amount) {
a++;
if (a > 3) {
a = 0;
}
enemy = attachMovie("enemy" + a, "enemy" + i, _root.getNextHighestDepth());
if (i < 3) {
_root["enemy" + i]._y = 222;
_root["enemy" + i]._x = 700;
} else {
_root["enemy" + i]._y = 0;
_root["enemy" + i]._x = 1100;
}
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 75);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * -250);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 398.2;
car._y = 134.5;
park_spot._rotation = 90;
park_spot._x = 250;
park_spot._y = 425;
break;
case 8 :
ink = 3000;
car._x = 658.5;
car._y = 134.5;
park_spot._x = 635;
park_spot._y = 395;
break;
case 11 :
ink = 2000;
enemy_amount = 2;
i = 0;
while (i < enemy_amount) {
enemy = attachMovie("enemy" + i, "enemy" + i, _root.getNextHighestDepth());
_root["enemy" + i]._y = 215;
_root["enemy" + i]._x = 0;
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 85);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * 350);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 658.5;
car._y = 134.5;
park_spot._x = 12;
park_spot._y = 395;
break;
case 12 :
ink = 2000;
tyre_amount = 0;
tyre_collected = 0;
enemy_amount = 6;
a = 0;
i = 0;
while (i < enemy_amount) {
a++;
if (a > 3) {
a = 0;
}
enemy = attachMovie("enemy" + a, "enemy" + i, _root.getNextHighestDepth());
if (i < 3) {
_root["enemy" + i]._y = 216;
_root["enemy" + i]._x = 700;
} else {
_root["enemy" + i]._y = 35;
_root["enemy" + i]._x = 1100;
}
_root["enemy" + i]._y = _root["enemy" + i]._y + (i * 61);
_root["enemy" + i]._x = _root["enemy" + i]._x + (i * -245);
_root["enemy" + i]._rotation = 270;
i++;
}
car._x = 398.2;
car._y = 134.5;
park_spot._rotation = 90;
park_spot._x = 120;
park_spot._y = 435;
}
level_finished = false;
removeMovieClip("interlevel");
if ((enemy_amount > 0) and (enemy_drive_started == false)) {
enemy_drive_started = true;
enemy_drive.start(0, 99);
} else if (enemy_amount == 0) {
enemy_drive.stop("enemy_drive");
}
}
function collision1(mc1, mc2) {
return(mc1.hitTest(mc2));
}
function collision2(mc1, mc2) {
var _local1 = mc1.getBounds(mc1);
var _local2 = mc2.getBounds(mc1);
return((((_local1.xMin <= (_local2.xMax - 8)) && ((_local1.xMax - 8) >= _local2.xMin)) && (_local1.yMin <= (_local2.yMax - 8))) && ((_local1.yMax - 8) >= _local2.yMin));
}
function checkCollision(r1, r2) {
var _local1 = collision1(r1, r2);
var _local3 = collision2(r1, r2);
var _local2 = collision2(r2, r1);
if (_local1) {
green.gotoAndStop(2);
} else {
green.gotoAndStop(1);
}
if (_local3) {
yellow.gotoAndStop(2);
} else {
yellow.gotoAndStop(1);
}
if (_local2) {
blue.gotoAndStop(2);
} else {
blue.gotoAndStop(1);
}
if ((_local1 && (_local3)) && (_local2)) {
red.gotoAndStop(2);
} else {
red.gotoAndStop(1);
}
}
stop();
car_crash = new Sound(this);
car_crash.attachSound("car_crash");
go = false;
game_over = false;
removeMovieClip("splash");
car.speed = 1;
radius = 25;
level = 1;
score = 0;
total_score = 0;
ink_bonus = 0;
point_amount = 0;
i = 1;
while (i < (lives + 1)) {
attachMovie("lives", "lives" + i, 500 + i);
_root["lives" + i]._y = 5;
_root["lives" + i]._x = 500;
_root["lives" + i]._x = _root["lives" + i]._x + (i * 20);
i++;
}
difficulty = 1;
var color = 3394815;
var alpha = 0.8;
var blurX = 35;
var blurY = 35;
var strength = 2;
var quality = 3;
var inner = false;
var knockout = false;
var my_glow_filter = (new flash.filters.GlowFilter(color, alpha, blurX, blurY, strength, quality, inner, knockout));
go = false;
buildlevel(level);
onEnterFrame = function () {
if (hit == "argh") {
dot._x++;
if (can_crash == true) {
car_crash.start();
}
can_crash = false;
}
if (point_amount < 0) {
point_amount = 0;
}
if (_root._ymouse < 60) {
Mouse.show();
pen._visible = false;
can_draw = false;
} else {
Mouse.hide();
pen._visible = true;
can_draw = true;
}
pen._x = _root._xmouse;
pen._y = _root._ymouse;
go_btn.onRollOver = function () {
go_btn.gotoAndStop(2);
};
go_btn.onRollOut = function () {
go_btn.gotoAndStop(1);
};
reset_btn.onRollOver = function () {
reset_btn.gotoAndStop(2);
};
reset_btn.onRollOut = function () {
reset_btn.gotoAndStop(1);
};
reset_btn.onRelease = function () {
if ((level_finished == false) and (game_over == false)) {
removeMovieClip("lives" + lives);
lives--;
buildlevel(level);
}
};
if (((_root.park_spot.hitTest(car._x, car._y + radius, true) and _root.park_spot.hitTest(car._x, car._y - radius, true)) and _root.park_spot.hitTest(car._x - radius, car._y, true)) and _root.park_spot.hitTest(car._x + radius, car._y, true)) {
hit = "top";
_root.park_spot.gotoAndStop(2);
if (car.speed == 0) {
if (tyre_collected == tyre_amount) {
if (level_finished == false) {
score = (level * difficulty) * 1000;
ink_bonus = ink;
total_score = total_score + (score + ink_bonus);
level_finished = true;
if (level < 12) {
attachMovie("interlevel", "interlevel", _root.getNextHighestDepth(), {_x:175, _y:125});
} else {
attachMovie("gameover", "gameover", _root.getNextHighestDepth(), {_x:175, _y:125});
}
}
Mouse.show();
}
}
} else if (hit == "top") {
hit = "not";
_root.park_spot.gotoAndStop(1);
}
if (((level1.boundries.hitTest(_root.car._x, _root.car._y + radius, true) or level1.boundries.hitTest(_root.car._x, _root.car._y - radius, true)) or level1.boundries.hitTest(_root.car._x - radius, _root.car._y, true)) or level1.boundries.hitTest(_root.car._x + radius, _root.car._y, true)) {
hit = "argh";
}
i = 0;
while (i < tyre_amount) {
_root["tyre" + i].onEnterFrame = function () {
if (this.hitTest(_root.car)) {
tyre_collected++;
removeMovieClip(this);
}
};
i++;
}
i = 0;
while (i < enemy_amount) {
_root["enemy" + i].onEnterFrame = function () {
if (level > 1) {
if ((hit_car == false) and (level_finished == false)) {
this._x = this._x + difficulty;
}
if (this._x > 750) {
this._x = -50;
} else if (level == 11) {
if ((hit_car == false) and (level_finished == false)) {
this._x = this._x + 1.25;
}
if (this._x > 750) {
this._x = -50;
}
}
_root.checkCollision(this, _root.car);
if (_root.red._currentframe == 2) {
hit_car = true;
enemy_drive.stop("enemy_drive");
car_drive.stop("car_drive");
crash = true;
enemy_drive_started = false;
hit = "argh";
}
}
};
i++;
}
go_btn.onPress = function () {
if ((level_finished == false) and (game_over == false)) {
if (go == false) {
point_amount--;
point_distance = 0;
ink++;
car_drive.start(0, 99);
go = true;
}
}
};
if (go == true) {
if (_root["node" + car.point_to_reach].hitTest(car)) {
car.speed = 1;
} else {
car.speed = car.speed * 0.99;
if (car.speed < 0.1) {
car.speed = 0;
}
}
if (hit == "argh") {
car.speed = 0;
}
car.onEnterFrame = function () {
dist_x = waypoint_x[this.point_to_reach] - this._x;
dist_y = waypoint_y[this.point_to_reach] - this._y;
point = Math.abs(dist_x) + Math.abs(dist_y);
if (point < 25) {
this.point_to_reach++;
}
if (this.point_to_reach <= (waypoint_x.length - 1)) {
angle = Math.atan2(dist_y, dist_x);
this._x = this._x + (this.speed * Math.cos(angle));
this._y = this._y + (this.speed * Math.sin(angle));
this._rotation = ((angle / Math.PI) * 180) - 90;
} else {
this._x = this._x + (this.speed * Math.cos(angle));
this._y = this._y + (this.speed * Math.sin(angle));
}
};
}
onMouseDown = function () {
if (((imdrawing == false) and (ink > 0)) and (can_draw == true)) {
if (go == false) {
drew = false;
line.moveTo(_xmouse, _ymouse);
waypoint_x.push(_xmouse);
waypoint_y.push(_ymouse);
imdrawing = true;
_root.attachMovie("node", "node" + point_amount, _root.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
point_amount++;
ink--;
}
}
};
onMouseMove = function () {
if (imdrawing == true) {
if ((go == false) and (can_draw == true)) {
pointx = waypoint_x[point_amount - 1] - _xmouse;
pointy = waypoint_y[point_amount - 1] - _ymouse;
if (pointx < 0) {
pointx = pointx * -1;
}
if (pointy < 0) {
pointy = pointy * -1;
}
point_distance = pointx + pointy;
if (ink > point_distance) {
drew = true;
ink = ink - point_distance;
if (level == 7) {
ink_pct = (point_distance + 1) / 37.5;
} else if (level == 8) {
ink_pct = (point_distance + 1) / 75;
} else if (level == 10) {
ink_pct = (point_distance + 1) / 50;
} else if (level == 11) {
ink_pct = (point_distance + 1) / 50;
} else if (level == 12) {
ink_pct = (point_distance + 1) / 50;
} else {
ink_pct = (point_distance + 1) / 25;
}
ink_bar._height = ink_bar._height - ink_pct;
ink_bar._y = ink_bar2._y + (40 - ink_bar._height);
waypoint_x.push(_xmouse);
waypoint_y.push(_ymouse);
_root.attachMovie("node", "node" + point_amount, _root.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
point_amount++;
ink--;
line.lineTo(_xmouse, _ymouse);
}
}
}
};
onMouseUp = function () {
if (go == false) {
if (drew == false) {
point_amount--;
removeMovieClip(_root["node" + point_amount]);
point_distance = 0;
ink++;
waypoint_x.pop(_xmouse);
waypoint_y.pop(_ymouse);
}
}
imdrawing = false;
};
};
Symbol 27 MovieClip [logo] Frame 1
this.onPress = function () {
getURL ("http://www.dedegames.com", "_blank");
};
Symbol 33 MovieClip [menu_btn] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
Mouse.show();
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onPress = function () {
_root.attachMovie("gameover", "gameover", _root.getNextHighestDepth(), {_x:175, _y:125});
};
Symbol 79 MovieClip [reset_btn] Frame 1
stop();
Symbol 82 MovieClip [go_btn] Frame 1
stop();
Symbol 101 MovieClip [park_spot] Frame 1
stop();
Symbol 101 MovieClip [park_spot] Frame 2
stop();
Symbol 111 MovieClip [instructions_bk_btn] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onPress = function () {
removeMovieClip(_root.instructions_splash);
_root.attachMovie("splash", "splash", 999);
};
Symbol 115 MovieClip [car] Frame 1
stop();
Symbol 115 MovieClip [car] Frame 2
stop();
Symbol 123 MovieClip [playmore_btn] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onPress = function () {
getURL ("http://www.dedegames.com", "_blank");
};
Symbol 126 MovieClip [start_btn] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onPress = function () {
_root.gotoAndPlay("game");
};
Symbol 128 MovieClip [instructions_btn] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onPress = function () {
removeMovieClip(_root.splash);
_root.attachMovie("instructions_splash", "instructions_splash", 999);
};
Symbol 131 MovieClip [splash_btn] Frame 1
stop();
Symbol 151 MovieClip [gameover] Frame 1
this.onRollOver = function () {
Mouse.show();
};
this.onPress = function () {
_root.gotoAndPlay("start");
removeMovieClip(this);
};
Symbol 158 MovieClip [interlevel] Frame 1
this.onRollOver = function () {
Mouse.show();
};
this.onPress = function () {
_root.level++;
_root.buildlevel(_root.level);
removeMovieClip(this);
};
Symbol 184 MovieClip Frame 1
stop();