Frame 1
_root.Best = 0;
Frame 3
function Explosion() {
var _local1 = _root;
_local1.mcExplosion._x = _local1.mcHelicopter._x;
_local1.mcExplosion._y = _local1.mcHelicopter._y;
_local1.mcExplosion._visible = true;
_local1.mcHelicopter._visible = false;
_local1.mcExplosion.gotoAndPlay(2);
_local1.mcInstructions.txtTitle.text = "HELICOPTER CRASHED!\rCLICK TO PLAY AGAIN...";
_local1.mcInstructions._visible = true;
sndHelicopter.stop();
sndExplosion = new Sound(this);
sndExplosion.attachSound("explosion");
sndExplosion.setVolume(100);
sndExplosion.start();
_local1.FlagExplosion = true;
if (_local1.Best < parseInt(_local1.mcGauge.txtMileage.text)) {
_local1.Best = parseInt(_local1.mcGauge.txtMileage.text);
_local1.mcGauge.txtBest.text = _local1.Best;
}
}
function ResetParameters() {
var _local1 = _root;
z = 0;
while (z < 100) {
_local1["mcStone" + z].removeMovieClip();
z++;
}
z = _local1.ObstacleCounter - 5;
while (z < (parseInt(_local1.ObstacleCounter) + 5)) {
_local1[_local1.ObstacleName + z].removeMovieClip();
z++;
}
_local1.FlagStarted = false;
_local1.FlagGo = false;
_local1.StoneCounter = 0;
_local1.MaxStoneX = 530;
_local1.FrameCounter = 0;
_local1.FrameCounter2 = 0;
_local1.ObstacleCounter = 0;
_local1.Mileage = 0;
_local1.Phase = 1;
_local1.FlagExplosion = false;
_local1.FlagStarted = false;
_local1.mcHelicopter._y = 326;
_local1.mcHelicopter._visible = true;
_local1.mcGauge.mcCredits._visible = false;
_local1.mcGauge.txtBest.text = _local1.Best;
}
function StartSound() {
sndHelicopter = new Sound(this);
sndHelicopter.attachSound("copter");
sndHelicopter.setVolume(100);
sndHelicopter.start(0, 999);
sndHelicopter.onSoundComplete = function () {
sndHelicopter.start(0, 999);
};
}
ResetParameters();
StartSound();
_root.Speed = 7;
_root.MaxSpeed = 18;
_root.Gravity = 5;
_root.VSpeed = 5;
_root.PhaseChanger = 3;
_root.MaxStones = 42;
_root.Gravity = _root.Gravity + _root.Phase;
_root.VSpeed = _root.VSpeed + _root.Phase;
_root.attachMovie("mcGauge", "mcGauge", 1500);
_root.mcGauge._x = 60;
_root.mcGauge._y = 10;
_root.attachMovie("mcBottomBar", "mcBottomBar", 1100);
_root.mcBottomBar._x = 250;
_root.mcBottomBar._y = 362;
_root.mcBottomBar.onEnterFrame = function () {
var _local1 = _root;
if ((_local1.FlagGo == true) && (_local1.mcBase._x < 90)) {
if (this.hitTest(_local1.mcHelicopter)) {
if (_local1.mcBase._x > 70) {
_local1.mcHelicopter._y = 300;
}
_local1.FlagGo = false;
_local1.Explosion();
}
}
};
_root.attachMovie("mcBack", "mcBack", 1000);
_root.mcBack._x = 250;
_root.mcBack._y = 190;
_root.mcBack._alpha = 0;
_root.mcBack.onPress = function () {
var _local1 = _root;
if (_local1.FlagExplosion == true) {
gotoAndPlay (2);
}
if (_local1.FlagStarted == false) {
_local1.FlagStarted = true;
_local1.FlagGo = true;
_local1.mcInstructions._visible = false;
_local1.mcTitle._visible = false;
}
if (_local1.FlagGo == true) {
this.onEnterFrame = function () {
var _local1 = _root;
_local1.mcHelicopter._y = _local1.mcHelicopter._y - _local1.VSpeed;
};
}
};
_root.mcBack.onRelease = function () {
var _local1 = _root;
if (_local1.FlagGo == true) {
this.onEnterFrame = function () {
var _local1 = _root;
_local1.mcHelicopter._y = _local1.mcHelicopter._y + _local1.Gravity;
};
}
};
_root.mcBack.onRollOut = function () {
var _local1 = _root;
if (_local1.FlagGo == true) {
this.onEnterFrame = function () {
var _local1 = _root;
_local1.mcHelicopter._y = _local1.mcHelicopter._y + _local1.Gravity;
};
}
};
_root.mcBack.onDragOut = function () {
var _local1 = _root;
if (_local1.FlagGo == true) {
this.onEnterFrame = function () {
var _local1 = _root;
_local1.mcHelicopter._y = _local1.mcHelicopter._y + _local1.Gravity;
};
}
};
_root.mcBack.useHandCursor = false;
stop();
Instance of Symbol 35 MovieClip "mcBase" in Frame 3
onClipEvent (enterFrame) {
if (_root.FlagGo == true) {
if (this._x < -60) {
this.removeMovieClip();
} else {
this._x = this._x - _root.Speed;
}
}
}
Instance of Symbol 47 MovieClip "mcHelicopter" in Frame 3
on (press) {
this.startDrag();
}
on (release) {
this.stopDrag();
}
Instance of Symbol 52 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.FlagGo == true) {
_root.FrameCounter++;
_root.FrameCounter2++;
_root.Mileage++;
_root.mcGauge.txtMileage.text = _root.Mileage;
if (_root.FrameCounter2 == (_root.MaxStones - Math.floor(_root[_root.ObstacleName + _root.ObstacleCounter]._xscale / 10))) {
_root.FrameCounter2 = 0;
switch (_root.Phase) {
case 1 :
_root.ObstacleName = "mcZeppelin";
break;
case 2 :
_root.ObstacleName = "mcZeppelin";
break;
case 3 :
_root.ObstacleName = "mcHarriet";
}
_root.attachMovie(_root.ObstacleName, _root.ObstacleName + _root.ObstacleCounter, 2000 + _root.ObstacleCounter);
_root[_root.ObstacleName + _root.ObstacleCounter]._x = _root.MaxStoneX + 50;
OSize = Math.floor(Math.random() * 30) + 80;
_root[_root.ObstacleName + _root.ObstacleCounter]._xscale = OSize;
_root[_root.ObstacleName + _root.ObstacleCounter]._yscale = OSize;
if (_root.mcHelicopter._y >= 190) {
Vposition = (_root.mcHelicopter._y - Math.floor(Math.random() * 80)) + 20;
} else {
Vposition = (_root.mcHelicopter._y + Math.floor(Math.random() * 80)) - 20;
}
_root[_root.ObstacleName + _root.ObstacleCounter]._x = _root.MaxStoneX;
_root[_root.ObstacleName + _root.ObstacleCounter]._y = Vposition;
_root[_root.ObstacleName + _root.ObstacleCounter].onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.FlagGo == true) {
switch (_local1.Phase) {
case 1 :
_local2._x = _local2._x - _local1.Speed;
break;
case 2 :
_local2._x = (_local2._x - _local1.Speed) - _local1.Speed;
break;
case 3 :
_local2._x = ((_local2._x - _local1.Speed) - _local1.Speed) - ((140 - OSize) / 20);
}
if (_local2._x < -30) {
_local2.removeMovieClip();
}
if (_local2.hitTest(_local1.mcHelicopter)) {
_local1.FlagGo = false;
_local1.Explosion("ceiling");
}
}
};
_root.ObstacleCounter++;
if (_root.ObstacleCounter == 10) {
_root.ObstacleCounter == 0;
}
}
if (_root.FrameCounter == 10) {
_root.StoneCounter = _root.StoneCounter + 2;
_root.StoneCounter2++;
if (_root.StoneCounter2 > _root.MaxStones) {
_root.StoneCounter2 = 0;
}
_root.attachMovie("mcStone", "mcStone" + _root.StoneCounter, _root.StoneCounter);
_root["mcStone" + _root.StoneCounter].onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.FlagGo == true) {
_local1._x = _local1._x - _local2.Speed;
if (_local1._x < -30) {
_local1.removeMovieClip();
}
if (_local1.hitTest(_local2.mcHelicopter)) {
_local2.FlagGo = false;
_local2.Explosion("ceiling");
}
}
};
_root.attachMovie("mcStone", "mcStone" + (_root.StoneCounter + 1), _root.StoneCounter + 1);
_root["mcStone" + (_root.StoneCounter + 1)].onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.FlagGo == true) {
_local1._x = _local1._x - _local2.Speed;
if (_local1._x < -30) {
_local1.removeMovieClip();
}
if (_local1.hitTest(_local2.mcHelicopter)) {
_local2.FlagGo = false;
_local2.Explosion("ground");
}
}
};
yCeiling = Math.floor(Math.random() * 40) - 20;
yGround = yCeiling + 350;
_root["mcStone" + _root.StoneCounter]._y = yCeiling;
_root["mcStone" + (_root.StoneCounter + 1)]._y = yGround;
_root["mcStone" + _root.StoneCounter]._x = _root.MaxStoneX;
_root["mcStone" + (_root.StoneCounter + 1)]._x = _root.MaxStoneX;
_root["mcStone" + (_root.StoneCounter + 1)]._rotation = 180;
_root["mcStone" + _root.StoneCounter]._xscale = 100 + (_root.Speed * 10);
_root["mcStone" + (_root.StoneCounter + 1)]._xscale = 100 + (_root.Speed * 10);
_root["mcStone" + _root.StoneCounter]._alpha = Math.floor(Math.random() * 10) + 90;
_root["mcStone" + (_root.StoneCounter + 1)]._alpha = Math.floor(Math.random() * 10) + 90;
_root.FrameCounter = 0;
if (((_root.Mileage / 1000) - Math.floor(_root.Mileage / 1000)) == 0) {
if (_root.Speed < _root.MaxSpeed) {
_root.Speed++;
}
}
if (_root.StoneCounter > 70) {
_root.StoneCounter = 0;
}
}
}
if (Key.isDown(17) && (Key.isDown(89))) {
_root.mcGauge.mcCredits._visible = true;
} else {
_root.mcGauge.mcCredits._visible = false;
}
}
Symbol 6 MovieClip [mcStone] Frame 1
Symbol 12 Button
on (release) {
getURL ("http://www.lostjungle.com");
}
Symbol 13 Button
on (release) {
getURL ("http://www.lostjungle.com/add.php?game=helyx");
}
Symbol 32 MovieClip [mcGauge] Frame 1
_root.mcGauge.txtBest.text = _root.Best;
Symbol 47 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 2
play();
Symbol 55 MovieClip Frame 21
stop();