Frame 1
stop();
_root.fadeOutShape();
this.onEnterFrame = function () {
BytesTotal = this.getBytesTotal();
BytesLoaded = this.getBytesLoaded();
percent2 = Math.ceil((BytesLoaded * 100) / BytesTotal);
i = 1;
while (i <= 10) {
j = i * 10;
if (percent2 >= j) {
this.loader.red.gotoAndPlay(percent2 - 9);
}
i++;
}
if (BytesTotal == BytesLoaded) {
ifFrameLoaded (15) {
this.gotoAndStop(8);
delete this.onEnterFrame;
}
}
};
Frame 8
function fadeInSound(channel, maxV, inc) {
var myS = this["sound_" + channel];
this["s_" + channel].onEnterFrame = function () {
enters++;
var _local2 = myS.getVolume();
if (_local2 < maxV) {
myS.setVolume(_local2 + inc);
} else {
delete this["s_" + channel].onEnterFrame;
}
};
}
function fadeOutSound(channel, inc, sname) {
trace(channel);
trace(inc);
trace(sname);
var myS = this["sound_" + channel];
this["s_" + channel].onEnterFrame = function () {
var _local2 = myS.getVolume();
trace("sname=" + _local2);
if (_local2 > 0) {
myS.setVolume(_local2 - inc);
} else {
trace("stopped");
StopSound(channel, sname);
delete this.onEnterFrame;
}
};
}
function StopSound(channel, sname) {
this["sound_" + channel].stop([sname]);
this["s_" + channel].removeMovieClip();
}
function startSound(channel, sname, vol, loop, repeat) {
StopSound(channel, sname);
this.createEmptyMovieClip("s_" + channel, 4030400 + channel);
this["sound_" + channel] = new Sound("s_" + channel);
this["sound_" + channel].attachSound(sname);
this["sound_" + channel].setVolume(vol);
if (!repeat) {
channelVol = new Array();
channelVol.push(channel);
channelVol.push(vol);
soundsVolumeArray.push(channelVol);
}
this["sound_" + channel].stop([sname]);
if (loop != -1) {
this["sound_" + channel].start(0, loop);
} else {
this["sound_" + channel].start(0);
this["sound_" + channel].onSoundComplete = function () {
startSound(channel, sname, 100, loop, 1);
};
}
}
function changeVolume(channel, vol) {
return(this["sound_" + channel].setVolume(vol));
}
function fadeDownSound(channel, inc, toValue) {
var myS = this["sound_" + channel];
this["s_" + channel].onEnterFrame = function () {
var _local2 = myS.getVolume() - inc;
myS.setVolume(_local2);
if (_local2 >= toValue) {
} else {
delete this.onEnterFrame;
}
};
}
function fadeDownStop(channel, inc, toValue, sname) {
var myS = this["sound_" + channel];
this["s_" + channel].onEnterFrame = function () {
var _local2 = myS.getVolume() - inc;
myS.setVolume(_local2);
if (_local2 >= toValue) {
} else {
StopSound(channel, sname);
delete this.onEnterFrame;
}
};
}
function fadeUpSound(channel, inc, toValue) {
var myS = this["sound_" + channel];
this["s_" + channel].onEnterFrame = function () {
var _local2 = myS.getVolume() + inc;
myS.setVolume(_local2);
if (_local2 <= toValue) {
} else {
delete this.onEnterFrame;
}
};
}
function myOnKeyDown() {
timePress = timeRemaining;
if ((!collision) && (!gameIsOver)) {
keyPressOnes = 1;
if ((Key.isDown(38) && (Key.getCode() == 39)) || (Key.isDown(39) && (Key.getCode() == 38))) {
dir = "up/right";
} else if ((Key.isDown(38) && (Key.getCode() == 37)) || (Key.isDown(37) && (Key.getCode() == 38))) {
dir = "up/left";
} else if (Key.getCode() == 37) {
dir = "left";
} else if (Key.getCode() == 39) {
dir = "right";
} else if (Key.getCode() == 40) {
dir = "down";
} else if (Key.getCode() == 38) {
dir = "up";
} else if (Key.getCode() == 32) {
testTheBlow();
}
}
}
function testTheBlow() {
if ((dynamiteCount == 4) && (!gameIsOver)) {
if (bg_mc.bg8_mc.endTest_mc.hitTest(Helicopter_mc.chopper_mc.fireImpact_mc) && (keyPressOnes == 1)) {
blowHeli();
gameOver(2);
bg_mc.bg8_mc.hole_mc._alpha = 100;
} else {
gameOver(1);
}
}
}
function myOnKeyUp() {
if ((!collision) && (!gameIsOver)) {
if (Key.isDown(38) && (Key.getCode() == 39)) {
dir = "up";
} else if (Key.isDown(38) && (Key.getCode() == 37)) {
dir = "up";
} else {
dir = "stop";
}
}
}
function degreeToRadian(d) {
r = (d / 180) * Math.PI;
return(r);
}
function createObstacle(mc) {
target = "bg1_mc";
xObstacle = mc._x;
yObstacle = mc._y;
rotationObstacle = mc._rotation;
mc._rotation = mc._rotation - rotationObstacle;
widthObstacle = mc._width;
heightObstacle = mc._height;
mc._rotation = rotationObstacle;
v1 = widthObstacle * Math.sin(degreeToRadian(rotationObstacle));
v2 = widthObstacle * Math.cos(degreeToRadian(rotationObstacle));
v3 = heightObstacle * Math.sin(degreeToRadian(rotationObstacle));
v4 = heightObstacle * Math.cos(degreeToRadian(rotationObstacle));
face1 = createLine(xObstacle, yObstacle, 0 + rotationObstacle, widthObstacle, target);
face2 = createLine(xObstacle + v2, yObstacle + v1, rotationObstacle + 90, heightObstacle, target);
face3 = createLine((xObstacle + v2) - v3, (yObstacle + v4) + v1, rotationObstacle + 180, widthObstacle, target);
face4 = createLine(xObstacle - v3, yObstacle + v4, rotationObstacle + 270, heightObstacle, target);
}
function switchMusic() {
if (!switch4) {
this.startSound(103, "sound_103", 0, -1, 1);
this.fadeInSound(103, 80, 1);
fadeOutSound(100, 1, "sound_100");
switch4 = 1;
}
}
function startTimer() {
startTime = getTimer();
mytime_i = setInterval(timing, 25, startTime);
}
function timing(startTime) {
trace(timeRemaining);
timeRemaining = getTimer() - startTime;
if ((timeRemaining > 90000) && (!voiceMessage)) {
startSound(500, "sound_500", 40, 0, 1);
voiceMessage = 1;
time1 = timeRemaining;
}
if (voiceMessage && ((timeRemaining - time1) > 30000)) {
time1 = timeRemaining;
startSound(500, "sound_500", 40, 0, 1);
}
if (voiceMessage && ((timeRemaining - timePress) > 15000)) {
timePress = timePress + 15000;
startSound(500, "sound_500", 40, 0, 1);
}
secondsElapsed = Math.floor(timeRemaining / 1000);
minutesElapsed = Math.floor(secondsElapsed / 60);
secondsFinalElapsed = secondsElapsed - (minutesElapsed * 60);
milliElapsed = timeRemaining - (secondsElapsed * 1000);
milliElapsedDisplay = Math.floor(milliElapsed / 10);
timeToDisplay = (((minutesElapsed + ":") + secondsFinalElapsed) + ":") + milliElapsedDisplay;
if (minutesElapsed < 10) {
minToDisplay = "0" + minutesElapsed;
} else {
minToDisplay = minutesElapsed;
}
if (secondsFinalElapsed < 10) {
secToDisplay = "0" + secondsFinalElapsed;
} else {
secToDisplay = secondsFinalElapsed;
}
if (milliElapsedDisplay < 10) {
centToDisplay = "0" + milliElapsedDisplay;
} else {
centToDisplay = milliElapsedDisplay;
}
}
function stopTimer() {
clearInterval(mytime_i);
}
function generateFire(interval, bg, fire, id) {
trace(interval);
mc = this.bg_mc[("bg" + bg) + "_mc"]["fire" + fire];
if (bg == 2) {
mc.typeFire = 2;
} else {
mc.typeFire = 1;
}
mc.gotoAndPlay("start");
_root["appearFire" + id] = 0;
_root["fireInterval" + id] = setInterval(createFire, interval, mc, id);
}
function createFire(mc, id) {
if (!_root["appearFire" + id]) {
_root["appearFire" + id] = 1;
appearFire(mc, id);
}
}
function appearFire(mc, id) {
channel = id;
_root["startSoundFire" + id] = 1;
this.startSound(channel, "sound_8", 100, 0, 1);
currentScale = 1;
newScale = 100;
var _local4 = new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Elastic.easeOut, currentScale, newScale, 3, true);
var _local3 = new mx.transitions.Tween(mc, "_yscale", mx.transitions.easing.Elastic.easeOut, currentScale, newScale, 3, true);
_local3.onMotionFinished = function () {
disappearFire(mc, id);
};
}
function disappearFire(mc, id) {
currentScale = 100;
newScale = 1;
var _local5 = new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Elastic.easeOut, currentScale, newScale, 1, true);
var _local3 = new mx.transitions.Tween(mc, "_yscale", mx.transitions.easing.Elastic.easeOut, currentScale, newScale, 1, true);
_local3.onMotionFinished = function () {
_root["appearFire" + id] = 0;
_root["startSoundFire" + id] = 0;
channel = id;
this.fadeOutSound(channel, 20, "sound_8");
};
}
function generateElec(interval, bg, elec, id) {
mc = this.bg_mc[("bg" + bg) + "_mc"]["elec" + elec];
mc.gotoAndPlay("start");
_root["appearElec" + id] = 0;
_root["elecInterval" + id] = setInterval(createElec, interval, mc, id);
}
function createElec(mc, id) {
if (!_root["appearElec" + id]) {
_root["appearElec" + id] = 1;
appearElec(mc, id);
}
}
function appearElec(mc, id) {
currentScale = 1;
newScale = 100;
var _local1 = new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Elastic.easeOut, currentScale, newScale, 3, true);
_local1.onMotionFinished = function () {
disappearElec(mc, id);
};
}
function disappearElec(mc, id) {
currentScale = 100;
newScale = 1;
var _local2 = new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Elastic.easeOut, currentScale, newScale, 1, true);
_local2.onMotionFinished = function () {
_root["appearElec" + id] = 0;
};
}
function nextBackGround(n, g) {
if (g == 1) {
bgArray[1] = n - 1;
bgArray[2] = n;
} else {
bgArray[0] = n;
bgArray[1] = n + 1;
bgArray[2] = n + 2;
}
var _local3 = this.bg_mc.attachMovie(("bg" + n) + "_mc", ("bg" + n) + "_mc", 2 + n);
_local3._x = -135;
if (n == 9) {
_local3._y = -((n - 1) * 360);
_local3._y = _local3._y + 233;
} else {
_local3._y = -((n - 1) * 360);
}
}
function removeBackGround(n, g) {
if (g == 1) {
bgArray[0] = bgArray[1];
}
if (n != 9) {
clearInterval(_root["fireInterval" + n]);
} else {
clearInterval(_root.fireInterval91);
clearInterval(_root.fireInterval92);
}
this.bg_mc[("bg" + n) + "_mc"].removeMovieClip();
lineArray = new Array();
}
function moveBackGroundX() {
this.bg_mc._x = this.bg_mc._x - heli.xmov;
bg.vx = -heli.xmov;
i = 0;
while (i < lineArray.length) {
var _local2 = lineArray[i];
_local2.pStart.x = _local2.pStart.x + bg.vx;
_local2.pStart.y = _local2.pStart.y + 0;
_local2.pEnd.x = _local2.pEnd.x + bg.vx;
_local2.pEnd.y = _local2.pEnd.y + 0;
updateWallValues(_local2, true);
i++;
}
this.bglight_mc._x = this.bglight_mc._x - heli.xmov;
this.bgfront_mc._x = this.bgfront_mc._x - heli.xmov;
}
function moveBackGroundY(n) {
this.bg_mc._y = this.bg_mc._y - heli.ymov;
bg.vy = -heli.ymov;
i = 0;
while (i < lineArray.length) {
var _local2 = lineArray[i];
_local2.pStart.y = _local2.pStart.y + bg.vy;
_local2.pStart.x = _local2.pStart.x + 0;
_local2.pEnd.y = _local2.pEnd.y + bg.vy;
_local2.pEnd.x = _local2.pEnd.x + 0;
updateWallValues(_local2, true);
i++;
}
this.bglight_mc._y = this.bglight_mc._y - heli.ymov;
this.bgfront_mc._y = this.bgfront_mc._y - (heli.ymov * 2);
}
function fan() {
speed = speed * 0.6;
}
function scaleUpHeli() {
scaleUpFinished = 0;
currentScaleX = Helicopter_mc._xscale;
currentScaleY = Helicopter_mc._yscale;
newScaleX = 130;
newScaleY = 130;
var _local1 = new mx.transitions.Tween(Helicopter_mc, "_xscale", mx.transitions.easing.Strong.easeIn, currentScaleX, newScaleX, 10, false);
var _local2 = new mx.transitions.Tween(Helicopter_mc, "_yscale", mx.transitions.easing.Strong.easeIn, currentScaleY, newScaleY, 10, false);
_local1.onMotionFinished = function () {
scaleUpFinished = 1;
scaleDownFinished = 0;
};
}
function scaleDownHeli() {
scaleDownFinished = 0;
currentScaleX = Helicopter_mc._xscale;
currentScaleY = Helicopter_mc._yscale;
newScaleX = 100;
newScaleY = 100;
var _local2 = new mx.transitions.Tween(Helicopter_mc, "_xscale", mx.transitions.easing.Elastic.easeOut, currentScaleX, newScaleX, 1, true);
var _local1 = new mx.transitions.Tween(Helicopter_mc, "_yscale", mx.transitions.easing.Elastic.easeOut, currentScaleY, newScaleY, 1, true);
_local1.onMotionFinished = function () {
scaleUpFinished = 0;
scaleDownFinished = 1;
fanMove = 0;
};
}
function getTempPosition(mc) {
if ((dir == "up") && (!Key.isDown(38))) {
dir = "stop";
}
if (dir == "up/left") {
lastMov = 0;
mc.chopper_mc.chopper.gotoAndStop(17);
speed = speed + 6;
speedTurn = speedTurn + 1;
angle = mc.chopper_mc._rotation - 5;
mc.chopper_mc._rotation = mc.chopper_mc._rotation - 5;
mc.shadow_mc._rotation = mc.shadow_mc._rotation - 5;
directionHeli = "left";
}
if (dir == "up/right") {
lastMov = 0;
speed = speed + 6;
speedTurn = speedTurn + 1;
angle = mc.chopper_mc._rotation + 5;
mc.chopper_mc._rotation = mc.chopper_mc._rotation + 5;
mc.shadow_mc._rotation = mc.shadow_mc._rotation + 5;
directionHeli = "right";
}
if (dir == "left") {
speedTurn = speedTurn + 1;
mc.chopper_mc._rotation = mc.chopper_mc._rotation - speedTurn;
mc.shadow_mc._rotation = mc.shadow_mc._rotation - speedTurn;
angle = mc.chopper_mc._rotation;
mc.chopper_mc.chopper.gotoAndStop(17);
directionHeli = "left";
lastMov = 0;
speed = speed * 0.9;
}
if (dir == "right") {
speedTurn = speedTurn + 1;
mc.chopper_mc._rotation = mc.chopper_mc._rotation + speedTurn;
mc.chopper_mc.chopper.gotoAndStop(7);
mc.shadow_mc._rotation = mc.shadow_mc._rotation + speedTurn;
angle = mc.chopper_mc._rotation;
directionHeli = "right";
addMovement();
speed = speed * 0.98;
lastMov = 0;
}
if (dir == "up") {
mc.chopper_mc.chopper.play();
speed = speed + 1;
angle = mc.chopper_mc._rotation;
directionHeli = "up";
if (fanMove) {
mc.chopper_mc._rotation = mc.chopper_mc._rotation - 4;
mc.shadow_mc._rotation = mc.shadow_mc._rotation - 4;
}
}
if (dir == "down") {
mc.chopper_mc.chopper.play();
directionHeli = "back";
isDown = 1;
speed = speed - 0.5;
angle = mc.chopper_mc._rotation;
if (fanMove) {
mc.chopper_mc._rotation = mc.chopper_mc._rotation + 4;
mc.shadow_mc._rotation = mc.shadow_mc._rotation + 4;
}
} else {
isDown = 0;
}
if (dir == "stop") {
mc.chopper_mc.chopper.play();
if (directionHeli == "right") {
mc.chopper_mc._rotation = mc.chopper_mc._rotation + speedTurn;
mc.shadow_mc._rotation = mc.shadow_mc._rotation + speedTurn;
} else if (directionHeli == "left") {
mc.chopper_mc._rotation = mc.chopper_mc._rotation - speedTurn;
mc.shadow_mc._rotation = mc.shadow_mc._rotation - speedTurn;
} else if (fanMove) {
mc.chopper_mc._rotation = mc.chopper_mc._rotation + 2;
mc.shadow_mc._rotation = mc.shadow_mc._rotation + 2;
}
angle = mc.chopper_mc._rotation;
speed = speed * 0.98;
speedTurn = speedTurn * speedDecrease;
}
if (Math.abs(speed) > 8) {
speed = speed * 0.5;
}
if (Math.abs(speedTurn) > 10) {
speedTurn = speedTurn * 0.5;
}
heli.xmov = Math.round(Math.sin(angle * (Math.PI/180)) * speed);
heli.ymov = Math.round((Math.cos(angle * (Math.PI/180)) * speed) * -1);
circle.vx = heli.xmov;
circle.vy = heli.ymov;
if ((this.bg_mc._y > (bgArray[1] * 360)) && (nBg <= 9)) {
removeBackGround(bgArray[0], 1);
nextId = bgArray[2] + 1;
nextBackGround(nextId, 1);
}
if (this.bg_mc._y < (bgArray[0] * 360)) {
removeBackGround(bgArray[2], 2);
nextId = bgArray[0] - 1;
nextBackGround(nextId, 2);
}
if (this.Helicopter_mc._x < 180) {
if ((this.bg_mc._x < 135) && (heli.xmov < 0)) {
heli.vx = 0;
moveBackGroundX();
} else {
heli.vx = heli.xmov * 2;
}
} else if (this.Helicopter_mc._x >= 300) {
if ((this.bg_mc._x > -25) && (heli.xmov > 0)) {
heli.vx = 0;
moveBackGroundX();
} else {
heli.vx = heli.xmov * 2;
}
} else {
heli.vx = heli.xmov * 2;
}
if (this.Helicopter_mc._y < 180) {
if ((this.bg_mc._y < 2635) && (heli.ymov < 0)) {
heli.vy = 0;
moveBackGroundY(1);
} else {
heli.vy = heli.ymov * 2;
}
} else if (this.Helicopter_mc._y >= 200) {
if ((this.bg_mc._y > 15) && (heli.ymov > 0)) {
heli.vy = 0;
moveBackGroundY(2);
} else {
heli.vy = heli.ymov * 2;
}
} else {
heli.vy = heli.ymov * 2;
}
updateHeliValues();
collisionDetection();
render(heli);
}
function addLife(n) {
c = this.damage._currentframe;
this.damage.onEnterFrame = function () {
if (this._currentframe < 70) {
StopSound(10, "sound_10");
}
if ((this._currentframe > (c - 20)) && (this._currentframe > 0)) {
this.gotoAndStop(this._currentframe - 1);
} else {
delete this.onEnterFrame;
}
};
}
function removeLife(n) {
c = this.damage._currentframe;
this.damage.onEnterFrame = function () {
if ((!_root.soundStoped) && (this._currentframe >= 70)) {
startSound(10, "sound_10", 20, -1, 1);
}
if (this._currentframe < (c + n)) {
this.gotoAndStop(this._currentframe + 1);
} else {
delete this.onEnterFrame;
}
};
}
function convertToClock(n) {
secondsElapsed = Math.floor(n / 1000);
minutesElapsed = Math.floor(secondsElapsed / 60);
secondsFinalElapsed = secondsElapsed - (minutesElapsed * 60);
milliElapsed = n - (secondsElapsed * 1000);
milliElapsedDisplay = Math.floor(milliElapsed / 10);
if (minutesElapsed < 10) {
minToDisplay = "0" + minutesElapsed;
} else {
minToDisplay = minutesElapsed;
}
if (secondsFinalElapsed < 10) {
secToDisplay = "0" + secondsFinalElapsed;
} else {
secToDisplay = secondsFinalElapsed;
}
if (milliElapsedDisplay < 10) {
centToDisplay = "0" + milliElapsedDisplay;
} else {
centToDisplay = milliElapsedDisplay;
}
timeToDisplay = (((minToDisplay + ":") + secToDisplay) + ":") + centToDisplay;
return(timeToDisplay);
}
function gameOver(n) {
StopSound(10, "sound_10");
gameIsOver = 1;
blowHeli();
if (n == 1) {
this.gotoAndPlay("gameover");
this.bg_mc.bg9_mc.detonate_mc._alpha = 0;
} else {
_root.timeM1 = timeRemaining;
_root.timeM1 = convertToClock(_root.timeM1);
_root.scoreM1 = 5000;
if (timeRemaining < 120000) {
trace("timeRemaining=" + timeRemaining);
bonus = Math.ceil((120000 - timeRemaining) / 1000) * 100;
_root.scoreM1 = _root.scoreM1 + bonus;
}
trace("score=" + _root.scoreM1);
this.bg_mc.bg9_mc.detonate_mc._alpha = 0;
_root.fadeInShape("QcopterVideo", "0xFFFFFF");
}
stopTimer();
heli.xmov = 0;
heli.ymov = 0;
delete this.onEnterFrame;
}
function blowHeli() {
this.Helicopter_mc.gotoAndPlay("blowUp");
}
function collisionDetection() {
if ((this.Helicopter_mc._x <= 69) && (keyPressOnes == 1)) {
circle.vxR = circle.vx;
circle.vyR = circle.vy;
bounceHeli(6);
}
if ((this.Helicopter_mc._x >= 414) && (keyPressOnes == 1)) {
circle.vxR = circle.vx;
circle.vyR = circle.vy;
bounceHeli(2);
}
if ((this.Helicopter_mc._y >= 292) && (keyPressOnes == 1)) {
circle.vxR = circle.vx;
circle.vyR = circle.vy;
bounceHeli(4);
}
if ((this.Helicopter_mc._y <= 67) && (keyPressOnes == 1)) {
circle.vxR = circle.vx;
circle.vyR = circle.vy;
bounceHeli(0);
}
i = 0;
while (i < 10) {
k = 0;
while (k < 3) {
j = 0;
while (j < collisionArray[bgArray[k]]) {
if (this.bg_mc[("bg" + bgArray[k]) + "_mc"]["test_mc" + j].hitTest(this.Helicopter_mc["hitPoint" + i].hit) && (keyPressOnes == 1)) {
if (Math.abs(speed) > 6) {
if ((getTimer() - lastWallImpact) > 1500) {
lastWallImpact = getTimer();
removeLife(10);
}
}
circle.vxR = circle.vx;
circle.vyR = circle.vy;
bounceHeli(i);
var _local2 = this.Helicopter_mc["hitPoint" + i].attachMovie("sparks", "sparks", 10);
_local2._xscale = 20;
_local2._yscale = 20;
_local2._x = 0;
_local2._y = -69;
_local2._rotation = -90;
this.startSound(2, "sound_2", 100, 0, 1);
} else {
collision = 0;
}
j++;
}
k++;
}
i++;
}
}
function projectVector(v1, dx, dy) {
var _local2 = (v1.vx * dx) + (v1.vy * dy);
var _local1 = {};
_local1.vx = _local2 * dx;
_local1.vy = _local2 * dy;
return(_local1);
}
function updateHeliValues() {
var _local2 = getTimer();
var _local1 = (_local2 - heli.lastTime) / 100;
heli.vx = heli.vx * _local1;
heli.vy = heli.vy * _local1;
heli.pStart = {};
heli.pStart.x = heli.pEnd.x + heli.vx;
heli.pStart.y = heli.pEnd.y + heli.vy;
heli.length = Math.sqrt((v.vx * v.vx) + (v.vy * v.vy));
heli.dx = heli.vx / heli.length;
heli.dy = heli.vy / heli.length;
heli.rx = -heli.vy;
heli.ry = heli.vx;
heli.lx = heli.vy;
heli.ly = -heli.vx;
heli.lastTime = _local2;
heli.timeFrame = _local1;
}
function bounceHeli(n) {
speedBounce = Math.abs(speed);
speed = speed * -0.5;
if (speedBounce > 2) {
bounce = speedBounce;
} else {
bounce = 2;
}
trace(n);
switch (n) {
case 0 :
heli.pStart.x = heli.pStart.x - 0;
heli.pStart.y = heli.pStart.y + bounce;
break;
case 8 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y + bounce;
break;
case 1 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y + bounce;
break;
case 9 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y + bounce;
break;
case 2 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y + 0;
break;
case 10 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 11 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 3 :
heli.pStart.x = heli.pStart.x - bounce;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 4 :
heli.pStart.x = heli.pStart.x - 0;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 5 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 12 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 13 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y - bounce;
break;
case 6 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y + 0;
break;
case 7 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y + bounce;
break;
case 14 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y + bounce;
break;
case 15 :
heli.pStart.x = heli.pStart.x + bounce;
heli.pStart.y = heli.pStart.y + bounce;
}
}
function render(heli) {
heli.clip._x = heli.pStart.x;
heli.clip._y = heli.pStart.y;
heli.pEnd = heli.pStart;
}
stop();
_quality = "MEDIUM";
var speed = 0;
var speedTurn = 0;
var life = 5;
var collision = 0;
var gameIsOver = 0;
var dynamiteCount = 0;
var speedDecrease = 0.85;
dynamiteArray = [0, 0, 0, 0];
scaleDownFinished = 1;
fanMove = 0;
heli = {};
circle = {};
heli.clip = this.Helicopter_mc;
heli.x = heli.clip._x;
heli.y = heli.clip._y;
heli.radius = (this.Helicopter_mc.helice._width / 2) - 15;
heli.xmov = 0;
heli.ymov = 0;
angle = 0;
heli.lastTime = getTimer();
heli.pEnd = {x:150, y:250};
collisionArray = [0, 3, 4, 5, 4, 5, 6, 6, 4, 0];
keyPressOnes = 0;
var myListener = new Object();
myListener.onKeyDown = myOnKeyDown;
myListener.onKeyUp = myOnKeyUp;
Key.addListener(myListener);
Accessibility.updateProperties();
var myListener = new Object();
myListener.onKeyDown = myOnKeyDown;
myListener.onKeyUp = myOnKeyUp;
Key.addListener(myListener);
Accessibility.updateProperties();
var bg1 = this.bg_mc.attachMovie("bg1_mc", "bg1_mc", 1);
bg1._x = -135;
bg1._y = 0;
var bg2 = this.bg_mc.attachMovie("bg2_mc", "bg2_mc", 2);
bg2._x = -135;
bg2._y = -360;
bgArray = new Array();
bgArray.push(0);
bgArray.push(1);
bgArray.push(2);
fireArray = [0, 0, [4000], [3500], [3000], 0, 0, 0, 0, [2000, 3000]];
elecArray = [0, 0, 0, 0, 0, 0, [8500], [7500], 0, 0];
startTimer();
this.startSound(1, "sound_1", 50, -1, 1);
this.startSound(100, "sound_100", 100, -1, 1);
switch4 = 0;
voiceMessage = 0;
bg = {};
bg.vx = 0;
bg.vy = 0;
lastWallImpact = getTimer();
this.onEnterFrame = function () {
getTempPosition(this.Helicopter_mc);
};
_root.fitToBox(this.qTimeBox, 0, _root.getHigherIN(), 0);
Frame 14
stop();
Symbol 2 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 9 MovieClip [smoke] Frame 30
gotoAndPlay (1);
Symbol 10 MovieClip [ballUp] Frame 30
gotoAndPlay (1);
Symbol 11 MovieClip [ball] Frame 30
gotoAndPlay (1);
Symbol 16 MovieClip Frame 1
typeFire = typeFire;
stop();
Symbol 16 MovieClip Frame 2
lastFireImpact = getTimer();
this.onEnterFrame = function () {
if ((this.hitTest(_parent._parent._parent.Helicopter_mc.chopper_mc.fireImpact_mc) && (_parent._parent._parent.keyPressOnes == 1)) && (this._xscale > 10)) {
if ((getTimer() - lastFireImpact) > 4000) {
lastFireImpact = getTimer();
_parent._parent._parent.removeLife(30);
}
}
};
stop();
if (this.typeFire != 2) {
num = 10;
var i = 0;
while (i < num) {
cur = attachMovie("ball", "ball" + i, i);
var r = ((random(2) == 0) ? 1 : -1);
cur._xscale = 100 * r;
cur._yscale = 100;
cur.gotoAndPlay(random(59) + 1);
cur.cacheAsBitmap = true;
cur.blendMode = 8;
cur._x = (0 + random(20)) - 20;
cur._y = 0;
cur._alpha = 30;
cur.gotoAndPlay(random(29) + 1);
i++;
}
} else {
num = 10;
var i = 0;
while (i < num) {
cur = attachMovie("ballUp", "ballUp" + i, i);
var r = ((random(2) == 0) ? 1 : -1);
cur._xscale = 100 * r;
cur._yscale = 100;
cur.gotoAndPlay(random(59) + 1);
cur.cacheAsBitmap = true;
cur.blendMode = 8;
cur._x = (0 + random(20)) - 20;
cur._y = 0;
cur._alpha = 30;
cur.gotoAndPlay(random(29) + 1);
i++;
}
}
Symbol 37 MovieClip Frame 1
this.onEnterFrame = function () {
if ((this.hitTest(_parent._parent._parent.Helicopter_mc.chopper_mc.fireImpact_mc) && (_parent._parent._parent.keyPressOnes == 1)) && (_parent._parent._parent.damage._currentframe > 0)) {
_parent._parent._parent.startSound(4, "sound_4", 30, 0, 1);
_parent._parent._parent.addLife();
this.gotoAndStop(21);
}
};
Symbol 37 MovieClip Frame 20
gotoAndPlay (1);
Symbol 39 MovieClip Frame 1
idDynamite = this._name.charAt(1);
idDynamite--;
if (_parent._parent._parent.dynamiteArray[idDynamite] == 0) {
this.onEnterFrame = function () {
if (this.hitTest(_parent._parent._parent.Helicopter_mc.chopper_mc.fireImpact_mc) && (_parent._parent._parent.keyPressOnes == 1)) {
_parent._parent._parent.startSound(3, "sound_3", 30, 0, 1);
this.gotoAndPlay(71);
_parent._parent._parent.dynamiteCount++;
_parent._parent._parent.dynamiteArray[idDynamite] = 1;
_parent._parent._parent.rackDynamite_mc.gotoAndStop(_parent._parent._parent.dynamiteCount + 1);
}
};
} else {
this.gotoAndPlay(71);
}
Symbol 39 MovieClip Frame 70
gotoAndPlay (1);
Symbol 39 MovieClip Frame 71
stop();
Symbol 43 MovieClip Frame 1
_root.fitToBox(this.detonateBox, 0, _root.getHigherIN(), 0);
Symbol 45 MovieClip Frame 1
_root.fitToBox(this.entranceBox, 0, _root.getHigherIN(), 0);
Symbol 47 MovieClip [bg9_mc] Frame 1
_parent._parent.generateFire(_parent._parent.fireArray[9][0], 9, 1, 91);
_parent._parent.generateFire(_parent._parent.fireArray[9][1], 9, 2, 92);
detonate_mc._alpha = 0;
this.onEnterFrame = function () {
if (_parent._parent.dynamiteCount == 4) {
detonate_mc._alpha = 100;
delete this.onEnterFrame;
}
};
Symbol 56 MovieClip Frame 1
this.onEnterFrame = function () {
if (this.hitTest(_parent._parent._parent.Helicopter_mc.chopper_mc.fireImpact_mc) && (_parent._parent._parent.keyPressOnes == 1)) {
_parent._parent._parent.speedDecrease = 0.85;
if (((!_parent._parent._parent.scaleUpFinished) && (_parent._parent._parent.scaleDownFinished)) && (!_parent._parent._parent.fanMove)) {
_parent._parent._parent.scaleUpHeli();
_parent._parent._parent.fanMove = 1;
}
} else if (_parent._parent._parent.scaleUpFinished && (!_parent._parent._parent.scaleDownFinished)) {
_parent._parent._parent.scaleDownHeli();
} else {
_parent._parent._parent.speedDecrease = 0.85;
}
};
Symbol 62 MovieClip [bg8_mc] Frame 1
hole_mc._alpha = 0;
Symbol 85 MovieClip Frame 1
lastElecImpact = getTimer();
this.onEnterFrame = function () {
if ((this.hitTest(_parent._parent._parent.Helicopter_mc.chopper_mc.fireImpact_mc) && (_parent._parent._parent.keyPressOnes == 1)) && (this._xscale > 10)) {
if ((getTimer() - lastElecImpact) > 4000) {
lastElecImpact = getTimer();
_parent._parent._parent.removeLife(30);
}
}
};
Symbol 86 MovieClip [bg7_mc] Frame 1
_parent._parent.generateElec(_parent._parent.elecArray[7][0], 7, 1, 71);
Symbol 95 MovieClip Frame 1
this.onEnterFrame = function () {
if (this.hitTest(_parent._parent._parent.Helicopter_mc.chopper_mc.fireImpact_mc) && (_parent._parent._parent.keyPressOnes == 1)) {
trace("coucou");
_parent._parent._parent.switchMusic();
delete this.onEnterFrame;
}
};
Symbol 96 MovieClip [bg6_mc] Frame 1
_parent._parent.generateElec(_parent._parent.elecArray[6][0], 6, 1, 61);
Symbol 104 MovieClip [bg4_mc] Frame 1
_parent._parent.generateFire(_parent._parent.fireArray[4][0], 4, 1, 4);
Symbol 110 MovieClip [bg3_mc] Frame 1
_parent._parent.generateFire(_parent._parent.fireArray[3][0], 3, 1, 3);
Symbol 116 MovieClip [bg2_mc] Frame 1
_parent._parent.generateFire(_parent._parent.fireArray[2][0], 2, 1, 2);
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 10
stop();
Symbol 142 MovieClip Frame 20
stop();
Symbol 142 MovieClip Frame 30
stop();
Symbol 142 MovieClip Frame 40
stop();
Symbol 142 MovieClip Frame 50
stop();
Symbol 142 MovieClip Frame 60
stop();
Symbol 142 MovieClip Frame 70
stop();
Symbol 142 MovieClip Frame 80
stop();
Symbol 142 MovieClip Frame 90
stop();
Symbol 142 MovieClip Frame 100
stop();
Symbol 238 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 239 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 240 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 241 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 242 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 174 MovieClip Frame 1
Symbol 176 MovieClip Frame 1
stop();
Symbol 176 MovieClip Frame 2
stop();
startSmoke = getTimer();
this.onEnterFrame = function () {
if ((getTimer() - startSmoke) > 5000) {
this.gotoAndStop(1);
delete this.onEnterFrame;
}
};
Symbol 176 MovieClip Frame 3
stop();
startElect = getTimer();
this.onEnterFrame = function () {
if ((getTimer() - startElect) > 5000) {
this.gotoAndStop(1);
delete this.onEnterFrame;
}
};
Symbol 195 MovieClip Frame 1
if (!_root.soundStoped) {
_parent._parent.startSound(6, "sound_6", 100, 0, 1);
}
Symbol 195 MovieClip Frame 13
stop();
Symbol 196 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 11
stop();
this._alpha = 0;
Symbol 207 MovieClip Frame 1
_root.fitToBox(this.qCriticalBox, 0, _root.getHigherIN(), 0);
Symbol 212 MovieClip Frame 1
stop();
_root.fitToBox(this.qDamageBox1, 0, _root.getHigherIN(), 0);
_root.fitToBox(this.qDamageBox2, 0, _root.getHigherIN(), 0);
Symbol 212 MovieClip Frame 100
stop();
_parent.gameOver(1);
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 2
stop();
Symbol 219 MovieClip Frame 3
stop();
Symbol 219 MovieClip Frame 4
stop();
Symbol 219 MovieClip Frame 5
stop();
Symbol 237 MovieClip Frame 50
stop();
_root.fadeInShape("qcopter start", "0x000000");