Combined Code
movieClip 9 {
}
movieClip 13 wall1 {
frame 1 {
gotoAndStop(random(20) + 1);
}
}
movieClip 17 {
}
movieClip 18 {
frame 2 {
if (_parent._x < _root.heli._x + 180) {
} else {
gotoAndPlay(1);
}
}
instance of movieClip 17 {
onClipEvent (enterFrame) {
_x = _x - 10;
b = _root.heli.getBounds(_root);
if (this.hitTest(_root.heli)) {
_root.heli.gotoandplay('die');
}
}
}
instance of movieClip 17 {
onClipEvent (enterFrame) {
_x = _x - 10;
b = _root.heli.getBounds(_root);
if (this.hitTest(_root.heli)) {
_root.heli.gotoandplay('die');
}
}
}
instance of movieClip 17 {
onClipEvent (enterFrame) {
_x = _x - 10;
b = _root.heli.getBounds(_root);
if (this.hitTest(_root.heli)) {
_root.heli.gotoandplay('die');
}
}
}
frame 63 {
stop();
}
}
movieClip 20 {
}
movieClip 21 {
frame 3 {
if (_parent._x < _root.heli._x + 100) {
} else {
gotoAndPlay(1);
}
}
instance of movieClip 20 {
onClipEvent (enterFrame) {
_y = _y - 5;
b = _root.heli.getBounds(_root);
if (this.hitTest(_root.heli)) {
_root.heli.gotoandplay('die');
}
}
}
frame 55 {
stop();
}
}
movieClip 23 {
}
movieClip 24 {
frame 2 {
if (_parent._x < _root.heli._x + 165) {
} else {
gotoAndPlay(1);
}
}
instance of movieClip 17 {
onClipEvent (enterFrame) {
_y = _y + 10;
b = _root.heli.getBounds(_root);
if (this.hitTest(_root.heli)) {
_root.heli.gotoandplay('die');
}
}
}
frame 70 {
stop();
}
}
movieClip 25 wall2 {
frame 1 {
gotoAndStop(random(10));
}
}
movieClip 27 {
}
movieClip 28 smoke {
}
movieClip 31 bonus {
}
movieClip 34 {
}
movieClip 39 {
}
movieClip 40 {
}
instance loader of movieClip 40 {
onClipEvent (enterFrame) {
bytes = int(_root.getBytesLoaded() / 1000) + 'KB / ' + int(_root.getBytesTotal() / 1000) + 'KB';
pct = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
percent = int(pct);
loader.bar._xscale = pct;
bar._xscale = pct;
px = bar._x + bar._width;
pc._x = px;
if (percent < 100) {
pc.percent = percent add '%';
} else {
tellTarget ('_root') {
play();
}
pc.percent = '';
}
}
}
frame 2 {
stop();
}
movieClip 43 {
}
frame 3 {
stop();
_root.die = 1;
}
movieClip 47 {
}
movieClip 52 {
}
movieClip 57 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
_root.die = 1;
_root.humtwo.stop();
}
frame 4 {
_root.soundtrigger('crash', 'crash', '0');
}
frame 70 {
stop();
}
}
movieClip 62 {
}
button 114 {
on (release) {
if (_root.scoredone == 'done' and _root.score > _root.hiscore20 and _root.old_score != _root.score) {
_root.old_score = _root.score;
_root.hiscore = _root.score;
if (_root.xname eq 'Name Here') {
_root.xname = 'etgames';
}
loadVariablesNum('/scores.php?action=sendscore&game=' + _root.game + '&hiscore=' + _root.hiscore + '&xname=' + _root.xname + '&randx=' + random(100), 0, 'POST');
}
_visible = 0;
}
}
movieClip 117 {
frame 1 {
if (_root.score > _root.hiscore20 and _root.local == 1) {
_visible = 1;
} else {
_visible = 0;
stop();
}
}
}
movieClip 118 {
frame 1 {
if (_root.local == 1) {
_visible = 1;
} else {
_visible = 0;
stop();
}
}
frame 2 {
_root.game = 'helicopter';
loadVariablesNum('/scores.php?action=getscores&game=' + _root.game + '&randx=' + random(100), 0, 'POST');
}
frame 5 {
if (_root.scoredone == 'done') {
nothing = nothing;
} else {
gotoAndPlay(3);
}
}
frame 7 {
stop();
}
}
movieClip 120 {
}
button 123 {
on (press) {
getURL('http://etgames.com', '');
}
}
movieClip 124 {
frame 1 {
stop();
}
instance of movieClip 62 {
onClipEvent (enterFrame) {
if (_root.die < 1) {
this._visible = 0;
_parent.gotoandstop(1);
} else {
_parent.gotoandstop(2);
this._visible = 1;
}
}
onClipEvent (press) {
++_root.walla;
x = 0;
while (_root.walla > 0) {
--_root.walla;
removeMovieClip(_root['wall' + _root.walla]);
removeMovieClip(_root['wallx' + _root.walla]);
removeMovieClip(_root['bonus' + _root.walla]);
}
_root.die = 0;
_root.init = 0;
_root.heli._y = 100;
_root.heli.gotoandstop(1);
_root.gotoandplay('game');
}
}
}
instance of movieClip 124 {
onClipEvent (load) {
this.swapDepths(99999999999999.0);
}
}
frame 4 {
function soundtrigger(mainname, linkname, loop) {
this[mainname] = new Sound();
this[mainname].attachSound(linkname);
this[mainname].start(0, loop);
}
function volume(mainname, value) {
_root[mainname].setVolume(value);
}
function pan(mainname, value) {
this[mainname].setPan(value);
}
if (_root.init < 1) {
_root.helispeed = 5;
_root.oldhelispeed = 5;
_root.grav = _root.helispeed * 0.7;
_root.oldgrav = _root.helispeed * 0.7;
_root.up = _root.helispeed * 1.2;
_root.oldup = _root.helispeed * 1.2;
_root.init = 1;
_root.score = 0;
_root.place = 120;
_root.placeoff = 1;
walla = 0;
_root.soundtrigger('humtwo', 'humtwo', '1000');
}
++smwait;
if (smwait > 1 and _root.die < 1) {
++smoke;
_root.attachMovie('smoke', 'sm' + smoke, smoke + 1000);
_root['sm' + smoke]._y = _root.heli._y + 5;
_root['sm' + smoke]._x = _root.heli._x - 10;
_root['sm' + smoke].onEnterFrame = function () {
if (this.smokespeed < 0.1) {
this._rotation = random(360);
this.smokespeed = 3;
}
this.smokespeed *= 0.95;
this._alpha *= 0.9;
this._x -= _root.helispeed;
this._y -= this.smokespeed;
this._xscale += 15;
this._yscale += 15;
if (this._x < -220) {
this.removeMovieClip();
}
};
smwait = 0;
}
if (_root.score > _root.best and _root.die == 1) {
_root.best = _root.score;
}
++wallawait;
if (wallawait > 8 and _root.die < 1) {
wallawait = 0;
++walla;
++_root.score;
if (walla % 100 == 0) {
_root.helispeed += 0.5;
}
if (walla % 4 == 0) {
_root.attachMovie('wall2', 'wallx' + walla, walla + 100);
_root['wallx' + walla]._y = random(150) + 100;
_root['wallx' + walla]._x = 600;
_root['wallx' + walla]._yscale = 100 + walla / 20;
_root['wallx' + walla].onEnterFrame = function () {
if (_root.die < 1) {
this._x -= _root.helispeed;
b = _root.heli.getBounds(_root);
if (this.hitTest(b.xmax, b.ymax, true)) {
_root.heli.gotoandplay('die');
}
if (this._x < -100) {
this.removeMovieClip();
}
}
};
}
if (walla % 1 == 0) {
_root.attachMovie('bonus', 'bonus' + walla, walla + 1000);
_root['bonus' + walla]._y = random(100) + 150;
_root['bonus' + walla]._x = 600;
_root['bonus' + walla].onEnterFrame = function () {
if (_root.die < 1) {
this._xscale += 0.5;
this._x -= _root.helispeed;
if (this.hitTest(_root.heli)) {
_root.score += 5;
this.removeMovieClip();
_root.soundtrigger('beep', 'beep', '0');
}
if (this._x < -100) {
this.removeMovieClip();
}
}
};
}
_root.attachMovie('wall1', 'wall' + walla, walla);
if (_root.place > 200 or _root.place < 100) {
_root.placeoff *= -1;
}
_root.place += _root.placeoff;
_root['wall' + walla]._y = _root.place;
_root['wall' + walla]._x = 600;
_root['wall' + walla]._yscale = 110 - walla / 20;
_root['wall' + walla].health = 100;
xwall = 'wall' + walla;
_root['wall' + walla].onEnterFrame = function () {
if (_root.die < 1) {
this._xscale += 0.4;
this._x -= _root.helispeed;
b = _root.heli.getBounds(_root);
if (this.hitTest(b.xmax, b.ymax, true)) {
_root.heli.gotoandplay('die');
}
if (this._x < -150) {
this.removeMovieClip();
}
}
};
}
_root.onMouseDown = function () {
_root.moused = 1;
};
_root.onMouseUp = function () {
_root.moused = 0;
};
if (Key.isDown(32)) {
} else {
if (_root.moused == '1' and _root.die < 1) {
_root.heli._y -= _root.up;
_root.grav = _root.oldgrav;
_root.helispeed = _root.oldhelispeed;
_root.heli.gotoandstop(1);
} else {
if (_root.die < 1) {
_root.up = _root.oldup;
_root.grav *= 1.05;
if (_root.heli._y < 320) {
_root.heli._y += grav;
}
_root.heli.gotoandstop(2);
_root.helispeed = _root.oldhelispeed;
}
}
}
}
frame 5 {
gotoAndPlay(4);
}