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

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

Darkest Days.swf

This is the info page for
Flash #135167

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


ActionScript [AS1/AS2]
Combined Code
movieClip 41 Particle { frame 1 { } } movieClip 42 UBGPar { frame 1 { stop(); } } movieClip 45 { } // unknown tag 88 length 85 movieClip 49 Portal { instance of movieClip 45 { onClipEvent (enterFrame) { this._rotation -= 8; } } instance of movieClip 45 { onClipEvent (enterFrame) { this._rotation -= 10; } } instance of movieClip 45 { onClipEvent (enterFrame) { this._rotation -= 10; } } instance of movieClip 45 { onClipEvent (enterFrame) { this._rotation += 10; } } instance of movieClip 45 { onClipEvent (enterFrame) { this._rotation += 10; } } } movieClip 152 Cooldown { frame 1 { stop(); } } movieClip 158 { } movieClip 163 { } movieClip 165 { } movieClip 166 ISOPlayer { } movieClip 168 Player { } movieClip 173 { } movieClip 176 { } movieClip 179 { frame 1 { stop(); } frame 3 { _root.soun(6); } frame 4 { _root.soun(6); } frame 6 { _root.soun(6); } frame 8 { _root.soun(6); } frame 10 { _root.soun(6); } } movieClip 184 { frame 1 { stop(); } } movieClip 191 CannonBase { frame 1 { stop(); } instance Cannon of movieClip 184 { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 193 Node { } movieClip 195 Splitter { } movieClip 196 SplitterBase { frame 1 { stop(); } instance of movieClip 195 Splitter { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 198 Shuriken { } movieClip 199 ShurikenBase { frame 1 { stop(); } instance of movieClip 198 Shuriken { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 203 { frame 1 { this.onEnterFrame = function () { if (this._parent.Speed == undefined || this._parent.Speed < 2) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } }; } } movieClip 204 StaticFieldBot { } movieClip 205 StaticFieldBotBase { frame 1 { stop(); } instance of movieClip 204 StaticFieldBot { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 208 Enforcer { } movieClip 209 EnforcerBase { frame 1 { stop(); } instance of movieClip 208 Enforcer { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 211 GuardBot { } movieClip 212 GuardBotBase { frame 1 { stop(); } instance of movieClip 211 GuardBot { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 214 { } movieClip 215 BurrowDrone { frame 1 { stop(); } instance of movieClip 214 { onClipEvent (enterFrame) { this._x = Math.cos(this._parent.Time) * 1; } } instance of movieClip 214 { onClipEvent (enterFrame) { this._x = Math.sin(this._parent.Time) * 2; } } instance of movieClip 214 { onClipEvent (enterFrame) { this._x = Math.cos(this._parent.Time) * 3; } } } movieClip 216 BurrowDroneBase { frame 1 { stop(); } instance of movieClip 215 BurrowDrone { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 220 { } movieClip 221 PatrolBot { } movieClip 222 PatrolBotBase { frame 1 { stop(); } instance of movieClip 221 PatrolBot { onClipEvent (load) { stop(); this.SeekGFX.stop(); } } frame 7 { this.Spawn = true; } } movieClip 224 Seeker { } movieClip 225 SeekerBase { frame 1 { stop(); } instance of movieClip 224 Seeker { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 231 Critter { } movieClip 232 CritterBase { frame 1 { stop(); } instance of movieClip 231 Critter { onClipEvent (load) { stop(); } } frame 7 { this.Spawn = true; } } movieClip 234 Bullet4 { } movieClip 236 Bullet5 { } movieClip 238 Bullet3 { } movieClip 240 Bullet2 { } movieClip 242 Bullet1 { } movieClip 244 Splitter Death { } movieClip 246 Small Death { } movieClip 248 BaseDeath { } // unknown tag 88 length 144 movieClip 251 Skills_DT { } movieClip 253 Split { } movieClip 255 Pierce { } movieClip 264 Crit { frame 9 { stop(); } } movieClip 266 Missile { } movieClip 268 LevelSpawn { } movieClip 270 Shockwave { } movieClip 272 LevelUp2 { } // unknown tag 88 length 85 movieClip 276 LevelUp { } movieClip 278 MissileExplode { } movieClip 280 KnockbackLine { } movieClip 293 TractorBeam { } movieClip 295 TeleLine { } movieClip 300 StaticActive { } movieClip 302 TeleExit { } movieClip 306 LaserGFX { } movieClip 308 LaserHit { } movieClip 310 BurrowDroneBurrow { } movieClip 312 Heart { } movieClip 314 GainSkillPoint { } movieClip 316 Heal { } movieClip 318 CannonShot { } movieClip 320 CannonHit { } movieClip 322 ShurikenTrail { } movieClip 324 SkillCover { } movieClip 326 ShurikenDeath { } movieClip 328 3d Prism { } movieClip 330 BurrowExplode { } movieClip 332 SkillPoint { } movieClip 334 TeleStart { } movieClip 336 Shell { } movieClip 338 Emitter { frame 1 { PD = 500000; Spin = 0; this._visible = false; tyu = 0; ph = 1; yu = -1; this.Active = true; this.onEnterFrame = function () { if (PD < 1) { PD = 500000; } if (this.Active) { if (tyu == 0) { ph = 1; yu *= -1; rty = 0.1; xcv = 0; sdf = -1.9; } tyu += yu; if (tyu % 50 == 0) { xcv -= 5 + Math.random() * 5; } if (tyu % 100 == 0) { xcv = 15 + Math.random() * 10 - 5; } if (tyu % 200 == 0) { ph = tyu / 200; } if (ph == 0) { ph = 1; } if (tyu % 250 == 0) { xcv = Math.random() * 10 - 5; } if (tyu % 300 == 0) { xcv = Math.random() * 7 + 5; } if (tyu % 200 == 0) { sdf = Math.random() * 2 - 0.5; } if (xcv < -25) { xcv = -25; } if (xcv > 25) { xcv = 25; } if (sdf < 0.5 && sdf > -0.5) { sdf = 1; } if (tyu == 1000) { yu *= -1; } i = 0; while (i <= 3) { var v3 = this._parent.attachMovie('UBGPar', 'S' + PD, PD); --PD; if (_global.ParticleMode == 1) { v3._x = this._parent._xmouse; v3._y = this._parent._ymouse; } else { v3._x = this._x; v3._y = this._y; } v3._xscale = Math.random() * 0 + 8; v3._yscale = v3._xscale; v3._rotation = i * 90 + Spin; Spin += sdf; v3.par.gotoAndStop(ph); v3.Life = 90; v3.tyu = tyu; v3.onEnterFrame = function () { this._xscale -= 0.03; this._yscale -= 0.03; if (this._yscale < 0.5) { this.removeMovieClip(); } this.Life -= 1; if (this._Parent.Emitter.Active != true) { this.Life -= 1; } if (this.Life < 1) { this.removeMovieClip(); } if (this.Life < 10) { this._alpha -= 9; } this._alpha -= 0; if (this._alpha < 5) { this.removeMovieClip(); } this._rotation += xcv / ((tyu % 1) / 2 + 1); speedx = Math.sin(this._rotation * 0.0174532925199433) * 1.9; speedy = Math.cos(this._rotation * 0.0174532925199433) * 1.9 * -1; this._y += speedx; this._x += speedy; }; ++i; } } }; } } frame 1 { function GraphicEffect(FX, behaviors, Data) { function NewA() { fx.TempA(); behaviors.A(fx); } function NewB() { fx.TempB(); behaviors.B(fx); } function NewC() { fx.TempC(); behaviors.C(fx); } if (Data.Ref == undefined) { Data.Ref = this; } if (Data._x == undefined) { Data._x = 0; } if (Data._y == undefined) { Data._y = 0; } if (Data._alpha == undefined) { Data._alpha = 100; } if (Data._rotation == undefined) { Data._rotation = 0; } if (Data.Speed == undefined) { Data.Speed = 2; } if (Data.Life == undefined) { Data.Life = 5; } if (Data.Spin == undefined) { Data.Spin = 30; } if (Data.Speed == undefined) { Data.Speed = 0; } if (Data.Grow == undefined) { Data.Grow = 10; } if (Data.Shrink == undefined) { Data.Shrink = 3; } if (Data.FadeOut == undefined) { Data.FadeOut = 10; } var fx = Data.Ref.attachMovie(FX, 'fx' + _global.cDepth, _global.cDepth); fx.D = _global.cDepth; ++_global.cDepth; fx._x = Data._x; fx._y = Data._y; fx._alpha = Data._alpha; if (Data._xscale != undefined) { fx._xscale = Data._xscale; } if (Data._yscale != undefined) { fx._yscale = Data._yscale; } fx._rotation = Data._rotation; fx.Spin = Data.Spin; fx.Grow = Data.Grow; fx.Speed = Data.Speed; fx.Shrink = Data.Shrink; fx.FadeOut = Data.FadeOut; fx.Life = Data.Life; fx.onEnterFrame = function () { --fx.Life; if (fx.Life < 1) { fx.removeMovieClip(); } }; fx.TempA = fx.onEnterFrame; fx.onEnterFrame = function () { NewA(); }; fx.TempB = fx.onEnterFrame; fx.onEnterFrame = function () { NewB(); }; fx.TempC = fx.onEnterFrame; fx.onEnterFrame = function () { NewC(); }; } function getDist(Self, Target) { DX = Self._x - Target._x; DY = Self._y - Target._y; Dis = Math.sqrt(this.DX * this.DX + this.DY * this.DY); return Dis; } function rotateTo(Self, Target) { DX = Target._x - Self._x; DY = -(Target._y - Self._y); radAngle = Math.atan(DY / DX); if (DX < 0) { corrFactor = 270; Rotation = -radAngle * 360 / 6.283185307179586 + corrFactor; return Rotation; } corrFactor = 90; Rotation = -radAngle * 360 / 6.283185307179586 + corrFactor; return Rotation; } function run(Self) { Self._x += Math.sin(Self._rotation * 0.0174532925199433) * Self.Speed / 10; Self._y += (Math.cos(Self._rotation * 0.0174532925199433) * Self.Speed / 10) * -1; } function getXYvel(Self) { Self.Xvel = Math.round(100 * Math.sin(Self._rotation * 0.0174532925199433) * Self.Speed / 10) / 100; Self.Yvel = Math.round((100 * Math.cos(Self._rotation * 0.0174532925199433) * Self.Speed / 10) * -1) / 100; } function size(Self) { if (Self.MathSize != undefined) { Size = Self.MathSize; return Size; } Self.MathSize = (Self._width + Self._height) / 2; Size = Self.MathSize; return Size; } function RN(Random, Int) { if (Int == undefined) { Int = 0; } return Math.random() * Random + Int; } function PC(percent) { X = Math.random() * 100; if (X < percent) { return true; } else { return false; } } function pull(Self, Target, Speed) { angle = rotateTo(Target, Self); Target._x += Math.sin(angle * 0.0174532925199433) * Speed / 10; Target._y += (Math.cos(angle * 0.0174532925199433) * Speed / 10) * -1; } function pX(Rot) { X = Math.sin(Rot * 0.0174532925199433) * 1; return X; } function pY(Rot) { Y = Math.cos(Rot * 0.0174532925199433) * 1 * -1; return Y; } function spin(Self) { Self._rotation += Self.Spin; } function grow(Self) { Self._xscale += Self.Grow; Self._yscale += Self.Grow; } function shrink(Self) { Self._xscale -= Self.Shrink; Self._yscale -= Self.Shrink; } function fadeOut(Self) { Self._alpha -= Self.FadeOut; } function homing(Self, Target, Speed) { if (Speed == undefined) { Self._rotation = rotateTo(Self, Target); } else { D = rotateTo(Self, Target); R = Self._rotation; if (R < 0) { R = 360 + R; } if (R > 360) { R %= 360; } if (R <= 180) { if (R != 180) { R2 = R + 180; } else { R2 = R + 179; } if (D < R) { Self.Turn = -1; } if (D >= R2) { Self.Turn = -1; } if (D < R2 && D > R) { Self.Turn = 1; } } if (R > 180) { R2 = R - 180; if (D > R) { Self.Turn = 1; } if (D <= R2) { Self.Turn = 1; } if (D > R2 && D < R) { Self.Turn = -1; } } Self._rotation += Speed * Self.Turn; X = R - D; if (X < 0) { X *= -1; } if (X <= Speed) { Self._rotation = D; } } } } frame 1 { function soun(S) { if (this['soundOut' + S] < this['soundMax' + S]) { ++this['soundOut' + S]; this['snd' + S].start(0, 1); } } function musi(M, loops) { if (loops == undefined) { loops = 100000; } musics += 1; trace('Music----------'); trace(musics); trace(this['mus' + (musics - 1)]); this['mus' + (musics - 1)].stop(); delete this['mus' + (musics - 1)]; var v3 = new Sound(); this['mus' + musics] = v3; trace('mus' + musics); this['mus' + musics].attachSound('music' + M); this['mus' + musics].start(0, loops); trace('----------------'); } function manageSound() { if (_global.Frames == undefined) { _global.Frames = 0; } ++_global.Frames; if (_global.SoundOn == false && _global.Volume > 0) { _global.Volume -= 5; } else { if (_global.SoundOn != false && _global.Volume < _global.VolumeSet) { _global.Volume += 5; } else { if (_global.SoundOn != false && _global.Volume > _global.VolumeSet) { _global.Volume -= 5; } } } snd1.setVolume(_global.Volume); if (_global.Frames % 2 == 0) { i = 1; while (i <= NumberOfSounds) { if (this['soundOut' + i] > 0) { this['soundOut' + i] = 0; } ++i; } } } if (_global.SoundOn == undefined) { _global.SoundOn = true; _global.Volume = 100; _global.VolumeSet = 100; } soundMax1 = 10; var snd1 = new Sound(); snd1.attachSound('sound1'); snd1.setVolume(100); snd1.start(0, 1000000); NumberOfSounds = 50; i = 1; while (i <= NumberOfSounds) { this['soundMax' + i] = 4; this['snd' + i] = new Sound(); this['snd' + i].attachSound('sound' + i); ++i; } i = 1; while (i <= NumberOfSounds) { this['soundOut' + i] = 0; ++i; } if (musics == undefined) { musics = 0; } } frame 1 { UBG_path = _url; unboundedgamesOK = false; UBGstring = UBG_path.split('.'); com = (UBGstring[2].split('/'))[0]; if (UBGstring[1] + '.' + com == 'unboundedgames.com') { unboundedgamesOK = true; } if (unboundedgamesOK) { _global.UBG = true; } else { _global.UBG = false; } } frame 1 { function doNothing() {} function link() { getURL('http://www.unboundedgames.com/', '_blank'); } MENU = new ContextMenu(); MENU.hideBuiltInItems(); item1 = new ContextMenuItem('Joseph Lormand', doNothing); item2 = new ContextMenuItem('Unboundedgames', link); item3 = new ContextMenuItem('____________________', doNothing); item4 = new ContextMenuItem('(Quality Automagically Adjusts)', doNothing); MENU.customItems.push(item1); MENU.customItems.push(item2); MENU.customItems.push(item3); MENU.customItems.push(item4); this.menu = MENU; _parent.menu = MENU; _global.menu = MENU; } 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; } stop(); this.tabChildren = false; if (mochiVar == undefined) { mochiVar = 1; GameID = '417fefb1df0a8336'; var _mochiads_game_id = '417fefb1df0a8336'; mochi.as2.MochiServices.connect('417fefb1df0a8336'); mochi.as2.MochiAd.showPreGameAd({'id': '417fefb1df0a8336', 'res': '600x500', 'background': 0, 'color': 35071, 'outline': 16777215, 'no_bg': true, 'ad_failed': function () { this._parent.play(); }}); } __com_mochibot__('a874134c', this, 10301, true); } movieClip 347 { frame 1 { if (this._parent._parent.ColorScheme % 7 == 0) { gotoAndPlay(7); } } frame 5 { if (this._parent._parent.ColorScheme % 7 != 0) { gotoAndPlay(1); } } frame 7 { if (this._parent._parent.ColorScheme % 7 != 0) { gotoAndPlay(1); } } frame 11 { if (this._parent._parent.ColorScheme % 7 != 0) { gotoAndPlay(7); } } } instance of movieClip 347 { onClipEvent (enterFrame) { this._parent.manageSound(); } } // unknown tag 88 length 114 movieClip 353 { } instance of movieClip 353 { onClipEvent (load) { MaxFPS = 25; _root._quality = 'high'; _global.Quality = 3; _global.autoQuality = true; L = 90; frames = 0; } onClipEvent (enterFrame) { if (_global.HeroHP != undefined) { if (_global.autoQuality == true) { if (_global.Quality == 1) { if (L == 85 && Laverage > MaxFPS - 5) { _root._quality = 'medium'; _global.Quality = 2; } else { if (L == 85) { _root._quality = 'low'; _global.Quality = 1; } } } else { if (_global.Quality == 2) { if ((L == 55 || L == 85) && Laverage < MaxFPS - 5) { _root._quality = 'low'; _global.Quality = 1; } else { if (L == 85 && Laverage < MaxFPS - 2) { _root._quality = 'medium'; _global.Quality = 2; } else { if (L == 85) { _root._quality = 'high'; _global.Quality = 3; } } } } else { if (_global.Quality == 3) { if ((L == 35 || L == 55 || L == 85) && Laverage < MaxFPS - 8) { _root._quality = 'low'; _global.Quality = 1; } else { if ((L == 55 || L == 85) && Laverage < MaxFPS - 5) { _root._quality = 'medium'; _global.Quality = 2; } else { if (L == 85) { _root._quality = 'high'; _global.Quality = 3; } } } } } } } millisecond = getTimer(); framespersecond = Math.round(1000 / (millisecond - o)); o = millisecond; timer = frames / 30; if (L < 90) { ++L; LT = timer - TS; LS = millisecond - MS; } else { L = 0; TS = timer; MS = millisecond; } Laverage = Math.floor((LT / LS) * 30000); average = Math.floor((timer / millisecond) * 30000); ++frames; currentFPS.text = 'FPS: ' + framespersecond; averageFPS.text = 'Average: ' + average; localFPS.text = 'Local: ' + Laverage; } } } movieClip 354 { frame 1 { this.swapDepths(1534563456); } } movieClip 633 __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 634 __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 635 __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 636 __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 637 __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 638 __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 639 __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 640 __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 { stop(); Time = 0; soun(29); this.onEnterFrame = function () {}; } button 358 { on (release) { getURL('http://www.unboundedgames.com/', '_blank'); } } movieClip 360 { } movieClip 361 { } instance UBG2 of movieClip 361 { onClipEvent (load) { this.swapDepths(10000000); this._alpha = -80; } onClipEvent (enterFrame) { if (this._alpha < 100) { this._alpha += 5; } } } movieClip 363 { } movieClip 365 { } movieClip 366 { instance of movieClip 363 { onClipEvent (enterFrame) { this._rotation += 3; } } instance of movieClip 365 { onClipEvent (enterFrame) { this._rotation += 3; } } } movieClip 369 { } movieClip 370 { } movieClip 371 { } instance UBG1 of movieClip 371 { onClipEvent (load) { this.swapDepths(10000001); this._alpha = 0; } onClipEvent (enterFrame) { if (this._alpha < 100) { this._alpha += 7; } } } instance Emitter of movieClip 338 Emitter { } button 374 { on (press) { soun(30); Emitter.Active = false; SplashFade.Active = true; } } movieClip 376 { frame 1 { this._x = 0; this.onEnterFrame = function () { if (this._y < 1000) { this._y += 15; } }; } } movieClip 378 { frame 1 { Time = 0; _alpha = 0; Active = false; swapDepths(10000005); this.onEnterFrame = function () { if (this.Active == true) { this._x = 0; this._alpha += 2.5; } if (_alpha > 150) { this._parent.UBG1.removeMovieClip(); this._parent.UBG2.removeMovieClip(); this._parent.gotoAndStop('warning'); this.removeMovieClip(); } }; } } frame 3 { stop(); Time = 0; this.onEnterFrame = function () { ++Time; if (Time > 165) { WarningFade.Active = true; } }; this.onMouseDown = function () { if (Time > 10) { Time = 250; } }; } // unknown tag 88 length 87 movieClip 385 { frame 1 { Time = 0; _alpha = 0; Active = false; swapDepths(10000005); this.onEnterFrame = function () { if (this.Active == true) { this._x = 0; this._alpha += 3.5; } if (_alpha > 120) { this._parent.gotoAndStop('story'); this.removeMovieClip(); } }; } } frame 4 { stop(); this.onEnterFrame = function () { if (Key.isDown(32)) { StoryFade.removeMovieClip(); gotoAndStop('title'); } }; this.onMouseDown = function () { if (StorySequence.FadeMode != true) { StorySequence.Time = 10000; } }; } movieClip 386 { frame 1 { Time = 0; _alpha = 0; Active = false; swapDepths(10000005); this.onEnterFrame = function () { if (this.Active == true) { this._x = 0; this._alpha += 2.5; } if (_alpha > 120) { this._parent.gotoAndStop('title'); this.removeMovieClip(); } }; } } // unknown tag 88 length 138 movieClip 390 { } movieClip 404 { frame 1 { _parent.soun(27); } frame 1 { stop(); _parent.soun(27); FadeClip._alpha = 0; FadeClip._x = 0; FadeClip._y = 0; Time = 0; Delay = 3; Frame = 1; FadeMode = false; this.onEnterFrame = function () { ++Time; if (Time > Delay * 50) { Time = 0; FadeMode = true; } if (FadeMode && FadeClip._alpha < 125) { FadeClip._alpha += 5; } else { if (FadeMode) { FadeMode = false; Frame += 1; gotoAndStop(Frame); } if (FadeClip._alpha > 0) { FadeClip._alpha -= 9; } } }; } frame 2 { Delay = 6; } frame 3 { Delay = 10; } frame 4 { Delay = 10; } frame 5 { Delay = 4; _parent.soun(33); } frame 6 { Delay = 7; } frame 7 { Delay = 5; _parent.soun(27); _parent.soun(34); } frame 8 { Delay = 8; } frame 9 { Delay = 10; _parent.soun(17); } frame 10 { Delay = 8; } frame 11 { Delay = 8; _parent.soun(14); } frame 12 { Delay = 8; } frame 13 { 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; } Delay = 4; _parent.soun(32); __com_mochibot__('50212fc8', this, 10301, true); } frame 14 { stop(); Delay = 50; _parent.StoryFade.Active = true; } } movieClip 407 { } frame 5 { stop(); soun(22); Time = 0; trace('Title Screen'); this.Starting = false; this.onEnterFrame = function () { ++Time; }; this.onMouseDown = function () { if (Time > 115 && this.Starting != true) { this.Starting = true; GameStartSplash._x = 0; GameStartSplash.play(); soun(23); } }; } // unknown tag 88 length 143 movieClip 413 { frame 1 { this.onLoad = function () { if (_global.SoundOn) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } }; this.onEnterFrame = function () { if (_global.SoundOn) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } }; } } button 415 { on (press) { if (_global.SoundOn) { _global.SoundOn = false; } else { _global.SoundOn = true; } } } movieClip 417 { frame 1 { Time = 0; this._alpha = 0; this.onEnterFrame = function () { ++this.Time; if (this.Time % 40 == 0) { this.In = false; } else { if (this.Time % 20 == 0 && this.Time > 150) { this.In = true; } } if (this.In && this._alpha < 180) { this._alpha += 15; } else { if (this._alpha > 0) { this._alpha -= 15; } } }; } } movieClip 420 { } movieClip 421 { } movieClip 423 { } movieClip 425 { } movieClip 426 { instance of movieClip 421 { onClipEvent (load) { this._alpha = -20; } onClipEvent (enterFrame) { if (this._alpha < 100) { this._alpha += 1; } } } instance of movieClip 423 { onClipEvent (load) { this._alpha = -90; } onClipEvent (enterFrame) { if (this._alpha < 100) { this._alpha += 1; } } } instance of movieClip 425 { onClipEvent (enterFrame) { this._x += 4; } } } // unknown tag 88 length 82 button 430 { on (release) { getURL('http://www.unboundedgames.com/', '_blank'); } } movieClip 431 { frame 1 { Time = 0; this.onEnterFrame = function () { ++Time; if (Time > 100 && this._alpha > 0) { this._alpha -= 2; } }; } } movieClip 434 { } movieClip 441 { frame 1 { stop(); } instance of movieClip 434 { onClipEvent (load) { this._alpha = 0; } onClipEvent (enterFrame) { this._alpha += 3; if (this._alpha > 160) { this._parent._parent.gotoAndStop('game'); } } } frame 11 { stop(); } } frame 6 { function CreateController() { trace('CreateController'); Controller.removeMovieClip(); var Controller = this.attachMovie('Bullet1', 'Controller', _global.cDepth); ++_global.cDepth; Controller._visible = false; Controller.onEnterFrame = function () { Ref = this._parent; _global.HeroMaxHP = 50 + Ref.Skill_Burst.Level * 5; _global.HeroSpeed = (10 + _global.Frenzy + Ref.Skill_FireRate.Level) / (_global.Static + 1); if (_global.HeroSpeed < 1) { _global.HeroSpeed = 1; } _global.HeroDamage = 3 + Math.ceil(_global.Frenzy / 2) + Ref.Skill_Accuracy.Level / 2; Ref.D_MainCannon.SoundLink = 10 + Math.floor(RN(3)); Ref.D_SplitterShell.Damage = _global.HeroDamage; Ref.D_MissileBurst.Damage = _global.HeroDamage + 6; Ref.D_MissileBurst.Burst = 5 + Ref.Skill_MissileBurst.Level * 4; Ref.D_MainCannon.Damage = _global.HeroDamage; Ref.D_MainCannon.Accuracy = 75 + Ref.Skill_Accuracy.Level * 2 - _global.Frenzy * 3; Ref.D_MainCannon.Burst = 3 + Ref.Skill_Burst.Level / 2 + Math.ceil(_global.Frenzy / 2); Ref.D_MainCannon.FireRate = 3 + Ref.Skill_FireRate.Level / 2 + Math.ceil(_global.Frenzy / 2); Ref.Skill_HomingMissiles.Cooldown = 12 - Ref.Skill_HomingMissiles.Level; Ref.Skill_Laser.Cooldown = 26 - Ref.Skill_Laser.Level * 2; Ref.Skill_Frenzy.Cooldown = 45 - Ref.Skill_Frenzy.Level * 3; Ref.Skill_Teleport.Cooldown = 24 - Ref.Skill_Teleport.Level * 2; Ref.Skill_Shockwave.Cooldown = 15 - Ref.Skill_Shockwave.Level; Ref.D_Siege.Burst = 12 + Ref.Skill_Siege.Level * 3; Ref.D_Siege.Damage = Math.ceil(_global.HeroDamage / 2) + 5; Ref.D_Shockwave.Burst = 40 + Ref.Skill_Shockwave.Level * 10; Ref.D_Shockwave.Damage = _global.HeroDamage * 3 + 10 + _global.Level / 2; Ref.D_Backfire.Burst = 10 + Ref.Skill_Backfire.Level * 5; Ref.D_Backfire.Damage = _global.HeroDamage * 2 + 10; Ref.D_Shards.Damage = _global.HeroDamage * 3 + 20; if (_global.SkillTree) { C = 45 + Ref.Skill_Accuracy.Level * 5; N = 45 + (Ref.Skill_Accuracy.Level + 1) * 5; L = N - C; Ref.Skill_Accuracy.Description = 'Your gun\'s fire range is ' + C + '% (+' + L + '%) accurate. Also increases your DAMAGE.'; C = Ref.Skill_HomingMissiles.Cooldown; N = 12 - (Ref.Skill_HomingMissiles.Level + 1); L = N - C; Ref.Skill_HomingMissiles.Description = 'Launches two Homing Missiles every ' + C + ' (' + L + ') seconds.'; C = 5 + Ref.Skill_MissileBurst.Level * 5; N = 5 + (Ref.Skill_MissileBurst.Level + 1) * 5; L = N - C; Ref.Skill_MissileBurst.Description = 'Homing Missiles explode into a wave of ' + C + ' (+' + L + ') bullets.'; C = Ref.Skill_Laser.Cooldown; N = 26 - (Ref.Skill_Laser.Level + 1) * 2; L = N - C; Ref.Skill_Laser.Description = '[ACTIVE SKILL]: You can fire a devastating laser once every ' + C + ' (' + L + ') seconds.'; C = 30 + Ref.Skill_Shards.Level * 10; if (C == 30) { C = 0; } N = 30 + (Ref.Skill_Shards.Level + 1) * 10; L = N - C; Ref.Skill_Shards.Description = 'Your laser emits ' + C + ' (+' + L + ') deadly shards of energy.'; C = Ref.Skill_Pierce.Level * 5; N = (Ref.Skill_Pierce.Level + 1) * 5; L = N - C; Ref.Skill_Pierce.Description = 'Every Bullet has a ' + C + '% (+' + L + '%) chance to pierce the target and continue moving.'; C = 3 + Ref.Skill_FireRate.Level / 2; N = 3 + (Ref.Skill_FireRate.Level + 1) / 2; L = N - C; Ref.Skill_FireRate.Description = 'Your gun triggers ' + C + ' (+' + L + ') times per second. Also increases your SPEED.'; C = 45 - Ref.Skill_Frenzy.Level * 3; N = 45 - (Ref.Skill_Frenzy.Level + 1) * 3; L = N - C; Ref.Skill_Frenzy.Description = '[ACTIVE SKILL]: Every ' + C + ' (' + L + ') seconds, you can enter a killing rampage for 5 seconds.'; C = Ref.Skill_UnbreakableWill.Level * 10; N = (Ref.Skill_UnbreakableWill.Level + 1) * 10; L = N - C; Ref.Skill_UnbreakableWill.Description = 'While in frenzy, you cannot fall below ' + C + '% (+' + L + '%) Life.'; C = 15 + Ref.Skill_Teleport.Level * 4; N = 15 + (Ref.Skill_Teleport.Level + 1) * 4; L = N - C; C2 = 24 - Ref.Skill_Teleport.Level * 2; N2 = 24 - (Ref.Skill_Teleport.Level + 1) * 2; L2 = N2 - C2; Ref.Skill_Teleport.Description = '[ACTIVE SKILL]: You can instantly warp up to ' + C + ' (+' + L + ') units every ' + C2 + ' (' + L2 + ') seconds to escape danger.'; C = 10 + Ref.Skill_Backfire.Level * 5; if (C == 10) { C = 0; } N = 10 + (Ref.Skill_Backfire.Level + 1) * 5; L = N - C; Ref.Skill_Backfire.Description = 'Upon exiting warp, you release a wave of ' + C + ' (+' + L + ') bullets.'; C = Ref.Skill_Criticals.Level * 3; N = (Ref.Skill_Criticals.Level + 1) * 3; L = N - C; Ref.Skill_Criticals.Description = 'Every Bullet has a ' + C + '% (+' + L + '%) chance to instantly kill the target. (Does not effect Bases)'; C = 3 + Ref.Skill_Burst.Level / 2; N = 3 + (Ref.Skill_Burst.Level + 1) / 2; A = Math.floor(N); if (A != N) { L = '0~1'; } else { L = 1; } A = Math.floor(C); B = Math.ceil(C); if (A == B) { Ref.Skill_Burst.Description = 'Each time you fire your gun you shoot ' + C + ' (+' + L + ') bullets. Also increases your LIFE.'; } else { Ref.Skill_Burst.Description = 'Each time you fire your gun you shoot ' + A + '~' + B + ' (+' + L + ') bullets. Also increases your LIFE.'; } C = 12 + Ref.Skill_Siege.Level * 3; if (C == 12) { C = 0; } N = 12 + (Ref.Skill_Siege.Level + 1) * 3; L = N - C; Ref.Skill_Siege.Description = 'Every Bullet does ' + Ref.Skill_Siege.Level * 5 + '% (+5%) extra damage to bases and every base you destroy explodes into a ring of ' + C + ' (+' + L + ') bullets'; C = Ref.Skill_SplitterShells.Level * 6; N = (Ref.Skill_SplitterShells.Level + 1) * 6; L = N - C; Ref.Skill_SplitterShells.Description = 'Bullets fired from your gun have a ' + C + '% (+' + L + ') chance to split into two and continue moving.'; C = 40 + Ref.Skill_Shockwave.Level * 10; if (C == 20) { C = 0; } N = 40 + (Ref.Skill_Shockwave.Level + 1) * 10; L = N - C; C2 = 15 - Ref.Skill_Shockwave.Level; N2 = 15 - (Ref.Skill_Shockwave.Level + 1); L2 = N2 - C2; Ref.Skill_Shockwave.Description = '[ACTIVE SKILL]: You can unleash an enourmous ring of ' + C + ' (+' + L + ') bullets every ' + C2 + ' (' + L2 + ') seconds'; C = Ref.Skill_Knockback.Level * 5; N = (Ref.Skill_Knockback.Level + 1) * 5; L = N - C; C2 = 2 + Ref.Skill_Knockback.Level; if (C2 == 2) { C2 = 0; } N2 = 2 + Ref.Skill_Knockback.Level + 1; L2 = N2 - C2; Ref.Skill_Knockback.Description = 'The force of your shockwave causes ' + C + ' (+' + L + ') damage to enemies and pushes them back ' + C2 + ' (+' + L2 + ') units'; } if (_global.Paused != true) { --_global.FrenzyTime; } if (_global.FrenzyTime < 1 || _global.FrenzyTime == undefined || _global.FrenzyTime == NaN || _global.FrenzyTime > 500) { _global.Frenzy = 0; _global.FrenzyTime = 0; } }; } Index = 0; GunBook = new Array(); D_MainCannon = new Object(); D_MainCannon.ItemName = 'MainCannon'; D_MainCannon.Index = Index; GunBook[Index] = 'MainCannon'; ++Index; D_MainCannon.BulletGFX = 'Bullet1'; D_MainCannon.Damage = 10; D_MainCannon.FireRate = 25; D_MainCannon.Accuracy = 99; D_MainCannon.Burst = 10; D_MainCannon.BurstAccuracy = 92; D_MainCannon.SoundLink = 20; D_SplitterShell = new Object(); D_SplitterShell.ItemName = 'SplitterShell'; D_SplitterShell.Index = Index; GunBook[Index] = 'SplitterShell'; ++Index; D_SplitterShell.BulletGFX = 'Bullet2'; D_SplitterShell.Damage = 10; D_SplitterShell.FireRate = 25; D_SplitterShell.Accuracy = 95; D_SplitterShell.Burst = 1; D_SplitterShell.BurstAccuracy = 100; D_MissileBurst = new Object(); D_MissileBurst.ItemName = 'MissileBurst'; D_MissileBurst.Index = Index; GunBook[Index] = 'MissileBurst'; ++Index; D_MissileBurst.BulletGFX = 'Bullet2'; D_MissileBurst.Damage = 10; D_MissileBurst.FireRate = 25; D_MissileBurst.Accuracy = 95; D_MissileBurst.Burst = 5; D_MissileBurst.BurstAccuracy = 72; D_MissileBurst.SoundLink = 15; D_Shockwave = new Object(); D_Shockwave.ItemName = 'Shockwave'; D_Shockwave.Index = Index; GunBook[Index] = 'Shockwave'; ++Index; D_Shockwave.BulletGFX = 'Bullet3'; D_Shockwave.Damage = 10; D_Shockwave.FireRate = 25; D_Shockwave.Accuracy = 100; D_Shockwave.Burst = 20; D_Shockwave.BurstAccuracy = -100; D_Shockwave.SoundLink = 14; D_Siege = new Object(); D_Siege.ItemName = 'Siege'; D_Siege.Index = Index; GunBook[Index] = 'Siege'; ++Index; D_Siege.BulletGFX = 'Bullet3'; D_Siege.Damage = 10; D_Siege.FireRate = 25; D_Siege.Accuracy = 100; D_Siege.Burst = 20; D_Siege.BurstAccuracy = -180; D_Backfire = new Object(); D_Backfire.ItemName = 'Backfire'; D_Backfire.Index = Index; GunBook[Index] = 'Backfire'; ++Index; D_Backfire.BulletGFX = 'Bullet4'; D_Backfire.Damage = 10; D_Backfire.FireRate = 25; D_Backfire.Accuracy = 100; D_Backfire.Burst = 25; D_Backfire.BurstAccuracy = 90; D_Shards = new Object(); D_Shards.ItemName = 'Shards'; D_Shards.Index = Index; GunBook[Index] = 'Shards'; ++Index; D_Shards.BulletGFX = 'Bullet5'; D_Shards.Damage = 10; D_Shards.FireRate = 25; D_Shards.Accuracy = 100; D_Shards.Burst = 1; D_Shards.BurstAccuracy = 100; _global.SkillPoints = 5; if (_global.UBG == true) { _global.SkillPoints = 10; } _global.Skill_Accuracy = 0; Skill_Accuracy = new Object(); Skill_Accuracy.Level = 0; Skill_Accuracy.Max = 10; _global.Skill_HomingMissiles = 0; Skill_HomingMissiles = new Object(); Skill_HomingMissiles.Level = 0; Skill_HomingMissiles.Max = 10; Skill_HomingMissiles.Parent1 = 'Accuracy'; _global.Skill_MissileBurst = 0; Skill_MissileBurst = new Object(); Skill_MissileBurst.Level = 0; Skill_MissileBurst.Max = 10; Skill_MissileBurst.Parent1 = 'HomingMissiles'; _global.Skill_Laser = 0; Skill_Laser = new Object(); Skill_Laser.Level = 0; Skill_Laser.Max = 10; Skill_Laser.Parent1 = 'Accuracy'; Skill_Laser.Parent2 = 'Pierce'; _global.Skill_Shards = 0; Skill_Shards = new Object(); Skill_Shards.Level = 0; Skill_Shards.Max = 10; Skill_Shards.Parent1 = 'Laser'; _global.Skill_Pierce = 0; Skill_Pierce = new Object(); Skill_Pierce.Level = 0; Skill_Pierce.Max = 10; _global.Skill_FireRate = 0; Skill_FireRate = new Object(); Skill_FireRate.Level = 0; Skill_FireRate.Max = 10; _global.Skill_Frenzy = 0; Skill_Frenzy = new Object(); Skill_Frenzy.Level = 0; Skill_Frenzy.Max = 10; Skill_Frenzy.Parent1 = 'FireRate'; _global.Skill_UnbreakableWill = 0; Skill_UnbreakableWill = new Object(); Skill_UnbreakableWill.Level = 0; Skill_UnbreakableWill.Max = 10; Skill_UnbreakableWill.Parent1 = 'Frenzy'; _global.Skill_Teleport = 0; Skill_Teleport = new Object(); Skill_Teleport.Level = 0; Skill_Teleport.Max = 10; Skill_Teleport.Parent1 = 'FireRate'; _global.Skill_Backfire = 0; Skill_Backfire = new Object(); Skill_Backfire.Level = 0; Skill_Backfire.Max = 10; Skill_Backfire.Parent1 = 'Teleport'; _global.Skill_Criticals = 0; Skill_Criticals = new Object(); Skill_Criticals.Level = 0; Skill_Criticals.Max = 10; _global.Skill_Burst = 0; Skill_Burst = new Object(); Skill_Burst.Level = 0; Skill_Burst.Max = 10; _global.Skill_Siege = 0; Skill_Siege = new Object(); Skill_Siege.Level = 0; Skill_Siege.Max = 10; Skill_Siege.Parent1 = 'SplitterShells'; _global.Skill_SplitterShells = 0; Skill_SplitterShells = new Object(); Skill_SplitterShells.Level = 0; Skill_SplitterShells.Max = 10; Skill_SplitterShells.Parent1 = 'Burst'; _global.Skill_Shockwave = 0; Skill_Shockwave = new Object(); Skill_Shockwave.Level = 0; Skill_Shockwave.Max = 10; Skill_Shockwave.Parent1 = 'Burst'; _global.Skill_Knockback = 0; Skill_Knockback = new Object(); Skill_Knockback.Level = 0; Skill_Knockback.Max = 10; Skill_Knockback.Parent1 = 'Shockwave'; } frame 6 { Index = 0; EnemyBook = new Array(); D_Critter = new Object(); D_Critter.ItemName = 'Critter'; D_Critter.Index = Index; EnemyBook[Index] = 'Critter'; ++Index; D_Critter.Life = 1; D_Critter.Speed = 14; D_Critter.Damage = 1; D_Critter.Score = 50; D_Critter.DeathGFX = 'Small Death'; D_Critter.DeathSound = 3; D_Seeker = new Object(); D_Seeker.ItemName = 'Seeker'; D_Seeker.Index = Index; EnemyBook[Index] = 'Seeker'; ++Index; D_Seeker.Life = 3; D_Seeker.Speed = 50; D_Seeker.Damage = 2; D_Seeker.Score = 200; D_Seeker.DeathGFX = 'Small Death'; D_Seeker.DeathSound = 3; D_PatrolBot = new Object(); D_PatrolBot.ItemName = 'PatrolBot'; D_PatrolBot.Index = Index; EnemyBook[Index] = 'PatrolBot'; ++Index; D_PatrolBot.Life = 12; D_PatrolBot.Speed = 26; D_PatrolBot.Damage = 3; D_PatrolBot.Score = 400; D_PatrolBot.DeathGFX = 'Small Death'; D_PatrolBot.DeathSound = 3; D_BurrowDrone = new Object(); D_BurrowDrone.ItemName = 'BurrowDrone'; D_BurrowDrone.Index = Index; EnemyBook[Index] = 'BurrowDrone'; ++Index; D_BurrowDrone.Life = 60; D_BurrowDrone.Speed = 21; D_BurrowDrone.Damage = 5; D_BurrowDrone.Score = 800; D_BurrowDrone.DeathGFX = 'Small Death'; D_BurrowDrone.DeathSound = 3; D_GuardBot = new Object(); D_GuardBot.ItemName = 'GuardBot'; D_GuardBot.Index = Index; EnemyBook[Index] = 'GuardBot'; ++Index; D_GuardBot.Life = 80; D_GuardBot.Speed = 25; D_GuardBot.Damage = 3; D_GuardBot.Score = 100; D_GuardBot.DeathGFX = 'Small Death'; D_GuardBot.DeathSound = 3; D_Enforcer = new Object(); D_Enforcer.ItemName = 'Enforcer'; D_Enforcer.Index = Index; EnemyBook[Index] = 'Enforcer'; ++Index; D_Enforcer.Life = 35; D_Enforcer.Speed = 36; D_Enforcer.Damage = 4; D_Enforcer.Score = 1000; D_Enforcer.DeathGFX = 'Small Death'; D_Enforcer.DeathSound = 3; D_StaticFieldBot = new Object(); D_StaticFieldBot.ItemName = 'StaticFieldBot'; D_StaticFieldBot.Index = Index; EnemyBook[Index] = 'StaticFieldBot'; ++Index; D_StaticFieldBot.Life = 125; D_StaticFieldBot.Speed = 25; D_StaticFieldBot.Damage = 5; D_StaticFieldBot.Score = 1200; D_StaticFieldBot.DeathGFX = 'Small Death'; D_StaticFieldBot.DeathSound = 3; D_Splitter = new Object(); D_Splitter.ItemName = 'Splitter'; D_Splitter.Index = Index; EnemyBook[Index] = 'Splitter'; ++Index; D_Splitter.Life = 55; D_Splitter.Speed = 45; D_Splitter.Damage = 6; D_Splitter.Score = 1800; D_Splitter.DeathGFX = 'Splitter Death'; D_Splitter.DeathSound = 3; D_Node = new Object(); D_Node.ItemName = 'Node'; D_Node.Index = Index; EnemyBook[Index] = 'Node'; ++Index; D_Node.Life = 1; D_Node.Speed = 35; D_Node.Damage = 3; D_Node.Score = 400; D_Node.DeathGFX = 'Small Death'; D_Node.DeathSound = 3; D_Shuriken = new Object(); D_Shuriken.ItemName = 'Shuriken'; D_Shuriken.Index = Index; EnemyBook[Index] = 'Shuriken'; ++Index; D_Shuriken.Life = 85; D_Shuriken.Speed = 55; D_Shuriken.Damage = 10; D_Shuriken.Score = 3000; D_Shuriken.DeathGFX = 'ShurikenDeath'; D_Shuriken.DeathSound = 3; i = 0; while (i < EnemyBook.length) { this[EnemyBook[i] + 'Damage'] = 0; this[EnemyBook[i] + 'Kills'] = 0; this[EnemyBook[i] + 'Bases'] = 0; ++i; } CannonDamage = 0; CannonKills = 0; CannonBases = 0; Index = 0; BaseBook = new Array(); D_CritterBase = new Object(); D_CritterBase.ItemName = 'CritterBase'; D_CritterBase.Index = Index; BaseBook[Index] = 'CritterBase'; ++Index; D_CritterBase.Life = 75; D_CritterBase.Score = 750; D_CritterBase.DeathGFX = 'BaseDeath'; D_SeekerBase = new Object(); D_SeekerBase.ItemName = 'SeekerBase'; D_SeekerBase.Index = Index; BaseBook[Index] = 'SeekerBase'; ++Index; D_SeekerBase.Life = 150; D_SeekerBase.Score = 2000; D_SeekerBase.DeathGFX = 'BaseDeath'; D_PatrolBotBase = new Object(); D_PatrolBotBase.ItemName = 'PatrolBotBase'; D_PatrolBotBase.Index = Index; BaseBook[Index] = 'PatrolBotBase'; ++Index; D_PatrolBotBase.Life = 250; D_PatrolBotBase.Score = 4000; D_PatrolBotBase.DeathGFX = 'BaseDeath'; D_BurrowDroneBase = new Object(); D_BurrowDroneBase.ItemName = 'BurrowDroneBase'; D_BurrowDroneBase.Index = Index; BaseBook[Index] = 'BurrowDroneBase'; ++Index; D_BurrowDroneBase.Life = 350; D_BurrowDroneBase.Score = 7500; D_BurrowDroneBase.DeathGFX = 'BaseDeath'; D_GuardBotBase = new Object(); D_GuardBotBase.ItemName = 'GuardBotBase'; D_GuardBotBase.Index = Index; BaseBook[Index] = 'GuardBotBase'; ++Index; D_GuardBotBase.Life = 450; D_GuardBotBase.Score = 10000; D_GuardBotBase.DeathGFX = 'BaseDeath'; D_EnforcerBase = new Object(); D_EnforcerBase.ItemName = 'EnforcerBase'; D_EnforcerBase.Index = Index; BaseBook[Index] = 'EnforcerBase'; ++Index; D_EnforcerBase.Life = 550; D_EnforcerBase.Score = 15000; D_EnforcerBase.DeathGFX = 'BaseDeath'; D_StaticFieldBotBase = new Object(); D_StaticFieldBotBase.ItemName = 'StaticFieldBotBase'; D_StaticFieldBotBase.Index = Index; BaseBook[Index] = 'StaticFieldBotBase'; ++Index; D_StaticFieldBotBase.Life = 650; D_StaticFieldBotBase.Score = 20000; D_StaticFieldBotBase.DeathGFX = 'BaseDeath'; D_SplitterBase = new Object(); D_SplitterBase.ItemName = 'SplitterBase'; D_SplitterBase.Index = Index; BaseBook[Index] = 'SplitterBase'; ++Index; D_SplitterBase.Life = 800; D_SplitterBase.Score = 25000; D_SplitterBase.DeathGFX = 'BaseDeath'; D_CannonBase = new Object(); D_CannonBase.ItemName = 'CannonBase'; D_CannonBase.Index = Index; BaseBook[Index] = 'CannonBase'; ++Index; D_CannonBase.Life = 500; D_CannonBase.Score = 10000; D_CannonBase.DeathGFX = 'BaseDeath'; D_ShurikenBase = new Object(); D_ShurikenBase.ItemName = 'ShurikenBase'; D_ShurikenBase.Index = Index; BaseBook[Index] = 'ShurikenBase'; ++Index; D_ShurikenBase.Life = 1000; D_ShurikenBase.Score = 30000; D_ShurikenBase.DeathGFX = 'BaseDeath'; } frame 6 { function manageTip() { if (_global.Level == 0 && _global.SkillPoints > 0) { Tip.text = 'Press K or Enter to spend your Skill Points!'; } else { if (_global.Level == 0) { Tip.text = 'Move into the portal.'; } else { if (_global.Level == 1 && _global.Bases > 0) { Tip.text = 'Destroy every base to complete the stage.'; } else { if (_global.Level == 1 && _global.Creatures > 1) { Tip.text = _global.Creatures + ' Drones left to destroy.'; } else { if (_global.Level == 1 && _global.Creatures > 0) { Tip.text = '1 Drone left to destroy.'; } else { if (_global.Level == 1) { Tip.text = ' The Portal opens once the stage is clear.'; } else { if (_global.Level == 2 && _global.Bases < 1 && _global.Creatures < 2 && _global.SkillPoints > 0) { Tip.text = 'Remember to spend all of your skillpoints.'; } else { if (_global.Level == 3) { Tip.text = ''; } else { Tip.text = ''; } } } } } } } } } function CreatePortal() { soun(26); _global.PortalOut = true; var v3 = this.attachMovie('Portal', 'Portal', objDepth()); v3._x = 300; v3._y = 235; v3.Time = 0; v3._alpha = 0; v3.onEnterFrame = function () { ++this.Time; this.Stage_txt.text = 'Stage ' + (_global.Level + 1) + ' Portal'; this.Skillpoints.text = _global.SkillPoints + ' SkillPoints available. (press K)'; if (_global.SkillPoints < 1) { this.Skillpoints.text = ''; } if (this._alpha < 100) { this._alpha += 3; } this.Dist = getDist(this, this._parent.Player); if (this.Time > 35) { if (this.Dist < 30) { CreateLevel(); _global.PortalOut = false; this.removeMovieClip(); } } if (this.Time > 5 && _global.HeroDead) { this.removeMovieClip(); _global.PortalOut = false; } }; } function CreateLevel() { Player.HomingMissileTime = Skill_HomingMissiles.Cooldown * 25 - 50; ++_global.Level; GraphicEffect('LevelSpawn', {'A': grow, 'B': fadeOut}, {'_x': 300, '_y': 250}); D = Math.floor(_global.Level * _global.Level / 3.5) + _global.Level * 5 + 10 * _global.HeroLevel + 5; ClearLevelGrid(); if (RN(1) < 0.5) { Axis = 1; } else { Axis = 2; } LX = _global.Level + 7 + _global.Level * _global.Level / 60; if (LX > _global.Level * 3) { LX = _global.Level * 3; } if (LX < 4) { LX = 4; } if (LX > 30) { LX = 30; } i = 0; while (i < LX) { if (RN(1) < 0.72 && i != 0 && (i != 1 || _global.Level < 5)) { Double = 2; } else { Double = 1; } Points = Math.ceil(RN(D / (2.5 + Double)), 2) + Math.ceil(RN(_global.Level / 1.5), _global.Level / 4); D -= Points; cl = 0; while (cl < 20) { if (Double == 2) { X2 = Math.floor(RN(14, 15)); X1 = X2; Y2 = Math.floor(RN(11, 11)); Y1 = Y2; if (Axis == 1) { X2 = 28 - X1; } if (Axis == 2) { Y2 = 21 - Y1; } } if (Double == 1 && Axis == 1) { X1 = 14; Y1 = Math.floor(RN(22)); } if (Double == 1 && Axis == 2) { X1 = Math.floor(RN(29)); Y1 = 11; } if (Axis == 2 && Double == 2) { Y1 += 0.5; Y2 += 0.5; } if (Double == 1 && LevelGrid[X1][Math.floor(Y1)] != 1) { LevelGrid[X1][Math.floor(Y1)] = 1; break; } if (Double == 2 && LevelGrid[X1][Math.floor(Y1)] != 1 && LevelGrid[X2][Math.floor(Y2)] != 1) { LevelGrid[X1][Math.floor(Y1)] = 1; LevelGrid[X2][Math.floor(Y2)] = 1; break; } ++cl; } if (Points > 45 && Double == 1 && RN(1) < 0.45 && _global.Level > 8) { s = 1; while (s <= Double) { spawnShurikenBase(this['X' + s], this['Y' + s], SpawnRate(140, _global.Level)); ++s; } } else { if (Points > 25 * Double && RN(1) < 0.7 && _global.Level > 5) { s = 1; while (s <= Double) { spawnSplitterBase(this['X' + s], this['Y' + s], SpawnRate(140, _global.Level * 3)); ++s; } } else { if (Points > 20 * Double && RN(1) < 0.5 && _global.Level > 6) { s = 1; while (s <= Double) { spawnStaticFieldBotBase(this['X' + s], this['Y' + s], SpawnRate(175, _global.Level * 2)); ++s; } } else { if (Points > 17 * Double && RN(1) < 0.6 && _global.Level > 5) { s = 1; while (s <= Double) { spawnEnforcerBase(this['X' + s], this['Y' + s], SpawnRate(100, _global.Level * 2)); ++s; } } else { if (Points > 14 * Double && RN(1) < 0.45 && _global.Level > 4) { s = 1; while (s <= Double) { spawnGuardBotBase(this['X' + s], this['Y' + s], SpawnRate(95, _global.Level)); ++s; } } else { if (Points > 12 * Double && RN(1) < 0.4 && _global.Level > 4) { s = 1; while (s <= Double) { spawnBurrowDroneBase(this['X' + s], this['Y' + s], SpawnRate(180, _global.Level)); ++s; } } else { if (Points + RN(5) > 11 * Double && RN(3 - Double) < 0.75 && _global.Level > 3) { s = 1; while (s <= Double) { spawnCannonBase(this['X' + s], this['Y' + s], SpawnRate(75, _global.Level)); ++s; } } else { if (Points > 7 * Double && RN(1) < 0.5 && _global.Level > 2) { s = 1; while (s <= Double) { spawnPatrolBotBase(this['X' + s], this['Y' + s], SpawnRate(105, _global.Level)); ++s; } } else { if (Points > 3 * Double && RN(1) < 0.55 && _global.Level > 1) { s = 1; while (s <= Double) { spawnSeekerBase(this['X' + s], this['Y' + s], SpawnRate(80, _global.Level)); ++s; } } else { if (Points > 1 * Double) { s = 1; while (s <= Double) { spawnCritterBase(this['X' + s], this['Y' + s], SpawnRate(40, Math.floor(_global.Level / 2))); ++s; } } } } } } } } } } } if (D < 2 || _global.Bases > LX) { i = 100000; } ++i; } if ((_global.Bases < _global.Level || _global.Bases < 4) && _global.Bases < 8) { --_global.Level; CreateLevel(); } else { soun(20); } } function SpawnRate(Base, Points) { Rate = Base - Points; if (Rate < 25) { Rate = 25; } return Rate; } function LevelUp() { soun(8); ++_global.HeroLevel; GraphicEffect('LevelUp', {'A': grow, 'B': fadeOut}, {'Life': 25, 'FadeOut': 3, '_x': Player._x, '_y': Player._y}); GraphicEffect('LevelUp2', {'A': grow, 'B': spin}, {'Life': 15, '_x': Player._x + Player.Xvel * 2, '_y': Player._y + Player.Xvel * 2}); _global.SkillPoints += 2; Temp = _global.NextLevelXP; _global.NextLevelXP += Math.ceil((_global.NextLevelXP * 0.15 + 65) / 25) * 25; _global.XP -= Temp; } function chooseSlot(theArray) { X = undefined; cs = theArray.length - 1; while (cs >= 0) { if (theArray[cs] == 0) { X = cs; break; } if (cs < 0 || cs > 1000) { trace('chooseSlot Error'); break; } --cs; } if (X == undefined) { X = -5; } return X; } function fireGun(ItemName, X, Y, Rot, Exception) { Gun = this['D_' + ItemName]; ++_global.ShotDelay; R = 25 - Gun.FireRate; if (Gun.Burst == undefined || Gun.Burst > 300) { Gun.Burst = 1; } if (Gun.SoundLink != undefined) { soun(Gun.SoundLink); } if (RN(1) < 0.5) { Burst = Math.ceil(Gun.Burst); } else { Burst = Math.floor(Gun.Burst); } fg = 0; while (fg < Burst) { GFX = Gun.BulletGFX; var v3 = this.attachMovie(GFX, 'Bullet' + _global.cDepth, objDepth(), {'_x': X, '_y': Y}); if (GFX == 'Bullet3') { v3.Speed = 80 + Math.ceil(fg / 20) * 5 + Math.round(RN(5)); } else { v3.Speed = 95 + _global.HeroSpeed * 2; } v3.Item = ItemName; v3.Exception = Exception; R = Rot; A = 100 - Gun.Accuracy; v3._rotation = Rot + RN(A, -A / 2) - (fg - Gun.Burst / 2) * (100 - Gun.BurstAccuracy) / 11.5; v3.Damage = Gun.Damage; v3.Life = 1; getXYvel(v3); v3.Time = 0; v3.onEnterFrame = function () { if (!_global.Paused) { if (_global.HeroDead) { this.removeMovieClip(); } ++this.Time; if (this._parent.EnemyShell.hitTest(this._x, this._y, true)) { checkEnemyHit(this); } this._x += this.Xvel; this._y += this.Yvel; if (this.Life < 1) { this.removeMovieClip(); } if (this.Time % 5 == 0) { if (bounds(this)) { this.removeMovieClip(); } } } }; ++fg; } } function randomEnemy() { re = 0; while (re < 200) { X = Math.floor(RN(120)); S = getShell(X); E = S['Enemy' + X]; if (E._x != undefined) { return E; } ++re; } return randomBase(); } function randomBase() { rb = 0; while (rb < 75) { X = Math.floor(RN(35)); B = EnemyShell.BaseShell['Base' + X]; if (B._x != undefined) { return B; } ++rb; } return Player; } function bounds(Self, Mod) { if (Mod == undefined) { Mod = 0; } if (Self._x < -5 + Mod) { return true; } else { if (Self._x > 605 - Mod) { return true; } else { if (Self._y > 475 - Mod) { return true; } else { if (Self._y < -5 + Mod) { return true; } else { return false; } } } } } function spawnPlayer(X, Y) { var Player = this.attachMovie('Player', 'Player', 4999999999.0, {'_x': X, '_y': Y}); Player.Xvel = 0; Player.Yvel = 0; Player.Life = _global.HeroMaxHP; Player.Speed = _global.HeroSpeed; Player.Weapon1 = 'MainCannon'; Player.FireRate1 = this['D_' + Player.Weapon1].FireRate; Player.Delay1 = 0; Player.HomingMissileTime = 5000; Player.LaserTime = 5000; Player.FrenzyTime = 5000; Player.TeleportTime = 5000; Player.ShockwaveTime = 5000; Player.onEnterFrame = function () { if (this._parent['Skill_' + this.ActiveSkill].Level < 1) { this.ActiveSkill = undefined; } this.Speed = _global.HeroSpeed; this.FireRate1 = this._parent['D_' + Player.Weapon1].FireRate * 2; if (_global.HeroMaxHP > this.TempMaxHP) { this.Life += Math.floor(_global.HeroMaxHP - this.TempMaxHP); } this.TempMaxHP = _global.HeroMaxHP; if (this.Life > _global.HeroMaxHP) { this.Life = _global.HeroMaxHP; } _global.HeroHP = this.Life; if (!_global.Paused && !_global.HeroDead) { Ref = this._parent; ++this.Delay1; ++this.HomingMissileTime; ++this.LaserTime; ++this.FrenzyTime; ++this.TeleportTime; ++this.ShockwaveTime; if (_global.FrenzyTime > 0) { X = this.Life / _global.HeroMaxHP; if (X * 10 < this._parent.Skill_UnbreakableWill.Level) { X2 = this.TempHP / _global.HeroMaxHP; if (X2 >= this._parent.Skill_UnbreakableWill.Level / 10) { this.Life = Math.ceil(_global.HeroMaxHP * this._parent.Skill_UnbreakableWill.Level / 10); } else { this.Life = this.TempHP; } } ++this.HomingMissileTime; ++this.LaserTime; ++this.TeleportTime; ++this.ShockwaveTime; } X = this._parent.Skill_HomingMissiles.Level; if (this.HomingMissileTime > this._parent.Skill_HomingMissiles.Cooldown * 25 && X > 0 && (_global.Creatures > 0 || _global.Bases > 0)) { HomingMissiles(this, randomEnemy(), randomEnemy()); this.HomingMissileTime = 0; } if (_global.MouseIsDown) { if (this.Delay1 > Math.round(50 / this.FireRate1)) { this.Delay1 = 0; fireGun(this.Weapon1, this._x, this._y, this._rotation); } } homing(this, {'_x': _xmouse, '_y': _ymouse}, 10); homing(this, {'_x': _xmouse, '_y': _ymouse}, 7); homing(this, {'_x': _xmouse, '_y': _ymouse}, 5); if (Key.isDown(65) || Key.isDown(37)) { this.Direction = 'Left'; this.Xvel -= this.Speed / 10; } if (Key.isDown(87) || Key.isDown(38)) { this.Direction = 'Up'; this.Yvel -= this.Speed / 10; } if (Key.isDown(68) || Key.isDown(39)) { this.Direction = 'Right'; this.Xvel += this.Speed / 10; } if (Key.isDown(83) || Key.isDown(40)) { this.Direction = 'Down'; this.Yvel += this.Speed / 10; } if (Key.isDown(32) && this.SpacePressed != true) { this.UseActiveSkill = true; this.SpacePressed = true; } if (!Key.isDown(32)) { this.SpacePressed = false; } if (Key.isDown(69) && EP != true) { EP = true; } else { EP = false; } if (Key.isDown(82) && RP != true) { RP = true; } else { RP = false; } if (Key.isDown(84) && TP != true) { TP = true; } else { TP = false; } if (Key.isDown(70) && FP != true) { FP = true; } else { FP = false; } if (this.UseActiveSkill == true || EP || RP || TP || FP) { C1 = this.ActiveSkill == 'Laser' && this.UseActiveSkill == true; C2 = RP; if (C1 || C2) { if (this.LaserTime > Ref.Skill_Laser.Cooldown * 25 && Ref.Skill_Laser.Level > 0) { trace('Laser!'); homing(this, {'_x': _xmouse, '_y': _ymouse}, 250); Laser(this, this._x, this._y); this.LaserTime = 0; } } C1 = this.ActiveSkill == 'Frenzy' && this.UseActiveSkill == true; C2 = FP; if (C1 || C2) { if (this.FrenzyTime > Ref.Skill_Frenzy.Cooldown * 25 && Ref.Skill_Frenzy.Level > 0) { trace('Frenzy!'); soun(17); _global.Frenzy = 5; _global.FrenzyTime = 125; this.FrenzyTime = 0; } } C1 = this.ActiveSkill == 'Teleport' && this.UseActiveSkill == true; C2 = TP; if (C1 || C2) { if (this.TeleportTime > Ref.Skill_Teleport.Cooldown * 25 && Ref.Skill_Teleport.Level > 0) { trace('Teleport!'); homing(this, {'_x': _xmouse, '_y': _ymouse}, 250); Teleport(this, _xmouse, _ymouse); this.TeleportTime = 0; } } C1 = this.ActiveSkill == 'Shockwave' && this.UseActiveSkill == true; C2 = EP; if (C1 || C2) { if (this.ShockwaveTime > Skill_Shockwave.Cooldown * 25 && Ref.Skill_Shockwave.Level > 0) { trace('Shockwave!'); Shockwave(this); this.ShockwaveTime = 0; } } this.UseActiveSkill = false; } this.Xvel *= 0.82 - Math.abs(this.Yvel * 0.006); this.Yvel *= 0.82 - Math.abs(this.Xvel * 0.006); this._y += this.Yvel; this._x += this.Xvel; if (this._x < 5) { this._x = 5; } if (this._x > 595) { this._x = 595; } if (this._y < 5) { this._y = 5; } if (this._y > 467) { this._y = 467; } } this.TempHP = this.Life; if (this.Life < 1) { ++_global.DeathTime; } else { _global.DeathTime = 0; this._alpha = 100; } if (_global.DeathTime > 20) { _global.HeroDead = true; this.removeMovieClip(); } else { _global.HeroDead = false; } if (_global.DeathTime == 3) { soun(25); } if (_global.DeathTime > 0 && _global.DeathTime % 2 == 0) { this._alpha -= 10; soun(14 + Math.floor(RN(2))); X = 1 + RN(20); GraphicEffect('MissileExplode', {'A': grow}, {'Life': 7, 'Grow': 20, '_x': this._x + RN(40, -20), '_y': this._y + RN(40, -20), '_xscale': X, '_yscale': X, '_rotation': RN(360)}); } }; } function Laser(Self, X, Y) { soun(18); soun(21); Damage = _global.HeroDamage * 5 + 100; GraphicEffect('LaserGFX', {'A': fadeOut, 'B': shrink}, {'_x': X, '_y': Y, '_rotation': Self._rotation}); var v4 = this.attachMovie('LaserHit', 'Hit', objDepth()); v4._x = X; v4._y = Y; v4._rotation = Self._rotation; l = 0; while (l < 120) { S = getShell(l); E = S['Enemy' + l]; if (v4.hitTest(E._x, E._y, true)) { E.Life -= Damage; } ++l; } l = 0; while (l < 35) { B = EnemyShell.BaseShell['Base' + l]; CX = B._x - 5; CY = B._y + 5; if (v4.hitTest(CX, CY, true)) { B.Life -= Damage / 4; } CX = B._x + 5; CY = B._y + 5; if (v4.hitTest(CX, CY, true)) { B.Life -= Damage / 4; } CX = B._x + 5; CY = B._y - 5; if (v4.hitTest(CX, CY, true)) { B.Life -= Damage / 4; } CX = B._x - 5; CY = B._y - 5; if (v4.hitTest(CX, CY, true)) { B.Life -= Damage / 4; } ++l; } v4.removeMovieClip(); if (Skill_Shards.Level > 0) { Tracer = new Object(); Tracer._x = X; Tracer._y = Y; Tracer._rotation = Self._rotation; Tracer.Speed = 500; l = 0; while (l < 15) { if (Tracer._x < 5) { break; } else { if (Tracer._x > 595) { break; } else { if (Tracer._y < 5) { break; } else { if (Tracer._y > 470) { break; } else { run(Tracer); } } } } ++l; } X2 = Tracer._x; Y2 = Tracer._y; D = getDist({'_x': X, '_y': Y}, {'_x': X2, '_y': Y2}); Shards = 30 + Ref.Skill_Shards.Level * 10; Tracer._x = X; Tracer._y = Y; Tracer.Speed = (D / Shards) * 10; SideRot = Self._rotation + 135; l = 0; while (l < Shards) { run(Tracer); fireGun('Shards', Tracer._x, Tracer._y, SideRot + RN(6, -3)); SideRot += 90 * (-1 * (l % 2)); ++l; } } } function Teleport(Self, X, Y) { soun(19); GraphicEffect('TeleStart', {'A': shrink}, {'Life': 9, '_x': Self._x, '_y': Self._y}); D = getDist(Self, {'_x': X, '_y': Y}); Max = (15 + Ref.Skill_Teleport.Level * 4) * 10; if (D > Max) { D = Max; } R = rotateTo(Self, {'_x': X, '_y': Y}); GraphicEffect('TeleLine', {}, {'_x': Self._x, '_y': Self._y, '_xscale': 100 / (D / 5), '_yscale': D, '_rotation': R}); TempR = Self._rotation; TempS = Self.Speed; Self._rotation = R; Self.Speed = D * 10; run(Self); Self._rotation = TempR; Self.Speed = TempS; GraphicEffect('TeleExit', {'A': spin}, {'Life': 11, '_x': Self._x, '_y': Self._y}); if (Skill_Backfire.Level > 0) { fireGun('Backfire', Self._x, Self._y, Self._rotation + 180); } } function Shockwave(Self) { fireGun('Shockwave', Self._x, Self._y, Self._rotation); GraphicEffect('Shockwave', {'A': grow}, {'Life': 16, 'Grow': 50, '_x': Self._x, '_y': Self._y, '_xscale': 50, '_yscale': 50}); if (Skill_Shockwave.Level > 3) { GraphicEffect('Shockwave', {'A': grow}, {'Life': 16, 'Grow': 40, '_x': Self._x, '_y': Self._y, '_xscale': 40, '_yscale': 40, '_rotation': 10}); } if (Skill_Knockback.Level > 0) { sw = 0; while (sw < 120) { S = getShell(sw); E = S['Enemy' + sw]; D = getDist(Self, E); if (D < Skill_Knockback.Level * 5 + 50) { E.Life -= Skill_Knockback.Level * 5; X1 = E._x; Y1 = E._y; TempS = E.Speed; TempR = E._rotation; R = rotateTo(Self, E); E.Speed = (2 + Skill_Knockback.Level) * 10 * 10 + RN(60, -30); E._rotation = R; run(E); E.Speed = TempS; E._rotation = RN(360); X2 = E._x; Y2 = E._y; R = rotateTo({'_x': X1, '_y': Y1}, {'_x': X2, '_y': Y2}); D = getDist({'_x': X1, '_y': Y1}, {'_x': X2, '_y': Y2}); GraphicEffect('KnockbackLine', {}, {'Life': 5, '_x': X1, '_y': Y1, '_xscale': 100 / (D / 5), '_yscale': D, '_rotation': R}); } ++sw; } } } function Siege(Self) { fireGun('Siege', Self._x, Self._y, Self._rotation); GraphicEffect('Shockwave', {'A': grow}, {'Life': 12, 'Grow': 35, '_x': Self._x, '_y': Self._y, '_xscale': 30, '_yscale': 30}); } function HomingMissiles(Self, Target1, Target2) { soun(16); hm = 1; while (hm <= 2) { var v3 = this.attachMovie('Missile', 'Missile' + _global.cDepth, objDepth()); v3._x = Self._x; v3._y = Self._y; v3._rotation = Self._rotation - 20 + (hm - 1) * 40; v3.Speed = 20; v3.Life = 1; v3.Time = 0; if (hm == 1) { v3.Target = Target1; } if (hm == 2) { v3.Target = Target2; } v3.onEnterFrame = function () { if (_global.Paused != true) { ++this.Time; if (this.Target._x == undefined) { this.Target = randomEnemy(); } if (this.Time == 250) { this.Target = randomEnemy(); } if (this.Speed < 50) { this.Speed += 0.5; } getXYvel(this); if (getDist(this, this.Target) < size(this.Target) + 5 || this._parent.EnemyShell.hitTest(this._x + this.Xvel, this._y + this.Yvel, true) || this.Target == Player && RN(1) < 0.08 || _global.HeroDead == true) { this.Life = 0; fireGun('MissileBurst', this._x, this._y, this._rotation); GraphicEffect('MissileExplode', {'A': grow}, {'Life': 7, 'Grow': 21, '_x': this._x, '_y': this._y, '_xscale': 5, '_yscale': 5}); } run(this); homing(this, this.Target, this.Speed / 12); if (this.Life < 1) { this.removeMovieClip(); } } }; ++hm; } } function getShell(Slot) { ShellNumber = Math.floor(Slot / 15) + 1; if (ShellNumber == 1) { Shell = EnemyShell.Shell1.Shell1.Shell1; return Shell; } if (ShellNumber == 2) { Shell = EnemyShell.Shell1.Shell1.Shell2; return Shell; } if (ShellNumber == 3) { Shell = EnemyShell.Shell1.Shell2.Shell1; return Shell; } if (ShellNumber == 4) { Shell = EnemyShell.Shell1.Shell2.Shell2; return Shell; } if (ShellNumber == 5) { Shell = EnemyShell.Shell2.Shell1.Shell1; return Shell; } if (ShellNumber == 6) { Shell = EnemyShell.Shell2.Shell1.Shell2; return Shell; } if (ShellNumber == 7) { Shell = EnemyShell.Shell2.Shell2.Shell1; return Shell; } if (ShellNumber == 8) { Shell = EnemyShell.Shell2.Shell2.Shell2; } return Shell; } function objDepth() { ++_global.cDepth; return _global.cDepth - 1; } function initiateCreature(Self, Name) { _global.Creatures += 1; Self.Name = Name; Self.Life = this['D_' + Name].Life + Math.floor(_global.Level * 1.5); Self.Damage = this['D_' + Name].Damage + Math.floor(_global.Level / 10); Self.Speed = this['D_' + Name].Speed + Math.floor(_global.Level / 3); Self.Score = Math.floor(this['D_' + Name].Score * (1 + _global.Level / 10)); Self.XP = Math.ceil(Math.sqrt(Self.Score) / 5); Self.DeathGFX = this['D_' + Name].DeathGFX; Self.DeathSound = this['D_' + Name].DeathSound; Self.Xvel = 0; Self.Yvel = 0; Self.Time = 0; } function generalAI(Self, Bounds) { ++Self.Time; if (Bounds == undefined) { Bounds = true; } if (Self.Life == undefined || Self.Life == NaN || Self.Life > 1000000000 || Self.Slot > 120 || Self.Slot < 0) { Self.Life = 0; } if (Self.Life < 1) { die(Self); } if (Bounds) { if (Self._x < 5) { Self._x = 5; } if (Self._x > 595) { Self._x = 595; } if (Self._y < 5) { Self._y = 5; } if (Self._y > 470) { Self._y = 470; } } } function spawnCritter(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('Critter', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); initiateCreature(v4, 'Critter'); v4.Life = 1; v4.Speed += _global.Level / 4; v4.onEnterFrame = function () { if (!_global.Paused) { if (this.Time % 2 == 0) { homing(this, _root.Player, 7); } this.Dist = getDist(this, _root.Player); if (this.Dist < 20 + _global.Level * 3) { run(this); homing(this, _root.Player, 5); } if (this.Dist < 7) { DamagePlayer(this.Damage, 'Critter'); this.Life = 0; } run(this); generalAI(this); } }; } } function spawnSeeker(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('Seeker', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = rotateTo(v4, Player) + RN(40, -20); initiateCreature(v4, 'Seeker'); v4.onEnterFrame = function () { if (!_global.Paused) { X = 25 - _global.Level / 2; if (X < 8) { X = 8; } if (Math.floor(this.Time / X) % 3 == 0) { run(this); this.Trail._visible = true; } else { homing(this, _root.Player, 7); this.Trail._visible = false; } this.Dist = getDist(this, _root.Player); if (this.Dist < 8) { DamagePlayer(this.Damage, 'Seeker'); this.Life = 0; } if (bounds(this, 12)) { homing(this, _root.Player, 20); } generalAI(this); } }; } } function spawnPatrolBot(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('PatrolBot', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); initiateCreature(v4, 'PatrolBot'); v4.BoundsTime = 0; v4.onEnterFrame = function () { if (!_global.Paused) { run(this); --this.BoundsTime; if (bounds(this, 10) && this.BoundsTime < 1 && this.Dist > 35) { this._rotation += 180; homing(this, _root.Player, 25); run(this); this.BoundsTime = 10; } this.Dist = getDist(this, _root.Player); if (this.Dist < 65) { homing(this, _root.Player, 5 + Math.floor(_global.Level / 6)); this.SeekGFX._visible = true; run(this); if (this.Active != true) { this.Active = true; soun(13); } } else { this.SeekGFX._visible = false; if (this.Active != false) { this.Active = false; } } if (this.Dist < 8) { DamagePlayer(this.Damage, 'PatrolBot'); this.Life = 0; } if (bounds(this, 12)) { homing(this, _root.Player, 20); } generalAI(this); } }; } } function spawnBurrowDrone(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('BurrowDrone', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); initiateCreature(v4, 'BurrowDrone'); v4.Time += Math.round(RN(25)); v4.DestX = RN(540, 30); v4.DestY = RN(400, 30); v4.onEnterFrame = function () { if (!_global.Paused) { run(this); this._rotation += Math.cos(this.Time / 5) * 15; this.Dist = getDist(this, {'_x': this.DestX, '_y': this.DestY}); this.Dist2 = getDist(this, _root.Player); homing(this, {'_x': this.DestX, '_y': this.DestY}, 10); if (this.Dist < 20 && this.Speed > 0) { --this.Speed; } if (this.Speed == 1) { var v4 = this.attachMovie('BurrowDroneBurrow', 'Burrow', _global.cDepth); ++_global.cDepth; v4.onEnterFrame = function () { this._rotation += 10; }; } if (this.Speed < 1 && this.Time % 25 == 0) { spawnCritter(this._x, this._y); this.Life -= 4; } if (this.Dist2 < 8) { DamagePlayer(this.Damage, 'BurrowDrone'); this.Life = 0; } if (this.Dist2 < 50 && this.ActiveTime == undefined) { soun(35); this.ActiveTime = 0; } if (this.ActiveTime != undefined) { ++this.ActiveTime; this._xscale += 6; this._yscale += 5; } if (this.ActiveTime == 5 || this.Life < 1) { soun(36); GraphicEffect('BurrowExplode', {'A': spin, 'B': grow}, {'_x': this._x, '_y': this._y, '_xscale': 20, '_yscale': 20, 'Grow': 21, 'Spin': 17, 'Life': 9}); if (this.Dist2 < 50) { DamagePlayer(5, 'BurrowDrone'); } X = this._x; Y = this._y; Z = 4 + _global.Level / 3; i = 0; while (i < Z) { spawnCritter(X, Y); if (i > 14) { break; } ++i; } this.Life = 0; } generalAI(this); } }; } } function spawnGuardBot(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('GuardBot', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); initiateCreature(v4, 'GuardBot'); v4.Time += Math.round(RN(25)); v4.Base = randomBase(); v4.UniqueAngle = RN(60, -30); v4.TrueSpeed = v4.Speed; v4.Life += _global.Level; v4.onEnterFrame = function () { if (!_global.Paused) { this.Dist = getDist(this, {'_x': this.Base._x, '_y': this.Base._y}); this.Dist3 = getDist(this, _root.Player); if (this.Base._x == undefined || this.Base == _root.Player && this.Time % 3 == 0) { this.Base = randomBase(); this.Active = false; } if (this.Time % 150 == 0 && RN(10) < 5 && this.Active == true) { this.Base = randomBase(); this.Active = false; } if (this.Dist < 25 || this.Active == true) { this.Active = true; this.Speed = this.TrueSpeed / 2; if (this.Time % 75 == 0) { this.UniqueAngle = RN(70, -35); } if (this.Time % 7 == 0) { Tracer = new Object(); Tracer._x = this.Base._x; Tracer._y = this.Base._y; Tracer._rotation = rotateTo(this.Base, _root.Player) + this.UniqueAngle; Tracer.Speed = 400; run(Tracer); this.DestX = Tracer._x; this.DestY = Tracer._y; delete Tracer; } this.Dist2 = getDist(this, {'_x': this.DestX, '_y': this.DestY}); if (this.Dist2 > this.Speed / 10) { this._rotation = rotateTo(this, {'_x': this.DestX, '_y': this.DestY}); run(this); } this._rotation = rotateTo(this, _root.Player); } else { if (this.Active != true) { this.Speed = this.TrueSpeed; run(this); homing(this, {'_x': this.Base._x, '_y': this.Base._y}, 10); } } if (this.Dist3 < 8) { DamagePlayer(this.Damage, 'GuardBot'); this.Life = 0; } generalAI(this); } }; } } function spawnEnforcer(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('Enforcer', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = 90 * Math.round(RN(4)); initiateCreature(v4, 'Enforcer'); v4.BoundScale = RN(100); if (RN(10) < 5) { v4.TurnType = 1; } else { v4.TurnType = -1; } v4.onEnterFrame = function () { if (!_global.Paused) { getXYvel(this); this._x += this.Xvel; this._y += this.Yvel; this.Dist = getDist(this, _root.Player); if (this.Dist >= 85 + _global.Level * 2) { this._rotation = Math.round(this._rotation / 90) * 90; if (this.Xvel > 0 && this._x > 580 - this.BoundScale) { this._rotation += 90 * this.TurnType; } if (this.Xvel < 0 && this._x < 20 + this.BoundScale) { this._rotation += 90 * this.TurnType; } if (this.Yvel > 0 && this._y > 455 - this.BoundScale) { this._rotation += 90 * this.TurnType; } if (this.Yvel < 0 && this._y < 20 + this.BoundScale) { this._rotation += 90 * this.TurnType; } } if (this.Dist < 80 + _global.Level * 2) { homing(this, _root.Player, 17); } if (this.Dist < 8) { DamagePlayer(this.Damage, 'Enforcer'); this.Life = 0; } generalAI(this); } }; } } function spawnStaticFieldBot(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('StaticFieldBot', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); initiateCreature(v4, 'StaticFieldBot'); v4.DestX = RN(540, 30); v4.DestY = RN(400, 30); v4.Life += _global.Level; v4.onEnterFrame = function () { if (!_global.Paused) { if (this.Speed > 0) { run(this); this.Dist = getDist(this, {'_x': this.DestX, '_y': this.DestY}); } if (this.Dist < 20 && this.Speed > 0) { --this.Speed; } else { homing(this, {'_x': this.DestX, '_y': this.DestY}, 10); } if (this.Speed == 1) { this.Speed = 0; var v5 = this.attachMovie('StaticActive', 'Static', 1); v5.onEnterFrame = function () { this._rotation += 3; }; var v4 = this._parent.attachMovie('TractorBeam', 'Beam' + this.Slot, _global.cDepth); ++_global.cDepth; v4.Link = this; v4._x = this._x; v4._y = this._y; v4._visible = false; v4.Working = false; v4.onEnterFrame = function () { this.Dist = getDist(this, _root.Player); this._x = this.Link._x; this._y = this.Link._y; if (this.Dist < 95 + _global.Level) { this.play(); this._rotation = rotateTo(this, _root.Player); if (this.Link.Time % 20 == 0) { DamagePlayer(1, 'StaticFieldBot'); } this._yscale = this.Dist; this._visible = true; if (this.Working != true && _global.Static < 5) { _global.Static += 1; this.Working = true; } } else { this.stop(); this._visible = false; if (this.Working != false) { _global.Static -= 1; this.Working = false; } } if (this.Link._x == undefined || this.Link.Life < 1) { if (this.Working != false) { _global.Static -= 1; this.Working = false; } this.removeMovieClip(); } }; } if (this.Speed < 1) { this._rotation += 11; } this.Dist2 = getDist(this, _root.Player); if (this.Dist2 < 8) { DamagePlayer(this.Damage, 'StaticFieldBot'); this.Life = 0; } generalAI(this); } }; } } function spawnSplitter(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('Splitter', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); v4.RealRot = v4._rotation; v4.FakeRot = 0; initiateCreature(v4, 'Splitter'); v4.onEnterFrame = function () { if (!_global.Paused) { this._rotation = this.RealRot; if (this.Time % 2 == 0) { homing(this, _root.Player, 3 + Math.floor(_global.Level / 4)); } if (bounds(this, 15)) { homing(this, _root.Player, 10); } run(this); this.RealRot = this._rotation; this.FakeRot += 9; this._rotation = this.FakeRot; this.Dist = getDist(this, _root.Player); if (this.Dist < 10) { DamagePlayer(this.Damage, 'Splitter'); this.Life = 0; } if (this.Life < 1) { spawnNode(this._x, this._y, this.FakeRot + 45); spawnNode(this._x, this._y, this.FakeRot + 45 + 90); spawnNode(this._x, this._y, this.FakeRot + 45 + 180); spawnNode(this._x, this._y, this.FakeRot + 45 + 270); } generalAI(this); } }; } } function spawnNode(X, Y, Rot) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('Node', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = Rot; initiateCreature(v4, 'Node'); v4.Life = 1; v4.onEnterFrame = function () { if (!_global.Paused) { if (this.Time % 3 == 0) { homing(this, _root.Player, 9 + Math.floor(_global.Level / 3)); } this.Dist = getDist(this, _root.Player); if (this.Dist < 8 && this.Time > 30) { DamagePlayer(this.Damage, 'Splitter'); this.Life = 0; } if (bounds(this, 9)) { homing(this, _root.Player, 8); } run(this); generalAI(this); } }; } } function spawnShuriken(X, Y) { if (_global.SlotSuggestion != undefined) { Slot = _global.SlotSuggestion; _global.SlotSuggestion = undefined; } else { Slot = chooseSlot(enemyArray); } if (Slot >= 0) { enemyArray[Slot] = 1; Shell = getShell(Slot); var v4 = Shell.attachMovie('Shuriken', 'Enemy' + Slot, objDepth(), {'_x': X, '_y': Y}); v4.Slot = Slot; v4._rotation = RN(360); v4.Speed = 80; run(v4); v4._rotation -= 90; v4.RealRot = v4._rotation; v4.FakeRot = 0; v4.Turn = -20; v4.Rate = RN(35) / 10000 + 0.00085; initiateCreature(v4, 'Shuriken'); v4.onEnterFrame = function () { if (!_global.Paused) { if (this.Time % 2 == 0) { GraphicEffect('ShurikenTrail', {'A': shrink}, {'Shrink': 5, '_x': this._x, '_y': this._y, '_rotation': this._rotation}); } this._rotation = this.RealRot; this._rotation += this.Turn; run(this); this.Speed *= 1 + this.Rate; this.Turn *= 1 - this.Rate; this.RealRot = this._rotation; this.FakeRot -= this.Speed / 10 + 15; this._rotation = this.FakeRot; this.Dist = getDist(this, _root.Player); if (this.Dist < 15) { DamagePlayer(this.Damage, 'Shuriken'); this.Life = 0; } if (this.Time > 415) { this._xscale -= 10; this._yscale -= 10; } if (this.Time > 425) { this.Life = 0; _global.Score -= this.Score; _global.XP -= this.XP; } generalAI(this, false); } }; } } function initiateBase(Self, Name) { _global.Bases += 1; Self.Name = Name; Name += 'Base'; Self.Condition._rotation += 90 * Math.floor(RN(5)); Self.Life = this['D_' + Name].Life + _global.Level * 35; if (Self.Life > _global.Level * 50 + 25) { Self.Life = _global.Level * 50 + 25; } Self.MaxLife = Self.Life; Self.Score = Math.floor(this['D_' + Name].Score * (1 + _global.Level / 10)); Self.DeathGFX = this['D_' + Name].DeathGFX; Self.Time = 100; } function generalBaseAI(Self) { ++Self.Time; if (Self.Time % Self.Rate == 0) { Self.play(); } if (Self.Life < Self.MaxLife && Self.Time % 5 == 0) { Self.Condition.gotoAndStop(Math.ceil(10 - 10 * (Self.Life / Self.MaxLife))); } if (Self.Life < 1) { baseDie(Self); } } function spawnCritterBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('CritterBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'Critter'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnCritter(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnSeekerBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('SeekerBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'Seeker'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnSeeker(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnPatrolBotBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('PatrolBotBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'PatrolBot'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnPatrolBot(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnBurrowDroneBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('BurrowDroneBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'BurrowDrone'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnBurrowDrone(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnGuardBotBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('GuardBotBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'GuardBot'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnGuardBot(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnEnforcerBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('EnforcerBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'Enforcer'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnEnforcer(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnStaticFieldBotBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('StaticFieldBotBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'StaticFieldBot'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnStaticFieldBot(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnSplitterBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('SplitterBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'Splitter'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnSplitter(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function spawnCannonBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v4 = EnemyShell.BaseShell.attachMovie('CannonBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v4.Slot = Slot; if (Rate == undefined) { v4.Rate = 25; } else { v4.Rate = Rate; } initiateBase(v4, 'Cannon'); v4.Time += Math.floor(RN(50)); v4.onEnterFrame = function () { if (!_global.Paused) { this._rotation = this.Rot; homing(this, _root.Player, 10); this.Rot = this._rotation; this._rotation = 0; this.Cannon._rotation = this.Rot; if (this.Time < 100) { this.Spawn = false; } if (this.Spawn == true) { this.Cannon.play(); soun(5); var v4 = this._parent.attachMovie('CannonShot', 'Shot' + _global.cDepth, objDepth()); v4._x = this._x; v4._y = this._y; v4._rotation = this.Cannon._rotation; v4.Speed = 90; v4.onEnterFrame = function () { if (_global.Paused != true) { run(this); if (_root.Player.hitTest(this._x, this._y, true)) { GraphicEffect('CannonHit', {'A': grow, 'B': spin}, {'_x': this._x, '_y': this._y}); DamagePlayer(3, 'Cannon'); this.removeMovieClip(); } if (bounds(this)) { this.removeMovieClip(); } } }; this.Spawn = false; } generalBaseAI(this); } }; } } function spawnShurikenBase(X, Y, Rate) { Slot = chooseSlot(baseArray); if (Slot >= 0) { baseArray[Slot] = 1; var v3 = EnemyShell.BaseShell.attachMovie('ShurikenBase', 'Base' + Slot, objDepth(), {'_x': X * 20 + 20, '_y': Y * 20 + 25}); v3.Slot = Slot; if (Rate == undefined) { v3.Rate = 25; } else { v3.Rate = Rate; } initiateBase(v3, 'Shuriken'); v3.onEnterFrame = function () { if (!_global.Paused) { if (this.Spawn == true) { spawnShuriken(this._x, this._y); this.Spawn = false; } generalBaseAI(this); } }; } } function die(Self) { this[Self.Name + 'Kills'] += 1; if (Self.DeathSound != undefined) { soun(Self.DeathSound); } --_global.Creatures; _global.SlotSuggestion = Self.Slot; _global.XP += Self.XP; _global.Score += Self.Score; enemyArray[Self.Slot] = 0; if (Self.DeathGFX != undefined) { GraphicEffect(Self.DeathGFX, {'A': grow, 'B': spin}, {'_x': Self._x, '_y': Self._y}); } Self.removeMovieClip(); } function baseDie(Self) { this[Self.Name + 'Bases'] += 1; soun(7); Chance = 0.04; Percent = Math.round((Player.Life / _global.HeroMaxHP) * 100); if (Percent > 100) { Percent = 100; } Chance += 0.001 * (100 - Percent); if (RN(1) < Chance) { spawnHeart(Self._x, Self._y, 5); } else { Chance = 0.0004 * Percent + 0.02; if (RN(1) < Chance) { spawnSkillPoint(Self._x, Self._y); } } if (Skill_Siege.Level > 0) { Siege(Self); } --_global.Bases; _global.XP += Math.ceil(Math.sqrt(Self.Score)); _global.Score += Self.Score; baseArray[Self.Slot] = 0; if (Self.DeathGFX != undefined) { GraphicEffect(Self.DeathGFX, {'A': grow, 'B': spin}, {'_x': Self._x, '_y': Self._y}); } GraphicEffect('Shockwave', {'A': grow}, {'Life': 10, 'Grow': 30, '_x': Self._x, '_y': Self._y}); Self.removeMovieClip(); } function spawnHeart(X, Y, Life) { var v3 = this.attachMovie('Heart', 'Heart' + _global.cDepth, objDepth()); v3._x = X; v3._y = Y; v3.Life = Life; v3.Time = 0; v3.onEnterFrame = function () { if (_global.Paused != true) { ++this.Time; if (this.hitTest(this._parent.Player)) { this._parent.Player.Life += this.Life; _global.HeartsCollected += 1; this.Collected = true; soun(9); GraphicEffect('Heal', {'A': grow, 'B': fadeOut}, {'FadeOut': 4, '_x': X, '_y': Y}); } if (this.Time > 325) { this._alpha -= 1; } if (this._alpha < 0 || this.Collected == true || _global.HeroDead) { this.removeMovieClip(); } } }; } function spawnSkillPoint(X, Y) { var v3 = this.attachMovie('SkillPoint', 'SkillPoint' + _global.cDepth, objDepth()); v3._x = X; v3._y = Y; v3.Time = 0; v3.onEnterFrame = function () { if (_global.Paused != true) { ++this.Time; if (this.hitTest(this._parent.Player)) { _global.SkillPoints += 1; this.Collected = true; soun(24); GraphicEffect('GainSkillPoint', {'A': grow, 'B': fadeOut}, {'Life': 25, 'FadeOut': 4, '_x': X, '_y': Y}); } if (this.Time > 325) { this._alpha -= 1; } if (this._alpha < 0 || this.Collected == true || _global.HeroDead) { this.removeMovieClip(); } } }; } function ActiveSkillIcon(Self) { if (Self.Loaded != true) { var v3 = Self.attachMovie('Cooldown', 'CD', 1); Self.Loaded = true; } X = Math.ceil(Player[Self.Skill + 'Time'] * 100 / 25 * this['Skill_' + Self.Skill].Cooldown); if (X > 99) { X = 101; } Self.CD.gotoAndStop(X); Self.Level = this['Skill_' + Self.Skill].Level; if (Self.Level > 0) { Self._visible = true; } else { Self._visible = false; } if (Self.Clicked == true) { ActiveSkill_mc._x = Self._x; ActiveSkill_mc._y = Self._y; Player.ActiveSkill = Self.Skill; Self.Clicked = false; } } function checkEnemyHit(Self) { min = 0; max = 120; if (EnemyShell.Shell1.hitTest(Self._x, Self._y, true)) { if (EnemyShell.Shell1.Shell1.hitTest(Self._x, Self._y, true)) { if (EnemyShell.Shell1.Shell1.Shell1.hitTest(Self._x, Self._y, true)) { min = 0; max = 15; } else { if (EnemyShell.Shell1.Shell1.Shell2.hitTest(Self._x, Self._y, true)) { min = 15; max = 30; } } } else { if (EnemyShell.Shell1.Shell2.hitTest(Self._x, Self._y, true)) { if (EnemyShell.Shell1.Shell2.Shell1.hitTest(Self._x, Self._y, true)) { min = 30; max = 45; } else { if (EnemyShell.Shell1.Shell2.Shell2.hitTest(Self._x, Self._y, true)) { min = 45; max = 60; } } } } } else { if (EnemyShell.Shell2.hitTest(Self._x, Self._y, true)) { if (EnemyShell.Shell2.Shell1.hitTest(Self._x, Self._y, true)) { if (EnemyShell.Shell2.Shell1.Shell1.hitTest(Self._x, Self._y, true)) { min = 60; max = 75; } else { if (EnemyShell.Shell2.Shell1.Shell2.hitTest(Self._x, Self._y, true)) { min = 75; max = 90; } } } else { if (EnemyShell.Shell2.Shell2.hitTest(Self._x, Self._y, true)) { if (EnemyShell.Shell2.Shell2.Shell1.hitTest(Self._x, Self._y, true)) { min = 90; max = 105; } else { if (EnemyShell.Shell2.Shell2.Shell2.hitTest(Self._x, Self._y, true)) { min = 105; max = 120; } } } } } } if (min != 0 || max != 120) { ceh = min; while (ceh < max) { S = getShell(ceh); E = S['Enemy' + ceh]; D = getDist(Self, E); if (D < size(E) && E.Life > 0 && E != Self.Exception) { E.Life -= Self.Damage; if (RN(100) < Skill_Criticals.Level * 3) { GraphicEffect('Crit', {}, {'Life': 9, '_x': E._x, '_y': E._y}); E.Life -= 1000; } Self.Life = 0; if (RN(20) < Skill_Pierce.Level) { GraphicEffect('Pierce', {'A': shrink}, {'Life': 9, '_x': E._x, '_y': E._y, '_rotation': Self._rotation}); Self.Exception = E; Self.Life = 1; } if (RN(15) < Skill_SplitterShells.Level && Self.Item == 'MainCannon') { GraphicEffect('Split', {'A': spin}, {'Life': 7, '_x': E._x, '_y': E._y, '_rotation': Self._rotation}); fireGun('SplitterShell', E._x, E._y, Self._rotation - 25, E); fireGun('SplitterShell', E._x, E._y, Self._rotation + 25, E); } break; } ++ceh; } } else { if (Self.Life > 0) { ceh = 0; while (ceh < 35) { B = EnemyShell.BaseShell['Base' + ceh]; D = getDist(Self, B); if (D < size(B) && B.Life > 0) { B.Life -= Self.Damage * (1 + Skill_Siege.Level / 20); Self.Life = 0; break; } ++ceh; } } } } function ClearLevelGrid() { i = 0; while (i < 30) { ii = 0; while (ii < 22) { LevelGrid[i][ii] = 0; ++ii; } ++i; } } function openCharacterSheet() { i; if (_global.CharacterSheet != true) { _global.Paused = true; _global.CharacterSheet = true; } else { if (_global.SkillTree != true) { _global.Paused = false; } _global.CharacterSheet = false; } } function openSkillTree() { if (_global.SkillTree != true) { _global.Paused = true; _global.SkillTree = true; } else { _global.Paused = false; _global.SkillTree = false; } } function DamagePlayer(Amount, Name) { soun(28); Temp = Player.Life; if (Player.Life - Amount > 0) { this[Name + 'Damage'] += Amount; } else { if (Player.Life > 0) { this[Name + 'Damage'] += Player.Life; } } Player.Life -= Amount; if (Player.Life < 1 && Temp > 0) { _global.KillingBlow = Name; } } function spawnISOPlayer(X, Y) { var v2 = this.attachMovie('Player', 'Player', 50000000, {'_x': X, '_y': Y}); v2.Direction = 'Down'; v2.Xvel = 0; v2.Yvel = 0; v2.Life = 100; v2.Speed = 20; v2.onEnterFrame = function () { if (Key.isDown(65)) { this.Direction = 'Left'; this.Xvel -= this.Speed / 10; } if (Key.isDown(87)) { this.Direction = 'Up'; this.Yvel -= this.Speed / 10; } if (Key.isDown(68)) { this.Direction = 'Right'; this.Xvel += this.Speed / 10; } if (Key.isDown(83)) { this.Direction = 'Down'; this.Yvel += this.Speed / 10; } this.Head.gotoAndStop(this.Direction); this.Xvel *= 0.8; this.Yvel *= 0.8; this._y += this.Yvel; this._x += this.Xvel; }; } __com_mochibot__('8b50ad59', this, 10301, true); stop(); _global.cDepth = 0; _global.ShotDelay = 0; _global.Score = 0; _global.HeroMaxHP = 50; _global.HeroHP = 50; _global.HeroSpeed = 15; _global.HeroDamage = 5; _global.HeroDead = false; _global.XP = 0; _global.NextLevelXP = 100; _global.SlotSuggestion = undefined; _global.Level = 1; _global.Paused = false; _global.Frenzy = 0; _global.FrenzyTime = 0; _global.Creatures = 0; _global.Bases = 0; _global.Level = 0; _global.HeroLevel = 1; _global.Static = 0; _global.Frames = 0; _global.HeartsCollected = 0; _global.LeaderBoard = false; _global.ShowingBoard = false; _global.KillingBlow = 'Drone'; FrenzyDoubleCheck = 0; spawnPlayer(300, 120); enemyArray = new Array(); i = 0; while (i < 120) { enemyArray[i] = 0; ++i; } baseArray = new Array(); i = 0; while (i < 35) { baseArray[i] = 0; ++i; } LevelGrid = new Array(); i = 0; while (i < 30) { LevelGrid[i] = new Array(); ii = 0; while (ii < 22) { LevelGrid[i][ii] = 0; ++ii; } ++i; } CreateController(); this.onEnterFrame = function () { if (_global.Frenzy > 0 && _global.Paused != true) { ++FrenzyDoubleCheck; } else { FrenzyDoubleCheck = 0; } if (FrenzyDoubleCheck > 1000 && _global.Paused != true) { Skill_UnbreakableWill.Level = 0; Player.Life = 0; _global.Frenzy = 0; _global.HeroDamge = 0; _global.HeroDead = true; } if (Controller._x == undefined) { CreateController(); } manageTip(); manageSound(); this.Score.text = 'Score: ' + _global.Score; this.Stage_txt.text = 'Stage: ' + _global.Level; if (_global.Level < 1) { this.Stage_txt.text = ''; } if (Key.isDown(75) || Key.isDown(13) || Key.isDown(27)) { if (Kdown != true) { openSkillTree(); openCharacterSheet(); } Kdown = true; } else { Kdown = false; } if (Key.isDown(67)) { if (Cdown != true) { openCharacterSheet(); } Cdown = true; } else { Cdown = false; } if (!_global.Paused) { if (_global.XP >= _global.NextLevelXP) { LevelUp(); } if (_global.Creatures < 1 && _global.Bases < 1 && _global.PortalOut != true && _global.HeroDead != true) { CreatePortal(); } } if (Player.ActiveSkill == undefined) { if (Skill_Laser.Level > 0) { Player.ActiveSkill = 'Laser'; } else { if (Skill_Frenzy.Level > 0) { Player.ActiveSkill = 'Frenzy'; } else { if (Skill_Teleport.Level > 0) { Player.ActiveSkill = 'Teleport'; } else { if (Skill_Shockwave.Level > 0) { Player.ActiveSkill = 'Shockwave'; } } } } } if (Key.isDown(49) && Skill_Laser.Level > 0) { Player.ActiveSkill = 'Laser'; } if (Key.isDown(50) && Skill_Frenzy.Level > 0) { Player.ActiveSkill = 'Frenzy'; } if (Key.isDown(51) && Skill_Teleport.Level > 0) { Player.ActiveSkill = 'Teleport'; } if (Key.isDown(52) && Skill_Shockwave.Level > 0) { Player.ActiveSkill = 'Shockwave'; } }; onMouseDown = function () { _global.MouseIsDown = true; }; onMouseUp = function () { _global.MouseIsDown = false; _global.ShotDelay = 0; }; } frame 6 { function splitShell(Shell) { var v4 = Shell.attachMovie('Shell', 'Shell1', _global.cDepth); ++_global.cDepth; var v3 = Shell.attachMovie('Shell', 'Shell2', _global.cDepth); ++_global.cDepth; } EnemyShell.attachMovie('Shell', 'BaseShell', _global.cDepth); ++_global.cDepth; splitShell(EnemyShell); splitShell(EnemyShell.Shell1); splitShell(EnemyShell.Shell2); splitShell(EnemyShell.Shell1.Shell1); splitShell(EnemyShell.Shell1.Shell2); splitShell(EnemyShell.Shell2.Shell1); splitShell(EnemyShell.Shell2.Shell2); } movieClip 443 { frame 1 { this.swapDepths(5000000000.0); this.onEnterFrame = function () { if (_global.Paused == true) { this._x = 0; this._y = 0; } else { this._x = 1000; } }; } } movieClip 447 { } // unknown tag 88 length 79 movieClip 451 { frame 1 { this.onEnterFrame = function () { X = _global.HeroHP; if (X == undefined || X < 0) { X = 0; } this.DT.text = X + '/' + _global.HeroMaxHP; }; } } movieClip 452 { instance of movieClip 447 { onClipEvent (enterFrame) { this._x = (_global.HeroHP / _global.HeroMaxHP) * 100; } } } button 455 { on (press) { Clicked = true; } } movieClip 457 { frame 1 { this.Skill = 'Laser'; } } instance LaserIcon of movieClip 457 { onClipEvent (enterFrame) { _parent.ActiveSkillIcon(this); } } movieClip 459 { frame 1 { this.Skill = 'Shockwave'; } } instance ShockwaveIcon of movieClip 459 { onClipEvent (enterFrame) { _parent.ActiveSkillIcon(this); } } movieClip 461 { frame 1 { this.Skill = 'Frenzy'; } } instance FrenzyIcon of movieClip 461 { onClipEvent (enterFrame) { _parent.ActiveSkillIcon(this); } } movieClip 463 { frame 1 { this.Skill = 'Teleport'; } } instance TeleportIcon of movieClip 463 { onClipEvent (enterFrame) { _parent.ActiveSkillIcon(this); } } movieClip 465 { frame 1 { this.onEnterFrame = function () { Skill = this._parent.Player.ActiveSkill; if (Skill != undefined) { this._x = this._parent[Skill + 'Icon']._x; this._y = this._parent[Skill + 'Icon']._y; } else { this._x = 10000; } }; } } instance of movieClip 334 TeleStart { onClipEvent (load) { this.Yval = this._y; } onClipEvent (enterFrame) { this._rotation += 1; if (_global.SkillPoints > 0) { this._y = this.Yval; } else { this._y = 1000; } } } movieClip 467 { frame 1 { this.onEnterFrame = function () { if (_global.FrenzyTime > 0) { this._x = _parent.Player._x; this._y = _parent.Player._y; this._rotation += 3; } else { this._x = 10000; } }; } } movieClip 470 { frame 1 { this.onEnterFrame = function () { this.DT.text = _global.XP + '/' + _global.NextLevelXP; }; } } movieClip 471 { instance of movieClip 447 { onClipEvent (enterFrame) { this._x = (_global.XP / _global.NextLevelXP) * 100; } } } movieClip 488 { frame 1 { stop(); this._alpha = 0; this.onEnterFrame = function () { Ref = this._parent; S1 = Ref.Skill_Laser.Level > 0; S2 = Ref.Skill_Frenzy.Level > 0; S3 = Ref.Skill_Teleport.Level > 0; S4 = Ref.Skill_Shockwave.Level > 0; if (_global.Paused == true) { this._alpha += 8; } else { if (_global.Bases > 0 || _global.Creatures > 0) { this._alpha = -10; } else { if (_global.Level < 1 && this._alpha < 100) { this._alpha += 8; } } } if (S1 || S2 || S3 || S4) { if (this.Advanced != true) { this.gotoAndStop(2); this.Advanced = true; this.Shown = false; } if (this.Shown != true) { if (this._alpha > 100) { this.Shown = true; } else { this._alpha += 8; } } } else { if (this.Advanced == true) { this.gotoAndStop(1); this.Advanced = false; this.Shown = false; } } }; } } movieClip 490 { frame 1 { this._x = 0; this.onEnterFrame = function () { if (_global.HeroDead != true && this._alpha > 0) { this._alpha -= 4; } if (_global.HeroDead == true) { this._alpha += 5; } if (this._alpha > 200) { this._parent.gotoAndStop('gameOver'); } }; } } button 492 { on (press) { openCharacterSheet(); } } // unknown tag 88 length 61 button 501 { on (press) { if (_global.SkillTree != true) { _global.Paused = false; } _global.CharacterSheet = false; } } movieClip 503 { frame 1 { X = this._x; Y = this._y; this._x = 10000; this.swapDepths(5000000002.0); this.onEnterFrame = function () { if (_global.Paused == false) { _global.CharacterSheet = false; } if (_global.CharacterSheet == true) { this._x = X; } else { this._x = 10000; } Level.text = 'Level: ' + _global.HeroLevel; XP.text = 'XP: ' + _global.XP + '/' + _global.NextLevelXP; Life.text = 'Life: ' + _global.HeroMaxHP; Speed.text = 'Speed: ' + _global.HeroSpeed; Damage.text = 'Damage: ' + _global.HeroDamage; }; } } movieClip 506 { frame 1 { this.Skill = 'Accuracy'; } } movieClip 508 { frame 1 { this.Skill = 'HomingMissiles'; } } movieClip 510 { frame 1 { this.Skill = 'Shards'; } } movieClip 512 { frame 1 { this.Skill = 'MissileBurst'; } } movieClip 514 { frame 1 { this.Skill = 'Pierce'; } } movieClip 516 { frame 1 { this.Skill = 'FireRate'; } } movieClip 518 { frame 1 { this.Skill = 'Burst'; } } movieClip 520 { frame 1 { this.Skill = 'Criticals'; } } movieClip 522 { frame 1 { this.Skill = 'Backfire'; } } movieClip 524 { frame 1 { this.Skill = 'UnbreakableWill'; } } movieClip 526 { frame 1 { this.Skill = 'SplitterShells'; } } movieClip 528 { frame 1 { this.Skill = 'Knockback'; } } movieClip 533 { frame 1 { this.Skill = 'Siege'; } } button 535 { on (press) { _global.Paused = false; _global.SkillTree = false; } } button 540 { on (press) { this.Reset(); } } movieClip 541 { frame 1 { function SkillOEF(Self) { if (_global.SkillTree == true) { if (Self.Loaded != true) { Self.Max = this._parent['Skill_' + Self.Skill].Max; Self.Parent1 = this._parent['Skill_' + Self.Skill].Parent1; Self.Parent2 = this._parent['Skill_' + Self.Skill].Parent2; var DT = this.attachMovie('Skills_DT', Self.Skill + 'DT', _global.cDepth); ++_global.cDepth; DT._x = Self._x; DT._y = Self._y + 9; DT.Link = Self; DT.onEnterFrame = function () { this.DT.text = this.Link.Level + '/' + this.Link.Max; if (!this.Link.TF1 || !this.Link.TF2) { this._visible = false; } else { this._visible = true; } }; var v4 = this.attachMovie('SkillCover', 'SC' + _global.cDepth, _global.cDepth); ++_global.cDepth; v4._x = Self._x; v4._y = Self._y; v4.Link = Self; v4.onEnterFrame = function () { if (!this.Link.TF1 || !this.Link.TF2) { this._visible = true; } else { this._visible = false; } }; Self.Loaded = true; } Self.Level = this._parent['Skill_' + Self.Skill].Level; if (_xmouse > Self._x - 10 && _xmouse < Self._x + 10 && _ymouse > Self._y - 10 && _ymouse < Self._y + 10) { this.Descrip = Self.Skill + ': ' + Self.Description; } Self.Description = this._parent['Skill_' + Self.Skill].Description; Self.TF1 = this._parent['Skill_' + Self.Parent1].Level || Self.Parent1 == undefined; Self.TF2 = this._parent['Skill_' + Self.Parent2].Level || Self.Parent2 == undefined; if (Self.Clicked == true) { if (_global.SkillPoints > 0 && Self.Level < Self.Max && Self.TF1 && Self.TF2) { --_global.SkillPoints; this._parent.soun(4); this.UndoArray[Index] = Self.Skill; ++Index; this.Undo._visible = true; ++this._parent['Skill_' + Self.Skill].Level; } Self.Clicked = false; } } } function Reset() { Index = 0; r = 0; while (r < UndoArray.length) { ++_global.SkillPoints; Skill = UndoArray[r]; this.Undo._visible = false; --this._parent['Skill_' + Skill].Level; ++r; } UndoArray = new Array(); } X = this._x; Y = this._y; this._x = 10000; this.Descrip = 'Select a skill to learn more about it.'; this.swapDepths(5000000001.0); UndoArray = new Array(); Index = 0; this.onEnterFrame = function () { if (_global.Paused == false) { _global.SkillTree = false; } if (_global.SkillTree == true) { this._x = X; } else { this._x = 10000; this.Undo._visible = false; UndoArray = new Array(); Index = 0; } Description.text = this.Descrip; SkillPoints.text = 'Skill Points: ' + _global.SkillPoints; }; } instance of movieClip 506 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 457 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 508 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 510 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 512 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 514 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 516 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 518 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 520 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 461 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 463 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 522 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 524 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 526 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 459 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 528 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } instance of movieClip 533 { onClipEvent (enterFrame) { _parent.SkillOEF(this); } } } button 543 { on (press) { openSkillTree(); } } frame 7 { stop(); _global.HeroDead = false; _global.Paused = false; _global.LeaderBoardTime = 0; _global.LeaderBoard = false; _global.ShowingBoard = false; soun(27); this.onEnterFrame = function () { manageSound(); }; Score.text = _global.Score; StageReached.text = 'You Reached Stage ' + _global.Level; X = _global.Score + _global.Level * _global.Level * 500; if (X < 10000) { Rank = 'Peon'; } else { if (X < 50000) { Rank = 'Militia'; } else { if (X < 150000) { Rank = 'Soldier'; } else { if (X < 500000) { Rank = 'Knight'; } else { if (X < 1000000) { Rank = 'Hero'; } else { if (X < 2000000) { Rank = 'Champion'; } else { if (X < 3000000) { Rank = 'Master'; } else { if (X < 4000000) { Rank = 'Legend'; } else { if (X < 5000000) { Rank = 'Demigod'; } else { Rank = 'Mythical'; } } } } } } } } } Rank_txt.text = 'Rank : ' + Rank; X = Math.floor(RN(19) + 1); if (X == 1) { T = 'Increasing Accuracy also boosts the damage from skills such as Laser, Shards, Backfire, Shockwave, and MissileBurst'; } if (X == 2) { T = 'Pierce, Criticals and Siege, effect both the main cannon and your skills.'; } if (X == 3) { T = 'Frenzy Increases your movement speed, fire rate, damage, burst, and bullet spread.'; } if (X == 4) { T = 'While in frenzy, other skills become available twice as fast, and homing missiles shoot twice as often.'; } if (X == 5) { T = 'Teleport and shockwave make a devastating combo if used correctly.'; } if (X == 6) { T = 'At the beginning of each level, try to focus-fire the most dangerous base until it is destroyed.'; } if (X == 7) { T = 'Active Skills do tremendous damage compared to regular bullets'; } if (X == 8) { T = 'Enemies become stronger and faster with each passing stage, and bases become harder to destroy.'; } if (X == 9) { T = 'The amount of XP and Score you obtain for each kill increases as you progress through the game.'; } if (X == 10) { T = 'Active skills become very powerful at higher levels because the cooldowns are reduced with each Skill Point used.'; } if (X == 11) { T = 'Laser Shards do roughly 10x the normal damage from your gun, and the Laser itself does even more.'; } if (X == 12) { T = 'The difficulty of each stage is partly dependent on your character level.'; } if (X == 13) { T = 'The chance that a base will drop a Heart is increased when your life is low.'; } if (X == 14) { T = 'The chance that a base will drop a Skill Point is increased when your life is high.'; } if (X == 15) { T = 'Laser does less damage if you only hit part of a base, try getting a direct hit for maximum damage.'; } if (X == 16) { T = 'Drones become more aggressive throughout the game, keep your distance once you reach '; } if (X == 17) { T = 'Leveling passives such as criticals, splitter shells, and piercing will increase your damage output significantly.'; } if (X == 18) { T = 'No matter what skill build you come up with, it\'s always a good idea to get a few points into Burst and Fire Rate.'; } if (X == 19) { T = 'Increasing Fire Rate significantly enhances your characters movement speed.'; } Tip.text = 'Tip: ' + T; } button 550 { on (press) { GameStartSplash._x = 0; GameStartSplash.play(); soun(23); } } instance of movieClip 231 Critter { onClipEvent (load) { stop(); } } instance of movieClip 211 GuardBot { onClipEvent (load) { stop(); } } instance of movieClip 215 BurrowDrone { onClipEvent (load) { stop(); } } instance of movieClip 208 Enforcer { onClipEvent (load) { stop(); } } instance of movieClip 204 StaticFieldBot { onClipEvent (load) { stop(); } } instance of movieClip 195 Splitter { onClipEvent (load) { stop(); } } instance of movieClip 184 { onClipEvent (load) { stop(); } } instance of movieClip 198 Shuriken { onClipEvent (load) { stop(); } } button 566 { on (press) { _global.LeaderBoard = true; Submit._visible = false; Submitted._y = Submit._y; } } button 569 { on (press) { this.Clicked = true; } } movieClip 571 { } instance DamageTab of movieClip 571 { onClipEvent (load) { this._yscale = 125; this._xscale = 125; } onClipEvent (enterFrame) { if (this.Clicked) { _parent.soun(31); this.Clicked = false; this._parent.Panel.gotoAndStop('Damage'); this._xscale = 125; this._yscale = 125; this._parent.KillsTab._xscale = 100; this._parent.KillsTab._yscale = 100; this._parent.BasesTab._xscale = 100; this._parent.BasesTab._yscale = 100; } } } movieClip 573 { } instance KillsTab of movieClip 573 { onClipEvent (enterFrame) { if (this.Clicked) { _parent.soun(31); this.Clicked = false; this._parent.Panel.gotoAndStop('Kills'); this._xscale = 125; this._yscale = 125; this._parent.DamageTab._xscale = 100; this._parent.DamageTab._yscale = 100; this._parent.BasesTab._xscale = 100; this._parent.BasesTab._yscale = 100; } } } movieClip 575 { } instance BasesTab of movieClip 575 { onClipEvent (enterFrame) { if (this.Clicked) { _parent.soun(31); this.Clicked = false; this._parent.Panel.gotoAndStop('Bases'); this._xscale = 125; this._yscale = 125; this._parent.KillsTab._xscale = 100; this._parent.KillsTab._yscale = 100; this._parent.DamageTab._xscale = 100; this._parent.DamageTab._yscale = 100; } } } movieClip 616 { frame 1 { stop(); TotalDamage = 0; Ref = this._parent; i = 0; while (i < Ref.EnemyBook.length) { this[Ref.EnemyBook[i] + 'D'].text = Ref[Ref.EnemyBook[i] + 'Damage']; TotalDamage += Ref[Ref.EnemyBook[i] + 'Damage']; ++i; } CannonD.text = Ref.CannonDamage; TotalDamage += Ref.CannonDamage; Total.text = 'Total: ' + TotalDamage; Hearts.text = '( ' + _global.HeartsCollected + ' Hearts Collected )'; Killer.text = 'Killed by: ' + _global.KillingBlow; } frame 2 { stop(); TotalKills = 0; Ref = this._parent; i = 0; while (i < Ref.EnemyBook.length) { this[Ref.EnemyBook[i] + 'K'].text = Ref[Ref.EnemyBook[i] + 'Kills']; TotalKills += Ref[Ref.EnemyBook[i] + 'Kills']; ++i; } CannonK.text = ' '; Total.text = 'Total: ' + TotalKills; } frame 3 { stop(); TotalBases = 0; Ref = this._parent; i = 0; while (i < Ref.EnemyBook.length) { this[Ref.EnemyBook[i] + 'B'].text = Ref[Ref.EnemyBook[i] + 'Bases']; TotalBases += Ref[Ref.EnemyBook[i] + 'Bases']; ++i; } CannonB.text = Ref.CannonBases; TotalBases += Ref.CannonBases; Total.text = 'Total: ' + TotalBases; } } movieClip 618 { } button 623 { on (press) { gotoAndStop('title'); } } button 626 { on (release) { getURL('http://www.unboundedgames.com/The-Arcade/Action/Darkest-Days.html', '_blank'); } } movieClip 627 { frame 1 { stop(); if (_global.UBG == true) { gotoAndStop(2); } } } movieClip 630 { frame 1 { stop(); } frame 4 { _global.LeaderBoard = false; _global.ShowingBoard = false; trace('Leaderboard Code Parent: ' + this._parent); this.gotoAndStop(1); } } instance Clip1 of movieClip 630 { onClipEvent (enterFrame) { if (_global.LeaderBoard == true) { ++_global.LeaderBoardTime; } if (_global.LeaderBoardTime > 5 && _global.ShowingBoard != true) { _global.ShowingBoard = true; var o = {'n': [3, 12, 12, 8, 6, 1, 15, 15, 7, 10, 4, 14, 9, 8, 2, 11], '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': '3cc861ff7a4e982b', 'score': _global.Score, 'onClose': function () { Clip1.play(); }}); } } } movieClip 632 { }




http://swfchan.com/28/135167/info.shtml
Created: 9/2 -2019 15:52:43 Last modified: 9/2 -2019 15:52:43 Server time: 05/11 -2024 08:40:19