Frame 1
_root.global_effects = 1;
_root.global_robot_mode = 0;
_root.global_velocity = 6;
_root.global_tv = 16;
_root.global_parachutes = 0;
_root.global_ravens = 0;
_root.global_tv_time = 0;
_root.global_limbless_time = 0;
_root.global_soft_clouds = 1;
_root.global_music = 1;
_root.global_player = 0;
_root.global_playerBody = 0;
_root.pause = false;
_root.help_position = 1;
_root.xx = 0;
_root.yy = 0;
_root.limbx = 0;
_root.limby = 0;
_root.attachMovie("cloudmaker", "cloudmaker", this.getNextHighestDepth(), {_x:0, _y:0});
MochiAd.showPreGameAd({id:"470e7a9c7a6cf371", res:"640x480", no_bg:true});
_root.clipname = "";
mochi.MochiServices.connect("470e7a9c7a6cf371");
Frame 2
stop();
Frame 3
function onEnterFrame() {
if ((_currentframe == 4) && (_root.pause == false)) {
if ((Math.random() * (20 / (_root.global_velocity / 6))) < 1) {
cloud = _root.attachMovie("cloud", "cloud" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:Math.random() * 640, _y:240 + ((207 * (_root.global_velocity + 4)) / 10)});
}
if ((_root.global_velocity == _root.global_tv) and (terminal == 30)) {
_root.attachMovie("terminal", "terminal" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:320, _y:240});
}
if (_root.global_player && (intro < 90)) {
timer = timer + 1;
}
score_pulse = Math.max(0, score_pulse - 0.05);
intro = Math.max(0, intro - 1);
if (intro > 0) {
stop();
}
if ((_root.global_velocity == _root.global_tv) && (terminal < 90)) {
if (((terminal == 0) or (terminal == 10)) or (terminal == 20)) {
warningsnd.start();
}
terminal = terminal + 1;
stop();
}
if (!player) {
stop();
}
dir = Math.random() * 360;
if ((Math.random() * 30) < 1) {
seagull = _root.attachMovie("seagull", "seagull" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:320 + (Math.cos((dir * Math.PI) / 180) * point_distance(320, 240, 0, 0)), _y:240 - (Math.sin((dir * Math.PI) / 180) * point_distance(320, 240, 0, 0))});
seagull.dir = (point_direction(seagull._x, seagull._y, 320, 240) + (Math.random() * 60)) - 30;
_root.enemies.push(seagull._name);
}
if ((timer / 30) > 30) {
if ((Math.random() * 100) < 1) {
raven = _root.attachMovie("raven", "raven" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:320 + (Math.cos((dir * Math.PI) / 180) * point_distance(320, 240, 0, 0)), _y:240 - (Math.sin((dir * Math.PI) / 180) * point_distance(320, 240, 0, 0))});
raven.timer = 60;
_root.enemies.push(raven._name);
}
}
if ((timer / 30) > 120) {
if ((Math.random() * 200) < 1) {
rand = random(2);
if (rand == 0) {
jet = _root.attachMovie("jet", "jet" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:-100, _y:(Math.random() * 480) + (35 * _root.global_velocity)});
} else {
jet = _root.attachMovie("jet", "jet" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:740, _y:(Math.random() * 480) + (35 * _root.global_velocity)});
jet._yscale = -100;
}
jet.dir = (point_direction(jet._x, jet._y, 320, jet._y) + (Math.random() * 10)) - 5;
_root.enemies.push(jet._name);
_root.jets.push(jet._name);
}
}
if ((timer / 30) > 60) {
if ((Math.random() * 200) < 1) {
chopper = _root.attachMovie("chopper", "chopper" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:Math.random() * 640, _y:580});
chopper.timer = 0;
rand = random(2);
if (rand == 0) {
chopper._xscale = -100;
}
_root.enemies.push(chopper._name);
_root.choppers.push(chopper._name);
}
}
if ((Math.random() * (200 - ((_root.global_velocity - 6) * 12.5))) < 1) {
crate = _root.attachMovie("crate", "crate" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:Math.random() * 640, _y:544});
if (_root.global_player.limbs > 0) {
crate.val = (Math.ceil(Math.max(1, _root.enemies.length * (((_root.global_velocity - 6) / 2) + 1)) / 2.5) * 5) * 1;
trace("chute");
} else {
crate.val = (Math.ceil(Math.max(1, _root.enemies.length * (((_root.global_velocity - 6) / 2) + 1)) / 2.5) * 5) * 2;
}
}
if (_root.global_player.chute == 0) {
if ((Math.random() * 200) < 1) {
diver = _root.attachMovie("diver", "diver" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:Math.random() * 640, _y:580});
_root.divers.push(diver._name);
}
}
}
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
function instance_number() {
temp = 0;
for (var _local2 in _root) {
if ((((_root[_local2].id == "raven") or (_root[_local2].id == "seagull")) or (_root[_local2].id == "chopper")) or (_root[_local2].id == "jet")) {
temp++;
}
}
return(temp);
}
function scoreInit() {
for (var _local2 in _root) {
if (typeof(_root[_local2]) == "movieclip") {
if (_root[_local2]._name != _root.clipname) {
removeMovieClip(_root[_local2]);
}
}
}
_root.gotoAndStop(10);
}
_root.attachMovie("cloudmaker", "cloudmaker", this.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("menu_title", "menu_title", this.getNextHighestDepth(), {_x:220, _y:15});
_root.attachMovie("menu_jump", "menu_jump", this.getNextHighestDepth(), {_x:32, _y:110});
_root.attachMovie("menu_trophies", "menu_trophies", this.getNextHighestDepth(), {_x:32, _y:180});
_root.attachMovie("menu_options", "menu_options", this.getNextHighestDepth(), {_x:32, _y:250});
_root.attachMovie("menu_help", "menu_help", this.getNextHighestDepth(), {_x:32, _y:320});
_root.attachMovie("menu_games", "menu_games", this.getNextHighestDepth(), {_x:32, _y:390});
_root.attachMovie("menu_skydiver", "menu_skydiver", this.getNextHighestDepth(), {_x:278.9, _y:106});
_root.attachMovie("cursor", "cursor", this.getNextHighestDepth(), {_x:513, _y:78});
_root.enemies = new Array();
_root.divers = new Array();
_root.choppers = new Array();
_root.jets = new Array();
intro = 150;
timer = 0;
terminal = 0;
score_pulse = 0;
if (_root.global_music == 1) {
var snd = new Sound();
snd.attachSound("snd_music_menu");
snd.start();
snd.setVolume(50);
snd.onSoundComplete = function () {
snd.start();
};
}
stop();
Frame 4
_root.attachMovie("scores", "scores", this.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("player", "player", this.getNextHighestDepth(), {_x:0, _y:0});
stop();
Frame 5
stop();
Frame 6
_root.attachMovie("cloudmaker", "cloudmaker", this.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("menu_music", "menu_music", this.getNextHighestDepth(), {_x:32, _y:120});
_root.attachMovie("menu_effects", "menu_effects", this.getNextHighestDepth(), {_x:32, _y:200});
_root.attachMovie("txt_on", "txt_on_music", this.getNextHighestDepth(), {_x:550, _y:120});
_root.attachMovie("txt_on", "txt_on_effects", this.getNextHighestDepth(), {_x:550, _y:200});
_root.attachMovie("txt_off", "txt_off_music", this.getNextHighestDepth(), {_x:550, _y:120});
_root.attachMovie("txt_off", "txt_off_effects", this.getNextHighestDepth(), {_x:550, _y:200});
_root.attachMovie("menu_ok", "menu_ok", this.getNextHighestDepth(), {_x:32, _y:416});
_root.attachMovie("txt_options_music", "txt_options_music", this.getNextHighestDepth(), {_x:180, _y:400});
_root.attachMovie("txt_options_effects", "txt_options_effects", this.getNextHighestDepth(), {_x:180, _y:400});
_root.attachMovie("cursor", "cursor", this.getNextHighestDepth(), {_x:513, _y:78});
stop();
Frame 7
_root.attachMovie("score_back", "score_back", this.getNextHighestDepth(), {_x:32, _y:416});
stop();
Frame 8
gotoAndStop (3);
Frame 9
_root.attachMovie("cloudmaker", "cloudmaker", this.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("help_back", "help_back", this.getNextHighestDepth(), {_x:32, _y:416});
_root.attachMovie("help_next", "help_next", this.getNextHighestDepth(), {_x:480, _y:416});
_root.attachMovie("help_prev", "help_prev", this.getNextHighestDepth(), {_x:288, _y:416});
_root.attachMovie("help_player", "help_player", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_text_1", "help_text_1", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("help_crate", "help_crate", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_text_2", "help_text_2", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("help_text_3", "help_text_3", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("help_text_4", "help_text_4", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("help_text_5", "help_text_5", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("help_raven", "help_raven", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_chute", "help_chute", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_diver", "help_diver", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_seagull", "help_seagull", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_chopper", "help_chopper", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_jet", "help_jet", this.getNextHighestDepth(), {_x:320, _y:160});
_root.attachMovie("help_text_6", "help_text_6", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("help_text_7", "help_text_7", this.getNextHighestDepth(), {_x:320, _y:220});
_root.attachMovie("cursor", "cursor", this.getNextHighestDepth(), {_x:513, _y:78});
stop();
Frame 10
_root.attachMovie("score_done", "score_done", this.getNextHighestDepth(), {_x:32, _y:416});
mochi.MochiScores.showLeaderboard({boardID:"c23331afe1e721e3", score:Math.floor(_root.timer / 30), hideDoneButton:true});
stop();
Frame 11
for (var i in _root) {
if (typeof(_root[i]) == "movieclip") {
if (_root[i]._name != _root.clipname) {
removeMovieClip(_root[i]);
}
}
}
_root.pause = false;
_root.gotoAndStop(3);
Symbol 57 MovieClip [menu_trophies] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
_root.gotoAndStop(7);
Mouse.show();
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 62 MovieClip [menu_help] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
_root.gotoAndStop(9);
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 67 MovieClip [menu_effects] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
_root.txt_options_effects._visible = true;
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
_root.txt_options_effects._visible = false;
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.global_effects == 0) {
_root.global_effects = 1;
} else {
_root.global_effects = 0;
}
}
}
this.gotoAndStop(1);
Symbol 72 MovieClip [menu_music] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
_root.txt_options_music._visible = true;
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
_root.txt_options_music._visible = false;
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.global_music == 0) {
_root.global_music = 1;
} else {
_root.global_music = 0;
}
}
}
this.gotoAndStop(1);
Symbol 77 MovieClip [menu_games] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
getURL ("http://www.moopgames.com", "_blank");
}
}
this.gotoAndStop(1);
Symbol 82 MovieClip [menu_options] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
_root.gotoAndStop(6);
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 87 MovieClip [help_prev] Frame 1
function onEnterFrame() {
if (_root.help_position > 1) {
_visible = true;
} else {
_visible = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse) && (this._visible == true)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse) && (this._visible == true)) {
_root.help_position--;
}
}
this.gotoAndStop(1);
Symbol 92 MovieClip [help_next] Frame 1
function onEnterFrame() {
if (_root.help_position < 7) {
_visible = true;
} else {
_visible = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse) && (this._visible == true)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse) && (this._visible == true)) {
_root.help_position++;
}
}
this.gotoAndStop(1);
Symbol 97 MovieClip [score_done] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
mochi.MochiScores.closeLeaderboard();
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 102 MovieClip [score_back] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
mochi.MochiScores.closeLeaderboard();
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
mochi.MochiScores.showLeaderboard({boardID:"c23331afe1e721e3", hideDoneButton:true});
Symbol 103 MovieClip [help_back] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
_root.gotoAndStop(3);
_root.help_position = 1;
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 108 MovieClip [menu_ok] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
_root.gotoAndStop(3);
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 114 MovieClip [menu_jump] Frame 1
function onEnterFrame() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndPlay(1);
}
if (this._currentframe == 7) {
this.gotoAndStop(7);
}
} else {
if (this._currentframe == 7) {
this.gotoAndPlay(8);
}
if (this._currentframe == 14) {
this.gotoAndStop(1);
}
}
}
function onMouseUp() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.snd.stop();
_root.gotoAndStop(4);
for (var _local3 in _root) {
if (typeof(_root[_local3]) == "movieclip") {
if (_root[_local3]._name != _root.clipname) {
removeMovieClip(_root[_local3]);
}
}
}
}
}
this.gotoAndStop(1);
Symbol 120 MovieClip [txt_on] Frame 1
function onEnterFrame() {
if (this._name == "txt_on_music") {
if (_root.global_music == 0) {
this._visible = false;
} else {
this._visible = true;
}
} else if (this._name == "txt_on_effects") {
if (_root.global_effects == 0) {
this._visible = false;
} else {
this._visible = true;
}
}
}
_visible = false;
Symbol 123 MovieClip [txt_off] Frame 1
function onEnterFrame() {
if (this._name == "txt_off_music") {
if (_root.global_music == 1) {
this._visible = false;
} else {
this._visible = true;
}
} else if (this._name == "txt_off_effects") {
if (_root.global_effects == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
}
_visible = false;
Symbol 124 MovieClip [player] Frame 1
function onEnterFrame() {
if (timer0 >= 0) {
timer0--;
}
if (timer1 >= 0) {
timer1--;
}
if (timer0 == 0) {
alarm0();
}
if (timer1 == 0) {
alarm1();
}
if (hitMove == true) {
Hdirx = Math.cos((Hdir * Math.PI) / 180) * Hspeed;
Hdiry = Math.sin((Hdir * Math.PI) / 180) * Hspeed;
this._x = this._x + Hdirx;
this._y = this._y + Hdiry;
hitMove = false;
}
xprevious = _x;
yprevious = _y;
this._x = basemean(Math.max(chute, (12 - _root.global_velocity) / 2), this._x, _root._xmouse);
this._y = basemean(Math.max(chute, (12 - _root.global_velocity) / 2), this._y, _root._ymouse);
xmove = _x - xprevious;
ymove = _y - yprevious;
if (xmove > 10) {
spin = Math.min(-xmove, spin);
}
if (xmove < -10) {
spin = Math.max(-xmove, spin);
}
x = Math.max(0, x);
x = Math.min(640, x);
y = Math.max(0, y);
y = Math.min(480, y);
rot = rot + spin;
spin = spin * 0.9;
_root.global_velocity = Math.min(_root.global_tv - (chute * (_root.global_tv - 6)), _root.global_velocity + 0.1);
if (_root.global_music == 1) {
snd.setVolume((((_root.global_velocity - 6) * 0.01) + 0.9) * 40);
}
if (((Math.random() * 600) < 1) && (limbs == 4)) {
if (_root.global_music == 1) {
say("terminal_1", 7, 0);
}
}
dirx = ((Math.cos(((Math.random() * 360) * Math.PI) / 180) * Math.random()) * 3) + 5;
diry = ((Math.sin(((Math.random() * 360) * Math.PI) / 180) * Math.random()) * 3) + 5;
this._x = this._x + dirx;
this._y = this._y + diry;
if (chute == 1) {
chute_angle = point_direction(_x, _y, xprevious, yprevious - 50);
dist = point_distance(_x, _y, xprevious, yprevious);
chute_xscale = Math.max(chute_xscale, Math.min(1, dist / 100));
chute_xscale = chute_xscale * 0.8;
}
}
function createBlood() {
_root.xx = _x;
_root.yy = _y;
if (random(2) == 0) {
blood = _root.attachMovie("blood1", "blood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
} else {
blood = _root.attachMovie("blood2", "blood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
}
blood.speed = Math.random() * 5;
blood.dir = Math.random() * 360;
}
function basemean(argument0, argument1, argument2) {
return(((argument1 * argument0) + argument2) / (argument0 + 1));
}
function say(argument0, argument1, argument2) {
if (argument1 < say_priority) {
say_snd.attachSound(argument0);
say_priority = argument1;
timer0 = Math.max(argument2, 1);
}
}
function alarm0() {
say_snd.start();
timer1 = 45;
}
function alarm1() {
say_priority = 100;
}
function deployChute() {
attachMovie("chute", "chute", this.getNextHighestDepth(), {});
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
spin = 0;
chute = 1;
chute_angle = 0;
chute_xscale = 1;
image_speed = 0.5;
rot = 0;
Hdir = 0;
Hspeed = 0;
hitMove = false;
say_priority = 100;
timer0 = -1;
timer1 = -1;
if (_root.global_music == 1) {
var say_snd = new Sound();
var snd = new Sound();
snd.attachSound("snd_air");
snd.start();
var limbsnd = new Sound();
limbsnd.attachSound("snd_limb_steal");
var scarysnd = new Sound();
scarysnd.attachSound("snd_music_scary");
var diesnd = new Sound();
diesnd.attachSound("snd_die");
var snd_woosh = new Sound();
snd_woosh.attachSound("snd_woosh");
snd.onSoundComplete = function () {
snd.start();
};
var snd2 = new Sound();
snd2.attachSound("snd_flap");
snd2.start();
snd2.onSoundComplete = function () {
if (chute == 1) {
snd2.start();
}
};
}
close_timer = 0;
enemy_close = -4;
enemy_close_dist = 0;
arm_r = 1;
arm_l = 1;
leg_r = 1;
leg_l = 1;
limbs = 4;
blood_drop_last = -4;
_root.global_player = this;
deployChute();
body = attachMovie("player_body", "player_body" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
_root.global_playerBody = body;
attachMovie("player_arm_r", "player_arm_r" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("player_arm_l", "player_arm_l" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("player_leg_r", "player_leg_r" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("player_leg_l", "player_leg_l" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
Symbol 137 MovieClip [blood2] Frame 1
function onEnterFrame() {
if (_root.pause == false) {
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
_y = (_y - _root.global_velocity);
}
if (this._currentframe == 12) {
this.removeMovieClip();
}
}
if (_root.global_effects == 0) {
this.removeMovieClip();
}
_rotation = (Math.random() * 360);
Symbol 154 MovieClip [blood1] Frame 1
function onEnterFrame() {
if (_root.pause == false) {
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
_y = (_y - _root.global_velocity);
}
if (this._currentframe == 16) {
this.removeMovieClip();
}
}
if (_root.global_effects == 0) {
this.removeMovieClip();
}
_rotation = (Math.random() * 360);
Symbol 163 MovieClip [diver_arm_l] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_parent.chute == 1) {
_visible = false;
} else {
_visible = true;
}
if (_parent.arm_l == 0) {
this.removeMovieClip();
}
}
Symbol 184 MovieClip [player_arm_l] Frame 1
function onEnterFrame() {
this._rotation = _parent.rot;
if (_parent.arm_l == 0) {
_visible = false;
} else {
_visible = true;
}
}
Symbol 193 MovieClip [diver_leg_r] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_parent.chute == 1) {
_visible = false;
} else {
_visible = true;
}
if (_parent.leg_r == 0) {
this.removeMovieClip();
}
}
Symbol 214 MovieClip [player_leg_r] Frame 1
function onEnterFrame() {
this._rotation = _parent.rot;
if (_parent.leg_r == 0) {
_visible = false;
} else {
_visible = true;
}
}
Symbol 223 MovieClip [diver_leg_l] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_parent.chute == 1) {
_visible = false;
} else {
_visible = true;
}
if (_parent.leg_l == 0) {
this.removeMovieClip();
}
}
Symbol 244 MovieClip [player_leg_l] Frame 1
function onEnterFrame() {
this._rotation = _parent.rot;
if (_parent.leg_l == 0) {
_visible = false;
} else {
_visible = true;
}
}
Symbol 253 MovieClip [diver_arm_r] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_parent.chute == 1) {
_visible = false;
} else {
_visible = true;
}
if (_parent.arm_r == 0) {
this.removeMovieClip();
}
}
Symbol 274 MovieClip [player_arm_r] Frame 1
function onEnterFrame() {
this._rotation = _parent.rot;
if (_parent.arm_r == 0) {
_visible = false;
} else {
_visible = true;
}
}
Symbol 279 MovieClip [player_body] Frame 1
function onEnterFrame() {
this._rotation = _parent.rot;
for (x in _root.enemies) {
if (this.hitTest(_root[_root.enemies[x]])) {
other = _root[_root.enemies[x]];
beenHit();
}
if (_parent.close_timer == 0) {
if (point_distance(_x, _y, _root[_root.enemies[x]]._x, _root[_root.enemies[x]]._y) < 10) {
_parent.enemy_close_dist = point_distance(_x, _y, _root[_root.enemies[x]]._x, _root[_root.enemies[x]]._y);
_parent.close_timer = 5;
}
} else {
_parent.close_timer = Math.max(0, _parent.close_timer - 1);
if (_parent.close_timer == 0) {
if ((point_distance(_x, _y, _root[_root.enemies[x]]._x, _root[_root.enemies[x]]._y) > _parent.enemy_close_dist) and ((Math.random() * 2) < 1)) {
rand = random(6);
if (rand == 0) {
_parent.say("close_2", 5, 0);
} else if (rand == 1) {
_parent.say("close_3", 5, 0);
} else if (rand == 2) {
_parent.say("close_4", 5, 0);
} else if (rand == 3) {
_parent.say("close_5", 5, 0);
} else if (rand == 4) {
_parent.say("close_6", 5, 0);
} else {
_parent.say("close_7", 5, 0);
}
}
}
}
}
for (x in _root.divers) {
if (this.hitTest(_root[_root.divers[x]])) {
diver = _root[_root.divers[x]];
diverCollision();
}
}
if (_parent.limbs < 4) {
if ((Math.random() * (4 + _parent.limbs)) < 1) {
_parent.createBlood();
} else if (bleeding > 0) {
if ((Math.random() * (4 + (4 - (_parent.bleeding / 10)))) < 1) {
_parent.createBlood();
}
}
}
bleeding = Math.max(0, bleeding - 0.2);
}
function beenHit() {
_parent.hitMove = true;
_parent.Hdir = point_direction(other._x, other._y, _x, _y);
_parent.Hspeed = 50;
if ((other.id == "seagull") or (other.id == "raven")) {
if (_root.global_music == 1) {
var _local3 = new Sound();
rand = random(3);
if (rand == 0) {
_local3.attachSound("snd_hit_1");
} else if (rand == 1) {
_local3.attachSound("snd_hit_2");
} else if (rand == 2) {
_local3.attachSound("snd_hit_3");
}
_local3.start();
}
other.die();
}
if ((other.id == "chopper") or (other.id == "jet")) {
if (_root.global_music == 1) {
var _local3 = new Sound();
rand = random(3);
if (rand == 0) {
_local3.attachSound("snd_hit_hard_1");
} else if (rand == 1) {
_local3.attachSound("snd_hit_hard_2");
} else if (rand == 2) {
_local3.attachSound("snd_hit_hard_3");
}
_local3.start();
}
other.die();
}
if (_parent.chute == 1) {
_root.xx = _parent._x;
_root.yy = _parent._y;
parachute = _root.attachMovie("parachute_off", "parachute_off" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
if (_root.global_music == 1) {
_parent.snd2.stop();
_parent.scarysnd.stop();
_parent.scarysnd.start(0, 999);
_parent.snd.start();
rand = random(4);
if (rand == 0) {
_parent.say("missed_1", 0, 10);
} else if (rand == 1) {
_parent.say("missed_2", 0, 10);
} else if (rand == 2) {
_parent.say("missed_3", 0, 10);
} else if (rand == 3) {
_parent.say("missed_4", 0, 10);
}
}
} else {
loseLimb();
}
_parent.chute = 0;
close_timer = 60;
}
function loseLimb() {
if (_parent.limbs > 2) {
if (_root.global_music == 1) {
rand = random(5);
if (rand == 0) {
_parent.say("pain_1", 3, 0);
} else if (rand == 1) {
_parent.say("pain_2", 3, 0);
} else if (rand == 2) {
_parent.say("pain_3", 3, 0);
} else if (rand == 3) {
_parent.say("pain_4", 3, 0);
} else if (rand == 4) {
_parent.say("pain_5", 3, 0);
}
}
}
if (_parent.limbs <= 2) {
if (_root.global_music == 1) {
rand = random(4);
if (rand == 0) {
_parent.say("agony_1", 2, 0);
} else if (rand == 1) {
_parent.say("agony_2", 2, 0);
} else if (rand == 2) {
_parent.say("agony_3", 2, 0);
} else if (rand == 3) {
_parent.say("agony_4", 2, 0);
}
}
}
_parent.limbs = _parent.limbs - 1;
if (_parent.limbs <= -1) {
_parent._x = _parent._x + dirx;
_parent._y = _parent._y + diry;
_root.global_playerBody = false;
i = 0;
while (i < 3) {
limb = _root.attachMovie("player_limb", "player_limb" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
limb.subimg = random(3) + 5;
i++;
}
if (_root.global_music == 1) {
_parent.scarysnd.stop();
_parent.diesnd.start();
}
_root.terminal = 90;
_root.attachMovie("fail", "fail", _root.getNextHighestDepth(), {_x:_x + (Math.cos((point_direction(_x, _y, 320, 240) * Math.PI) / 180) * 200), _y:_y - (Math.sin((point_direction(_x, _y, 320, 240) * Math.PI) / 180) * 200)});
_root.global_playerBody = 0;
this.removeMovieClip();
stop();
}
while ((((_parent.arm_r + _parent.arm_l) + _parent.leg_r) + _parent.leg_l) > _parent.limbs) {
pick = random(4);
if ((pick == 0) && (_parent.arm_r == 1)) {
_parent.arm_r = 0;
_root.xx = _parent._x;
_root.yy = _parent._y;
limb = _root.attachMovie("player_limb", "player_limb" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
limb.subimg = 1;
}
if ((pick == 1) && (_parent.arm_l == 1)) {
_parent.arm_l = 0;
_root.xx = _parent._x;
_root.yy = _parent._y;
limb = _root.attachMovie("player_limb", "player_limb" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
limb.subimg = 2;
}
if ((pick == 2) && (_parent.leg_r == 1)) {
_parent.leg_r = 0;
_root.xx = _parent._x;
_root.yy = _parent._y;
limb = _root.attachMovie("player_limb", "player_limb" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
limb.subimg = 3;
}
if ((pick == 3) && (_parent.leg_l == 1)) {
_parent.leg_l = 0;
_root.xx = _parent._x;
_root.yy = _parent._y;
limb = _root.attachMovie("player_limb", "player_limb" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
limb.subimg = 4;
}
}
}
function diverCollision() {
if (((((_parent.arm_r == 0) and (diver.arm_r == 1)) or ((_parent.arm_l == 0) and (diver.arm_l == 1))) or ((_parent.leg_r == 0) and (diver.leg_r == 1))) or ((_parent.leg_l == 0) and (diver.leg_l == 1))) {
if (_root.global_music == 1) {
_parent.limbsnd.start();
}
}
if ((_parent.arm_r == 0) and (diver.arm_r == 1)) {
diver.arm_r = 0;
diver.limbs = diver.limbs - 1;
_parent.arm_r = 1;
_parent.limbs = _parent.limbs + 1;
}
if ((_parent.arm_l == 0) and (diver.arm_l == 1)) {
diver.arm_l = 0;
diver.limbs = diver.limbs - 1;
_parent.arm_l = 1;
_parent.limbs = _parent.limbs + 1;
}
if ((_parent.leg_r == 0) and (diver.leg_l == 1)) {
diver.leg_r = 0;
diver.limbs = diver.limbs - 1;
_parent.leg_r = 1;
_parent.limbs = _parent.limbs + 1;
}
if ((_parent.leg_l == 0) and (diver.leg_l == 1)) {
diver.leg_l = 0;
diver.limbs = diver.limbs - 1;
_parent.leg_l = 1;
_parent.limbs = _parent.limbs + 1;
}
if (diver.chute == 1) {
_parent.chute = 1;
_parent.hitMove = true;
_parent.Hdir = 90;
_parent.Hspeed = 60;
if (_root.global_music == 1) {
_parent.scarysnd.stop();
_parent.snd.start();
_parent.snd_whoosh.start();
_parent.snd_flap.start();
}
_root.terminal = 0;
diver.chute = 0;
if (_root.global_music == 1) {
rand = random(3);
if (rand == 0) {
_parent.say("medic_1", 1, 10);
} else if (rand == 1) {
_parent.say("medic_2", 1, 10);
} else if (rand == 2) {
_parent.say("medic_3", 1, 10);
}
}
_root.global_parachutes = _root.global_parachutes + 1;
}
_parent.bleeding = (4 - _parent.limbs) * 10;
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
other = 0;
bleeding = 0;
Symbol 288 MovieClip [help_chute] Frame 1
function onEnterFrame() {
if (_root.help_position == 5) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 289 MovieClip [diver_chute] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_parent.chute == 0) {
this.removeMovieClip();
}
}
Symbol 290 MovieClip [chute] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
this._rotation = -(_parent.chute_angle - 90);
if (_parent.chute == 1) {
_visible = true;
} else {
_visible = false;
}
this._xscale = ((1 - _parent.chute_xscale) * 40) + 60;
this._yscale = 100 + (_parent.chute_xscale * 100);
}
Symbol 294 MovieClip [help_raven] Frame 1
function onEnterFrame() {
if (_root.help_position == 4) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 295 MovieClip [raven] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (point_distance(_x, _y, 320, 240) > (point_distance(320, 240, 0, 0) + 100)) {
j = 0;
while (j < _root.enemies.length) {
if (_root.enemies[j].toString() == this._name) {
_root.enemies.splice(j, 1);
}
j++;
}
this.removeMovieClip();
}
if (_root.global_playerBody) {
if (timer > 0) {
timer--;
_rotation = (-point_direction(_x, _y, _root.global_player._x, _root.global_player._y));
} else {
speed = 17;
}
}
dir = _rotation;
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
for (x in _root.choppers) {
if ((Math.abs(_x - _root[_root.choppers[x]]._x) <= 120) && ((_root[_root.choppers[x]]._y - this._y) <= 300)) {
this._y = this._y + 2;
}
}
for (x in _root.choppers) {
if (this.hitTest(_root[_root.choppers[x]])) {
die();
}
}
for (x in _root.jets) {
if (this.hitTest(_root[_root.jets[x]])) {
createExplosion();
die();
}
}
}
function createExplosion() {
i = 0;
while (i < 5) {
_root.xx = _x;
_root.yy = _y;
explosion = _root.attachMovie("explosion", "explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
explosion.speed = Math.random() * 5;
explosion.dir = Math.random() * 360;
i++;
}
}
function die() {
j = 0;
while (j < _root.enemies.length) {
if (_root.enemies[j].toString() == this._name) {
_root.enemies.splice(j, 1);
}
j++;
}
i = 0;
while (i < 12) {
feather = _root.attachMovie("ravenFeather", "ravenFeather" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
feather.dir = Math.random() * 360;
feather.speed = (Math.random() * 6) + 3;
feather.img = random(3) + 1;
i++;
}
if (_root.global_music == 1) {
var _local5 = new Sound();
rand = random(2);
if (rand == 0) {
_local5.attachSound("snd_seagull_1");
} else if (rand == 1) {
_local5.attachSound("snd_seagull_2");
}
_local5.start();
}
this.removeMovieClip();
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
speed = 6;
id = "raven";
Symbol 299 MovieClip [help_seagull] Frame 1
function onEnterFrame() {
if (_root.help_position == 3) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 300 MovieClip [seagull] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (point_distance(_x, _y, 320, 240) > (point_distance(320, 240, 0, 0) + 100)) {
j = 0;
while (j < _root.enemies.length) {
if (_root.enemies[j].toString() == this._name) {
_root.enemies.splice(j, 1);
}
j++;
}
this.removeMovieClip();
}
dirx = Math.cos(((-dir) * Math.PI) / 180) * speed;
diry = Math.sin(((-dir) * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
for (x in _root.choppers) {
if ((Math.abs(_x - _root[_root.choppers[x]]._x) <= 120) && ((_root[_root.choppers[x]]._y - this._y) <= 300)) {
this._y = this._y + 2;
}
}
for (x in _root.choppers) {
if (this.hitTest(_root[_root.choppers[x]])) {
die();
}
}
for (x in _root.jets) {
if (this.hitTest(_root[_root.jets[x]])) {
createExplosion();
die();
}
}
}
function die() {
j = 0;
while (j < _root.enemies.length) {
if (_root.enemies[j].toString() == this._name) {
_root.enemies.splice(j, 1);
}
j++;
}
i = 0;
while (i < 12) {
feather = _root.attachMovie("feather", "feather" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
feather.dir = Math.random() * 360;
feather.speed = (Math.random() * 6) + 3;
feather.img = random(3) + 1;
i++;
}
if (_root.global_music == 1) {
var _local5 = new Sound();
rand = random(2);
if (rand == 0) {
_local5.attachSound("snd_seagull_1");
} else if (rand == 1) {
_local5.attachSound("snd_seagull_2");
}
_local5.start();
}
this.removeMovieClip();
}
function createExplosion() {
i = 0;
while (i < 5) {
_root.xx = _x;
_root.yy = _y;
explosion = _root.attachMovie("explosion", "explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
explosion.speed = Math.random() * 5;
explosion.dir = Math.random() * 360;
i++;
}
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
_rotation = (-dir);
speed = 12;
id = "seagull";
Symbol 307 MovieClip [ravenFeather] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
_y = (_y - _root.global_velocity);
if (_y < -12) {
this.removeMovieClip();
}
_rotation = (Math.random() * 360);
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
}
if (_root.global_effects == 0) {
this.removeMovieClip();
}
this.gotoAndStop(img);
_rotation = (Math.random() * 360);
Symbol 314 MovieClip [feather] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
_y = (_y - _root.global_velocity);
if (_y < -12) {
this.removeMovieClip();
}
_rotation = (Math.random() * 360);
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
}
if (_root.global_effects == 0) {
this.removeMovieClip();
}
this.gotoAndStop(img);
_rotation = (Math.random() * 360);
Symbol 323 MovieClip [parachute_off] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_y < -100) {
this.removeMovieClip();
}
_y = (_y - _root.global_velocity);
}
Symbol 332 MovieClip [cloud] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
_y = (_y - (_root.global_velocity * scale));
if (_y < -200) {
this.removeMovieClip();
}
}
scale = (Math.random() * 1) + 0.5;
_xscale = ((Math.random() * 60) + (170 * scale));
_yscale = ((Math.random() * 60) + (170 * scale));
_alpha = (((2 - scale) / 3) * 100);
this.gotoAndStop(random(3) + 1);
Symbol 347 MovieClip [player_limb] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
y = y - (_root.global_velocity - _root.global_tv);
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
_rotation = (_rotation + spin);
if ((Math.random() * 3) < 1) {
createBlood();
}
if ((((_x < 0) or (_x > 640)) or (_y < 0)) or (_y > 480)) {
this.removeMovieClip();
}
}
function createBlood() {
_root.limbx = _x;
_root.limby = _y;
if (random(2) == 0) {
blood = _root.attachMovie("blood1", "blood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.limbx, _y:_root.limby});
} else {
blood = _root.attachMovie("blood2", "blood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.limbx, _y:_root.limby});
}
blood.speed = Math.random() * 5;
blood.dir = Math.random() * 360;
}
blood_drop_last = -4;
this.gotoAndStop(subimg);
_rotation = random(360);
spin = random(80) - 40;
dir = Math.random() * 360;
speed = Math.random() * 5;
Symbol 348 MovieClip [diver] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (limbs < 4) {
if ((Math.random() * (4 + limbs)) < 1) {
createBlood();
}
}
timer = timer + 0.02;
xprevious = _x;
yprevious = _y;
_x = (xstart + (Math.sin(timer) * 30));
_y = (_y - (_root.global_velocity - velocity));
xmove = _x - xprevious;
ymove = _y - yprevious;
chute_angle = point_direction(x, y, xprevious, yprevious - 50);
if (chute == 0) {
velocity = Math.min(_root.global_tv, velocity + 0.1);
}
if ((_y < -100) or (_y > 780)) {
this.removeMovieClip();
}
}
function createBlood() {
_root.xx = _x;
_root.yy = _y;
if (random(2) == 0) {
blood = _root.attachMovie("blood1", "blood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
} else {
blood = _root.attachMovie("blood2", "blood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.xx, _y:_root.yy});
}
blood.speed = Math.random() * 5;
blood.dir = Math.random() * 360;
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
chute = 1;
chute_angle = 0;
chute_xscale = 1;
timer = 0;
velocity = 6;
xstart = _x;
limbs = 4;
arm_r = 1;
arm_l = 1;
leg_r = 1;
leg_l = 1;
blood_drop_last = -4;
attachMovie("diver_chute", "diver_chute" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("diver_body", "diver_body" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("diver_arm_r", "diver_arm_r" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("diver_arm_l", "diver_arm_l" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("diver_leg_r", "diver_leg_r" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
attachMovie("diver_leg_l", "diver_leg_l" + this.getNextHighestDepth(), this.getNextHighestDepth(), {});
Symbol 365 MovieClip [help_diver] Frame 1
function onEnterFrame() {
if (_root.help_position == 5) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 369 MovieClip [diver_body] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (((_currentframe == 16) or (_currentframe < 9)) && (_parent.chute == 1)) {
gotoAndPlay (9);
}
if (((_currentframe == 8) or (_currentframe >= 9)) && (_parent.chute == 0)) {
gotoAndPlay (1);
}
}
Symbol 378 MovieClip [help_crate] Frame 1
function onEnterFrame() {
if (_root.help_position == 2) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 380 MovieClip [crate] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
if (_y < -100) {
this.removeMovieClip();
}
_y = (_y - _root.global_velocity);
if (this.hitTest(_root.global_playerBody)) {
_root.timer = _root.timer + (val * 30);
if (_root.global_music == 1) {
var _local5 = new Sound();
_local5.attachSound("snd_crate");
_local5.start();
}
i = 0;
while (i < 7) {
xx = _x;
yy = _y;
wood = _root.attachMovie("wood", "wood" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:xx, _y:yy});
wood.dir = Math.random() * 360;
wood.speed = (Math.random() * 5) + 2;
wood.subimage = random(15) + 1;
wood.timer = 0;
if ((Math.random() * 2) < 1) {
wood.alarm = (Math.random() * 20) + 10;
}
spin = (Math.random() * 5) + 2;
rand = random(2);
if (rand == 0) {
wood.spin = spin * -1;
} else {
wood.spin = spin;
}
i++;
}
_root.score_pulse = 1;
this.removeMovieClip();
}
}
tb_value.text = val;
Symbol 411 MovieClip [wood] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
timer++;
this.gotoAndStop(subimage);
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
if (timer == alarm) {
if (_root.global_music == 1) {
var _local3 = new Sound();
rand = random(2);
if (rand == 0) {
_local3.attachSound("snd_wood_1");
} else if (rand == 1) {
_local3.attachSound("snd_wood_2");
}
_local3.start();
}
}
velocity = Math.min(_root.global_tv, velocity + 0.1);
y = y - (_root.global_velocity - velocity);
_rotation = (_rotation + spin);
spin = spin * 0.95;
_alpha = (_alpha - 5);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
if (_root.global_effects == 0) {
this.removeMovieClip();
}
velocity = 0;
Symbol 416 MovieClip [help_chopper] Frame 1
function onEnterFrame() {
if (_root.help_position == 6) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 417 MovieClip [chopper] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
delete this.onEnterFrame;
}
if (_y < -100) {
j = 0;
while (j < _root.enemies.length) {
if (_root.enemies[j].toString() == this._name) {
_root.enemies.splice(j, 1);
}
j++;
}
j = 0;
while (j < _root.choppers.length) {
if (_root.choppers[j].toString() == this._name) {
_root.choppers.splice(j, 1);
}
j++;
}
this.removeMovieClip();
}
if (_root.pause == false) {
_y = (_y - _root.global_velocity);
}
timer = timer + 0.1;
_rotation = (Math.sin(timer) * 6);
}
id = "chopper";
if (_root.global_music == 1) {
var snd = new Sound();
snd.attachSound("snd_chopper");
snd.start();
}
Symbol 426 MovieClip [help_jet] Frame 1
function onEnterFrame() {
if (_root.help_position == 7) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 427 MovieClip [jet] Frame 1
function onEnterFrame() {
if (_root.pause == true) {
this.gotoAndStop(_currentframe);
delete this.onEnterFrame;
}
y = y - _root.global_velocity;
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
}
function point_direction(x1, y1, x2, y2) {
return(Math.atan2(y1 - y2, x2 - x1) * 57.2957795130823);
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
id = "jet";
if (_root.global_music == 1) {
var snd = new Sound();
snd.attachSound("snd_jet");
}
_rotation = dir;
speed = 12;
Symbol 428 MovieClip [cloudmaker] Frame 1
function onEnterFrame() {
if ((Math.random() * (20 / (_root.global_velocity / 6))) < 1) {
attachMovie("cloud", "cloud" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:Math.random() * 640, _y:240 + ((207 * (_root.global_velocity + 4)) / 10)});
}
}
Symbol 439 MovieClip [cursor] Frame 1
this._x = _root._xmouse;
this._y = _root._ymouse;
onMouseMove = function () {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
};
Symbol 446 MovieClip [terminal] Frame 1
function onEnterFrame() {
if (this._currentframe == 25) {
this.removeMovieClip();
}
}
Symbol 450 MovieClip [fail] Frame 1
function onEnterFrame() {
timer--;
if (timer == 0) {
if (_root.global_music == 1) {
var _local3 = new Sound();
_local3.attachSound("snd_fail");
_local3.start();
}
_root.pause = true;
rand = random(16);
if (rand == 0) {
text1 = "UTTER FAILURE!";
text2 = "UTTER FAILURE!";
} else if (rand == 1) {
text1 = "YOU GOT PWNED!";
text2 = "YOU GOT PWNED!";
} else if (rand == 2) {
text1 = "OWNED!";
text2 = "OWNED!";
} else if (rand == 3) {
text1 = "DOMINATED!";
text2 = "DOMINATED!";
} else if (rand == 4) {
text1 = "LOSERFACE";
text2 = "LOSERFACE";
} else if (rand == 5) {
text1 = "n00b";
text2 = "n00b";
} else if (rand == 6) {
text1 = "DEMOTED!";
text2 = "DEMOTED!";
} else if (rand == 7) {
text1 = "DUMPED!";
text2 = "DUMPED!";
} else if (rand == 8) {
text1 = "CAPPED!";
text2 = "CAPPED!";
} else if (rand == 9) {
text1 = "DEVOURED!";
text2 = "DEVOURED!";
} else if (rand == 10) {
text1 = "BAGGED!";
text2 = "BAGGED!";
} else if (rand == 11) {
text1 = "EXTINCTION";
text2 = "EXTINCTION";
} else if (rand == 12) {
text1 = "HAMMERED!";
text2 = "HAMMERED!";
} else if (rand == 13) {
text1 = "FAIL.";
text2 = "FAIL.";
} else if (rand == 14) {
text1 = "FAIL.";
text2 = "FAIL.";
} else {
text1 = "UNFORTUNE!";
text2 = "UNFORTUNE!";
}
}
tb_1.text = text1;
tb_2.text = text2;
if (timer == -90) {
Mouse.show();
_root.scoreInit();
this.removeMovieClip();
}
}
timer = 30;
_rotation = ((Math.random() * 30) - 15);
text1 = "";
text2 = "";
Symbol 453 MovieClip [scores] Frame 1
function onEnterFrame() {
tb_1.text = Math.floor(_root.timer / 30);
tb_2.text = Math.floor(_root.timer / 30);
_alpha = (1 - (((_root.intro - 60) / 30) * 100));
}
Symbol 458 MovieClip [txt_options_effects] Frame 1
_visible = false;
Symbol 461 MovieClip [txt_options_music] Frame 1
_visible = false;
Symbol 482 MovieClip [help_player] Frame 1
function onEnterFrame() {
if (_root.help_position == 1) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 485 MovieClip [help_text_7] Frame 1
function onEnterFrame() {
if (_root.help_position == 7) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 488 MovieClip [help_text_5] Frame 1
function onEnterFrame() {
if (_root.help_position == 5) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 491 MovieClip [help_text_6] Frame 1
function onEnterFrame() {
if (_root.help_position == 6) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 494 MovieClip [help_text_4] Frame 1
function onEnterFrame() {
if (_root.help_position == 4) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 497 MovieClip [help_text_3] Frame 1
function onEnterFrame() {
if (_root.help_position == 3) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 500 MovieClip [help_text_2] Frame 1
function onEnterFrame() {
if (_root.help_position == 2) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 503 MovieClip [help_text_1] Frame 1
function onEnterFrame() {
if (_root.help_position == 1) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 526 MovieClip [explosion] Frame 1
function onEnterFrame() {
if (_root.pause == false) {
dirx = Math.cos((dir * Math.PI) / 180) * speed;
diry = Math.sin((dir * Math.PI) / 180) * speed;
this._x = this._x + dirx;
this._y = this._y + diry;
_y = (_y - _root.global_velocity);
}
if (this._currentframe == 11) {
this.removeMovieClip();
}
}
if (_root.global_effects == 0) {
this.removeMovieClip();
}
_rotation = (Math.random() * 360);
Symbol 672 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 673 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_root.clipname = _local3;
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 674 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.5");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 671 MovieClip Frame 1
function onEnterFrame() {
timer++;
if (timer == 120) {
_root.cloudmaker.removeMovieClip();
_root.gotoAndStop(3);
}
if (_currentframe == 16) {
gotoAndStop (16);
}
}
timer = 0;