STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228113
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/10444517?noj=FRM10444517-9DC" width="1" height="1"></div>

Operation Triplane Norden - become pilot during WWI on a very important mission.swf

This is the info page for
Flash #128272

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 62 cash { frame 1 { onEnterFrame = function () { if (_root.paused == 0) { this._x += _root.xspeed; if (this.hitTest(_root.hitarea)) { _root.collectsound.start(); _root.cashearnt = Math.round(random(40)) + 10; this.removeMovieClip(); } if (this._x < -300) { this.removeMovieClip(); } } }; } } movieClip 103 { } movieClip 104 spanner { frame 1 { onEnterFrame = function () { if (_root.paused == 0) { this._x += _root.xspeed; if (this.hitTest(_root.hitarea)) { _root.repairsound.start(); _root.health += 20; if (_root.health > _root.maxhealth) { _root.health = _root.maxhealth; } this.removeMovieClip(); } if (this._x < -300) { this.removeMovieClip(); } } }; } } movieClip 107 gascan { frame 1 { onEnterFrame = function () { if (_root.paused == 0) { this._x += _root.xspeed; if (this.hitTest(_root.hitarea)) { _root.fillup.start(); _root.fuel += 10; if (_root.fuel > _root.maxfuel) { _root.fuel = _root.maxfuel; } this.removeMovieClip(); } if (this._x < -300) { this.removeMovieClip(); } } }; } } movieClip 115 enemybullet { frame 1 { stop(); if (_x < 700 and _x > 0) { _root.shoot.start(); } onEnterFrame = function () { if (_root.paused == 0) { this._x += _root.xspeed; if (this._currentframe == 1) { this._x += xspeed; this._y += yspeed; if (_x < 0) { this.removeMovieClip(); } else { if (_x > 700) { this.removeMovieClip(); } } if (_y < 0) { this.removeMovieClip(); } else { if (_y > 840) { _y = 840; play(); } } if (_root.plane._currentframe != 5) { if (_root.hitarea.hitTest(this)) { _root.hurt = 10; _root.tingsound.start(); this.removeMovieClip(); } } } } }; } frame 2 { _root.splash3.start(); } frame 8 { this.removeMovieClip(); } } movieClip 121 bullet { frame 1 { stop(); onEnterFrame = function () { if (_root.paused == 0) { this._x += _root.xspeed; if (this._currentframe == 1) { this._x += xspeed; this._y += yspeed; if (_x < 0) { this.removeMovieClip(); } else { if (_x > 700) { this.removeMovieClip(); } } if (_y < 0) { this.removeMovieClip(); } else { if (_y > 840) { _y = 840; play(); } } if (_root.background.blimp.hitTest(this)) { _root.tingsound.start(); _root.background.blimp.hurt = 50; this.removeMovieClip(); } if (_root.background.enemyhitarea.hitTest(this)) { _root.tingsound.start(); _root.background.enemyplane.hurt = 10; this.removeMovieClip(); } } } }; } frame 2 { _root.splash3.start(); } frame 8 { this.removeMovieClip(); } } movieClip 131 enemybomb { frame 1 { stop(); timer = 0; _root.bombsound2.start(); onEnterFrame = function () { if (_root.paused == 0) { _x = _x + _root.xspeed; if (_currentframe == 1) { if (_root.hitarea.hitTest(this)) { _root.health = 0; _root.bombsound2.stop('bombsound'); this.removeMovieClip(); } _x = _x + xspeed; _y = _y + yspeed; yspeed += 0.5; adjside = xspeed; oppside = yspeed; angle = Math.atan2(oppside, adjside); angle = Math.round((angle / Math.PI) * 180); _rotation = angle; if (_root.background.blimp._currentframe == 1) { if (this.hitTest(_root.background.blimp)) { _root.background.blimp.hurt = 100; _root.bombsound2.stop('bombsound'); this.removeMovieClip(); } } if (_y > 840) { if (_x < _root.background.island._x + 100 and _x > _root.background.island._x - 100) { _root.background.island.hurt = 100; _root.bombsound2.stop('bombsound'); this.removeMovieClip(); } else { if (_x < _root.background.ship._x + 80 and _x > _root.background.ship._x - 80) { _root.background.ship.hurt = 100; _root.bombsound2.stop('bombsound'); this.removeMovieClip(); } else { _y = 840; play(); } } } } } }; } frame 2 { _rotation = 0; _root.splash2.start(); _root.bombsound2.stop('bombsound'); } frame 8 { this.removeMovieClip(); } } movieClip 133 bomb { frame 1 { stop(); leftarea = 0; xdist = _x - _root.plane._x; ydist = _y - (_root.plane._y - _root.background._y); xdist *= xdist; ydist *= ydist; initialdist = Math.round(Math.sqrt(ydist + xdist)); _root.bombsound.start(); onEnterFrame = function () { if (_root.paused == 0) { if (_currentframe == 1) { if (leftarea == 1) { if (_root.hitarea.hitTest(this)) { _root.health = 0; _root.bombsound.stop('bombsound'); this.removeMovieClip(); } } if (leftarea == 0) { if (_root.hitarea.hitTest(this)) { } else { leftarea = 1; } xdist = _x - _root.plane._x; ydist = _y - (_root.plane._y - _root.background._y); xdist *= xdist; ydist *= ydist; totaldist = Math.round(Math.sqrt(ydist + xdist)); if (totaldist < initialdist - 2) { _root.health = 0; _root.bombsound.stop('bombsound'); this.removeMovieClip(); } } _x = _x + xspeed; _y = _y + yspeed; yspeed += 0.5; adjside = xspeed; oppside = yspeed; angle = Math.atan2(oppside, adjside); angle = Math.round((angle / Math.PI) * 180); _rotation = angle; if (_root.background.blimp._currentframe == 1) { if (this.hitTest(_root.background.blimp)) { _root.background.blimp.hurt = 100; _root.bombsound.stop('bombsound'); this.removeMovieClip(); } } if (this.hitTest(_root.background.enemyhitarea)) { _root.background.enemyplane.hurt = 100; _root.bombsound.stop('bombsound'); this.removeMovieClip(); } if (_y > 840) { if (_x < _root.background.island._x + 100 and _x > _root.background.island._x - 100) { _root.background.island.hurt = 100; _root.bombsound.stop('bombsound'); this.removeMovieClip(); } else { if (_x < _root.background.ship._x + 80 and _x > _root.background.ship._x - 80) { _root.background.ship.hurt = 100; _root.bombsound.stop('bombsound'); this.removeMovieClip(); } else { _y = 840; play(); } } } } _x = _x + _root.xspeed; } }; } frame 2 { _rotation = 0; _root.bombsound.stop('bombsound'); _root.splash1.start(); } frame 8 { this.removeMovieClip(); } } movieClip 154 { } movieClip 156 minedrop { frame 1 { stop(); yspeed = 0; onEnterFrame = function () { this._x += _root.xspeed; if (_currentframe == 1) { _y = _y + yspeed; yspeed += 1; if (_y > 840) { _root.cashearnt = 30; _y = 840; play(); } } }; } frame 2 { _root.splash2.start(); } frame 8 { this.removeMovieClip(); } } movieClip 211 mine { frame 1 { stop(); onEnterFrame = function () { if (_root.paused == 0) { this._x += _root.xspeed; if (_currentframe == 1) { _y = _y - 1; if (this.hitTest(_root.hitarea)) { if (_root.hitarea._y - _root.background._y < _y - 40) { _root.minedestroyedtrigger = 1; _root.background.bullets.attachMovie('balloonpop', 'balloon' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['balloon' + _root.bulletlevel]._x = _x - 20; _root.background.bullets['balloon' + _root.bulletlevel]._y = _y - 90; ++_root.bulletlevel; _root.background.bullets.attachMovie('minedrop', 'minedrop' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['minedrop' + _root.bulletlevel]._x = _x; _root.background.bullets['minedrop' + _root.bulletlevel]._y = _y; ++_root.minesdestroyed; ++_root.bulletlevel; this.removeMovieClip(); } else { _root.background.bullets.attachMovie('balloon', 'balloon' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['balloon' + _root.bulletlevel]._x = _x - 20; _root.background.bullets['balloon' + _root.bulletlevel]._y = _y - 90; ++_root.bulletlevel; _root.hurt = 50; play(); } } if (_x < 700) { if (this.hitTest(_root.background.enemyhitarea)) { if (_root.background.enemyhitarea._y - _root.background._y < _y - 40) { _root.background.bullets.attachMovie('balloonpop', 'balloon' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['balloon' + _root.bulletlevel]._x = _x - 20; _root.background.bullets['balloon' + _root.bulletlevel]._y = _y - 90; ++_root.bulletlevel; _root.background.bullets.attachMovie('minedrop', 'minedrop' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['minedrop' + _root.bulletlevel]._x = _x; _root.background.bullets['minedrop' + _root.bulletlevel]._y = _y; ++_root.bulletlevel; ++_root.minesdestroyed; this.removeMovieClip(); } else { _root.background.bullets.attachMovie('balloon', 'balloon' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['balloon' + _root.bulletlevel]._x = _x - 20; _root.background.bullets['balloon' + _root.bulletlevel]._y = _y - 90; ++_root.bulletlevel; _root.background.enemyplane.hurt = 50; play(); } } } if (this._x < -300) { this.removeMovieClip(); } if (this._y < -100) { this.removeMovieClip(); } } } }; } frame 2 { _root.minesound.start(); } frame 29 { this.removeMovieClip(); } } movieClip 218 { } movieClip 220 shrapnel { frame 1 { stop(); shrapnel._xscale = size; shrapnel._yscale = size; onEnterFrame = function () { if (_currentframe == 1) { this._x += xspeed; this._y += yspeed; yspeed += 0.5; this._rotation += xspeed / 2; if (_root.background.island.hitTest(this)) { this.removeMovieClip(); } if (_y > 840) { _y = 840; play(); } } _x = _x + _root.xspeed; }; } frame 2 { _rotation = 0; _root.splash1.start(); } frame 8 { this.removeMovieClip(); } } movieClip 222 smoke { frame 1 { size = random(50); _xscale = size; _yscale = size; speed = 5 + random(5); onEnterFrame = function () { _x = _x + _root.xspeed; _y = _y - 3; _xscale = _xscale + speed; _yscale = _yscale + speed; _alpha = 100 - _xscale; if (this._alpha <= 0) { this.removeMovieClip(); } }; } } movieClip 224 balloon { frame 1 { speed = 0; onEnterFrame = function () { _x = _x + _root.xspeed; speed += 1; _y = _y - speed; speed *= 0.9; if (_y < -100) { this.removeMovieClip(); } }; } } movieClip 228 { } movieClip 229 { } movieClip 271 missile { frame 1 { rotspeed = 5; stop(); onEnterFrame = function () { if (_root.paused == 0) { if (_x > 350) { _root.lostmissiletrigger = 1; } else { _root.lostmissiletrigger = 0; } _x = _x + _root.xspeed; if (_currentframe == 1) { if (_x < -1000) { this.removeMovieClip(); } ++_root.missiles; if (_y > 840) { _y = 840; gotoAndPlay(23); } if (_root.hitarea.hitTest(this)) { _root.missilehittrigger = 1; _root.hurt = 50; play(); } if (_x > -20 and _x < 720) { if (_y > 800) { if (_x > _root.background.ship._x - 100 and _x < _root.background.ship._x + 100) { _root.background.ship.hurt = 100; play(); } } if (_root.background.blimp.hitTest(this)) { if (_root.background.blimp._currentframe == 1) { _root.background.blimp.hurt = 100; play(); } } if (_root.background.enemyhitarea.hitTest(this)) { if (_root.background.enemyplane._currentframe == 1) { _root.background.enemyplane.hurt = 100; play(); } } } xdist = _root.plane._x - _x; ydist = _y - (_root.plane._y - _root.background._y); angle = Math.atan2(xdist, ydist) * 180 / Math.PI; if (angle < 0 and _rotation < 0 or angle > 0 and _rotation > 0) { if (_rotation < angle) { _rotation = _rotation + rotspeed; } else { if (_rotation > angle) { _rotation = _rotation - rotspeed; } } } else { if (_rotation > 0) { if (_rotation > 90) { _rotation = _rotation + rotspeed; } else { _rotation = _rotation - rotspeed; } } else { if (_rotation < -90) { _rotation = _rotation - rotspeed; } else { _rotation = _rotation + rotspeed; } } } xspeed += Math.cos((_rotation - 90) * 0.0174532925199433) * 2; yspeed += Math.sin((_rotation - 90) * 0.0174532925199433) * 2; yspeed *= 0.9; xspeed *= 0.9; ++_yspeed; _y = _y + yspeed; _x = _x + xspeed; } } }; } frame 2 { _rotation = 0; _root.missileexplode.start(); } frame 22 { this.removeMovieClip(); } frame 23 { _rotation = 0; _root.splash3.start(); } frame 29 { this.removeMovieClip(); } } movieClip 298 balloonpop { frame 1 { _root.baloonpop.start(); onEnterFrame = function () { _x = _x + _root.xspeed; }; } frame 14 { this.removeMovieClip(); } } movieClip 300 splash { frame 1 { size = 70 + random(50); _xscale = size; _yscale = size; _alpha = 50 + random(50); onEnterFrame = function () { _alpha = _alpha - 1; if (this._y > 840 or _alpha <= 0) { this.removeMovieClip(); } _x = _x + _root.xspeed; _x = _x - xspeed; _y = _y + yspeed; ++yspeed; }; } } movieClip 304 { } movieClip 353 { frame 1 { _root.blimpexplode.start(); } frame 25 { stop(); } } movieClip 354 blimp { frame 1 { _parent.blimpshadow._alpha = 10; } frame 1 { stop(); blimphit._alpha = 0; health = 100; hurt = 0; guntime = 10; guntimer = 0; _y = 100 + random(600); onEnterFrame = function () { if (_root.paused == 0) { if (_root.blimpstarted == 1) { _x = _x + _root.xspeed; } if (this._currentframe == 1) { if (_root.blimpstarted == 1) { _x = _x - 5; } if (hurt > 0) { health -= hurt; blimphit._alpha = 20; hurt = 0; } if (blimphit._alpha > 0) { --blimphit._alpha; } if (health <= 0) { _root.blimpdestroyedtrigger = 1; ++_root.blimpsdestroyed; gotoAndStop(2); _root.cashearnt = 150; } if (this.hitTest(_root.hitarea)) { if (_currentframe == 1) { _root.hurt = 50; ++_root.blimpsdestroyed; _root.cashearnt = 150; gotoAndStop(2); } } adjside = _root.plane._x - this._x; oppside = _root.plane._y - _root.background._y - this._y; angle = Math.atan2(oppside, adjside); angle = Math.round((angle / Math.PI) * 180); ++guntimer; if (_root.plane._y - _root.background._y > this._y) { if (guntimer > guntime) { shoot.start(); _root.background.bullets.attachMovie('enemybullet', 'bullet' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['bullet' + _root.bulletlevel]._x = this._x; _root.background.bullets['bullet' + _root.bulletlevel]._y = this._y + 35; _root.background.bullets['bullet' + _root.bulletlevel].xspeed = -Math.cos((angle + 180) * 0.0174532925199433) * 10; _root.background.bullets['bullet' + _root.bulletlevel].yspeed = -Math.sin((angle + 180) * 0.0174532925199433) * 10; ++_root.bulletlevel; guntimer = 0; } } } if (this._x < -200) { _root.blimpstarted = 0; _x = 900; gotoAndStop(1); _y = 100 + random(600); } } }; } frame 2 { _parent.blimpshadow._alpha = 0; } } frame 1 { var rightClick = new ContextMenu(); rightClick.hideBuiltInItems(); _root.menu = rightClick; fscommand('trapallkeys', true); hasearntfacebook = 0; hasearnttwitter = 0; _root.trainingcomplete = 0; } frame 1 { wantedframe = 6; rollover = new Sound(); rollover.attachSound('rollover'); click = new Sound(); click.attachSound('click'); shoot = new Sound(); shoot.attachSound('shoot'); music = new Sound(); music.attachSound('music'); engine = new Sound(); engine.attachSound('enginesound'); stopengine = new Sound(); stopengine.attachSound('stopengine'); baloonpop = new Sound(); baloonpop.attachSound('baloonpop'); repairsound = new Sound(); repairsound.attachSound('repairsound'); collectsound = new Sound(); collectsound.attachSound('collectsound'); fillup = new Sound(); fillup.attachSound('fillup'); bombsound = new Sound(); bombsound.attachSound('bombsound'); bombsound2 = new Sound(); bombsound2.attachSound('bombsound'); splash1 = new Sound(); splash1.attachSound('splash1'); splash2 = new Sound(); splash2.attachSound('splash2'); splash3 = new Sound(); splash3.attachSound('splash3'); missilesound = new Sound(); missilesound.attachSound('missilesound'); islandexplosion = new Sound(); islandexplosion.attachSound('islandexplosion'); shipexplosion = new Sound(); shipexplosion.attachSound('shipexplosion'); minesound = new Sound(); minesound.attachSound('minesound'); missileexplode = new Sound(); missileexplode.attachSound('missileexplode'); beep = new Sound(); beep.attachSound('beep'); tingsound = new Sound(); tingsound.attachSound('tingsound'); blimpexplode = new Sound(); blimpexplode.attachSound('blimpexplode'); planeexplode = new Sound(); planeexplode.attachSound('planeexplode'); bellsound = new Sound(); bellsound.attachSound('bellsound'); music2 = new Sound(); music2.attachSound('music2'); day = 0; money = 0; enginelevel = 1; fueltanklevel = 1; gunlevel = 1; cargolevel = 1; armourlevel = 1; efficiencylevel = 1; hudlevel = 1; multiplierlevel = 1; bombs = 2; ammo = 30; invertkeys = 1; soundon = 1; } frame 1 { Aminesweeper = 0; Aredbaron = 0; Ahindenburg = 0; Atimewaster = 0; Asunkbattleship = 0; Amoneyhoarder = 0; Acashgrabber = 0; Amasterpilot = 0; Ashorttrip = 0; Alongtrip = 0; Aepictrip = 0; Aflyinglow = 0; Aplanesdestroyed = 0; Aminesdestroyed = 0; Ablimpsdestroyed = 0; Ashipsdestroyed = 0; Adestroyedinsea = 0; planesdestroyed = 0; minesdestroyed = 0; blimpsdestroyed = 0; shipsdestroyed = 0; totalminutes = 0; distance = 0; totalearnt = 0; } frame 1 { function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; var pv; mb = '__mochibot__'; mbc = 'mochibot.com'; g = _global ? _global : _level0._root; if (g[mb + swfid]) { return g[mb + swfid]; } s = System.security; x = mc._root.getSWFVersion; fv = x ? mc.getSWFVersion() : (_global ? 6 : 5); if (!s) { s = {}; } sb = s.sandboxType; if (sb == 'localWithFile') { return null; } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } pv = (fv == 5) ? /:$version : System.capabilities.version; u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : ''); lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv); g[mb + 'level'] = lv; if (fv == 5) { res = '_level' + lv; if (!eval(res)) { loadMovieNum(u, lv); } return res; } res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); return res; } mochi.as2.MochiAd.showPreGameAd({'id': 'eed575d69b35f3bd', 'res': '700x600'}); MochiServices.connect(); startPlay(); __com_mochibot__('44aeac73', this, 10301, true); mochi.as2.MochiServices.connect('eed575d69b35f3bd'); } movieClip 356 { } // unknown tag 88 length 91 movieClip 362 { } movieClip 1511 __Packages.mochi.as2.MochiAd { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiAd) { var v1 = function () {}; mochi.as2.MochiAd = v1; var v2 = v1.prototype; v1.getVersion = function () { return mochi.as2.MochiServices.getVersion(); }; v1.showPreGameAd = function (options) { var v27 = {'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 = mochi.as2.MochiAd._parseOptions(options, v27); if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') { options.ad_started(); options.ad_finished(); return undefined; } var clip = options.clip; var v24 = 11000; var v19 = options.ad_timeout; if (options.skip) { v19 = 0; } delete options.ad_timeout; var fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!mochi.as2.MochiAd.load(options)) { options.ad_failed(); options.ad_finished(); return undefined; } options.ad_started(); var mc = clip._mochiad; mc.onUnload = function () { options.ad_finished(); }; var v15 = mochi.as2.MochiAd._getRes(options); var v5 = v15[0]; var v14 = v15[1]; mc._x = v5 * 0.5; mc._y = v14 * 0.5; var chk = mc.createEmptyMovieClip('_mochiad_wait', 3); chk._x = v5 * -0.5; chk._y = v14 * -0.5; var v7 = chk.createEmptyMovieClip('_mochiad_bar', 4); if (options.no_progress_bar) { v7._visible = false; delete options.no_progress_bar; } else { v7._x = 10; v7._y = v14 - 20; } var v23 = options.color; delete options.color; var v21 = options.background; delete options.background; var v25 = options.outline; delete options.outline; var v6 = v7.createEmptyMovieClip('_outline', 1); v6.beginFill(v21); v6.moveTo(0, 0); v6.lineTo(v5 - 20, 0); v6.lineTo(v5 - 20, 10); v6.lineTo(0, 10); v6.lineTo(0, 0); v6.endFill(); var v4 = v7.createEmptyMovieClip('_inside', 2); v4.beginFill(v23); v4.moveTo(0, 0); v4.lineTo(v5 - 20, 0); v4.lineTo(v5 - 20, 10); v4.lineTo(0, 10); v4.lineTo(0, 0); v4.endFill(); v4._xscale = 0; var v8 = v7.createEmptyMovieClip('_outline', 3); v8.lineStyle(0, v25, 100); v8.moveTo(0, 0); v8.lineTo(v5 - 20, 0); v8.lineTo(v5 - 20, 10); v8.lineTo(0, 10); v8.lineTo(0, 0); chk.ad_msec = v24; chk.ad_timeout = v19; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function () { var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time); if (v2 > 0) { this._parent._alpha = v2; } else { var v3 = this._parent._parent; mochi.as2.MochiAd.unload(v3); delete this.onEnterFrame; } }; 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 v2 = this.mc._mochiad_wait; v2.server_control = true; v2.started = getTimer(); v2.ad_msec = msec; }; mc.lc.rpc = function (callbackID, arg) { mochi.as2.MochiAd.rpc(clip, callbackID, arg); }; mc.rpcTestFn = function (s) { trace('[MOCHIAD rpcTestFn] ' + s); return s; }; chk.onEnterFrame = function () { var v10 = this._parent._parent; var v3 = v10; for (;;) { if (!(!v3.getBytesTotal() && v3)) break; v3 = v3._parent; } if (!v3) { v3 = _root; } var v13 = this._parent._mochiad_ctr; var v7 = getTimer() - this.started; var v5 = false; var v6 = v3.getBytesTotal(); var v9 = v3.getBytesLoaded(); var v4 = 100 * v9 / v6; var v12 = 100 * v7 / chk.ad_msec; var v11 = this._mochiad_bar._inside; var v15 = Math.min(100, Math.min(v4 || 0, v12)); v15 = Math.max(this.last_pcnt, v15); this.last_pcnt = v15; v11._xscale = v15; options.ad_progress(v15); if (sendHostProgress) { mochi.as2.MochiAd.containerNotify(clip, {'id': 'hostLoadPcnt', 'pcnt': v4}, clip._mochiad._containerLCName); if (v4 == 100) { sendHostProgress = false; } } if (!chk.showing) { var v8 = v13.getBytesTotal(); if (v8 > 0 || typeof v8 == 'undefined') { chk.showing = true; chk.started = getTimer(); } else { if (v7 > chk.ad_timeout && v4 == 100) { options.ad_failed(); v5 = true; } } } if (v7 > chk.ad_msec) { v5 = true; } if (v6 > 0 && v9 >= v6 && v5) { if (this.server_control) { delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; } } }; }; v1.showClickAwayAd = function (options) { var v10 = {'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 = mochi.as2.MochiAd._parseOptions(options, v10); var clip = options.clip; var v9 = options.ad_timeout; delete options.ad_timeout; if (!mochi.as2.MochiAd.load(options)) { options.ad_failed(); options.ad_finished(); return undefined; } options.ad_started(); var v3 = clip._mochiad; v3.onUnload = function () { options.ad_finished(); }; var v5 = mochi.as2.MochiAd._getRes(options); var v11 = v5[0]; var v8 = v5[1]; v3._x = v11 * 0.5; v3._y = v8 * 0.5; var chk = v3.createEmptyMovieClip('_mochiad_wait', 3); chk.ad_timeout = v9; chk.started = getTimer(); chk.showing = false; v3.lc.adLoaded = options.ad_loaded; v3.lc.adSkipped = options.ad_skipped; v3.lc.rpc = function (callbackID, arg) { mochi.as2.MochiAd.rpc(clip, callbackID, arg); }; v3.rpcTestFn = function (s) { trace('[MOCHIAD rpcTestFn] ' + s); return s; }; var v21 = false; chk.onEnterFrame = function () { var v5 = this._parent._mochiad_ctr; var v4 = getTimer() - this.started; var v2 = false; if (!chk.showing) { var v3 = v5.getBytesTotal(); if (v3 > 0 || typeof v3 == 'undefined') { v2 = true; chk.showing = true; chk.started = getTimer(); } else { if (v4 > chk.ad_timeout) { options.ad_failed(); v2 = true; } } } if (v2) { delete this.onEnterFrame; } }; }; v1.showInterLevelAd = function (options) { var v13 = {'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 = mochi.as2.MochiAd._parseOptions(options, v13); var clip = options.clip; var v10 = 11000; var v12 = options.ad_timeout; delete options.ad_timeout; var fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!mochi.as2.MochiAd.load(options)) { options.ad_failed(); options.ad_finished(); return undefined; } options.ad_started(); var mc = clip._mochiad; mc.onUnload = function () { options.ad_finished(); }; var v5 = mochi.as2.MochiAd._getRes(options); var v14 = v5[0]; var v11 = v5[1]; mc._x = v14 * 0.5; mc._y = v11 * 0.5; var chk = mc.createEmptyMovieClip('_mochiad_wait', 3); chk.ad_msec = v10; chk.ad_timeout = v12; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function () { var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time); if (v2 > 0) { this._parent._alpha = v2; } else { var v3 = this._parent._parent; mochi.as2.MochiAd.unload(v3); delete this.onEnterFrame; } }; mc.lc.adLoaded = options.ad_loaded; mc.lc.adSkipped = options.ad_skipped; mc.lc.adjustProgress = function (msec) { var v2 = this.mc._mochiad_wait; v2.server_control = true; v2.started = getTimer(); v2.ad_msec = msec - 250; }; mc.lc.rpc = function (callbackID, arg) { mochi.as2.MochiAd.rpc(clip, callbackID, arg); }; mc.rpcTestFn = function (s) { trace('[MOCHIAD rpcTestFn] ' + s); return s; }; chk.onEnterFrame = function () { var v5 = this._parent._mochiad_ctr; var v4 = getTimer() - this.started; var v2 = false; if (!chk.showing) { var v3 = v5.getBytesTotal(); if (v3 > 0 || typeof v3 == 'undefined') { chk.showing = true; chk.started = getTimer(); } else { if (v4 > chk.ad_timeout) { options.ad_failed(); v2 = true; } } } if (v4 > chk.ad_msec) { v2 = true; } if (v2) { if (this.server_control) { delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; } } }; }; v1.showPreloaderAd = function (options) { trace('[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0'); mochi.as2.MochiAd.showPreGameAd(options); }; v1.showTimedAd = function (options) { trace('[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0'); mochi.as2.MochiAd.showInterLevelAd(options); }; v1._allowDomains = function (server) { var v1 = ((server.split('/'))[2].split(':'))[0]; if (System.security) { if (System.security.allowDomain) { System.security.allowDomain('*'); System.security.allowDomain(v1); } if (System.security.allowInsecureDomain) { System.security.allowInsecureDomain('*'); System.security.allowInsecureDomain(v1); } } return v1; }; v1.load = function (options) { var v12 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'}; options = mochi.as2.MochiAd._parseOptions(options, v12); options.swfv = options.clip.getSWFVersion() || 6; options.mav = mochi.as2.MochiAd.getVersion(); var v6 = options.clip; if (!mochi.as2.MochiAd._isNetworkAvailable()) { return null; } if (v6._mochiad_loaded) { return null; } var v11 = options.depth; delete options.depth; var mc = v6.createEmptyMovieClip('_mochiad', v11); var v10 = mochi.as2.MochiAd._getRes(options); options.res = v10[0] + 'x' + v10[1]; options.server += options.id; delete options.id; v6._mochiad_loaded = true; if (v6._url.indexOf('http') != 0) { trace('[MochiAd] NOTE: Security Sandbox Violation errors below are normal'); } var v4 = mc.createEmptyMovieClip('_mochiad_ctr', 1); for (var v7 in options) { v4[v7] = options[v7]; } var v9 = v4.server; delete v4.server; var v13 = mochi.as2.MochiAd._allowDomains(v9); mc.onEnterFrame = function () { if (this._mochiad_ctr._url != this._url) { this.onEnterFrame = function () { if (!this._mochiad_ctr) { delete this.onEnterFrame; mochi.as2.MochiAd.unload(this._parent); } }; } }; var v5 = new Object(); var v8 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_'); v5.mc = mc; v5.name = v8; v5.hostname = v13; v5.allowDomain = function (d) { return true; }; v5.allowInsecureDomain = v5.allowDomain; v5.connect(v8); mc.lc = v5; mc.lc.regContLC = function (lc_name) { mc._containerLCName = lc_name; }; v4.lc = v8; v4.st = getTimer(); if (!options.skip) { v4.loadMovie(v9 + '.swf', 'POST'); } return mc; }; v1.unload = function (clip) { if (typeof clip == 'undefined') { clip = _root; } if (clip.clip && clip.clip._mochiad) { clip = clip.clip; } if (!clip._mochiad) { return false; } mochi.as2.MochiAd.containerNotify(clip, {'id': 'unload'}, clip._mochiad._containerLCName); clip._mochiad.removeMovieClip(); delete clip._mochiad_loaded; delete clip._mochiad; return true; }; v1._isNetworkAvailable = function () { if (System.security) { var v1 = System.security; if (v1.sandboxType == 'localWithFile') { return false; } } return true; }; v1._getRes = function (options) { var v3 = options.clip.getBounds(); var v2 = 0; var v1 = 0; if (typeof options.res != 'undefined') { var v4 = options.res.split('x'); v2 = parseFloat(v4[0]); v1 = parseFloat(v4[1]); } else { v2 = v3.xMax - v3.xMin; v1 = v3.yMax - v3.yMin; } if (v2 == 0 || v1 == 0) { v2 = Stage.width; v1 = Stage.height; } return [v2, v1]; }; v1._parseOptions = function (options, defaults) { var v4 = {}; for (var v8 in defaults) { v4[v8] = defaults[v8]; } if (options) { for (v8 in options) { v4[v8] = options[v8]; } } if (_root.mochiad_options) { var v5 = _root.mochiad_options.split('&'); var v2 = 0; while (v2 < v5.length) { var v3 = v5[v2].split('='); v4[unescape(v3[0])] = unescape(v3[1]); ++v2; } } if (v4.id == 'test') { trace('[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!'); } return v4; }; v1.rpc = function (clip, callbackID, arg) { switch (arg.id) { case 'setValue': mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value); break; case 'getValue': var v4 = mochi.as2.MochiAd.getValue(clip, arg.objectName); mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v4, clip._mochiad._containerLCName); break; case 'runMethod': var v3 = mochi.as2.MochiAd.runMethod(clip, arg.method, arg.args); mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v3, clip._mochiad._containerLCName); break; default: trace('[mochiads rpc] unknown rpc id: ' + arg.id); } }; v1.setValue = function (base, objectName, value) { var v2 = objectName.split('.'); var v1; v1 = 0; while (v1 < v2.length - 1) { if (base[v2[v1]] == undefined || base[v2[v1]] == null) { return undefined; } base = base[v2[v1]]; ++v1; } base[v2[v1]] = value; }; v1.getValue = function (base, objectName) { var v2 = objectName.split('.'); var v1; v1 = 0; while (v1 < v2.length - 1) { if (base[v2[v1]] == undefined || base[v2[v1]] == null) { return undefined; } base = base[v2[v1]]; ++v1; } return base[v2[v1]]; }; v1.runMethod = function (base, methodName, argsArray) { var v2 = methodName.split('.'); var v1; v1 = 0; while (v1 < v2.length - 1) { if (base[v2[v1]] == undefined || base[v2[v1]] == null) { return undefined; } base = base[v2[v1]]; ++v1; } if (typeof base[v2[v1]] == 'function') { return base[v2[v1]].apply(base, argsArray); } else { return undefined; } }; v1.containerNotify = function (clip, args, lcName) { var v1 = clip._mochiad._mochiad_ctr.ad.app; if (v1.notify) { v1.notify(args); } else { (new LocalConnection()).send(lcName, 'notify', args); } }; v1.containerRpcResult = function (clip, callbackID, val, lcName) { var v1 = clip._mochiad._mochiad_ctr.ad.app; if (v1.rpcResult) { v1.rpcResult(callbackID, val); } else { (new LocalConnection()).send(lcName, 'rpcResult', callbackID, val); } }; ASSetPropFlags(mochi.as2.MochiAd.prototype, null, 1); } #endinitclip } movieClip 1512 __Packages.mochi.as2.MochiEventDispatcher { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiEventDispatcher) { var v1 = function () { this.eventTable = {}; }; mochi.as2.MochiEventDispatcher = v1; var v2 = v1.prototype; v2.buildDelegate = function (thisObject, thatObject) { var v2 = {'thisObject': thisObject, 'thatObject': thatObject}; if (thatObject != undefined) { var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject; v2.delegate = function (args) { funct.call(thisObject, args); }; return v2; } v2.delegate = thisObject; return v2; }; v2.compareDelegate = function (d_A, d_B) { if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) { return false; } return true; }; v2.addEventListener = function (event, thisObject, thatObject) { this.removeEventListener(event, thisObject, thatObject); this.eventTable[event].push(this.buildDelegate(thisObject, thatObject)); }; v2.removeEventListener = function (event, thisObject, thatObject) { var v3 = this.buildDelegate(thisObject, thatObject); if (this.eventTable[event] == undefined) { this.eventTable[event] = []; return undefined; } for (var v4 in this.eventTable[event]) { if (!this.compareDelegate(this.eventTable[event][v4], v3)) { continue; } this.eventTable[event].splice(Number(v4), 1); } }; v2.triggerEvent = function (event, args) { if (this.eventTable[event] == undefined) { return undefined; } for (var v4 in this.eventTable[event]) { this.eventTable[event][v4].delegate(args); } }; ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1); } #endinitclip } movieClip 1513 __Packages.mochi.as2.MochiServices { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiServices) { var v1 = function () {}; mochi.as2.MochiServices = v1; var v2 = v1.prototype; v1.__get__id = function () { return mochi.as2.MochiServices._id; }; v1.__get__clip = function () { return mochi.as2.MochiServices._container; }; v1.__get__childClip = function () { return mochi.as2.MochiServices._clip; }; v1.getVersion = function () { return '3.9.2 as2'; }; v1.allowDomains = function (server) { var v1 = ((server.split('/'))[2].split(':'))[0]; if (System.security) { if (System.security.allowDomain) { System.security.allowDomain('*'); System.security.allowDomain(v1); } if (System.security.allowInsecureDomain) { System.security.allowInsecureDomain('*'); System.security.allowInsecureDomain(v1); } } return v1; }; v1.__get__isNetworkAvailable = function () { if (System.security) { var v1 = System.security; if (v1.sandboxType == 'localWithFile') { return false; } } return true; }; v1.__set__comChannelName = function (val) { if (val != undefined) { if (val.length > 3) { mochi.as2.MochiServices._sendChannelName = val + '_fromgame'; mochi.as2.MochiServices.initComChannels(); } } return mochi.as2.MochiServices.__get__comChannelName(); }; v1.__get__connected = function () { return mochi.as2.MochiServices._connected; }; v1.connect = function (id, clip, onError) { mochi.as2.MochiServices.warnID(id, false); if (!mochi.as2.MochiServices._connected && mochi.as2.MochiServices._clip == undefined) { trace('MochiServices Connecting...'); mochi.as2.MochiServices._connecting = true; mochi.as2.MochiServices.init(id, clip); } if (onError != undefined) { mochi.as2.MochiServices.onError = onError; } else { if (mochi.as2.MochiServices.onError == undefined) { mochi.as2.MochiServices.onError = function (errorCode) { trace(errorCode); }; } } }; v1.disconnect = function () { if (mochi.as2.MochiServices._connected || mochi.as2.MochiServices._connecting) { mochi.as2.MochiServices._connected = false; mochi.as2.MochiServices._connecting = mochi.as2.MochiServices._connected; mochi.as2.MochiServices.flush(true); if (mochi.as2.MochiServices._clip != undefined) { mochi.as2.MochiServices._clip.removeMovieClip(); delete mochi.as2.MochiServices._clip; } mochi.as2.MochiServices._listenChannel.close(); } }; v1.init = function (id, clip) { mochi.as2.MochiServices._id = id; if (clip != undefined) { mochi.as2.MochiServices._container = clip; } else { mochi.as2.MochiServices._container = _root; } mochi.as2.MochiServices.loadCommunicator(id, mochi.as2.MochiServices._container); }; v1.loadCommunicator = function (id, clip) { var v6 = '_mochiservices_com_' + id; var v5 = new MovieClipLoader(); var v3 = {}; if (mochi.as2.MochiServices._clip != null) { return mochi.as2.MochiServices._clip; } if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) { return null; } if ((mochi.as2.MochiServices.urlOptions()).servURL) { mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL; } var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services; if ((mochi.as2.MochiServices.urlOptions()).servicesURL) { v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL; } mochi.as2.MochiServices.allowDomains(v4); mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false); mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999); mochi.as2.MochiServices.listen(); if (v3.waitInterval != null) { clearInterval(v3.waitInterval); } v3.onLoadError = mochi.as2.MochiServices.loadError; v3.onLoadStart = function (target_mc) { this.isLoading = true; }; v3.onLoadComplete = function (target_mc) { target_mc.MochiServices = mochi.as2.MochiServices; }; v3.startTime = getTimer(); v3.wait = function () { if (getTimer() - this.startTime > 10000) { if (!this.isLoading) { mochi.as2.MochiServices.disconnect(); mochi.as2.MochiServices.onError.apply(null, ['IOError']); } clearInterval(this.waitInterval); } }; v3.waitInterval = setInterval(v3, 'wait', 1000); v5.addListener(v3); v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + mochi.as2.MochiServices.getVersion(), mochi.as2.MochiServices._clip); mochi.as2.MochiServices._sendChannel = new LocalConnection(); mochi.as2.MochiServices._sendChannel._queue = []; return mochi.as2.MochiServices._clip; }; v1.loadError = function (target_mc, errorCode, httpStatus) { trace('MochiServices could not load.'); mochi.as2.MochiServices.disconnect(); mochi.as2.MochiServices.onError.apply(null, [errorCode]); }; v1.onStatus = function (infoObject) { if (infoObject.level !== 'error') { } else { mochi.as2.MochiServices._connected = false; mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName); } }; v1.listen = function () { mochi.as2.MochiServices._listenChannel = new LocalConnection(); mochi.as2.MochiServices._listenChannel.handshake = function (args) { mochi.as2.MochiServices.__set__comChannelName(args.newChannel); }; mochi.as2.MochiServices._listenChannel.allowDomain = function (d) { return true; }; mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain; mochi.as2.MochiServices._listenChannel._nextcallbackID = 0; mochi.as2.MochiServices._listenChannel._callbacks = {}; mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName); trace('Waiting for MochiAds services to connect...'); }; v1.initComChannels = function () { if (!mochi.as2.MochiServices._connected) { mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) { mochi.as2.MochiServices.onStatus(infoObject); }; mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'}); mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'version': mochi.as2.MochiServices.getVersion()}); mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) { mochi.as2.MochiServices.onStatus(infoObject); }; mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) { var v5 = pkg.callbackID; var v4 = this._callbacks[v5]; if (!v4) { return undefined; } var v2 = v4.callbackMethod; var v3 = v4.callbackObject; if (v3 && typeof v2 == 'string') { v2 = v3[v2]; } if (v2 != undefined) { v2.apply(v3, pkg.args); } delete this._callbacks[v5]; }; mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) { switch (pkg.target) { case 'services': mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args); break; case 'events': mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args); break; case 'coins': mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args); break; case 'social': mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args); } }; mochi.as2.MochiServices._listenChannel.onError = function () { mochi.as2.MochiServices.onError.apply(null, ['IOError']); }; trace('[SERVICES_API] connected!'); mochi.as2.MochiServices._connecting = false; mochi.as2.MochiServices._connected = true; while (mochi.as2.MochiServices._sendChannel._queue.length > 0) { mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift()); } } }; v1.flush = function (error) { var v1; var v2; while (mochi.as2.MochiServices._sendChannel._queue.length > 0) { v1 = mochi.as2.MochiServices._sendChannel._queue.shift(); false; if (v1.callbackID != null) { v2 = mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID]; } delete mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID]; if (error) { mochi.as2.MochiServices.handleError(v1.args, v2.callbackObject, v2.callbackMethod); } } }; v1.handleError = function (args, callbackObject, callbackMethod) { if (args != null) { if (args.onError != null) { args.onError.apply(null, ['NotConnected']); } if (args.options != null && args.options.onError != null) { args.options.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); } } } }; v1.send = function (methodName, args, callbackObject, callbackMethod) { if (mochi.as2.MochiServices._connected) { mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID}); } else { if (mochi.as2.MochiServices._clip == undefined || !mochi.as2.MochiServices._connecting) { trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName); mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod); mochi.as2.MochiServices.flush(true); return undefined; } else { mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID}); } } mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod}; ++mochi.as2.MochiServices._listenChannel._nextcallbackID; }; v1.urlOptions = function () { var v5 = {}; var v6; if (_root._url.indexOf('mochiad_options') != -1) { var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1; v6 = _root._url.substr(v2, _root._url.length); } else { if (_root.mochiad_options) { v6 = _root.mochiad_options; } } if (v6) { var v4 = _root.mochiad_options.split('&'); var v2 = 0; while (v2 < v4.length) { var v3 = v4[v2].split('='); v5[unescape(v3[0])] = unescape(v3[1]); ++v2; } } return v5; }; v1.warnID = function (bid, leaderboard) { bid = bid.toLowerCase(); if (bid.length != 16) { trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length'); return undefined; } else { if (bid == '1e113c7239048b3f') { if (leaderboard) { trace('WARNING: Using testing board ID'); } else { trace('WARNING: Using testing board ID as game ID'); } return undefined; } else { if (bid == '84993a1de4031cd8') { if (leaderboard) { trace('WARNING: Using testing game ID as board ID'); } else { trace('WARNING: Using testing game ID'); } return undefined; } } } var v1 = 0; while (v1 < bid.length) { switch (bid.charAt(v1)) { if (bid.charAt(v1) !== 'f') { } else { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'a': break; case 'b': case 'c': case 'd': case 'e': } default: trace('WARNING: Board ID contains illegal characters: ' + bid); return undefined; } ++v1; } }; v1.addLinkEvent = function (url, burl, btn, onClick) { var timeout = 1500; var t0 = getTimer(); var v2 = new Object(); v2.mav = mochi.as2.MochiServices.getVersion(); v2.swfv = btn.getSWFVersion() || 6; v2.swfurl = btn._url; v2.fv = System.capabilities.version; v2.os = System.capabilities.os; v2.lang = System.capabilities.language; v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY; var s = '?'; var v3 = 0; for (var v6 in v2) { if (v3 != 0) { s += '&'; } ++v3; s = s + v6 + '=' + escape(v2[v6]); } if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) { var ping = btn.createEmptyMovieClip('ping', 777); var v7 = btn.createEmptyMovieClip('nettest', 778); mochi.as2.MochiServices.netupAttempted = true; ping.loadMovie('http://link.mochiads.com/linkping.swf?t=' + getTimer()); v7.onEnterFrame = function () { if (ping._totalframes > 0 && ping._totalframes == ping._framesloaded) { delete this.onEnterFrame; } else { if (getTimer() - t0 > timeout) { delete this.onEnterFrame; mochi.as2.MochiServices.netup = false; } } }; } var v4 = btn.createEmptyMovieClip('clk', 1001); v4._alpha = 0; v4.beginFill(1044735); v4.moveTo(0, 0); v4.lineTo(0, btn._height); v4.lineTo(btn._width, btn._height); v4.lineTo(btn._width, 0); v4.lineTo(0, 0); v4.endFill(); v4.onRelease = function () { if (mochi.as2.MochiServices.netup) { getURL(url + s, '_blank'); } else { getURL(burl, '_blank'); } if (onClick != undefined) { onClick(); } }; }; v1.setContainer = function (clip) {}; v1.stayOnTop = function (clip) {}; v1.addEventListener = function (eventType, thisObject, thatObject) { mochi.as2.MochiServices._dispatcher.addEventListener(eventType, thisObject, thatObject); }; v1.triggerEvent = function (eventType, args) { mochi.as2.MochiServices._dispatcher.triggerEvent(eventType, args); }; v1.removeEventListener = function (eventType, thisObject, thatObject) { mochi.as2.MochiServices._dispatcher.removeEventListener(eventType, thisObject, thatObject); }; v1.CONNECTED = 'onConnected'; v1._servURL = 'http://www.mochiads.com/static/lib/services/'; v1._services = 'services.swf'; v1._mochiLC = 'MochiLC.swf'; v1._listenChannelName = '__ms_'; v1._connecting = false; v1._connected = false; v1.netup = true; v1.netupAttempted = false; v1._dispatcher = new mochi.as2.MochiEventDispatcher(); v1.addProperty('childClip', v1.__get__childClip, function () {}); v1.addProperty('clip', v1.__get__clip, function () {}); v1.addProperty('comChannelName', function () {}, v1.__set__comChannelName); v1.addProperty('connected', v1.__get__connected, function () {}); v1.addProperty('id', v1.__get__id, function () {}); v1.addProperty('isNetworkAvailable', v1.__get__isNetworkAvailable, function () {}); ASSetPropFlags(mochi.as2.MochiServices.prototype, null, 1); } #endinitclip } movieClip 1514 __Packages.mochi.as2.MochiEvents { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiEvents) { var v1 = function () {}; mochi.as2.MochiEvents = v1; var v2 = v1.prototype; v1.getVersion = function () { return mochi.as2.MochiServices.getVersion(); }; v1.startSession = function (achievementID) { mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null); }; v1.setNotifications = function (clip, style) { var v2 = {}; for (var v3 in style) { v2[v3] = style[v3]; } v2.clip = clip; mochi.as2.MochiServices.send('events_setNotifications', v2, null, null); }; v1.addEventListener = function (eventType, thisObject, thatObject) { mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject); }; v1.triggerEvent = function (eventType, args) { mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args); }; v1.removeEventListener = function (eventType, thisObject, thatObject) { mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject); }; v1.startPlay = function (tag) { if (tag == undefined) { tag = 'gameplay'; } mochi.as2.MochiServices.send('events_setRoundID', {'tag': String(tag)}, null, null); }; v1.endPlay = function () { mochi.as2.MochiServices.send('events_clearRoundID', null, null, null); }; v1.trackEvent = function (tag, value) { mochi.as2.MochiServices.send('events_trackEvent', {'tag': tag, 'value': value}, null, null); }; v1.ACHIEVEMENT_RECEIVED = 'AchievementReceived'; v1.ALIGN_TOP_LEFT = 'ALIGN_TL'; v1.ALIGN_TOP = 'ALIGN_T'; v1.ALIGN_TOP_RIGHT = 'ALIGN_TR'; v1.ALIGN_LEFT = 'ALIGN_L'; v1.ALIGN_CENTER = 'ALIGN_C'; v1.ALIGN_RIGHT = 'ALIGN_R'; v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL'; v1.ALIGN_BOTTOM = 'ALIGN_B'; v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR'; v1.FORMAT_SHORT = 'ShortForm'; v1.FORMAT_LONG = 'LongForm'; v1._dispatcher = new mochi.as2.MochiEventDispatcher(); ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1); } #endinitclip } movieClip 1515 __Packages.mochi.as2.MochiCoins { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiCoins) { var v1 = function () {}; mochi.as2.MochiCoins = v1; var v2 = v1.prototype; v1.getVersion = function () { return mochi.as2.MochiServices.getVersion(); }; v1.showStore = function (options) { mochi.as2.MochiServices.send('coins_showStore', {'options': options}, null, null); }; v1.showItem = function (options) { if (options == undefined || typeof options.item != 'string') { trace('ERROR: showItem call must pass an Object with an item key'); return undefined; } mochi.as2.MochiServices.send('coins_showItem', {'options': options}, null, null); }; v1.showVideo = function (options) { if (options == undefined || typeof options.item != 'string') { trace('ERROR: showVideo call must pass an Object with an item key'); return undefined; } mochi.as2.MochiServices.send('coins_showVideo', {'options': options}, null, null); }; v1.getStoreItems = function () { mochi.as2.MochiServices.send('coins_getStoreItems'); }; v1.requestFunding = function (properties) { mochi.as2.MochiServices.send('social_requestFunding', properties); }; v1.addEventListener = function (eventType, delegate) { mochi.as2.MochiCoins._dispatcher.addEventListener(eventType, delegate); }; v1.triggerEvent = function (eventType, args) { mochi.as2.MochiCoins._dispatcher.triggerEvent(eventType, args); }; v1.removeEventListener = function (eventType, delegate) { mochi.as2.MochiCoins._dispatcher.removeEventListener(eventType, delegate); }; v1.STORE_SHOW = 'StoreShow'; v1.STORE_HIDE = 'StoreHide'; v1.ITEM_OWNED = 'ItemOwned'; v1.ITEM_NEW = 'ItemNew'; v1.STORE_ITEMS = 'StoreItems'; v1.ERROR = 'Error'; v1.IO_ERROR = 'IOError'; v1.NO_USER = 'NoUser'; v1._dispatcher = new mochi.as2.MochiEventDispatcher(); ASSetPropFlags(mochi.as2.MochiCoins.prototype, null, 1); } #endinitclip } movieClip 1516 __Packages.mochi.as2.MochiSocial { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiSocial) { var v1 = function () {}; mochi.as2.MochiSocial = v1; var v2 = v1.prototype; v1.getVersion = function () { return mochi.as2.MochiServices.getVersion(); }; v1.showLoginWidget = function (options) { mochi.as2.MochiServices.setContainer(); mochi.as2.MochiServices.stayOnTop(); mochi.as2.MochiServices.send('social_showLoginWidget', {'options': options}); }; v1.hideLoginWidget = function () { mochi.as2.MochiServices.send('social_hideLoginWidget'); }; v1.requestLogin = function (properties) { mochi.as2.MochiServices.send('social_requestLogin', properties); }; v1.getFriendsList = function (properties) { mochi.as2.MochiServices.send('social_getFriendsList', properties); }; v1.postToStream = function (properties) { mochi.as2.MochiServices.send('social_postToStream', properties); }; v1.inviteFriends = function (properties) { mochi.as2.MochiServices.send('social_inviteFriends', properties); }; v1.requestFan = function (properties) { mochi.as2.MochiServices.send('social_requestFan', properties); }; v1.saveUserProperties = function (properties) { mochi.as2.MochiServices.send('social_saveUserProperties', properties); }; v1.addEventListener = function (eventType, delegate) { mochi.as2.MochiSocial._dispatcher.addEventListener(eventType, delegate); }; v1.triggerEvent = function (eventType, args) { mochi.as2.MochiSocial._dispatcher.triggerEvent(eventType, args); }; v1.removeEventListener = function (eventType, delegate) { mochi.as2.MochiSocial._dispatcher.removeEventListener(eventType, delegate); }; v1.LOGGED_IN = 'LoggedIn'; v1.LOGGED_OUT = 'LoggedOut'; v1.LOGIN_SHOW = 'LoginShow'; v1.LOGIN_HIDE = 'LoginHide'; v1.LOGIN_SHOWN = 'LoginShown'; v1.PROFILE_SHOW = 'ProfileShow'; v1.PROFILE_HIDE = 'ProfileHide'; v1.PROPERTIES_SAVED = 'PropertySaved'; v1.WIDGET_LOADED = 'WidgetLoaded'; v1.FRIEND_LIST = 'FriendsList'; v1.PROFILE_DATA = 'ProfileData'; v1.GAMEPLAY_DATA = 'GameplayData'; v1.ACTION_CANCELED = 'onCancel'; v1.ACTION_COMPLETE = 'onComplete'; v1.USER_INFO = 'UserInfo'; v1.ERROR = 'Error'; v1.IO_ERROR = 'IOError'; v1.NO_USER = 'NoUser'; v1.PROPERTIES_SIZE = 'PropertiesSize'; v1._dispatcher = new mochi.as2.MochiEventDispatcher(); ASSetPropFlags(mochi.as2.MochiSocial.prototype, null, 1); } #endinitclip } movieClip 1517 __Packages.mochi.as2.MochiScores { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiScores) { var v1 = function () {}; mochi.as2.MochiScores = v1; var v2 = v1.prototype; v1.setBoardID = function (boardID) { mochi.as2.MochiServices.warnID(boardID, true); mochi.as2.MochiScores.boardID = boardID; mochi.as2.MochiServices.send('scores_setBoardID', {'boardID': boardID}); }; v1.showLeaderboard = function (options) { options.clip = mochi.as2.MochiServices.clip; if (options.clip != mochi.as2.MochiServices.__get__clip() || (mochi.as2.MochiServices.__get__childClip())._target == undefined) { mochi.as2.MochiServices.disconnect(); trace('WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!'); trace('make sure MochiServices.connect is called as early in the application runtime as possible.'); mochi.as2.MochiServices.connect(mochi.as2.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 (options.score instanceof TextField) { if (options.score.text != undefined) { options.score = options.score.text; } } else { if (options.score instanceof mochi.as2.MochiDigits) { options.score = options.score.value; } } var v1 = Number(options.score); if (isNaN(v1)) { trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is \'Not a Number\''); } else { if (v1 == Number.NEGATIVE_INFINITY || v1 == Number.POSITIVE_INFINITY) { trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is an infinite'); } else { if (Math.floor(v1) != v1) { trace('WARNING: Submitted score \'' + options.score + '\' will be truncated'); } options.score = v1; } } } if (options.onDisplay != null) { options.onDisplay(); } else { (mochi.as2.MochiServices.__get__clip()).stop(); } if (options.onClose != null) { mochi.as2.MochiScores.onClose = options.onClose; } else { mochi.as2.MochiScores.onClose = function () { (mochi.as2.MochiServices.__get__clip()).play(); }; } if (options.onError != null) { mochi.as2.MochiScores.onError = options.onError; } else { mochi.as2.MochiScores.onError = mochi.as2.MochiScores.onClose; } if (options.boardID == null) { if (mochi.as2.MochiScores.boardID != null) { options.boardID = mochi.as2.MochiScores.boardID; } } mochi.as2.MochiServices.warnID(options.boardID, true); trace('[MochiScores] NOTE: Security Sandbox Violation errors below are normal'); mochi.as2.MochiServices.send('scores_showLeaderboard', {'options': options}, null, mochi.as2.MochiScores.doClose); }; v1.closeLeaderboard = function () { mochi.as2.MochiServices.send('scores_closeLeaderboard'); }; v1.getPlayerInfo = function (callbackObj, callbackMethod) { mochi.as2.MochiServices.send('scores_getPlayerInfo', null, callbackObj, callbackMethod); }; v1.submit = function (score, name, callbackObj, callbackMethod) { score = Number(score); if (isNaN(score)) { trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is \'Not a Number\''); } else { if (score == Number.NEGATIVE_INFINITY || score == Number.POSITIVE_INFINITY) { trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is an infinite'); } else { if (Math.floor(score) != score) { trace('WARNING: Submitted score \'' + String(score) + '\' will be truncated'); } score = Number(score); } } mochi.as2.MochiServices.send('scores_submit', {'score': score, 'name': name}, callbackObj, callbackMethod); }; v1.requestList = function (callbackObj, callbackMethod) { mochi.as2.MochiServices.send('scores_requestList', null, callbackObj, callbackMethod); }; v1.scoresArrayToObjects = function (scores) { var v5 = {}; var v1; var v4; var v2; var v6; for (var v8 in scores) { if (typeof scores[v8] == 'object') { if (scores[v8].cols != null && scores[v8].rows != null) { v5[v8] = []; v2 = scores[v8]; v4 = 0; while (v4 < v2.rows.length) { v6 = {}; v1 = 0; while (v1 < v2.cols.length) { v6[v2.cols[v1]] = v2.rows[v4][v1]; ++v1; } v5[v8].push(v6); ++v4; } } else { v5[v8] = {}; for (var v7 in scores[v8]) { v5[v8][v7] = scores[v8][v7]; } } } else { v5[v8] = scores[v8]; } } return v5; }; v1.doClose = function (args) { if (args.error == true) { if (args.errorCode == undefined) { args.errorCode = 'IOError'; } mochi.as2.MochiScores.onError.apply(null, [args.errorCode]); } else { mochi.as2.MochiScores.onClose.apply(); } }; ASSetPropFlags(mochi.as2.MochiScores.prototype, null, 1); } #endinitclip } movieClip 1518 __Packages.mochi.as2.MochiDigits { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiDigits) { var v1 = function (digit, index) { this.Encoder = 0; this.setValue(digit, index); }; mochi.as2.MochiDigits = v1; var v2 = v1.prototype; v2.__get__value = function () { return Number(this.toString()); }; v2.__set__value = function (v) { this.setValue(v); return this.__get__value(); }; v2.addValue = function (v) { this.value += v; }; v2.setValue = function (digit, index) { var v3 = digit.toString(); if (index == undefined || isNaN(index)) { index = 0; } this.Fragment = v3.charCodeAt(index++) ^ this.Encoder; if (index < v3.length) { this.Sibling = new mochi.as2.MochiDigits(digit, index); } else { this.Sibling = null; } this.reencode(); }; v2.reencode = function () { var v2 = int(2147483647 * Math.random()); this.Fragment ^= v2 ^ this.Encoder; this.Encoder = v2; }; v2.toString = function () { var v2 = String.fromCharCode(this.Fragment ^ this.Encoder); return (this.Sibling != null) ? v2.concat(this.Sibling.toString()) : v2; }; v2.addProperty('value', v2.__get__value, v2.__set__value); ASSetPropFlags(mochi.as2.MochiDigits.prototype, null, 1); } #endinitclip } frame 2 { music.start(0, 999); stop(); _root.alive = 1; health = 100; _root.resettimer = 0; if (distance > 0) { totalearnt = Math.round((distance / 4) * (1 + (multiplierlevel - 1) * 0.3)); } else { totalearnt = 0; } missionsuccess = 0; if (totalminutes >= 1) { if (_root.missiontype == 1) { if (minesdestroyed >= minesneeded) { missionsuccess = 1; } } else { if (_root.missiontype == 2) { if (planesdestroyed >= planesneeded) { missionsuccess = 1; } } else { if (_root.missiontype == 3) { if (blimpsdestroyed >= blimpsneeded) { missionsuccess = 1; } } else { if (_root.missiontype == 4) { if (shipsdestroyed >= shipsneeded) { missionsuccess = 1; } } else { if (_root.missiontype == 5) { if (totalminutes >= timeneeded) { missionsuccess = 1; } } } } } } } if (missionsuccess == 1) { totalearnt += missionreward; } money += totalearnt; if (day > 0) { Aplanesdestroyed += planesdestroyed; planesdestroyed = 0; Ablimpsdestroyed += blimpsdestroyed; blimpsdestroyed = 0; Aminesdestroyed += minesdestroyed; minesdestroyed = 0; Ashipsdestroyed += shipsdestroyed; shipsdestroyed = 0; } if (cargolevel == 1) { maxbombs = 2; maxammo = 30; } else { if (cargolevel == 2) { maxbombs = 4; maxammo = 60; } else { if (cargolevel == 3) { maxbombs = 6; maxammo = 90; } else { if (cargolevel == 4) { maxbombs = 8; maxammo = 130; } else { if (cargolevel == 5) { maxbombs = 10; maxammo = 200; } } } } } engine.stop('stopengine'); engine.stop('enginesound'); engine.stop('bombsound'); } frame 2 { music2.stop('music2'); } frame 2 { endingstarted = 0; } movieClip 365 { } button 369 { on (rollOver) { _root.rollover.start(); descriptiontext.text = 'Increases acceleration and max speed'; if (_root.enginelevel == 1) { costtext.text = '$1,000'; leveltext.text = 'Level 2'; } else { if (_root.enginelevel == 2) { costtext.text = '$2,500'; leveltext.text = 'Level 3'; } else { if (_root.enginelevel == 3) { costtext.text = '$5,000'; leveltext.text = 'Level 4'; } else { if (_root.enginelevel == 4) { costtext.text = '$10,000'; leveltext.text = 'Level 5'; } else { if (_root.enginelevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the best engine available'; } } } } } } on (release) { _root.click.start(); if (_root.enginelevel == 1) { if (_root.money >= 1000) { _root.money -= 1000; costtext.text = '$2,500'; leveltext.text = 'Level 3'; ++_root.enginelevel; } } else { if (_root.enginelevel == 2) { if (_root.money >= 2500) { _root.money -= 2500; costtext.text = '$5,000'; leveltext.text = 'Level 4'; ++_root.enginelevel; } } else { if (_root.enginelevel == 3) { if (_root.money >= 5000) { _root.money -= 5000; costtext.text = '$10,000'; leveltext.text = 'Level 5'; ++_root.enginelevel; } } else { if (_root.enginelevel == 4) { if (_root.money >= 10000) { _root.money -= 10000; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the best engine available'; ++_root.enginelevel; } } } } } } } button 374 { on (rollOver) { _root.rollover.start(); descriptiontext.text = 'Increases the amount of fuel you can hold'; if (_root.fueltanklevel == 1) { costtext.text = '$500'; leveltext.text = 'Level 2'; } else { if (_root.fueltanklevel == 2) { costtext.text = '$900'; leveltext.text = 'Level 3'; } else { if (_root.fueltanklevel == 3) { costtext.text = '$1,500'; leveltext.text = 'Level 4'; } else { if (_root.fueltanklevel == 4) { costtext.text = '$3,100'; leveltext.text = 'Level 5'; } else { if (_root.fueltanklevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the largest fuel tank available'; } } } } } } on (release) { _root.click.start(); if (_root.fueltanklevel == 1) { if (_root.money >= 500) { _root.money -= 500; costtext.text = '$900'; leveltext.text = 'Level 3'; ++_root.fueltanklevel; } } else { if (_root.fueltanklevel == 2) { if (_root.money >= 900) { _root.money -= 900; costtext.text = '$1,500'; leveltext.text = 'Level 4'; ++_root.fueltanklevel; } } else { if (_root.fueltanklevel == 3) { if (_root.money >= 1500) { _root.money -= 1500; costtext.text = '$3,100'; leveltext.text = 'Level 5'; ++_root.fueltanklevel; } } else { if (_root.fueltanklevel == 4) { if (_root.money >= 3100) { _root.money -= 3100; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the largest fuel tank available'; ++_root.fueltanklevel; } } } } } } } button 376 { on (rollOver) { _root.rollover.start(); descriptiontext.text = 'Increases the rate of fire of your weapon'; if (_root.gunlevel == 1) { costtext.text = '$300'; leveltext.text = 'Level 2'; } else { if (_root.gunlevel == 2) { costtext.text = '$600'; leveltext.text = 'Level 3'; } else { if (_root.gunlevel == 3) { costtext.text = '$1,000'; leveltext.text = 'Level 4'; } else { if (_root.gunlevel == 4) { costtext.text = '$2,200'; leveltext.text = 'Level 5'; } else { if (_root.gunlevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the best gun available'; } } } } } } on (release) { _root.click.start(); if (_root.gunlevel == 1) { if (_root.money >= 300) { _root.money -= 300; costtext.text = '$600'; leveltext.text = 'Level 3'; ++_root.gunlevel; } } else { if (_root.gunlevel == 2) { if (_root.money >= 600) { _root.money -= 600; costtext.text = '$1,000'; leveltext.text = 'Level 4'; ++_root.gunlevel; } } else { if (_root.gunlevel == 3) { if (_root.money >= 1000) { _root.money -= 1000; costtext.text = '$2,200'; leveltext.text = 'Level 5'; ++_root.gunlevel; } } else { if (_root.gunlevel == 4) { if (_root.money >= 2200) { _root.money -= 2200; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the best gun available'; ++_root.gunlevel; } } } } } } } button 378 { on (rollOver) { _root.rollover.start(); if (_root.cargolevel == 1) { costtext.text = '$400'; leveltext.text = 'Level 2'; descriptiontext.text = 'Allows you to hold 4 bombs and 60 rounds'; } else { if (_root.cargolevel == 2) { costtext.text = '$600'; leveltext.text = 'Level 3'; descriptiontext.text = 'Allows you to hold 6 bombs and 90 rounds'; } else { if (_root.cargolevel == 3) { costtext.text = '$800'; leveltext.text = 'Level 4'; descriptiontext.text = 'Allows you to hold 8 bombs and 130 rounds'; } else { if (_root.cargolevel == 4) { costtext.text = '$1,000'; leveltext.text = 'Level 5'; descriptiontext.text = 'Allows you to hold 10 bombs and 200 rounds'; } else { if (_root.cargolevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the largest cargo hold available'; } } } } } } on (release) { _root.click.start(); if (_root.cargolevel == 1) { if (_root.money >= 400) { _root.money -= 400; costtext.text = '$600'; leveltext.text = 'Level 3'; descriptiontext.text = 'Allows you to hold 6 bombs and 90 rounds'; ++_root.cargolevel; } } else { if (_root.cargolevel == 2) { if (_root.money >= 600) { _root.money -= 600; costtext.text = '$800'; leveltext.text = 'Level 4'; descriptiontext.text = 'Allows you to hold 8 bombs and 130 rounds'; ++_root.cargolevel; } } else { if (_root.cargolevel == 3) { if (_root.money >= 800) { _root.money -= 800; costtext.text = '$1,000'; leveltext.text = 'Level 5'; descriptiontext.text = 'Allows you to hold 10 bombs and 200 rounds'; ++_root.cargolevel; } } else { if (_root.cargolevel == 4) { if (_root.money >= 1000) { _root.money -= 1000; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the largest cargo hold available'; ++_root.cargolevel; } } } } } if (_root.cargolevel == 1) { _root.maxbombs = 2; _root.maxammo = 30; } else { if (_root.cargolevel == 2) { _root.maxbombs = 4; _root.maxammo = 60; } else { if (_root.cargolevel == 3) { _root.maxbombs = 6; _root.maxammo = 90; } else { if (_root.cargolevel == 4) { _root.maxbombs = 8; _root.maxammo = 130; } else { if (_root.cargolevel == 5) { _root.maxbombs = 10; _root.maxammo = 200; } } } } } } } button 380 { on (rollOver) { _root.rollover.start(); if (_root.hudlevel == 1) { costtext.text = '$200'; leveltext.text = 'Level 2'; descriptiontext.text = 'Allows you to see your speed and fuel'; } else { if (_root.hudlevel == 2) { costtext.text = '$600'; leveltext.text = 'Level 3'; descriptiontext.text = 'Allows you to see your remaining rounds'; } else { if (_root.hudlevel == 3) { costtext.text = '$1,200'; leveltext.text = 'Level 4'; descriptiontext.text = 'Allows you to see your remaining bombs'; } else { if (_root.hudlevel == 4) { costtext.text = '$2,000'; leveltext.text = 'Level 5'; descriptiontext.text = 'Allows you to see the current length of your flight'; } else { if (_root.hudlevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the best HUD available'; } } } } } } on (release) { _root.click.start(); if (_root.hudlevel == 1) { if (_root.money >= 200) { _root.money -= 200; costtext.text = '$600'; leveltext.text = 'Level 3'; descriptiontext.text = 'Allows you to see your remaining rounds'; ++_root.hudlevel; } } else { if (_root.hudlevel == 2) { if (_root.money >= 600) { _root.money -= 600; costtext.text = '$1,200'; leveltext.text = 'Level 4'; descriptiontext.text = 'Allows you to see your remaining bombs'; ++_root.hudlevel; } } else { if (_root.hudlevel == 3) { if (_root.money >= 1200) { _root.money -= 1200; costtext.text = '$2,000'; leveltext.text = 'Level 5'; descriptiontext.text = 'Allows you to see the current length of your flight'; ++_root.hudlevel; } } else { if (_root.hudlevel == 4) { if (_root.money >= 2000) { _root.money -= 2000; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the best HUD available'; ++_root.hudlevel; } } } } } } } button 382 { on (rollOver) { _root.rollover.start(); descriptiontext.text = 'Increases the strngth of your plane, reducing damage'; if (_root.armourlevel == 1) { costtext.text = '$900'; leveltext.text = 'Level 2'; } else { if (_root.armourlevel == 2) { costtext.text = '$2,000'; leveltext.text = 'Level 3'; } else { if (_root.armourlevel == 3) { costtext.text = '$3,500'; leveltext.text = 'Level 4'; } else { if (_root.armourlevel == 4) { costtext.text = '$5,000'; leveltext.text = 'Level 5'; } else { if (_root.armourlevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the strongest armour available'; } } } } } } on (release) { _root.click.start(); if (_root.armourlevel == 1) { if (_root.money >= 900) { _root.money -= 900; costtext.text = '$2,000'; leveltext.text = 'Level 3'; ++_root.armourlevel; } } else { if (_root.armourlevel == 2) { if (_root.money >= 2000) { _root.money -= 2000; costtext.text = '$3,500'; leveltext.text = 'Level 4'; ++_root.armourlevel; } } else { if (_root.armourlevel == 3) { if (_root.money >= 3500) { _root.money -= 3500; costtext.text = '$5,000'; leveltext.text = 'Level 5'; ++_root.armourlevel; } } else { if (_root.armourlevel == 4) { if (_root.money >= 5000) { _root.money -= 5000; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the strongest armour available'; ++_root.armourlevel; } } } } } } } button 384 { on (rollOver) { _root.rollover.start(); descriptiontext.text = 'Decreases fuel consumption'; if (_root.efficiencylevel == 1) { costtext.text = '$500'; leveltext.text = 'Level 2'; } else { if (_root.efficiencylevel == 2) { costtext.text = '$800'; leveltext.text = 'Level 3'; } else { if (_root.efficiencylevel == 3) { costtext.text = '$1,500'; leveltext.text = 'Level 4'; } else { if (_root.efficiencylevel == 4) { costtext.text = '$2,500'; leveltext.text = 'Level 5'; } else { if (_root.efficiencylevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the most efficient engine available'; } } } } } } on (release) { _root.click.start(); if (_root.efficiencylevel == 1) { if (_root.money >= 500) { _root.money -= 500; costtext.text = '$800'; leveltext.text = 'Level 3'; ++_root.efficiencylevel; } } else { if (_root.efficiencylevel == 2) { if (_root.money >= 800) { _root.money -= 800; costtext.text = '$1,500'; leveltext.text = 'Level 4'; ++_root.efficiencylevel; } } else { if (_root.efficiencylevel == 3) { if (_root.money >= 1500) { _root.money -= 1500; costtext.text = '$2,500'; leveltext.text = 'Level 5'; ++_root.efficiencylevel; } } else { if (_root.efficiencylevel == 4) { if (_root.money >= 2500) { _root.money -= 2500; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'You have the most efficient engine available'; ++_root.efficiencylevel; } } } } } } } button 386 { on (rollOver) { _root.rollover.start(); descriptiontext.text = 'Increases the amount of cash you earn'; if (_root.multiplierlevel == 1) { costtext.text = '$1,000'; leveltext.text = 'Level 2'; } else { if (_root.multiplierlevel == 2) { costtext.text = '$2,000'; leveltext.text = 'Level 3'; } else { if (_root.multiplierlevel == 3) { costtext.text = '$3,000'; leveltext.text = 'Level 4'; } else { if (_root.multiplierlevel == 4) { costtext.text = '$4,000'; leveltext.text = 'Level 5'; } else { if (_root.multiplierlevel == 5) { costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'Your have the best multiplier available'; } } } } } } on (release) { _root.click.start(); if (_root.multiplierlevel == 1) { if (_root.money >= 1000) { _root.money -= 1000; costtext.text = '$2,000'; leveltext.text = 'Level 3'; ++_root.multiplierlevel; } } else { if (_root.multiplierlevel == 2) { if (_root.money >= 2000) { _root.money -= 2000; costtext.text = '$3,000'; leveltext.text = 'Level 4'; ++_root.multiplierlevel; } } else { if (_root.multiplierlevel == 3) { if (_root.money >= 3000) { _root.money -= 3000; costtext.text = '$4,000'; leveltext.text = 'Level 5'; ++_root.multiplierlevel; } } else { if (_root.multiplierlevel == 4) { if (_root.money >= 4000) { _root.money -= 4000; costtext.text = ''; leveltext.text = 'Maxed'; descriptiontext.text = 'Your have the best multiplier available'; ++_root.multiplierlevel; } } } } } } } button 388 { on (rollOver) { _root.rollover.start(); if (_root.bombs == 10) { leveltext.text = 'You have ' + _root.bombs; descriptiontext.text = 'You have the maximum number of bombs'; costtext.text = ''; } else { if (_root.bombs == _root.maxbombs) { descriptiontext.text = 'Upgrade cargo hold first'; leveltext.text = 'You have ' + _root.bombs; costtext.text = '$50'; } else { descriptiontext.text = 'Buy another bomb'; leveltext.text = 'You have ' + _root.bombs; costtext.text = '$50'; } } } on (release) { _root.click.start(); if (_root.money >= 50) { if (_root.bombs < _root.maxbombs) { ++_root.bombs; _root.money -= 50; if (_root.bombs == 10) { leveltext.text = 'You have ' + _root.bombs; descriptiontext.text = 'You have the maximum number of bombs'; costtext.text = ''; } else { if (_root.bombs == _root.maxbombs) { descriptiontext.text = 'Upgrade cargo hold first'; leveltext.text = 'You have ' + _root.bombs; costtext.text = '$50'; } else { descriptiontext.text = 'Buy another bomb'; leveltext.text = 'You have ' + _root.bombs; costtext.text = '$50'; } } } } } } button 390 { on (rollOver) { _root.rollover.start(); if (_root.ammo == 200) { leveltext.text = 'You have ' + _root.ammo + ' rounds'; descriptiontext.text = 'You have the maximum amount of ammunition'; costtext.text = ''; } else { if (_root.ammo == _root.maxammo) { descriptiontext.text = 'Upgrade cargo hold first'; leveltext.text = 'You have ' + _root.ammo + ' rounds'; costtext.text = '$10'; } else { descriptiontext.text = 'Buy another 10 rounds'; leveltext.text = 'You have ' + _root.ammo + ' rounds'; costtext.text = '$10'; } } } on (release) { _root.click.start(); if (_root.money >= 10) { if (_root.ammo < _root.maxammo) { _root.ammo += 10; if (_root.ammo > _root.maxammo) { _root.ammo = _root.maxammo; } if (_root.ammo > 200) { _root.ammo = 200; } _root.money -= 10; if (_root.ammo == 200) { leveltext.text = 'You have ' + _root.ammo + ' rounds'; descriptiontext.text = 'You have the maximum amount of ammunition'; costtext.text = ''; } else { if (_root.ammo == _root.maxammo) { descriptiontext.text = 'Upgrade cargo hold first'; leveltext.text = 'You have ' + _root.ammo + ' rounds'; costtext.text = '$10'; } else { descriptiontext.text = 'Buy another 10 rounds'; leveltext.text = 'You have ' + _root.ammo + ' rounds'; costtext.text = '$10'; } } } } } } button 396 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 2; } } movieClip 400 { } button 404 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 4; } } button 408 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 1; } } button 424 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 5; } } button 428 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 3; } } button 432 { on (rollOver) { _root.rollover.start(); } on (release) { _root.user_so.data.money = _root.money; _root.user_so.data.day = _root.day; _root.user_so.data.enginelevel = _root.enginelevel; _root.user_so.data.fueltanklevel = _root.fueltanklevel; _root.user_so.data.gunlevel = _root.gunlevel; _root.user_so.data.cargolevel = _root.cargolevel; _root.user_so.data.armourlevel = _root.armourlevel; _root.user_so.data.efficiencylevel = _root.efficiencylevel; _root.user_so.data.hudlevel = _root.hudlevel; _root.user_so.data.multiplierlevel = _root.multiplierlevel; _root.user_so.data.bombs = _root.bombs; _root.user_so.data.ammo = _root.ammo; _root.user_so.data.hasearntfacebook = _root.hasearntfacebook; _root.user_so.data.hasearnttwitter = _root.hasearnttwitter; _root.user_so.data.minesweeper = _root.Aminesweeper; _root.user_so.data.redbaron = _root.Aredbaron; _root.user_so.data.hindenburg = _root.Ahindenburg; _root.user_so.data.timewaster = _root.Atimewaster; _root.user_so.data.sunkbattleship = _root.Asunkbattleship; _root.user_so.data.moneyhoarder = _root.Amoneyhoarder; _root.user_so.data.cashgrabber = _root.Acashgrabber; _root.user_so.data.masterpilot = _root.Amasterpilot; _root.user_so.data.shirttrip = _root.Ashorttrip; _root.user_so.data.longtrip = _root.Alongtrip; _root.user_so.data.epictrip = _root.Aepictrip; _root.user_so.data.flyinglow = _root.Aflyinglow; _root.user_so.data.planesdestroyed = _root.Aplanesdestroyed; _root.user_so.data.minesdestroyed = _root.Aminesdestroyed; _root.user_so.data.blimpsdestroyed = _root.Ablimpsdestroyed; _root.user_so.data.shipsdestroyed = _root.Ashipsdestroyed; _root.user_so.data.destroyedinsea = _root.Adestroyedinsea; _root.click.start(); } } movieClip 436 { } button 437 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); if (_root.hasearntfacebook == 0) { _root.money += 500; _root.hasearntfacebook = 1; } getURL('http://www.facebook.com/sharer.php?u=http://braingames247.com/index.php?pageid=7', '_blank'); } } movieClip 440 { } button 441 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); if (_root.hasearnttwitter == 0) { _root.money += 500; _root.hasearnttwitter = 1; } getURL('http://twitter.com/home?status=I just bombed the enemy base camp in Operation Triplane: Mission to Norden http://is.gd/ynE90S', '_blank'); } } movieClip 444 { } movieClip 447 { } button 451 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 2; } } movieClip 454 { frame 1 { stop(); } } movieClip 456 { frame 1 { stop(); } } movieClip 459 { frame 1 { stop(); } } movieClip 462 { frame 1 { stop(); } } movieClip 465 { } button 469 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 'play'; } } movieClip 476 { } movieClip 478 { } movieClip 479 { instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Ashorttrip == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Ashorttrip == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Short Trip'; _parent._parent.awarddescription.text = 'Travel 500 miles'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Alongtrip == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Alongtrip == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Long Trip'; _parent._parent.awarddescription.text = 'Travel 1500 miles'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Aepictrip == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Aepictrip == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Epic Trip'; _parent._parent.awarddescription.text = 'Travel 3000 miles'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Aminesweeper == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Aminesweeper == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Minesweeper'; _parent._parent.awarddescription.text = 'Destroy 15 mines'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Ahindenburg == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Ahindenburg == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Hindenburg'; _parent._parent.awarddescription.text = 'Destroy 5 zeppelins'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Aredbaron == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Aredbaron == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Red Baron'; _parent._parent.awarddescription.text = 'Destroy 10 planes'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Asunkbattleship == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Asunkbattleship == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Sunk My Battleship'; _parent._parent.awarddescription.text = 'Destroy 10 battleship'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Acashgrabber == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Acashgrabber == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Cash Grabber'; _parent._parent.awarddescription.text = 'Earn $2,000 in one flight'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Amasterpilot == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Amasterpilot == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Master Pilot'; _parent._parent.awarddescription.text = 'Fly for 2 minutes in one flght'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Atimewaster == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Atimewaster == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Time Waster'; _parent._parent.awarddescription.text = 'Play for 5 minutes, non stop'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Aflyinglow == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Aflyinglow == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Flying Low'; _parent._parent.awarddescription.text = 'Fall in the ocean 5 times'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } instance mask1 of movieClip 478 { onClipEvent (load) { if (_root.Amoneyhoarder == 1) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } onClipEvent (rollOver) { if (_root.Amoneyhoarder == 1) { _root.rollover.start(); _parent._parent.awardname.text = 'Money Hoarder'; _parent._parent.awarddescription.text = 'Save over $10,000'; } else { _parent._parent.awardname.text = ''; _parent._parent.awarddescription.text = ''; } } } } movieClip 484 { } button 489 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 8; } } movieClip 491 { } button 493 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 7; } } // unknown tag 88 length 62 button 497 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 13; } } button 499 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); getURL('http://www.facebook.com/pages/BrainGames247/118955038116930', '_blank'); } } button 500 { on (rollOver) { _root.rollover.start(); } on (release) { getURL('http://www.twitter.com/braingames247', '_blank'); _root.click.start(); } } movieClip 501 { } button 506 { on (rollOver) { _root.rollover.start(); } on (release) { getURL('http://www.braingames247.com', '_blank'); _root.click.start(); } } button 511 { on (rollOver) { _root.rollover.start(); } on (release) { getURL('http://www.braingames247.com/index.php?pageid=1', '_blank'); _root.click.start(); } } movieClip 514 { } button 515 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); getURL('http://www.braingames247.com', '_blank'); } } button 518 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 'viewhighscores'; } } button 527 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 'training'; } } button 528 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 8; } } button 532 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 10; } } button 533 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 'training'; } } button 534 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 9; } } button 540 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 'submitscore'; } } button 542 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); if (_root.hasearnttwitter == 0) { _root.money += 500; _root.hasearnttwitter = 1; } getURL('http://twitter.com/?status=I just bombed the enemy base camp in Operation Triplane: Mission to Norden http://is.gd/ynE90S', '_blank'); } } movieClip 543 { } button 544 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.wantedframe = 6; } } movieClip 545 { frame 1 { _root.countfinished = 1; onEnterFrame = function () { if (_root.wantedframe == _currentframe) { if (dark._alpha > 0) { dark._alpha -= 5; } } else { if (_root.wantedframe == 'play' or _root.wantedframe == 'training') { if (_root.soundon == 1) { _root.music.setVolume(100 - dark._alpha); } } dark._alpha += 5; if (dark._alpha >= 100) { if (_root.wantedframe == 'play') { _root.gotoAndStop(3); } else { if (_root.wantedframe == 'training') { _root.gotoAndStop(4); } else { if (_root.wantedframe == 'submitscore') { _root.gotoAndStop(6); } else { if (_root.wantedframe == 'viewhighscores') { _root.gotoAndStop(8); } else { gotoAndStop(_root.wantedframe); } } } } } } moneytext.text = 'You have: $' + _root.money; }; } frame 1 { stop(); } frame 2 { daytext.text = 'End of Day ' + _root.day; if (_root.totalminutes < 10 and _root.totalseconds < 10) { timebox.text = '0' + _root.totalminutes + ':0' + _root.totalseconds; } else { if (_root.totalminutes < 10) { timebox.text = '0' + _root.totalminutes + ':' + _root.totalseconds; } else { if (_root.totalseconds < 10) { timebox.text = _root.totalminutes + ':0' + _root.totalseconds; } else { timebox.text = _root.totalminutes + ':' + _root.totalseconds; } } } if (_root.distance > 0) { distancebox.text = Math.round(_root.distance) + 'ft'; } else { distancebox.text = '0ft'; } if (_root.missionsuccess == 1) { missiontext.text = '$' + _root.missionreward; } else { missiontext.text = '$0'; } totaltext.text = '$' + _root.totalearnt; } instance soundon of movieClip 454 { onClipEvent (load) { if (_root.soundon == 0) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.setVolume(100); _root.click.start(); _root.soundon = 1; this.gotoAndStop(1); _parent.soundoff.gotoAndStop(2); } } instance soundoff of movieClip 456 { onClipEvent (load) { if (_root.soundon == 1) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.setVolume(0); _root.soundon = 0; this.gotoAndStop(1); _parent.soundon.gotoAndStop(20); } } instance normalkeys of movieClip 459 { onClipEvent (load) { if (_root.invertkeys == 2) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.start(); _root.invertkeys = 1; this.gotoAndStop(1); _parent.invertkeys.gotoAndStop(2); } } instance invertkeys of movieClip 462 { onClipEvent (load) { if (_root.invertkeys == 1) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.start(); _root.invertkeys = 2; this.gotoAndStop(1); _parent.normalkeys.gotoAndStop(2); } } frame 4 { _root.missiontype = Math.round(random(5) + 1); if (_root.missiontype == 1) { _root.minesneeded = 2 + Math.round(Math.random(5)); missionstatment.text = 'Survive 1 minutes and drop ' + _root.minesneeded + ' mines in the sea'; } else { if (_root.missiontype == 2) { _root.planesneeded = 2 + Math.round(Math.random(2)); missionstatment.text = 'Survive 1 minutes and destroy ' + _root.planesneeded + ' triplanes'; } else { if (_root.missiontype == 3) { _root.blimpsneeded = 2 + Math.round(Math.random(3)); missionstatment.text = 'Survive 1 minutes and destroy ' + _root.blimpsneeded + ' zeppelins'; } else { if (_root.missiontype == 4) { _root.shipsneeded = 2 + Math.round(Math.random(2)); missionstatment.text = 'Survive 1 minutes and destroy ' + _root.shipsneeded + ' battle ships'; } else { if (_root.missiontype == 5) { _root.timeneeded = 1 + Math.round(Math.random(2)); missionstatment.text = 'Survive ' + _root.timeneeded + ' minutes'; } } } } } _root.missionreward = (1 + Math.round(random(4))) * 500; rewardtext.text = '$' + _root.missionreward; } frame 6 { _root.user_so = SharedObject.getLocal('user'); if (_root.user_so.data.money != undefined) { continuebutton._visible = true; blanked._visible = false; } else { continuebutton._visible = false; blanked._visible = true; } } frame 7 { _root.money = _root.user_so.data.money; _root.day = _root.user_so.data.day; _root.enginelevel = _root.user_so.data.enginelevel; _root.fueltanklevel = _root.user_so.data.fueltanklevel; _root.gunlevel = _root.user_so.data.gunlevel; _root.cargolevel = _root.user_so.data.cargolevel; _root.armourlevel = _root.user_so.data.armourlevel; _root.efficiencylevel = _root.user_so.data.efficiencylevel; _root.hudlevel = _root.user_so.data.hudlevel; _root.multiplierlevel = _root.user_so.data.multiplierlevel; _root.bombs = _root.user_so.data.bombs; _root.ammo = _root.user_so.data.ammo; _root.hasearntfacebook = _root.user_so.data.hasearntfacebook; _root.hasearnttwitter = _root.user_so.data.hasearnttwitter; _root.Aminesweeper = _root.user_so.data.minesweeper; _root.Aredbaron = _root.user_so.data.redbaron; _root.Ahindenburg = _root.user_so.data.hindenburg; _root.Atimewaster = _root.user_so.data.timewaster; _root.Asunkbattleship = _root.user_so.data.sunkbattleship; _root.Amoneyhoarder = _root.user_so.data.moneyhoarder; _root.Acashgrabber = _root.user_so.data.cashgrabber; _root.Amasterpilot = _root.user_so.data.masterpilot; _root.Ashorttrip = _root.user_so.data.shirttrip; _root.Alongtrip = _root.user_so.data.longtrip; _root.Aepictrip = _root.user_so.data.epictrip; _root.Aflyinglow = _root.user_so.data.flyinglow; _root.Aplanesdestroyed = _root.user_so.data.planesdestroyed; _root.Aminesdestroyed = _root.user_so.data.minesdestroyed; _root.Ablimpsdestroyed = _root.user_so.data.blimpsdestroyed; _root.Ashipsdestroyed = _root.user_so.data.shipsdestroyed; _root.Adestroyedinsea = _root.user_so.data.destroyedinsea; _root.wantedframe = 'play'; } frame 12 { stop(); _root.wantedframe = 2; } frame 13 { _root.countfinished = 1; onEnterFrame = function () { if (_root.wantedframe == _currentframe) { if (dark._alpha > 0) { dark._alpha -= 5; } } else { if (_root.wantedframe == 'play' or _root.wantedframe == 'training') { if (_root.soundon == 1) { _root.music.setVolume(100 - dark._alpha); } } dark._alpha += 5; if (dark._alpha >= 100) { if (_root.wantedframe == 'play') { _root.gotoAndStop(3); } else { if (_root.wantedframe == 'training') { _root.gotoAndStop(4); } else { gotoAndStop(_root.wantedframe); } } } } moneytext.text = 'You have: $' + _root.money; }; } instance soundon of movieClip 454 { onClipEvent (load) { if (_root.soundon == 0) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.setVolume(100); _root.click.start(); _root.soundon = 1; this.gotoAndStop(1); _parent.soundoff.gotoAndStop(2); } } instance soundoff of movieClip 456 { onClipEvent (load) { if (_root.soundon == 1) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.setVolume(0); _root.soundon = 0; this.gotoAndStop(1); _parent.soundon.gotoAndStop(20); } } instance normalkeys of movieClip 459 { onClipEvent (load) { if (_root.invertkeys == 2) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.start(); _root.invertkeys = 1; this.gotoAndStop(1); _parent.invertkeys.gotoAndStop(2); } } instance invertkeys of movieClip 462 { onClipEvent (load) { if (_root.invertkeys == 1) { this.gotoAndStop(2); } } onClipEvent (press) { _root.click.start(); _root.invertkeys = 2; this.gotoAndStop(1); _parent.normalkeys.gotoAndStop(2); } } } movieClip 550 { } movieClip 551 { frame 1 { stop(); onEnterFrame = function () { if (_root.Atimewaster == 0) { if (_root.realstartingtime > 0) { if (getTimer() - _root.realstartingtime > 300000) { gotoAndPlay(2); awardbox.awardnametext.text = 'Time Waster'; awardbox.awarddescriptiontext.text = '$1000 - Play for 5 minutes'; _root.Atimewaster = 1; _root.money += 1000; } } } if (_root.Aredbaron == 0) { if (_root.Aplanesdestroyed + _root.planesdestroyed >= 10) { gotoAndPlay(2); awardbox.awardnametext.text = 'Red Baron'; awardbox.awarddescriptiontext.text = '$1000 - Shoot down 10 planes'; _root.Aredbaron = 1; _root.cashearnt = 1000; } } if (_root.Aminesweeper == 0) { if (_root.Aminesdestroyed + _root.minesdestroyed >= 15) { gotoAndPlay(2); awardbox.awardnametext.text = 'Minesweeper'; awardbox.awarddescriptiontext.text = '$1000 - Destroy 15 mines'; _root.Aminesweeper = 1; _root.cashearnt = 1000; } } if (_root.Asunkbattleship == 0) { if (_root.Ashipsdestroyed + _root.shipsdestroyed >= 10) { gotoAndPlay(2); awardbox.awardnametext.text = 'Sunk My Battleship'; awardbox.awarddescriptiontext.text = '$1000 - Destroy 10 battleships'; _root.Asunkbattleship = 1; _root.cashearnt = 1000; } } if (_root.Ahindenburg == 0) { if (_root.Ablimpsdestroyed + _root.blimpsdestroyed >= 5) { gotoAndPlay(2); awardbox.awardnametext.text = 'Hindenburg '; awardbox.awarddescriptiontext.text = '$1000 - Destroy 5 zeppelins'; _root.Ahindenburg = 1; _root.cashearnt = 1000; } } if (_root.Amoneyhoarder == 0) { if (_root.money >= 10000) { gotoAndPlay(2); awardbox.awardnametext.text = 'Money Hoarder'; awardbox.awarddescriptiontext.text = '$1000 - Save over $10,000'; _root.Amoneyhoarder = 1; _root.money += 1000; } } if (_root.Acashgrabber == 0) { if (_root.totalearnt >= 2000) { gotoAndPlay(2); awardbox.awardnametext.text = 'Cash Grabber'; awardbox.awarddescriptiontext.text = '$1000 - Earn $2,000 in one flight'; _root.Acashgrabber = 1; _root.money += 1000; } } if (_root.Amasterpilot == 0) { if (_root.totalminutes >= 2) { gotoAndPlay(2); awardbox.awardnametext.text = 'Master Pilot'; awardbox.awarddescriptiontext.text = '$1000 - 2 minutes in one flight'; _root.Amasterpilot = 1; _root.cashearnt = 1000; } } if (_root.Ashorttrip == 0) { if (_root.distance >= 500) { gotoAndPlay(2); awardbox.awardnametext.text = 'Short Trip'; awardbox.awarddescriptiontext.text = '$1000 - Travel 500 miles'; _root.Ashorttrip = 1; _root.cashearnt = 1000; } } if (_root.Alongtrip == 0) { if (_root.distance >= 1500) { gotoAndPlay(2); awardbox.awardnametext.text = 'Long Trip'; awardbox.awarddescriptiontext.text = '$1000 - Travel 1500 miles'; _root.Alongtrip = 1; _root.cashearnt = 1000; } } if (_root.Aepictrip == 0) { if (_root.distance >= 3000) { gotoAndPlay(2); awardbox.awardnametext.text = 'Epic Trip'; awardbox.awarddescriptiontext.text = '$1000 - Travel 3000 miles'; _root.Aepictrip = 1; _root.cashearnt = 1000; } } if (_root.Aflyinglow == 0) { if (_root.Adestroyedinsea >= 5) { gotoAndPlay(2); awardbox.awardnametext.text = 'Flying Low'; awardbox.awarddescriptiontext.text = '$1000 - Fall in the ocean 5 times'; _root.Aflyinglow = 1; _root.money += 1000; } } if (_root._currentframe == 3) { if (_root.started == 1) { if (_root.alive == 1) { if (Key.isDown(80)) { if (preleased == 1) { if (_root.paused == 0) { _root.pausestart = getTimer(); _root.paused = 1; _root.pauseddisplay._visible = true; _root.bombsound.setVolume(0); } else { _root.pauseend = getTimer(); _root.pausetime += _root.pauseend - _root.pausestart; _root.paused = 0; _root.pauseddisplay._visible = false; if (_root.soundon == 1) { _root.bombsound.setVolume(100); } } preleased = 0; } } else { preleased = 1; } } } } }; } frame 2 { _root.bellsound.start(); } } frame 3 { if (_root.realstartingtime > 0) { } else { _root.realstartingtime = getTimer(); } } frame 3 { music.stop(); if (_root.soundon == 1) { _root.music.setVolume(100); _root.music2.start(0, 999); } } frame 3 { pauseddisplay._visible = false; } frame 3 { paused = 0; ++day; shipsdestroyed = 0; planesdestroyed = 0; blimpsdestroyed = 0; minesdestroyed = 0; if (invertkeys == 1) { leftkey = 37; rightkey = 39; } else { leftkey = 39; rightkey = 37; } stop(); xspeed = 0; resettimer = 0; resettime = 100; beeptime = 30; beeptimer = 0; thrust = 0.3 + (enginelevel - 1) * 0.02; speed = 0; gravity = 0.8; rot = -10; decay = 0.98; rotspeed = 5; bulletlevel = 1; backgroundlevel = 1; stallspeed = 3; stalling = 0; guntimer = 0; guntime = 10 - (gunlevel - 1) * 1.5; upright = 1; alive = 1; hurtflash._alpha = 0; hurt = 0; maxhealth = 100 + (armourlevel - 1) * 50; health = maxhealth; maxfuel = 100 + (fueltanklevel - 1) * 50; fuel = maxfuel; fuelconsumption = 0.06 - (efficiencylevel - 1) * 0.01; cashearnt = 0; cashmultiply = 1 + (multiplierlevel - 1) * 0.3; smoketimer = 0; smoketime = 10; ammospace = maxammo; pausetime = 0; shipstarted = 0; islandstarted = 0; blimpstarted = 0; planestarted = 0; missiles = 0; distance = 0; started = 0; starttime = Math.round(getTimer() / 1000); totalminutes = 0; totalseconds = 0; endingstarted = 0; theend = 4000; upreleased = 1; onEnterFrame = function () { if (_currentframe == 3) { if (paused == 0) { mask._y = background._y + 550; if (alive == 1) { if (distance >= theend) { endingstarted = 1; } if (endingstarted == 1) { startend._alpha += 10; if (startend._alpha >= 100) { wantedframe = 11; gotoAndStop(2); } } totalseconds = Math.round((getTimer() - pausetime) / 1000) - starttime - 60 * totalminutes; if (totalseconds >= 60) { ++totalminutes; totalseconds -= 60; speedo.clock.minutes.play(); } speedo.timepin._rotation = (totalseconds / 60) * 360 + 90; if (started == 0) { rot = 0; } if (mask._y - plane._y < -285) { background.bullets.attachMovie('splash', 'splash' + bulletlevel, bulletlevel); background.bullets['splash' + bulletlevel]._y = plane._y - background._y; background.bullets['splash' + bulletlevel]._x = 350; background.bullets['splash' + bulletlevel].yspeed = -5 - random(5); background.bullets['splash' + bulletlevel].xspeed = xspeed / 2; ++bulletlevel; } distance -= xspeed / 10; if (distance >= 0) { speedo.distancetext.text = Math.round(distance) + 'mi'; } else { speedo.distancetext.text = '0mi'; } if (startend._alpha >= 0) { startend._alpha -= 5; } if (plane._y - background._y > 840) { ++Adestroyedinsea; alive = 0; plane._y = 840 + background._y; plane.gotoAndStop(6); i = 0; while (i <= 20) { background.bullets.attachMovie('splash', 'splash' + bulletlevel, bulletlevel); background.bullets['splash' + bulletlevel]._y = 830; background.bullets['splash' + bulletlevel]._x = 355 + (-10 + random(20)); background.bullets['splash' + bulletlevel].yspeed = -5 - random(10); background.bullets['splash' + bulletlevel].xspeed = -10 + random(20); ++bulletlevel; ++i; } i = 1; while (i <= 20) { background.bullets.attachMovie('shrapnel', 'shrapnel' + bulletlevel, bulletlevel); background.bullets['shrapnel' + bulletlevel]._x = 355 + (-10 + random(20)); background.bullets['shrapnel' + bulletlevel]._y = 830; background.bullets['shrapnel' + bulletlevel].shrapnel.gotoAndStop(Math.round(random(5) + 1)); background.bullets['shrapnel' + bulletlevel]._rotation = random(360); background.bullets['shrapnel' + bulletlevel].xspeed = -(Math.random() * xspeed) / 2; background.bullets['shrapnel' + bulletlevel].yspeed = -5 - random(10); background.bullets['shrapnel' + bulletlevel].size = 50 + random(30); ++bulletlevel; ++i; } } if (started == 1) { if (random(100) < 1) { if (random(10) > 5) { if (missiles == 0) { if (shipstarted == 0) { islandstarted = 1; } } } if (random(10) > 5) { blimpstarted = 1; } if (planestarted == 0) { if (random(10) > 7) { planestarted = 1; } } if (random(10) > 5) { if (islandstarted == 0) { shipstarted = 1; } } if (random(10) >= 9) { i = 1; while (i <= 10) { background.attachMovie('mine', 'bonus' + backgroundlevel, backgroundlevel); background['bonus' + backgroundlevel]._x = 700 + random(800); background['bonus' + backgroundlevel]._y = random(800); ++backgroundlevel; ++i; } } } } if (health <= 0) { alive = 0; yspeed = 0; plane.gotoAndStop(5); } else { if (health < 50) { smoketime = health / 5; ++smoketimer; if (smoketimer > smoketime) { _root.background.bullets.attachMovie('smoke', 'smoke' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['smoke' + _root.bulletlevel]._x = plane._x; _root.background.bullets['smoke' + _root.bulletlevel]._y = plane._y - background._y; ++_root.bulletlevel; smoketimer = 0; } } } if (cashearnt > 0) { cashearnt = Math.round(cashearnt * cashmultiply); speedo.addmoney._alpha = 100; speedo.addmoney.addmoney.text = '+' + cashearnt; money += cashearnt; cashearnt = 0; } else { if (speedo.addmoney._alpha > 0) { speedo.addmoney._alpha -= 2; } } speedo.ammo.ammomask._xscale = (ammo / ammospace) * 100; speedo.bombs.ammomask._xscale = (bombs / 10) * 100; speedo.moneytext.text = '$' + money; speedo.fuelpin._rotation = -((fuel / maxfuel) * 100 + 25); speedo.pin._rotation = -22.5 + -speed * 6; if (-22.5 + -speed * 6 > 202.5) { speedo.pin._rotation = 202.5; } if (hurt > 0) { hurtflash._alpha = hurt; health -= hurt; hurt = 0; } else { if (hurtflash._alpha > 0) { hurtflash._alpha -= 2; } } if (engine.position >= engine.duration - 200) { engine.stop('enginesound'); engine.start(1.25); } if (speedo.fuelpin._rotation < -45) { if (Key.isDown(38) or started == 0) { if (upreleased == 1) { engine.start(); } upreleased = 0; speed -= thrust; fuel -= fuelconsumption; } else { if (upreleased == 0) { stopengine.start(1.1); } engine.stop('enginesound'); upreleased = 1; } } else { ++beeptimer; if (beeptimer > beeptime) { beep.start(); beeptimer = 0; } } if (Key.isDown(leftkey) and started == 1) { if (stalling == 0) { rot -= rotspeed; } } else { if (Key.isDown(rightkey) and started == 1) { if (stalling == 0) { rot += rotspeed; } } } speed -= Math.sin(rot * 0.0174532925199433) * gravity; plane._y -= Math.sin(rot * 0.0174532925199433) * speed; speed *= decay; if (-speed < stallspeed) { stalling += 0.5; } else { stalling = 0; } if (rot > 0 and rot < 90 or rot > 270 and rot < 360) { rot += stalling; plane._y += stalling; } else { rot -= stalling; plane._y += stalling; } if (background._y >= -400 and background._y <= 0) { plane._y -= (plane._y - 300) / 10; background._y -= (plane._y - 300) / 10; } if (background._y < -400) { background._y = -400; plane._y += (plane._y - 300) / 10; } else { if (background._y > 0) { background._y = 0; plane._y += (plane._y - 300) / 10; } } xspeed = Math.cos(rot * 0.0174532925199433) * speed; if (rot > 360) { rot -= 360; } if (rot < 0) { rot += 360; } if (Key.isDown(40) and started == 1) { if (downreleased == 1) { if (plane._currentframe <= 2) { if (upright == 1) { plane.gotoAndStop(3); } else { plane.gotoAndStop(4); } } downreleased = 0; } } else { downreleased = 1; } plane.flip._y = -Math.sin(rot * 0.0174532925199433) * 4.5; plane.flip._x = 4.5 - Math.cos(rot * 0.0174532925199433) * 4.5; plane.flip._rotation = rot; if (upright == 1) { if (plane._currentframe <= 2) { plane.plane.gotoAndStop(Math.round(rot / 2)); } } else { if (plane._currentframe <= 2) { if (rot < 180) { plane.plane.gotoAndStop(180 - Math.round((rot + 180) / 2)); } else { plane.plane.gotoAndStop(180 - Math.round((rot - 180) / 2)); } } } background.shadow.gotoAndStop(Math.round(rot / 2)); background.shadow._height = 50 + Math.sqrt(Math.cos(rot * 0.0174532925199433) * 50 * (Math.cos(rot * 0.0174532925199433) * 50)); if (guntimer > guntime) { if (ammo > 0) { if (Key.isDown(88) and started == 1) { shoot.start(); background.bullets.attachMovie('bullet', 'bullet' + bulletlevel, bulletlevel); background.bullets['bullet' + bulletlevel]._x = plane._x; background.bullets['bullet' + bulletlevel]._y = plane._y - background._y; background.bullets['bullet' + bulletlevel].xspeed = Math.cos(rot * 0.0174532925199433) * 30; background.bullets['bullet' + bulletlevel].yspeed = Math.sin(rot * 0.0174532925199433) * 30; ++bulletlevel; guntimer = 0; --ammo; } } } else { ++guntimer; } if (Key.isDown(90) and started == 1) { if (shiftreleased == 1) { if (bombs > 0) { shiftreleased = 0; background.bullets.attachMovie('bomb', 'bomb' + bulletlevel, bulletlevel); if (upright == 1) { background.bullets['bomb' + bulletlevel]._x = plane._x - Math.cos((rot - 90) * 0.0174532925199433) * 10; background.bullets['bomb' + bulletlevel]._y = plane._y - background._y - Math.sin((rot - 90) * 0.0174532925199433) * 10; } else { background.bullets['bomb' + bulletlevel]._x = plane._x - Math.cos((rot + 90) * 0.0174532925199433) * 10; background.bullets['bomb' + bulletlevel]._y = plane._y - background._y - Math.sin((rot + 90) * 0.0174532925199433) * 10; } background.bullets['bomb' + bulletlevel]._rotation = rot; background.bullets['bomb' + bulletlevel].xspeed = -xspeed; background.bullets['bomb' + bulletlevel].yspeed = -Math.sin(rot * 0.0174532925199433) * speed; ++bulletlevel; --bombs; } } } else { shiftreleased = 1; } if (xspeed < 0) { if (random(100) < 1) { if (random(10) > 7) { background.attachMovie('gascan', 'bonus' + backgroundlevel, backgroundlevel); } else { if (random(10) > 4) { background.attachMovie('cash', 'bonus' + backgroundlevel, backgroundlevel); } else { if (random(10) > 3) { if (started == 1) { background.attachMovie('mine', 'bonus' + backgroundlevel, backgroundlevel); } } else { background.attachMovie('spanner', 'bonus' + backgroundlevel, backgroundlevel); } } } background['bonus' + backgroundlevel]._x = 700; background['bonus' + backgroundlevel]._y = random(800); ++backgroundlevel; } } hitarea._x = plane._x; hitarea._y = plane._y; } else { engine.stop('stopengine'); engine.stop('enginesound'); plane._x += xspeed; xspeed *= 0.9; if (hurtflash._alpha > 0) { hurtflash._alpha -= 2; } if (speedo.addmoney._alpha > 0) { speedo.addmoney._alpha -= 2; } ++resettimer; if (resettimer > resettime) { wantedframe = 2; gotoAndStop(2); } if (resettimer > resettime - 20) { if (startend._alpha < 100) { startend._alpha += 5; } } } missiles = 0; } } }; } movieClip 555 { } movieClip 556 { frame 1 { i = 1; while (i <= 5) { this['cloud' + i]._x = -100 + random(130); this['cloud' + i]._y = -50 + random(50); this['cloud' + i]._height = 140 + random(70); this['cloud' + i]._width = 140 + random(300); this['cloud' + i]._alpha = 20 + random(50); ++i; } } } movieClip 613 { } movieClip 718 { frame 52 { stop(); } } movieClip 719 { frame 1 { stop(); health = 100; hurt = 0; guntime = 200; guntimer = guntime; onEnterFrame = function () { if (_root.paused == 0) { if (_root.islandstarted == 1) { _x = _x + _root.xspeed; } if (this._currentframe == 1) { adjside = this._x - _root.plane._x; oppside = this._y - _root.plane._y; angle = Math.atan2(oppside, adjside); angle = Math.round((angle / Math.PI) * 180); if (hurt > 0) { health -= hurt; blimphit._alpha = 20; hurt = 0; } if (health <= 0) { _root.cashearnt = 200; gotoAndStop(2); } if (_root.islandstarted == 1) { ++guntimer; if (_x < _root.plane._x + 100) { if (guntimer > guntime) { _root.missilesound.start(); _root.background.bullets.attachMovie('missile', 'bullet' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['bullet' + _root.bulletlevel]._rotation = angle - 90; _root.background.bullets['bullet' + _root.bulletlevel]._x = this._x + Math.cos((angle + 180) * 0.0174532925199433) * 85; _root.background.bullets['bullet' + _root.bulletlevel]._y = this._y + Math.sin((angle + 180) * 0.0174532925199433) * 85; _root.background.bullets['bullet' + _root.bulletlevel].xspeed = Math.cos((angle + 180) * 0.0174532925199433) * 15; _root.background.bullets['bullet' + _root.bulletlevel].yspeed = Math.sin((angle + 180) * 0.0174532925199433) * 15; ++_root.bulletlevel; guntimer = 0; } } } angle -= 45; angle /= 3; aagun.gotoAndStop(Math.round(angle)); } if (this._x < -200) { _root.islandstarted = 0; _x = 900; guntimer = guntime; gotoAndStop(1); } } }; } frame 2 { _root.islandexplosion.start(); } } movieClip 1078 { frame 1 { stop(); } } movieClip 1080 { } movieClip 1083 { } movieClip 1084 { } movieClip 1165 { frame 39 { stop(); } } movieClip 1166 { frame 1 { stop(); health = 100; hurt = 0; guntimer = 0; guntime = 10; onEnterFrame = function () { if (_root.paused == 0) { if (_root.shipstarted == 1) { _x = _x + _root.xspeed; } if (this._currentframe == 1) { adjside = this._x - _root.plane._x; oppside = this._y - _root.plane._y; angle = Math.atan2(oppside, adjside); angle = Math.round((angle / Math.PI) * 180); if (hurt > 0) { health -= hurt; blimphit._alpha = 20; hurt = 0; } if (blimphit._alpha > 0) { --blimphit._alpha; } if (health <= 0) { _root.shipdestroyedtrigger = 1; ++_root.shipsdestroyed; _root.cashearnt = 200; gotoAndStop(2); } ++guntimer; if (guntimer > guntime) { _root.background.bullets.attachMovie('enemybullet', 'bullet' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['bullet' + _root.bulletlevel]._x = this._x + Math.cos((angle + 180) * 0.0174532925199433) * 10; _root.background.bullets['bullet' + _root.bulletlevel]._y = this._y + Math.sin((angle + 180) * 0.0174532925199433) * 10; _root.background.bullets['bullet' + _root.bulletlevel].xspeed = Math.cos((angle + 180) * 0.0174532925199433) * 10; _root.background.bullets['bullet' + _root.bulletlevel].yspeed = Math.sin((angle + 180) * 0.0174532925199433) * 10; ++_root.bulletlevel; guntimer = 0; } angle -= 45; angle /= 3; aagun.gotoAndStop(Math.round(angle)); } if (this._x < -200) { _root.shipstarted = 0; _x = 900; gotoAndStop(1); } } }; } frame 2 { i = 1; while (i <= 10) { _root.background.bullets.attachMovie('shrapnel', 'shrapnel' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['shrapnel' + _root.bulletlevel]._x = _x - 15 + random(30); _root.background.bullets['shrapnel' + _root.bulletlevel]._y = _y - 25 + random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].shrapnel.gotoAndStop(Math.round(random(5) + 1)); _root.background.bullets['shrapnel' + _root.bulletlevel]._rotation = random(360); _root.background.bullets['shrapnel' + _root.bulletlevel].xspeed = -5 + random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].yspeed = -5 - random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].size = 30 + random(30); ++_root.bulletlevel; ++i; } _root.shipexplosion.start(); } } movieClip 1169 { } movieClip 1170 { } movieClip 1172 { } movieClip 1174 { frame 1 { stop(); } } movieClip 1255 { frame 1 { _root.planeexplode.start(); } frame 41 { stop(); } } movieClip 1363 { frame 1 { _root.splash1.start(); _root.splash2.start(); _root.splash3.start(); } frame 54 { stop(); } } movieClip 1364 { frame 1 { stop(); initialthrust = _root.thrust; thrust = initialthrust; speed = 0; gravity = 0.8; rot = -10; decay = 0.98; rotspeed = 5; bulletlevel = 1; backgroundlevel = 1; stallspeed = 3; stalling = 0; guntimer = 0; guntime = 10; upright = 1; alive = 1; uptrigger = 1; lefttrigger = 0; righttrigger = 0; turnstart = 0; direction = 1; health = 100; hurt = 0; smoketime = 10; smoketimer = 0; _root.background.enemyshadow._visible = true; plane.enemyhit._alpha = 0; bombtime = 30; bombtimer = 0; onEnterFrame = function () { if (_root.paused == 0) { if (this._currentframe == 1) { if (_root.planestarted == 1) { if (hurt > 0) { plane.enemyhit._alpha = 20; health -= hurt; hurt = 0; } else { if (plane.enemyhit._alpha > 0) { plane.enemyhit._alpha -= 2; } } if (health <= 0) { ++_root.planesdestroyed; _root.cashearnt = 300; _root.planestarted = 2; gotoAndStop(2); } else { if (health < 50) { smoketime = health / 5; ++smoketimer; if (smoketimer > smoketime) { _root.background.bullets.attachMovie('smoke', 'smoke' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['smoke' + _root.bulletlevel]._x = _x; _root.background.bullets['smoke' + _root.bulletlevel]._y = _y; ++_root.bulletlevel; smoketimer = 0; } } } if (_y > 840) { health = 0; _root.casheartn = 300; _y = 840; gotoAndStop(3); } if (_x < -50) { thrust = initialthrust * 1.2; } else { thrust = initialthrust; } uptrigger = 1; relxpos = _x - _root.plane._x; relypos = _y - (_root.plane._y - _root.background._y); x2 = relxpos * relxpos; y2 = relypos * relypos; totaldist = Math.sqrt(x2 + y2); if (_x > 750) { direction = 2; } else { if (_x < -50) { direction = 1; turnstart = 0; plane.gotoAndStop(1); } } if (direction == 1) { if (relypos < 100 and _x > -50) { if (rot > 30 and rot < 180) { lefttrigger = 1; righttrigger = 0; } else { if (relypos > 10) { if (rot < 180 or rot > 335) { lefttrigger = 1; } } else { lefttrigger = 0; } } if (rot > 180 and rot < 330) { righttrigger = 1; lefttrigger = 0; } else { if (relypos < -50) { if (rot < 25 or rot > 180) { righttrigger = 1; } } else { righttrigger = 0; } } } else { if (_x > -50) { if (rot > 0 and rot < 180) { lefttrigger = 1; righttrigger = 0; } else { if (rot > 355 and rot > 180) { lefttrigger = 1; righttrigger = 0; } else { lefttrigger = 0; } } if (rot < 345 and rot > 180) { righttrigger = 1; lefttrigger = 0; } else { righttrigger = 0; } } else { if (rot > 1 and rot < 180) { lefttrigger = 1; righttrigger = 0; } else { lefttrigger = 0; } if (rot < 359 and rot > 180) { righttrigger = 1; lefttrigger = 0; } else { righttrigger = 0; } } } } else { if (direction == 2) { if (turnstart == 0 and _x < 740) { direction = 1; } if (_y < 300) { if (_x > 740) { turnstart = 1; } } if (turnstart == 1) { if (rot > 270 or rot < 180) { righttrigger = 1; lefttrigger = 0; uptrigger = 0; plane.gotoAndStop(2); } else { righttrigger = 0; lefttrigger = 0; } } else { if (rot >= 0 and rot < 180) { lefttrigger = 1; righttrigger = 0; } else { if (rot > 355 and rot > 180) { lefttrigger = 1; righttrigger = 0; } else { lefttrigger = 0; } } if (rot < 345 and rot > 180) { righttrigger = 1; lefttrigger = 0; } else { righttrigger = 0; } } } } _x = _x + _root.xspeed; if (uptrigger == 1) { speed -= thrust; } if (lefttrigger == 1) { if (stalling == 0) { rot -= rotspeed; } } else { if (righttrigger == 1) { if (stalling == 0) { rot += rotspeed; } } } speed -= Math.sin(rot * 0.0174532925199433) * gravity; _y = _y - Math.sin(rot * 0.0174532925199433) * speed; yspeed = Math.sin(rot * 0.0174532925199433) * speed; speed *= decay; if (-speed < stallspeed) { stalling += 0.5; } else { stalling = 0; } if (rot > 0 and rot < 90 or rot > 270 and rot < 360) { rot += stalling; _y = _y + stalling; } else { rot -= stalling; _y = _y + stalling; } _x = _x - Math.cos(rot * 0.0174532925199433) * speed; xspeed = Math.cos(rot * 0.0174532925199433) * speed; if (rot > 360) { rot -= 360; } if (rot < 0) { rot += 360; } _rotation = rot; _root.background.enemyshadow._rotation = rot; if (direction == 1 and _x < _root.plane._x and relypos < 50 and relypos > -50 or direction == 2 and _x > 350 and relypos < 50 and relypos > -50) { if (guntimer > guntime) { _root.background.bullets.attachMovie('enemybullet', 'bullet' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['bullet' + _root.bulletlevel]._x = _x; _root.background.bullets['bullet' + _root.bulletlevel]._y = _y; _root.background.bullets['bullet' + _root.bulletlevel].xspeed = Math.cos(rot * 0.0174532925199433) * 30; _root.background.bullets['bullet' + _root.bulletlevel].yspeed = Math.sin(rot * 0.0174532925199433) * 30; ++_root.bulletlevel; guntimer = 0; } } ++guntimer; if (bombtimer >= bombtime) { if (direction == 2 and _root.plane._y - _root.background._y > this._y and _x > 600 and _x < 650) { _root.background.bullets.attachMovie('enemybomb', 'bomb' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['bomb' + _root.bulletlevel]._x = _x - Math.cos((rot + 90) * 0.0174532925199433) * 10; _root.background.bullets['bomb' + _root.bulletlevel]._y = _y - Math.sin((rot + 90) * 0.0174532925199433) * 10; _root.background.bullets['bomb' + _root.bulletlevel]._rotation = rot; _root.background.bullets['bomb' + _root.bulletlevel].xspeed = -xspeed; _root.background.bullets['bomb' + _root.bulletlevel].yspeed = yspeed; ++_root.bulletlevel; bombtimer = 0; } } else { ++bombtimer; } } } else { _x = _x + _root.xspeed; if (_x < -500) { _x = 1100; _y = 200; gotoAndStop(1); _root.planestarted = 0; } } } }; } frame 2 { _rotation = 0; _root.background.enemyshadow._visible = false; i = 1; while (i <= 10) { _root.background.bullets.attachMovie('shrapnel', 'shrapnel' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['shrapnel' + _root.bulletlevel]._x = _x; _root.background.bullets['shrapnel' + _root.bulletlevel]._y = _y; _root.background.bullets['shrapnel' + _root.bulletlevel].shrapnel.gotoAndStop(Math.round(random(5) + 1)); _root.background.bullets['shrapnel' + _root.bulletlevel]._rotation = random(360); _root.background.bullets['shrapnel' + _root.bulletlevel].xspeed = -5 + random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].yspeed = -5 + random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].size = 30 + random(30); ++_root.bulletlevel; ++i; } } frame 3 { _root._root.background.enemyshadow._visible = false; _rotation = 0; i = 0; while (i <= 20) { _root.background.bullets.attachMovie('splash', 'splash' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['splash' + _root.bulletlevel]._y = 830; _root.background.bullets['splash' + _root.bulletlevel]._x = _x + (-10 + random(20)); _root.background.bullets['splash' + _root.bulletlevel].yspeed = -5 - random(10); _root.background.bullets['splash' + _root.bulletlevel].xspeed = -10 + random(20); ++_root.bulletlevel; ++i; } i = 1; while (i <= 20) { _root.background.bullets.attachMovie('shrapnel', 'shrapnel' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['shrapnel' + _root.bulletlevel]._x = _x + (-10 + random(20)); _root.background.bullets['shrapnel' + _root.bulletlevel]._y = 830; _root.background.bullets['shrapnel' + _root.bulletlevel].shrapnel.gotoAndStop(Math.round(random(5) + 1)); _root.background.bullets['shrapnel' + _root.bulletlevel]._rotation = random(360); _root.background.bullets['shrapnel' + _root.bulletlevel].xspeed = -10 + random(20); _root.background.bullets['shrapnel' + _root.bulletlevel].yspeed = -5 - random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].size = 50 + random(30); ++_root.bulletlevel; ++i; } } } movieClip 1366 { } movieClip 1368 { } movieClip 1369 { frame 1 { blimpshadow._alpha = 10; enemyshadow._alpha = 10; shadow._alpha = 10; enemyhitarea._visible = false; onEnterFrame = function () { blimpshadow._x = blimp._x; enemyshadow._x = enemyplane._x; i = 1; while (i <= 2) { this['motion' + i]._x += _root.xspeed; if (this['motion' + i]._x < -350) { this['motion' + i]._x += 1400; } if (this['motion' + i]._x > 1050) { this['motion' + i]._x -= 1400; } ++i; } i = 1; while (i <= 3) { this['cloud' + i]._x += _root.xspeed / 10; if (this['cloud' + i]._x < -300) { this['cloud' + i]._x += 1300; this['cloud' + i]._y = 400 + random(500); j = 1; while (j <= 5) { this['cloud' + i]['cloud' + j]._x = -100 + random(130); this['cloud' + i]['cloud' + j]._y = -50 + random(50); this['cloud' + i]['cloud' + j]._height = 140 + random(70); this['cloud' + i]['cloud' + j]._width = 140 + random(300); this['cloud' + i]['cloud' + j]._alpha = 20 + random(50); ++j; } } if (this['cloud' + i]._x > 1000) { this['cloud' + i]._x -= 1300; this['cloud' + i]._y = 400 + random(500); j = 1; while (j <= 5) { this['cloud' + i]['cloud' + j]._x = -100 + random(130); this['cloud' + i]['cloud' + j]._y = -50 + random(50); this['cloud' + i]['cloud' + j]._height = 140 + random(70); this['cloud' + i]['cloud' + j]._width = 140 + random(300); this['cloud' + i]['cloud' + j]._alpha = 20 + random(50); ++j; } } ++i; } if (_root.planestarted == 1) { if (enemyplane._x < -40) { planemarker._visible = true; planemarker._x = 10; planemarker._y = enemyplane._y; } else { if (enemyplane._x > 740) { planemarker._visible = true; planemarker._x = 690; planemarker._y = enemyplane._y; } else { planemarker._visible = false; } } } else { planemarker._visible = false; } enemyhitarea._x = enemyplane._x; enemyhitarea._y = enemyplane._y; }; } frame 1 { dark._alpha = 30; } } movieClip 1408 { frame 20 { _root.upright = 2; _parent.gotoAndStop(2); } } movieClip 1409 { frame 18 { _root.upright = 1; _parent.gotoAndStop(1); } } movieClip 1410 { frame 1 { stop(); } frame 5 { _rotation = 0; _root.background.shadow._visible = false; i = 1; while (i <= 10) { _root.background.bullets.attachMovie('shrapnel', 'shrapnel' + _root.bulletlevel, _root.bulletlevel); _root.background.bullets['shrapnel' + _root.bulletlevel]._x = _x; _root.background.bullets['shrapnel' + _root.bulletlevel]._y = _y - _root.background._y; _root.background.bullets['shrapnel' + _root.bulletlevel].shrapnel.gotoAndStop(Math.round(random(5) + 1)); _root.background.bullets['shrapnel' + _root.bulletlevel]._rotation = random(360); _root.background.bullets['shrapnel' + _root.bulletlevel].xspeed = -5 + random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].yspeed = -5 + random(10); _root.background.bullets['shrapnel' + _root.bulletlevel].size = 30 + random(30); ++_root.bulletlevel; ++i; } } frame 6 { _rotation = 0; } } movieClip 1413 { } // unknown tag 88 length 64 movieClip 1418 { } movieClip 1419 { frame 1 { stop(); number2.numbertext.text = _root.totalminutes + 1; number1.numbertext.text = _root.totalminutes; } } movieClip 1420 { } movieClip 1422 { } movieClip 1425 { frame 1 { _alpha = 0; } } movieClip 1428 { } movieClip 1431 { } movieClip 1434 { } movieClip 1438 { } movieClip 1439 { frame 1 { if (_root.hudlevel <= 1) { glass._visible = false; pin._visible = false; fuelpin._visible = false; speedo._visible = false; } if (_root.hudlevel <= 2) { ammo._visible = false; } if (_root.hudlevel <= 3) { bombs._visible = false; } if (_root.hudlevel <= 4) { clock._visible = false; timepin._visible = false; } } } button 1443 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.pausestart = getTimer(); _root.paused = 1; _root.pauseddisplay._visible = true; _root.bombsound.setVolume(0); } } button 1444 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); getURL('http://www.braingames247.com', '_blank'); _root.pausestart = getTimer(); _root.paused = 1; _root.pauseddisplay._visible = true; _root.bombsound.setVolume(0); } } movieClip 1446 { frame 1 { daytext.text = 'Day ' + _root.day; } } movieClip 1448 { } movieClip 1449 { frame 67 { stop(); _root.started = 1; } } button 1455 { on (press) { _root.pauseend = getTimer(); _root.pausetime += _root.pauseend - _root.pausestart; _root.paused = 0; _root.pauseddisplay._visible = false; if (_root.soundon == 1) { _root.bombsound.setVolume(100); } } } movieClip 1456 { } frame 4 { music.stop(); if (_root.soundon == 1) { _root.music.setVolume(100); _root.music2.start(0, 999); } } frame 4 { pauseddisplay._visible = false; } frame 4 { paused = 0; ++day; shipsdestroyed = 0; planesdestroyed = 0; blimpsdestroyed = 0; minesdestroyed = 0; if (invertkeys == 1) { leftkey = 37; rightkey = 39; } else { leftkey = 39; rightkey = 37; } stop(); xspeed = 0; resettimer = 0; resettime = 100; beeptime = 30; beeptimer = 0; thrust = 0.3 + (enginelevel - 1) * 0.02; speed = 0; gravity = 0.8; rot = -10; decay = 0.98; rotspeed = 5; bulletlevel = 1; backgroundlevel = 1; stallspeed = 3; stalling = 0; guntimer = 0; guntime = 10 - (gunlevel - 1) * 1.5; upright = 1; alive = 1; hurtflash._alpha = 0; hurt = 0; maxhealth = 100 + (armourlevel - 1) * 50; health = maxhealth; maxfuel = 100 + (fueltanklevel - 1) * 50; fuel = maxfuel; fuelconsumption = 0.06 - (efficiencylevel - 1) * 0.01; cashearnt = 0; cashmultiply = 1 + (multiplierlevel - 1) * 0.3; smoketimer = 0; smoketime = 10; ammospace = maxammo; pausetime = 0; shipstarted = 0; islandstarted = 0; blimpstarted = 0; planestarted = 0; missiles = 0; distance = 0; started = 0; starttime = Math.round(getTimer() / 1000); totalminutes = 0; totalseconds = 0; endingstarted = 0; theend = 4000; upreleased = 1; onEnterFrame = function () { if (_currentframe == 4) { if (paused == 0) { mask._y = background._y + 550; if (alive == 1) { if (distance >= theend) { endingstarted = 1; } if (endingstarted == 1) { startend._alpha += 10; if (startend._alpha >= 100) { wantedframe = 11; gotoAndStop(2); } } totalseconds = Math.round((getTimer() - pausetime) / 1000) - starttime - 60 * totalminutes; if (totalseconds >= 60) { ++totalminutes; totalseconds -= 60; speedo.clock.minutes.play(); } speedo.timepin._rotation = (totalseconds / 60) * 360 + 90; if (started == 0) { rot = 0; } if (mask._y - plane._y < -285) { background.bullets.attachMovie('splash', 'splash' + bulletlevel, bulletlevel); background.bullets['splash' + bulletlevel]._y = plane._y - background._y; background.bullets['splash' + bulletlevel]._x = 350; background.bullets['splash' + bulletlevel].yspeed = -5 - random(5); background.bullets['splash' + bulletlevel].xspeed = xspeed / 2; ++bulletlevel; } distance -= xspeed / 10; if (distance >= 0) { speedo.distancetext.text = Math.round(distance) + 'mi'; } else { speedo.distancetext.text = '0mi'; } if (startend._alpha >= 0) { startend._alpha -= 5; } if (plane._y - background._y > 840) { ++Adestroyedinsea; alive = 0; plane._y = 840 + background._y; plane.gotoAndStop(6); i = 0; while (i <= 20) { background.bullets.attachMovie('splash', 'splash' + bulletlevel, bulletlevel); background.bullets['splash' + bulletlevel]._y = 830; background.bullets['splash' + bulletlevel]._x = 355 + (-10 + random(20)); background.bullets['splash' + bulletlevel].yspeed = -5 - random(10); background.bullets['splash' + bulletlevel].xspeed = -10 + random(20); ++bulletlevel; ++i; } i = 1; while (i <= 20) { background.bullets.attachMovie('shrapnel', 'shrapnel' + bulletlevel, bulletlevel); background.bullets['shrapnel' + bulletlevel]._x = 355 + (-10 + random(20)); background.bullets['shrapnel' + bulletlevel]._y = 830; background.bullets['shrapnel' + bulletlevel].shrapnel.gotoAndStop(Math.round(random(5) + 1)); background.bullets['shrapnel' + bulletlevel]._rotation = random(360); background.bullets['shrapnel' + bulletlevel].xspeed = -(Math.random() * xspeed) / 2; background.bullets['shrapnel' + bulletlevel].yspeed = -5 - random(10); background.bullets['shrapnel' + bulletlevel].size = 50 + random(30); ++bulletlevel; ++i; } } if (hurt > 0) { hurtflash._alpha = hurt; health -= hurt; hurt = 0; } else { if (hurtflash._alpha > 0) { hurtflash._alpha -= 2; } } if (engine.position >= engine.duration - 200) { engine.stop('enginesound'); engine.start(1.25); } if (Key.isDown(38) or started == 0) { if (upreleased == 1) { engine.start(); } upreleased = 0; speed -= thrust; fuel -= fuelconsumption; } else { if (upreleased == 0) { stopengine.start(1.1); } engine.stop('enginesound'); upreleased = 1; } if (Key.isDown(leftkey) and started == 1) { if (stalling == 0) { rot -= rotspeed; } } else { if (Key.isDown(rightkey) and started == 1) { if (stalling == 0) { rot += rotspeed; } } } speed -= Math.sin(rot * 0.0174532925199433) * gravity; plane._y -= Math.sin(rot * 0.0174532925199433) * speed; speed *= decay; if (-speed < stallspeed) { stalling += 0.5; } else { stalling = 0; } if (rot > 0 and rot < 90 or rot > 270 and rot < 360) { rot += stalling; plane._y += stalling; } else { rot -= stalling; plane._y += stalling; } if (background._y >= -400 and background._y <= 0) { plane._y -= (plane._y - 300) / 10; background._y -= (plane._y - 300) / 10; } if (background._y < -400) { background._y = -400; plane._y += (plane._y - 300) / 10; } else { if (background._y > 0) { background._y = 0; plane._y += (plane._y - 300) / 10; } } xspeed = Math.cos(rot * 0.0174532925199433) * speed; if (rot > 360) { rot -= 360; } if (rot < 0) { rot += 360; } if (Key.isDown(40) and started == 1) { if (downreleased == 1) { if (plane._currentframe <= 2) { if (upright == 1) { plane.gotoAndStop(3); } else { plane.gotoAndStop(4); } } downreleased = 0; } } else { downreleased = 1; } plane.flip._y = -Math.sin(rot * 0.0174532925199433) * 4.5; plane.flip._x = 4.5 - Math.cos(rot * 0.0174532925199433) * 4.5; plane.flip._rotation = rot; if (upright == 1) { if (plane._currentframe <= 2) { plane.plane.gotoAndStop(Math.round(rot / 2)); } } else { if (plane._currentframe <= 2) { if (rot < 180) { plane.plane.gotoAndStop(180 - Math.round((rot + 180) / 2)); } else { plane.plane.gotoAndStop(180 - Math.round((rot - 180) / 2)); } } } background.shadow.gotoAndStop(Math.round(rot / 2)); background.shadow._height = 50 + Math.sqrt(Math.cos(rot * 0.0174532925199433) * 50 * (Math.cos(rot * 0.0174532925199433) * 50)); if (guntimer > guntime) { if (Key.isDown(88) and started == 1) { shoot.start(); background.bullets.attachMovie('bullet', 'bullet' + bulletlevel, bulletlevel); background.bullets['bullet' + bulletlevel]._x = plane._x; background.bullets['bullet' + bulletlevel]._y = plane._y - background._y; background.bullets['bullet' + bulletlevel].xspeed = Math.cos(rot * 0.0174532925199433) * 30; background.bullets['bullet' + bulletlevel].yspeed = Math.sin(rot * 0.0174532925199433) * 30; ++bulletlevel; guntimer = 0; --ammo; } } else { ++guntimer; } if (Key.isDown(90) and started == 1) { if (shiftreleased == 1) { shiftreleased = 0; background.bullets.attachMovie('bomb', 'bomb' + bulletlevel, bulletlevel); if (upright == 1) { background.bullets['bomb' + bulletlevel]._x = plane._x - Math.cos((rot - 90) * 0.0174532925199433) * 10; background.bullets['bomb' + bulletlevel]._y = plane._y - background._y - Math.sin((rot - 90) * 0.0174532925199433) * 10; } else { background.bullets['bomb' + bulletlevel]._x = plane._x - Math.cos((rot + 90) * 0.0174532925199433) * 10; background.bullets['bomb' + bulletlevel]._y = plane._y - background._y - Math.sin((rot + 90) * 0.0174532925199433) * 10; } background.bullets['bomb' + bulletlevel]._rotation = rot; background.bullets['bomb' + bulletlevel].xspeed = -xspeed; background.bullets['bomb' + bulletlevel].yspeed = -Math.sin(rot * 0.0174532925199433) * speed; ++bulletlevel; --bombs; } } else { shiftreleased = 1; } if (xspeed < 0) { if (random(100) < 1) { if (random(10) > 7) { background.attachMovie('gascan', 'bonus' + backgroundlevel, backgroundlevel); } else { if (random(10) > 4) { background.attachMovie('cash', 'bonus' + backgroundlevel, backgroundlevel); } else { if (random(10) > 3) { } else { background.attachMovie('spanner', 'bonus' + backgroundlevel, backgroundlevel); } } } background['bonus' + backgroundlevel]._x = 700; background['bonus' + backgroundlevel]._y = random(800); ++backgroundlevel; } } hitarea._x = plane._x; hitarea._y = plane._y; } else { engine.stop('stopengine'); engine.stop('enginesound'); plane._x += xspeed; xspeed *= 0.9; if (hurtflash._alpha > 0) { hurtflash._alpha -= 2; } if (speedo.addmoney._alpha > 0) { speedo.addmoney._alpha -= 2; } ++resettimer; if (resettimer > resettime) { gotoAndStop(5); } if (resettimer > resettime - 20) { if (startend._alpha < 100) { startend._alpha += 5; } } } missiles = 0; } } }; } button 1459 { on (rollOver) { _root.rollover.start(); } on (release) { _root.click.start(); _root.trainingcomplete = 1; _root.gotoAndStop(5); } } movieClip 1509 { frame 1 { _root.trainingstage = 0; } frame 32 { _root.trainingstage = 0; } frame 152 { _root.trainingstage = 1; } frame 304 { _root.started = 1; } frame 317 { if (Key.isDown(38)) { } else { gotoAndPlay(_currentframe - 1); } } frame 412 { _root.trainingstage = 2; } frame 418 { if (Key.isDown(37)) { gotoAndPlay(_currentframe + 1); } else { if (Key.isDown(39)) { gotoAndPlay(_currentframe + 3); } else { gotoAndPlay(_currentframe - 1); } } } frame 420 { if (Key.isDown(39)) { gotoAndPlay(_currentframe + 3); } else { gotoAndPlay(_currentframe - 1); } } frame 422 { if (Key.isDown(37)) { gotoAndPlay(_currentframe + 1); } else { gotoAndPlay(_currentframe - 1); } } frame 559 { _root.trainingstage = 3; } frame 565 { if (Key.isDown(90)) { } else { gotoAndPlay(_currentframe - 1); } } frame 677 { if (_root.shipdestroyedtrigger == 1) { } else { if (_root.shipstarted == 0) { _root.shipstarted = 1; } gotoAndPlay(_currentframe - 1); } } frame 801 { _root.trainingstage = 4; } frame 808 { if (Key.isDown(88)) { } else { gotoAndPlay(_currentframe - 1); } } frame 959 { _root.trainingstage = 5; } frame 1055 { minetimer = 0; } frame 1084 { if (_root.minedestroyedtrigger == 1) { } else { ++minetimer; if (minetimer > 10) { _root.background.attachMovie('mine', 'bonus' + _root.backgroundlevel, _root.backgroundlevel); _root.background['bonus' + _root.backgroundlevel]._x = 700; _root.background['bonus' + _root.backgroundlevel]._y = random(800); ++_root.backgroundlevel; minetimer = 0; } gotoAndPlay(_currentframe - 1); } } frame 1154 { _root.trainingstage = 6; } frame 1365 { if (_root.rot > 170 and _root.rot < 190) { } else { gotoAndPlay(_currentframe - 1); } } frame 1367 { if (Key.isDown(40)) { } else { gotoAndPlay(_currentframe - 1); } } frame 1518 { if ((_root.rot < 10 or _root.rot > 350) and _root.upright == 1) { } else { gotoAndPlay(_currentframe - 1); } } frame 1541 { _root.trainingstage = 7; } frame 1781 { if (_root.lostmissiletrigger == 1 and _root.rot > 100 and _root.rot < 260) { gotoAndPlay('missilelost'); } else { if (_root.missilehittrigger == 1) { } else { if (_root.missiles == 0 and _root.islandstarted == 0) { _root.islandstarted = 1; } gotoAndPlay(_currentframe - 1); } } } frame 1843 { _root.missilehittrigger = 0; gotoAndPlay('missile'); } frame 1844 { stop(); } frame 1957 { _root.resettimer = _root.resettime; _root.alive = 0; _root.trainingcomplete = 1; } } instance of movieClip 1509 { onClipEvent (load) { if (_root.trainingstage == 1) { this.gotoAndStop('stage1'); _root.started = 1; } else { if (_root.trainingstage == 2) { this.gotoAndStop('stage2'); _root.started = 1; } else { if (_root.trainingstage == 3) { this.gotoAndStop('stage3'); _root.started = 1; } else { if (_root.trainingstage == 4) { this.gotoAndStop('stage4'); _root.started = 1; } else { if (_root.trainingstage == 5) { this.gotoAndStop('stage5'); _root.started = 1; } else { if (_root.trainingstage == 6) { this.gotoAndStop('stage6'); _root.started = 1; } else { if (_root.trainingstage == 7) { this.gotoAndStop('stage7'); _root.started = 1; } else { _root.trainingstage = 0; this.gotoAndStop('stage0'); } } } } } } } time = 0; } onClipEvent (enterFrame) { ++time; if (time < 3) { this.stop(); } else { time = 0; this.play(); } } } movieClip 1510 { frame 1 { stop(); onEnterFrame = function () { _root.planesdestroyed = 0; _root.minesdestyroyed = 0; _root.shipsdestroyed = 0; _root.blimpsdestroyed = 0; _root.money = 0; _root.totalearnt = 0; _root.totalminutes = 0; _root.distance = 0; _root.Adestroyedinsea = 0; if (_root._currentframe == 3) { if (_root.started == 1) { if (_root.alive == 1) { if (Key.isDown(80)) { if (preleased == 1) { if (_root.paused == 0) { _root.pausestart = getTimer(); _root.paused = 1; _root.pauseddisplay._visible = true; _root.bombsound.setVolume(0); } else { _root.pauseend = getTimer(); _root.pausetime += _root.pauseend - _root.pausestart; _root.paused = 0; _root.pauseddisplay._visible = false; if (_root.soundon == 1) { _root.bombsound.setVolume(100); } } preleased = 0; } } else { preleased = 1; } } } } }; } frame 2 { _root.bellsound.start(); } } frame 5 { if (trainingcomplete == 0) { music2.stop('music2'); gotoAndStop(4); } else { music2.stop('music2'); distance = 0; totalminutes = 0; day = 0; money = 0; bombs = 2; ammo = 30; wantedframe = 4; gotoAndStop(2); } } frame 6 { stop(); var o = {'n': [9, 8, 10, 1, 10, 6, 10, 5, 5, 15, 1, 11, 15, 13, 15, 6], 'f': function (i, s) { if (s.length == 16) { return s; } return this.f(i + 1, s + this.n[i].toString(16)); }}; var boardID = o.f(0, ''); mochi.as2.MochiScores.showLeaderboard({'boardID': boardID, 'score': _root.day}); } frame 7 { gotoAndStop(2); wantedframe = 2; music.stop('music'); } frame 8 { mochi.as2.MochiScores.showLeaderboard({'boardID': '98a1a6a55f1bfdf6'}); } frame 9 { gotoAndStop(2); wantedframe = 6; music.stop('music'); }




http://swfchan.com/26/128272/info.shtml
Created: 24/2 -2019 08:03:02 Last modified: 24/2 -2019 08:03:02 Server time: 09/05 -2024 10:30:29