Frame 1
best = 0;
ifFrameLoaded (5) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 4
stop();
Frame 5
restart = false;
scrollSpeed = 8;
movieHeight = 300;
movieWidth = 400;
stop();
Instance of Symbol 28 MovieClip "wallBlock" in Frame 5
onClipEvent (load) {
scrollSpeed = _root.scrollSpeed;
}
onClipEvent (enterFrame) {
if ((this._name != "wallBlock") && (_root.helicopter.scrollStart == true)) {
this._x = this._x - scrollSpeed;
if (this.hitTest(_root.helicopter)) {
_root.helicopter.broken = true;
_root.helicopter.yspeed = 0;
_root.helicopter.gravity = 0;
_root.helicopter.scrollStart = false;
_root.helicopter.play();
}
if (0 >= this._x) {
this.removeMovieClip();
}
}
if (_root.restart == true) {
this.removeMovieClip();
}
}
Instance of Symbol 29 MovieClip "blockController" in Frame 5
onClipEvent (load) {
y1 = this._y;
y1Max = (_root.movieHeight - (this._height / 2)) - 5;
y1Min = (this._height / 2) + 5;
range = y1Max - y1Min;
y2 = random(range) + (this._height / 2);
x = random(30) + 30;
ySpeed = (y2 - y1) / x;
shrinkSpeed = 0.08;
}
onClipEvent (enterFrame) {
if (_root.helicopter.scrollStart == true) {
y1 = this._y;
y1Max = (_root.movieHeight - (this._height / 2)) - 5;
y1Min = (this._height / 2) + 5;
range = y1Max - y1Min;
if (((y2 + 5) >= y1) && (y1 >= (y2 - 5))) {
y2 = random(range) + (this._height / 2);
x = random(60) + 1;
ySpeed = (y2 - y1) / x;
}
this._y = this._y + ySpeed;
if (180 < this._height) {
this._height = this._height - shrinkSpeed;
}
}
if (_root.restart == true) {
this.removeMovieClip();
}
}
Instance of Symbol 30 MovieClip "obstacle" in Frame 5
onClipEvent (load) {
scrollSpeed = _root.scrollSpeed;
}
onClipEvent (enterFrame) {
if ((this._name != "obstacle") && (_root.helicopter.scrollStart == true)) {
this._x = this._x - scrollSpeed;
if (this.hitTest(_root.helicopter)) {
_root.helicopter.broken = true;
_root.helicopter.yspeed = 0;
_root.helicopter.gravity = 0;
_root.helicopter.scrollStart = false;
_root.helicopter.play();
}
if (0 >= this._x) {
this.removeMovieClip();
}
}
if (_root.restart == true) {
this.removeMovieClip();
}
}
Instance of Symbol 31 MovieClip "wallA" in Frame 5
onClipEvent (load) {
scrollSpeed = _root.scrollSpeed;
}
onClipEvent (enterFrame) {
if (_root.helicopter.scrollStart == true) {
this._x = this._x - scrollSpeed;
if (this.hitTest(_root.helicopter)) {
_root.helicopter.broken = true;
_root.helicopter.yspeed = 0;
_root.helicopter.gravity = 0;
_root.helicopter.scrollStart = false;
_root.helicopter.play();
}
if (0 >= this._x) {
this.removeMovieClip();
}
}
if (_root.restart == true) {
this.removeMovieClip();
}
}
Instance of Symbol 31 MovieClip "wallB" in Frame 5
onClipEvent (load) {
scrollSpeed = _root.scrollSpeed;
}
onClipEvent (enterFrame) {
if (_root.helicopter.scrollStart == true) {
this._x = this._x - scrollSpeed;
if (this.hitTest(_root.helicopter)) {
_root.helicopter.broken = true;
_root.helicopter.yspeed = 0;
_root.helicopter.gravity = 0;
_root.helicopter.scrollStart = false;
_root.helicopter.play();
}
if (0 >= this._x) {
this.removeMovieClip();
}
}
if (_root.restart == true) {
this.removeMovieClip();
}
}
Instance of Symbol 50 MovieClip "helicopter" in Frame 5
onClipEvent (load) {
this.swapDepths(500);
_root.trail._visible = false;
depthCounter = 1;
gravity = 0;
friction = 0.9;
scrollx = _root.mainGround.ground._width / 2;
scrollStart = false;
maxScrollSpeed = 30;
trailStart = 1;
upSound = new Sound();
upSound.attachSound("upSound");
downSound = new Sound();
downSound.attachSound("downSound");
upSound.setVolume(50);
downSound.setVolume(100);
}
onClipEvent (mouseDown) {
fly = true;
if (broken != true) {
downSound.stop();
upSound.start();
}
}
onClipEvent (mouseUp) {
fly = false;
if (broken != true) {
upSound.stop();
downSound.start();
}
}
onClipEvent (enterFrame) {
if (broken != true) {
scrollSpeed = ((this._x / _root.mainGround.ground._width) * maxScrollSpeed) + 2;
if ((fly == true) && (crashed != true)) {
yspeed = yspeed - 2;
gravity = 1.25;
scrollStart = true;
this._rotation = -5;
}
if (fly == false) {
this._rotation = 1;
}
if (scrollStart == true) {
_root.trail.duplicateMovieClip("trail" + depthCounter, depthCounter);
_root["trail" + depthCounter]._visible = true;
_root["trail" + depthCounter]._y = this._y;
depthCounter++;
if (depthCounter >= 99) {
depthCounter = 1;
}
}
yspeed = yspeed + gravity;
yspeed = yspeed * friction;
if (((_y + yspeed) + (_height / 2)) >= _root.wall1._y) {
_y = (_root.wall1._y - (_height / 2));
broken = true;
yspeed = 0;
gravity = 0;
scrollStart = false;
this.gotoAndPlay("floor");
} else if (_root.wall3._y >= ((_y + yspeed) - (_height / 2))) {
_y = (_root.wall3._y + (_height / 2));
yspeed = -yspeed;
} else {
_y = (_y + yspeed);
}
if (((_x + xspeed) + (_width / 2)) >= _root.wall2._x) {
_x = (_root.wall2._x - (_width / 2));
xspeed = -xspeed;
} else if (_root.wall4._x >= ((_x + xspeed) - (_width / 2))) {
_x = (_root.wall4._x + (_width / 2));
xspeed = -xspeed;
} else {
_x = (_x + xspeed);
}
xspeed = xspeed * friction;
}
if (_root.restart == true) {
this.removeMovieClip();
}
}
Instance of Symbol 51 MovieClip "trail" in Frame 5
onClipEvent (load) {
trailMoveSpeed = _root.scrollSpeed;
this._y = _root.helicopter._y;
this._x = (_root.helicopter._x - (_root.helicopter._width / 2)) - 4;
}
onClipEvent (enterFrame) {
if (this._name != "trail") {
this._x = this._x - trailMoveSpeed;
if (this._x < 0) {
this.removeMovieClip();
}
}
}
Instance of Symbol 53 MovieClip in Frame 5
onClipEvent (load) {
depthCounter = 100;
flag = false;
}
onClipEvent (enterFrame) {
if (_root.helicopter.scrollStart == true) {
if (flag == false) {
flag = true;
_root.wallBlock.duplicateMovieClip("wallBlock" + depthCounter, depthCounter);
_root.wallBlock.duplicateMovieClip(("wallBlock" + depthCounter) + 1, depthCounter + 1);
_root["wallBlock" + depthCounter]._y = (_root.blockController._y - (_root.blockController._height / 2)) - (_root.wallBlock._height / 2);
_root[("wallBlock" + depthCounter) + 1]._y = (_root.blockController._y + (_root.blockController._height / 2)) + (_root.wallBlock._height / 2);
}
if (((_root.wallBlock._x - (0.75 * _root.wallBlock._width)) >= _root["wallBlock" + depthCounter]._x) && (_root["wallBlock" + depthCounter]._x >= (_root.wallBlock._x - (1.25 * _root.wallBlock._width)))) {
depthCounter = depthCounter + 2;
if (depthCounter >= 299) {
depthCounter = 100;
}
_root.wallBlock.duplicateMovieClip("wallBlock" + depthCounter, depthCounter);
_root.wallBlock.duplicateMovieClip(("wallBlock" + depthCounter) + 1, depthCounter + 1);
_root["wallBlock" + depthCounter]._y = (_root.blockController._y - (_root.blockController._height / 2)) - (_root.wallBlock._height / 2);
_root[("wallBlock" + depthCounter) + 1]._y = (_root.blockController._y + (_root.blockController._height / 2)) + (_root.wallBlock._height / 2);
}
}
}
Instance of Symbol 54 MovieClip in Frame 5
onClipEvent (load) {
depthCounter = 400;
flag = false;
}
onClipEvent (enterFrame) {
if (_root.helicopter.scrollStart == true) {
if (flag == false) {
flag = true;
_root.obstacle.duplicateMovieClip("obstacle" + depthCounter, depthCounter);
_root["obstacle" + depthCounter]._y = random(100) + 100;
}
if (((_root.movieWidth / 2) >= _root["obstacle" + depthCounter]._x) && (((_root.movieWidth / 2) - _root.obstacle._width) >= _root["obstacle" + depthCounter]._x)) {
depthCounter++;
if (depthCounter >= 420) {
depthCounter = 400;
}
_root.obstacle.duplicateMovieClip("obstacle" + depthCounter, depthCounter);
_root["obstacle" + depthCounter]._y = random(100) + 100;
}
}
}
Instance of Symbol 15 MovieClip [startText] in Frame 5
onClipEvent (mouseDown) {
this.nextFrame();
}
Instance of Symbol 60 MovieClip in Frame 5
onClipEvent (load) {
this.swapDepths(600);
distance = 0;
}
onClipEvent (enterFrame) {
if (_root.helicopter.scrollStart == true) {
distance = distance + 1;
}
if (_root.restart == true) {
if (_root.best < distance) {
_root.best = distance;
}
this.removeMovieClip();
}
}
Instance of Symbol 62 MovieClip in Frame 5
onClipEvent (load) {
this.swapDepths(1000);
}
Frame 6
restart = true;
play();
Frame 7
gotoAndStop (5);
Symbol 10 MovieClip [broken] Frame 1
play();
Symbol 10 MovieClip [broken] Frame 6
stop();
Symbol 14 MovieClip [startText] Frame 1
stop();
Symbol 14 MovieClip [startText] Frame 2
stop();
Symbol 15 MovieClip [startText] Frame 1
stop();
Symbol 15 MovieClip [startText] Frame 2
stop();
Symbol 18 MovieClip Frame 1
_root.gotoAndPlay(5);
Symbol 24 Button
on (release) {
getURL ("http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash");
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 2
play();
stopAllSounds();
Symbol 50 MovieClip Frame 70
_root.nextFrame();