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

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

Cyberclasm 3.swf

This is the info page for
Flash #134394

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


ActionScript [AS1/AS2]
Combined Code
movieClip 11 { frame 17 { stop(); } } movieClip 12 explosion { frame 1 { stop(); } } movieClip 13 redEnemy { } movieClip 14 redEn { } // unknown tag 88 length 63 movieClip 19 fps { frame 1 { fps = 50; var timeinit = new Date(); var lasttime = timeinit.getMilliseconds(); onEnterFrame = function () { var v1 = new Date(); timepassed = v1.getMilliseconds() - lasttime >= 0 ? v1.getMilliseconds() - lasttime : 1000 + (v1.getMilliseconds() - lasttime); fps = Math.round(10000 / timepassed) / 10; lasttime = v1.getMilliseconds(); if (fps < 30) { trace('fps less than 30 frames per second =['); } }; } } 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; } __com_mochibot__('3978bc9b', this, 10301, true); } frame 1 { mochi.as2.MochiServices.connect('acbf4f08a84d9700'); } frame 1 { mochi.as2.MochiAd.showPreGameAd({'id': 'acbf4f08a84d9700', 'res': '1280x1024'}); } movieClip 124 __Packages.mochi.as2.MochiSync { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiSync) { var v1 = function () { this._syncContainer = {}; }; mochi.as2.MochiSync = v1; var v2 = v1.prototype; v2.getProp = function (name) { return this._syncContainer[name]; }; v2.setProp = function (name, value) { if (this._syncContainer[name] == value) { return undefined; } this._syncContainer[name] = value; mochi.as2.MochiServices.send('sync_propUpdate', {'name': name, 'value': value}); }; v2.triggerEvent = function (eventType, args) { switch (eventType) { case mochi.as2.MochiSync.SYNC_REQUEST: mochi.as2.MochiServices.send('sync_syncronize', this._syncContainer); break; case mochi.as2.MochiSync.SYNC_PROPERTY: this._syncContainer[args.name] = args.value; } }; v1.SYNC_REQUEST = 'SyncRequest'; v1.SYNC_PROPERTY = 'UpdateProperty'; ASSetPropFlags(mochi.as2.MochiSync.prototype, null, 1); } #endinitclip } movieClip 125 __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.8 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 'events': mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args); break; case 'coins': mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args); break; case 'sync': mochi.as2.MochiServices.servicesSync.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.updateCopy = function (args) { mochi.as2.MochiServices.send('coins_updateCopy', args, null, null); }; 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': case 'b': case 'c': break; 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://x.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._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.servicesSync = new mochi.as2.MochiSync(); 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 126 __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 127 __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 128 __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('coins_showLoginWidget', {'options': options}); }; v1.hideLoginWidget = function () { mochi.as2.MochiServices.send('coins_hideLoginWidget'); }; v1.requestLogin = function () { mochi.as2.MochiServices.send('coins_requestLogin'); }; v1.getUserInfo = function () { mochi.as2.MochiServices.send('coins_getUserInfo'); }; v1.saveUserProperties = function (properties) { mochi.as2.MochiServices.send('coins_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.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 129 __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 v26 = {'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, v26); if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') { options.ad_started(); options.ad_finished(); return undefined; } var clip = options.clip; var v23 = 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 v14 = mochi.as2.MochiAd._getRes(options); var v4 = v14[0]; var v13 = v14[1]; mc._x = v4 * 0.5; mc._y = v13 * 0.5; var chk = mc.createEmptyMovieClip('_mochiad_wait', 3); chk._x = v4 * -0.5; chk._y = v13 * -0.5; var v6 = chk.createEmptyMovieClip('_mochiad_bar', 4); if (options.no_progress_bar) { v6._visible = false; delete options.no_progress_bar; } else { v6._x = 10; v6._y = v13 - 20; } var v22 = options.color; delete options.color; var v20 = options.background; delete options.background; var v24 = options.outline; delete options.outline; var v5 = v6.createEmptyMovieClip('_outline', 1); v5.beginFill(v20); v5.moveTo(0, 0); v5.lineTo(v4 - 20, 0); v5.lineTo(v4 - 20, 10); v5.lineTo(0, 10); v5.lineTo(0, 0); v5.endFill(); var v3 = v6.createEmptyMovieClip('_inside', 2); v3.beginFill(v22); v3.moveTo(0, 0); v3.lineTo(v4 - 20, 0); v3.lineTo(v4 - 20, 10); v3.lineTo(0, 10); v3.lineTo(0, 0); v3.endFill(); v3._xscale = 0; var v7 = v6.createEmptyMovieClip('_outline', 3); v7.lineStyle(0, v24, 100); v7.moveTo(0, 0); v7.lineTo(v4 - 20, 0); v7.lineTo(v4 - 20, 10); v7.lineTo(0, 10); v7.lineTo(0, 0); chk.ad_msec = v23; 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 v6 = this._parent._parent; var v11 = this._parent._mochiad_ctr; var v5 = getTimer() - this.started; var v3 = false; var v4 = v6.getBytesTotal(); var v8 = v6.getBytesLoaded(); var v2 = 100 * v8 / v4; var v10 = 100 * v5 / chk.ad_msec; var v9 = this._mochiad_bar._inside; var v13 = Math.min(100, Math.min(v2 || 0, v10)); v13 = Math.max(this.last_pcnt, v13); this.last_pcnt = v13; v9._xscale = v13; options.ad_progress(v13); if (sendHostProgress) { mochi.as2.MochiAd.containerNotify(clip, {'id': 'hostLoadPcnt', 'pcnt': v2}, clip._mochiad._containerLCName); if (v2 == 100) { sendHostProgress = false; } } if (!chk.showing) { var v7 = v11.getBytesTotal(); if (v7 > 0 || typeof v7 == 'undefined') { chk.showing = true; chk.started = getTimer(); } else { if (v5 > chk.ad_timeout && v2 == 100) { options.ad_failed(); v3 = true; } } } if (v5 > chk.ad_msec) { v3 = true; } if (v4 > 0 && v8 >= v4 && v3) { 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 130 __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 131 __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(); var _mochiads_game_id = 'acbf4f08a84d9700'; } frame 2 { g = 0; while (g < 3000) { eName = 'enemy' + g; _root[eName].removeMovieClip(); ++g; } g = 0; while (g < 3000) { powerUp = 'HealthPU' + g; _root[powerUp].removeMovieClip(); ++g; } } movieClip 26 { } movieClip 28 { } // unknown tag 88 length 93 button 33 { on (release) { gotoAndStop('game'); _root.theScore = 0; } } button 35 { on (release) { _root.credits._visible = true; _root.console._visible = false; _root.credits.gotoAndPlay(2); } } button 37 { on (release) { console._visible = true; _root.credits._visible = false; console.gotoAndPlay(2); } } button 39 { on (release) { var o = {'n': [11, 11, 7, 4, 0, 9, 4, 15, 11, 7, 12, 1, 12, 11, 0, 1], 'f': function (i, s) { if (s.length == 16) { return s; } return this.f(i + 1, s + this.n[i].toString(16)); }}; var boardID = o.f(0, ''); mochi.as2.MochiScores.showLeaderboard({'boardID': boardID, 'score': _root.theScore}); } } button 41 { on (release) { var o = {'n': [11, 11, 7, 4, 0, 9, 4, 15, 11, 7, 12, 1, 12, 11, 0, 1], 'f': function (i, s) { if (s.length == 16) { return s; } return this.f(i + 1, s + this.n[i].toString(16)); }}; var boardID = o.f(0, ''); mochi.as2.MochiScores.showLeaderboard({'boardID': boardID}); } } // unknown tag 88 length 63 movieClip 51 { } movieClip 52 { } movieClip 54 { frame 27 { stop(); } } movieClip 55 { frame 27 { stop(); } } movieClip 57 { } movieClip 59 { } movieClip 61 { } movieClip 62 { frame 1 { stop(); } frame 44 { stop(); } instance of movieClip 54 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { kirupaSound = new Sound(this); kirupaSound.attachSound('healthRes'); kirupaSound.start(0, 1); if (_root.health < 100) { _root.health += 10; _root.hpBar._xscale = _root.health; } this.removeMovieClip(); } } } instance of movieClip 57 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { if (_root.playerSpeed < 20) { _root.playerSpeed += 0.5; } this.removeMovieClip(); } } } instance of movieClip 59 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { _root.playerDamage += 0.5; this.removeMovieClip(); } } } instance of movieClip 61 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { if (_root.regen < 100) { _root.regen += 2.5; } this.removeMovieClip(); } } } } instance console of movieClip 62 { onClipEvent (load) { _visible = true; _visible = false; this.gotoAndPlay(2); } } movieClip 67 { } instance of movieClip 67 { onClipEvent (enterFrame) { var xMouse = _root._xmouse; var yMouse = _root._ymouse; if (Math.abs(xMouse - this._x) < 1) { this._x = xMouse; this._y = yMouse; } else { this._x -= (this._x - xMouse) / 6; this._y -= (this._y - yMouse) / 6; } angle_in_radians = Math.atan2(_root._ymouse - _y, _root._xmouse - _x); angle_in_degrees = Math.round(angle_in_radians * 180 / Math.PI); _root.yText = 'y: ' + _y; _root.xText = 'x: ' + _x; } } // unknown tag 88 length 69 movieClip 74 { frame 1 { stop(); } frame 44 { stop(); } } instance credits of movieClip 74 { onClipEvent (load) { _visible = false; } } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); _root._quality = 'LOW'; topmargin = '0'; bottommargin = '0'; leftmargin = '0'; rightmargin = '0'; _root.sittingDuck = false; _root.advanced = false; _root.clicks = 0; _root.hit = 0; _root.fired = 0; _root.killed = 0; _root.exSpeed = 2; _root.drop = 7; _root.enHealth = 1; _root.enemyVal = 10; _root.enSize = 100; _root.enFireSpeed = 100; _root.scoreOnStage = 0; _root.theScore = 0; _root.i = 0; _root.bullets = 0; _root.bullets2 = 0; _root.playerDamage = 5; _root.enemyDamage = 5; _root.powerups = 0; _root.globalDepth = 0; _root.explosions = 0; _root.enemies = 0; _root.brokenSize = 30; _root.bars = 0; } movieClip 77 { } movieClip 78 { instance of movieClip 77 { onClipEvent (enterFrame) { _x = _root.circle._x; _y = _root.circle._y; } } } movieClip 80 { } movieClip 81 { frame 115 { stop(); } } movieClip 84 { frame 1 { gotoAndStop(random(4) + 1); } } movieClip 86 { instance of movieClip 84 { onClipEvent (enterFrame) { _rotation = _rotation + 10; } } } instance laser of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); if (Key.isDown(38) || Key.isDown(37) || Key.isDown(39) || Key.isDown(40)) { i = 0; this.gotoAndStop(random(11)); r = 200; speed = 30; _x = _root.circle._x; _y = _root.circle._y; _xscale = r; _yscale = r; if (Key.isDown(38)) { up = true; down = false; left = false; right = false; _rotation = 0; } if (Key.isDown(40)) { down = true; up = false; left = false; right = false; _rotation = 180; } if (Key.isDown(39)) { right = true; up = false; left = false; down = false; _rotation = 90; } if (Key.isDown(37)) { left = true; up = false; down = false; right = false; _rotation = -90; } if (Key.isDown(40) && Key.isDown(37)) { down = true; up = false; left = true; right = false; _rotation = 180; } if (Key.isDown(40) && Key.isDown(39)) { down = true; up = false; left = false; right = true; _rotation = 180; } if (Key.isDown(38) && Key.isDown(39)) { up = true; down = false; left = false; right = true; _rotation = 0; } if (Key.isDown(38) && Key.isDown(37)) { up = true; down = false; left = true; right = false; _rotation = 0; } } } } onClipEvent (enterFrame) { if (_visible == true) { if (up == true) { _y = _y - speed; } if (down == true) { _y = _y + speed; } if (left == true) { _x = _x - speed; } if (right == true) { _x = _x + speed; } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { ++_root.fired; this.removeMovieClip(); } } } } movieClip 88 { } instance plusOne of movieClip 88 { onClipEvent (load) { tOS = _root.scoreTOS; _alpha = 100; _root.soundEngine.gotoAndPlay('scorePlus'); } onClipEvent (enterFrame) { _alpha = _alpha - tOS; if (_alpha < 0) { this.removeMovieClip(); } } } instance laserdown of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _y = _y + speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance laserright of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { _x = _x + speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } instance laserleft of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _x = _x - speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance laserup of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _y = _y - speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } movieClip 91 { } // unknown tag 88 length 61 instance rightUp of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _x = _x + speed; _y = _y - speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance leftUp of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _x = _x - speed; _y = _y - speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance rightDown of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _y = _y + speed; _x = _x + speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance leftDown of movieClip 86 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('fireBeep'); i = 0; this.gotoAndStop(random(11)); r = 200; speed = 15; _xscale = r; _yscale = r; } } onClipEvent (enterFrame) { if (_visible == true) { _x = _x - speed; _y = _y + speed; if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance healthPow of movieClip 54 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { if (_root.health < 100) { _root.powerDisplay.gotoAndPlay(1); _root.disPow = '10% health restored'; _root.health += 10; _root.hpBar._xscale = _root.health; kirupaSound = new Sound(this); kirupaSound.attachSound('healthUp'); kirupaSound.start(0, 1); this.removeMovieClip(); } } } } instance speedPow of movieClip 57 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { _root.powerDisplay.gotoAndPlay(1); _root.disPow = 'Speed increased'; kirupaSound = new Sound(this); kirupaSound.attachSound('speedUp'); kirupaSound.start(0, 1); if (_root.playerSpeed < 20) { _root.playerSpeed += 0.5; } this.removeMovieClip(); } } } instance firePow of movieClip 59 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { _root.powerDisplay.gotoAndPlay(1); _root.disPow = 'Firepower increased'; _root.playerDamage += 0.3; kirupaSound = new Sound(this); kirupaSound.attachSound('powerUp'); kirupaSound.start(0, 1); this.removeMovieClip(); } } } instance shieldsPow of movieClip 61 { onClipEvent (load) { } onClipEvent (enterFrame) { if (this.hitTest(_root.circle)) { if (_root.regen < 100) { _root.regen += 5; _root.powerDisplay.gotoAndPlay(1); _root.disPow = 'Firing speed increased'; kirupaSound = new Sound(this); kirupaSound.attachSound('fsUp'); kirupaSound.start(0, 1); } this.removeMovieClip(); } } } movieClip 96 { } movieClip 97 { frame 1 { stop(); } } instance circle of movieClip 97 { onClipEvent (load) { m = 0; _root.dead = false; _root.playerSpeed = 6; rebound = 0.1; i = 0; energy = 100; _root.health = 100; _root.regen = 10; } onClipEvent (enterFrame) { if (_root.dead == false) { if (energy < 100) { energy += _root.regen; } if (energy > 98 && Key.isDown(38) || energy > 90 && Key.isDown(37) || energy > 90 && Key.isDown(39) || energy > 90 && Key.isDown(40)) { _root.accuracy = Math.round((_root.hit / _root.fired) * 100, 2) + '%'; bulletVal = 'bullet' + _root.bullets; _root[bulletVal].removeMovieClip(); duplicateMovieClip(_root.laser, bulletVal, _root.getNextHighestDepth()); energy = 0; ++_root.bullets; trace('Fired bullet' + bulletVal); if (_root.bullets == 35) { _root.bullets = 0; } } i = 0; while (i < 35) { nameVal = 'ebullet' + i; if (_root[nameVal].hitTest(this)) { trace('Target hit by ' + nameVal); _root.health -= _root.enemyDamage; _root.hpBar._xscale = _root.health; _root[nameVal].removeMovieClip(); } ++i; } if (Key.isDown(68) && _x < 1280) { _x = _x + _root.playerSpeed; _rotation = 90; } if (Key.isDown(65) && _x > 10) { _x = _x - _root.playerSpeed; _rotation = -90; } if (Key.isDown(87) && _y > 10) { _y = _y - _root.playerSpeed; _rotation = 0; } if (Key.isDown(83) && _y < 1024) { _y = _y + _root.playerSpeed; _rotation = 180; } if (_root.health < 0) { _root.soundEngine.gotoAndPlay('dead'); _root.dead = true; _root.retry._x = 500; i = 0; while (i < 100) { ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubep, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; _root.health = 0; dead = true; ++i; } } } } } instance purple of movieClip 97 { onClipEvent (load) { function right() { _x = _x + speed; _rotation = 90; } function left() { _x = _x - speed; _rotation = -90; } function up() { _y = _y - speed; _rotation = 0; } function down() { _y = _y + speed; _rotation = 180; } function shootDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserdown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserup, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRight() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserright, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLeft() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserleft, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } advanced = _root.advanced; dead = false; speed = _root.enSpeed; fixedSpeed = speed; slowSpeed = speed / 2; rebound = 6; i = 0; health = _root.enHealth; moveS = random(5); size = _root.enSize; pow = random(75); val = _root.enemyVal; maxDrop = _root.drop; regen = _root.enFireSpeed; e = 0; j = 0; loc = random(4); if (loc == 0) { _x = random(1340); _y = -40; } if (loc == 1) { _x = random(1340); _y = 1044; } if (loc == 2) { _x = 1320; _y = random(1054); } if (loc == 3) { _x = -40; _y = random(1054); } } onClipEvent (enterFrame) { if (this.enabled == true) { _xscale = size; _yscale = size; att = random(regen); if (_root.bullets2 == 20) { _root.bullets2 = 0; } if (_root.circle._x > this._x && att == 0) { shootRight(); } if (_root.circle._x < this._x && att == 1) { shootLeft(); } if (_root.circle._y < this._y && att == 2) { shootUp(); } if (_root.circle._y > this._y && att == 3) { shootDown(); } if (advanced == 1) { if (_root.circle._y < this._y && _root.circle._x < this._x && att == 4) { shootLUp(); } if (_root.circle._y < this._y && _root.circle._x > this._x && att == 5) { shootRUp(); } if (_root.circle._y > this._y && _root.circle._x < this._x && att == 6) { shootLDown(); } if (_root.circle._y > this._y && _root.circle._x > this._x && att == 7) { shootRDown(); } } if (moveS == 0) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x > _root.circle._x) { left(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x < _root.circle._x) { right(); } } } if (moveS == 1) { if (this._y > _root.circle._y && dead == false) { up(); } if (this._x > _root.circle._x) { left(); } if (this._y < _root.circle._y && dead == false) { down(); } if (this._x < _root.circle._x) { right(); } } if (moveS == 2) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x < _root.circle._x) { right(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x > _root.circle._x) { left(); } } } if (moveS == 3) { if (this._x > _root.circle._x) { left(); if (this._y > _root.circle._y && dead == false) { up(); } } if (this._x < _root.circle._x) { right(); if (this._y < _root.circle._y && dead == false) { down(); } } } if (moveS == 4) { if (this._x > _root.circle._x) { left(); if (this._y < _root.circle._y && dead == false) { down(); } } if (this._x < _root.circle._x) { right(); if (this._y > _root.circle._y && dead == false) { up(); } } } if (_parent.circle.hitTest((getBounds(_parent)).xMax, _y, true) && dead == false) { this._x -= speed + rebound; _root.circle._x += speed + rebound; } if (_parent.circle.hitTest((getBounds(_parent)).xMin, _y, true) && dead == false) { this._x += speed + rebound; _root.circle._x -= speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMax, true) && dead == false) { this._y -= speed + rebound; _root.circle._y += speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMin, true) && dead == false) { this._y += speed + rebound; _root.circle._y -= speed + rebound; } i = 0; while (i < 35) { nameVal = 'bullet' + i; if (_root[nameVal].hitTest(this)) { _root.exSpeed = 5; _root.brokenSize = 10; trace('Target hit by ' + nameVal); health -= _root.playerDamage; ++_root.hit; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubev, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = _root[nameVal]._x; _root[exNvar]._y = _root[nameVal]._y; _root[nameVal].removeMovieClip(); } ++i; } if (health <= 0) { if (pow == 0) { spawnPower(); } if (pow == 1) { spawnSpeed(); } if (pow == 2) { spawnHealth(); } if (pow == 3) { spawnShields(); } dead = true; _root.scoreStage = '+' + val; ++_root.scoreOnStage; _root.theScore += val; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; i = 0; while (i < maxDrop) { _root.brokenSize = 30; _root.exSpeed = 2; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubev, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; ++i; } ++_root.killed; this.removeMovieClip(); } } } } instance engine of movieClip 97 { onClipEvent (load) { function birthRed() { ++_root.enemies; enemyName = 'enemy' + _root.enemies; duplicateMovieClip(_root.red, enemyName, _root.getNextHighestDepth()); trace('God has given birth to ' + enemyName); _root.enemyVal = redVal; _root.drop = 7; _root.enSize = 100; _root.enHealth = 1; _root.enemyDamage = 1; _root.enSpeed = 4; _root.enFireSpeed = 100; _root.advanced = 0; } function birthOrange() { _root.enemyVal = orangeVal; ++_root.enemies; enemyName = 'enemy' + _root.enemies; duplicateMovieClip(_root.orange, enemyName, _root.getNextHighestDepth()); trace('God has given birth to ' + enemyName); _root.drop = 7; _root.enSize = 100; _root.enHealth = 10; _root.enemyDamage = 2; _root.enSpeed = 4; _root.enFireSpeed = 100; _root.advanced = 0; } function birthCyan() { _root.enemyVal = yellowVal; ++_root.enemies; enemyName = 'enemy' + _root.enemies; duplicateMovieClip(_root.yellow, enemyName, _root.getNextHighestDepth()); trace('God has given birth to ' + enemyName); _root.drop = 7; _root.enSize = 100; _root.enHealth = 15; _root.enemyDamage = 3; _root.enSpeed = 5; _root.enFireSpeed = 100; _root.advanced = 0; } function birthGreen() { _root.enemyVal = greenVal; ++_root.enemies; enemyName = 'enemy' + _root.enemies; duplicateMovieClip(_root.green, enemyName, _root.getNextHighestDepth()); trace('God has given birth to ' + enemyName); _root.drop = 7; _root.enSize = 100; _root.enHealth = 30; _root.enemyDamage = 4; _root.enSpeed = 6; _root.enFireSpeed = 100; _root.advanced = 0; } function birthBlue() { _root.enemyVal = blueVal; ++_root.enemies; enemyName = 'enemy' + _root.enemies; duplicateMovieClip(_root.blue, enemyName, _root.getNextHighestDepth()); trace('God has given birth to ' + enemyName); _root.drop = 7; _root.enSize = 100; _root.enHealth = 45; _root.enemyDamage = 5; _root.enSpeed = 7; _root.enFireSpeed = 100; _root.advanced = 0; } function birthPurple() { _root.enemyVal = purpleVal; ++_root.enemies; enemyName = 'enemy' + _root.enemies; duplicateMovieClip(_root.purple, enemyName, _root.getNextHighestDepth()); trace('God has given birth to ' + enemyName); _root.drop = 7; _root.enSize = 100; _root.enHealth = 70; _root.enemyDamage = 6; _root.enSpeed = 9; _root.enFireSpeed = 100; _root.advanced = 0; } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = random(1280); _root[powerUp]._y = random(1000) + 24; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = random(1280); _root[powerUp]._y = random(1000) + 24; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = random(1280); _root[powerUp]._y = random(1000) + 24; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = random(1280); _root[powerUp]._y = random(1000) + 24; } rBossCreated = false; oBossCreated = false; yBossCreated = false; gBossCreated = false; bBossCreated = false; vBossCreated = false; redVal = 5; orangeVal = 10; yellowVal = 15; greenVal = 20; blueVal = 25; purpleVal = 30; _root.laser._visible = false; _root.lasterright._visible = false; _root.laserleft._visible = false; _root.laserup._visible = false; _root.laserdown._visible = false; i = 0; _root.brokenCube._visible = false; _root.brokenCubeo._visible = false; _root.brokenCubey._visible = false; _root.brokenCubeg._visible = false; _root.brokenCubeb._visible = false; _root.brokenCubev._visible = false; _root.brokenCubep._visible = false; _root.microBC._visible = false; _root.enSpeed = 0; wave = 1; bossCreated = false; w1 = 0; w2 = 500; w3 = 700; w4 = 900; w5 = 1100; w6 = 1300; w7 = 1600; w8 = 1900; w9 = 2100; w10 = 2300; w11 = 2600; w12 = 2900; w13 = 3200; w14 = 3600; w15 = 4000; w16 = 4400; w17 = 4800; w18 = 5200; w19 = 5600; w20 = 6000; w21 = 6400; w22 = 6800; w23 = 7200; w24 = 7600; w25 = 8100; w26 = 8600; w27 = 9100; w28 = 9600; w29 = 10100; w30 = 10600; w31 = 11600; } onClipEvent (enterFrame) { _root.healthPercentage = Math.round(_root.health) + '%'; _root.waveOS = 'Wave ' + wave; if (_root.theScore > w2 && _root.theScore < w3) { wave = 2; } if (_root.theScore > w3 && _root.theScore < w4) { wave = 3; } if (_root.theScore > w4 && _root.theScore < w5) { wave = 4; } if (_root.theScore > w5 && _root.theScore < w6) { wave = 5; } if (_root.theScore > w6 && _root.theScore < w7) { wave = 6; } if (_root.theScore > w7 && _root.theScore < w8) { wave = 7; } if (_root.theScore > w8 && _root.theScore < w9) { wave = 8; } if (_root.theScore > w9 && _root.theScore < w10) { wave = 9; } if (_root.theScore > w10 && _root.theScore < w11) { wave = 10; } if (_root.theScore > w11 && _root.theScore < w12) { wave = 11; } if (_root.theScore > w12 && _root.theScore < w13) { wave = 12; } if (_root.theScore > w13 && _root.theScore < w14) { wave = 13; } if (_root.theScore > w14 && _root.theScore < w15) { wave = 14; } if (_root.theScore > w15 && _root.theScore < w16) { wave = 15; } if (_root.theScore > w16 && _root.theScore < w17) { wave = 16; } if (_root.theScore > w17 && _root.theScore < w18) { wave = 17; } if (_root.theScore > w18 && _root.theScore < w19) { wave = 18; } if (_root.theScore > w19 && _root.theScore < w20) { wave = 19; } if (_root.theScore > w20 && _root.theScore < w21) { wave = 20; } if (_root.theScore > w21 && _root.theScore < w22) { wave = 21; } if (_root.theScore > w22 && _root.theScore < w23) { wave = 22; } if (_root.theScore > w23 && _root.theScore < w24) { wave = 23; } if (_root.theScore > w24 && _root.theScore < w25) { wave = 24; } if (_root.theScore > w25 && _root.theScore < w26) { wave = 25; } if (_root.theScore > w26 && _root.theScore < w27) { wave = 26; } if (_root.theScore > w27 && _root.theScore < w28) { wave = 27; } if (_root.theScore > w28 && _root.theScore < w29) { wave = 28; } if (_root.theScore > w29 && _root.theScore < w30) { wave = 29; } if (_root.theScore > w30 && _root.theScore < w31) { wave = 30; } if (_root.theScore > w31) { wave = 31; } h = random(4000); if (h == 0) { spawnHealth(); } if (h == 1) { spawnSpeed(); } if (h == 2) { spawnShields(); } if (h == 3) { spawnPower(); } if (_root.health > 100) { _root.health = 100; _root.hpBar._xscale = 100; } if (wave == 1 || wave == 2) { spawn = random(30); if (spawn == 0) { shooter = random(10); birthRed(); _root.enFireSpeed = 100; _root.enemyDamage = 2; _root.enSpeed = 2; _root.enSize = 100; _root.enHealth = 5; _root.enemyVal = 5; } } if (wave == 3 || wave == 4) { spawn = random(25); if (spawn == 0) { birthRed(); _root.enFireSpeed = 90; _root.enemyDamage = 1; _root.enSpeed = 3 + random(3); _root.enSize = 100; _root.enHealth = 5; _root.advanced = 1; _root.enemyVal = 5; } } if (wave == 5 && rBossCreated == false) { birthRed(); spawnHealth(); spawnHealth(); spawnHealth(); spawnShields(); _root.enemyDamage = 2; _root.enSpeed = 2; _root.enSize = 500; _root.enHealth = 1000; _root.enFireSpeed = 20; _root.drop = 200; _root.enemyVal = w6 - w5; _root.advanced = 1; rBossCreated = true; } if (wave == 6 || wave == 7) { spawn = random(40); if (spawn == 0) { birthOrange(); _root.enFireSpeed = random(50) + 50; _root.enemyDamage = 2; _root.enSpeed = 3; _root.enSize = 100; _root.enHealth = 15; _root.advanced = 1; _root.drop = 10; } } if (wave == 8 || wave == 9) { spawn = random(30); if (spawn == 0) { birthOrange(); _root.enFireSpeed = random(40) + 50; _root.enemyDamage = 4; _root.enSpeed = 4; _root.enSize = 100; _root.enHealth = 15; _root.advanced = 1; _root.drop = 10; } } if (wave == 10 && oBossCreated == false) { birthOrange(); spawnHealth(); spawnHealth(); spawnHealth(); spawnShields(); _root.enemyDamage = 2; _root.enSpeed = 3; _root.enSize = 500; _root.enHealth = 2000; _root.enFireSpeed = 15; _root.drop = 200; _root.enemyVal = w11 - w10; _root.advanced = 1; oBossCreated = true; } if (wave == 11 || wave == 12) { spawn = random(30); if (spawn == 0) { birthCyan(); _root.enFireSpeed = random(40) + 50; _root.enemyDamage = 3; _root.enSpeed = 4; _root.enSize = 100; _root.enHealth = 20; _root.drop = 10; _root.advanced = 1; } } if (wave == 13 || wave == 14) { spawn = random(25); if (spawn == 0) { birthCyan(); _root.enFireSpeed = random(30) + 50; _root.enemyDamage = 3; _root.enSpeed = 5; _root.enSize = 100; _root.enHealth = 20; _root.drop = 10; _root.advanced = 1; } } if (wave == 15 && yBossCreated == false) { birthCyan(); spawnHealth(); spawnHealth(); spawnHealth(); spawnShields(); _root.enemyDamage = 8; _root.enSpeed = 3; _root.enSize = 500; _root.enHealth = 3000; _root.enFireSpeed = 10; _root.drop = 200; _root.enemyVal = w16 - w15; _root.advanced = 1; yBossCreated = true; } if (wave == 16 || wave == 17) { spawn = random(40); if (spawn == 0) { birthGreen(); _root.enFireSpeed = random(30) + 50; _root.enemyDamage = 4; _root.enSpeed = 5; _root.enSize = 100; _root.enHealth = 30; _root.drop = 10; _root.advanced = 1; } } if (wave == 18 || wave == 19) { spawn = random(30); if (spawn == 0) { birthGreen(); _root.enFireSpeed = random(30) + 50; _root.enemyDamage = 4; _root.enSpeed = 5; _root.enSize = 100; _root.enHealth = 40; _root.drop = 10; _root.advanced = 1; } } if (wave == 20 && gBossCreated == false) { birthGreen(); spawnHealth(); spawnHealth(); spawnHealth(); spawnHealth(); spawnHealth(); spawnHealth(); spawnShields(); _root.enemyDamage = 6; _root.enSpeed = 3; _root.enSize = 500; _root.enHealth = 4000; _root.enFireSpeed = 8; _root.drop = 200; _root.enemyVal = w21 - w20; _root.advanced = 1; gBossCreated = true; } if (wave == 21 || wave == 22) { spawn = random(40); if (spawn == 0) { birthBlue(); _root.enFireSpeed = random(20) + 50; _root.enemyDamage = 5; _root.enSpeed = 6; _root.enSize = 100; _root.enHealth = 50; _root.drop = 10; _root.advanced = 1; } } if (wave == 23 || wave == 24) { spawn = random(30); if (spawn == 0) { birthBlue(); _root.enFireSpeed = random(10) + 40; _root.enemyDamage = 5; _root.enSpeed = 7; _root.enSize = 100; _root.enHealth = 50; _root.drop = 10; _root.advanced = 1; } } if (wave == 25 && bBossCreated == false) { birthBlue(); spawnHealth(); spawnHealth(); spawnShields(); _root.enemyDamage = 6; _root.enSpeed = 4; _root.enSize = 500; _root.enHealth = 5000; _root.enFireSpeed = 7; _root.drop = 200; _root.enemyVal = w26 - w25; _root.advanced = 1; bBossCreated = true; } if (wave == 26 || wave == 27) { spawn = random(50); if (spawn == 0) { birthPurple(); _root.enFireSpeed = 9; _root.enemyDamage = 6; _root.enSpeed = 6; _root.enSize = 100; _root.enHealth = 70; _root.drop = 10; _root.advanced = 1; } } if (wave == 28 || wave == 29) { spawn = random(100); if (spawn == 0) { birthPurple(); _root.enFireSpeed = random(10) + 10; _root.enemyDamage = 6; _root.enSpeed = random(4) + 7; _root.enSize = 100; _root.enHealth = 200; _root.drop = 20; _root.advanced = 1; } } if (wave == 30 && vBossCreated == false) { birthPurple(); spawnHealth(); spawnHealth(); spawnHealth(); spawnHealth(); spawnHealth(); spawnHealth(); spawnShields(); _root.enemyDamage = 10; _root.enSpeed = 5; _root.enSize = 500; _root.enHealth = 6000; _root.enFireSpeed = 6; _root.drop = 300; _root.enemyVal = w31 - w30; _root.advanced = 1; vBossCreated = true; } if (wave == 31) { spawn = random(30); if (spawn == 0) { birthPurple(); _root.enFireSpeed = random(10) + 10; _root.enemyDamage = 4; _root.enSpeed = random(4) + 7; _root.enSize = 100; _root.enHealth = 200; _root.drop = 20; _root.advanced = 1; } } } } instance orange of movieClip 97 { onClipEvent (load) { function right() { _x = _x + speed; _rotation = 90; } function left() { _x = _x - speed; _rotation = -90; } function up() { _y = _y - speed; _rotation = 0; } function down() { _y = _y + speed; _rotation = 180; } function shootDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserdown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserup, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRight() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserright, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLeft() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserleft, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } advanced = _root.advanced; dead = false; speed = _root.enSpeed; fixedSpeed = speed; slowSpeed = speed / 2; rebound = 6; i = 0; health = _root.enHealth; moveS = random(5); size = _root.enSize; pow = random(75); val = _root.enemyVal; maxDrop = _root.drop; regen = _root.enFireSpeed; e = 0; j = 0; loc = random(4); if (loc == 0) { _x = random(1340); _y = -40; } if (loc == 1) { _x = random(1340); _y = 1044; } if (loc == 2) { _x = 1320; _y = random(1054); } if (loc == 3) { _x = -40; _y = random(1054); } } onClipEvent (enterFrame) { if (this.enabled == true) { _xscale = size; _yscale = size; att = random(regen); if (_root.bullets2 == 20) { _root.bullets2 = 0; } if (_root.circle._x > this._x && att == 0) { shootRight(); } if (_root.circle._x < this._x && att == 1) { shootLeft(); } if (_root.circle._y < this._y && att == 2) { shootUp(); } if (_root.circle._y > this._y && att == 3) { shootDown(); } if (advanced == 1) { if (_root.circle._y < this._y && _root.circle._x < this._x && att == 4) { shootLUp(); } if (_root.circle._y < this._y && _root.circle._x > this._x && att == 5) { shootRUp(); } if (_root.circle._y > this._y && _root.circle._x < this._x && att == 6) { shootLDown(); } if (_root.circle._y > this._y && _root.circle._x > this._x && att == 7) { shootRDown(); } } if (moveS == 0) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x > _root.circle._x) { left(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x < _root.circle._x) { right(); } } } if (moveS == 1) { if (this._y > _root.circle._y && dead == false) { up(); } if (this._x > _root.circle._x) { left(); } if (this._y < _root.circle._y && dead == false) { down(); } if (this._x < _root.circle._x) { right(); } } if (moveS == 2) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x < _root.circle._x) { right(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x > _root.circle._x) { left(); } } } if (moveS == 3) { if (this._x > _root.circle._x) { left(); if (this._y > _root.circle._y && dead == false) { up(); } } if (this._x < _root.circle._x) { right(); if (this._y < _root.circle._y && dead == false) { down(); } } } if (moveS == 4) { if (this._x > _root.circle._x) { left(); if (this._y < _root.circle._y && dead == false) { down(); } } if (this._x < _root.circle._x) { right(); if (this._y > _root.circle._y && dead == false) { up(); } } } if (_parent.circle.hitTest((getBounds(_parent)).xMax, _y, true) && dead == false) { this._x -= speed + rebound; _root.circle._x += speed + rebound; } if (_parent.circle.hitTest((getBounds(_parent)).xMin, _y, true) && dead == false) { this._x += speed + rebound; _root.circle._x -= speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMax, true) && dead == false) { this._y -= speed + rebound; _root.circle._y += speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMin, true) && dead == false) { this._y += speed + rebound; _root.circle._y -= speed + rebound; } i = 0; while (i < 35) { nameVal = 'bullet' + i; if (_root[nameVal].hitTest(this)) { _root.exSpeed = 5; _root.brokenSize = 10; trace('Target hit by ' + nameVal); health -= _root.playerDamage; ++_root.hit; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubeo, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = _root[nameVal]._x; _root[exNvar]._y = _root[nameVal]._y; _root[nameVal].removeMovieClip(); } ++i; } if (health <= 0) { if (pow == 0) { spawnPower(); } if (pow == 1) { spawnSpeed(); } if (pow == 2) { spawnHealth(); } if (pow == 3) { spawnShields(); } dead = true; _root.scoreStage = '+' + val; ++_root.scoreOnStage; _root.theScore += val; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; i = 0; while (i < maxDrop) { _root.brokenSize = 30; _root.exSpeed = 2; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubeo, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; ++i; } ++_root.killed; this.removeMovieClip(); } } } } instance yellow of movieClip 97 { onClipEvent (load) { function right() { _x = _x + speed; _rotation = 90; } function left() { _x = _x - speed; _rotation = -90; } function up() { _y = _y - speed; _rotation = 0; } function down() { _y = _y + speed; _rotation = 180; } function shootDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserdown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserup, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRight() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserright, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLeft() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserleft, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } advanced = _root.advanced; dead = false; speed = _root.enSpeed; fixedSpeed = speed; slowSpeed = speed / 2; rebound = 6; i = 0; health = _root.enHealth; moveS = random(5); size = _root.enSize; pow = random(75); val = _root.enemyVal; maxDrop = _root.drop; regen = _root.enFireSpeed; e = 0; j = 0; loc = random(4); if (loc == 0) { _x = random(1340); _y = -40; } if (loc == 1) { _x = random(1340); _y = 1044; } if (loc == 2) { _x = 1320; _y = random(1054); } if (loc == 3) { _x = -40; _y = random(1054); } } onClipEvent (enterFrame) { if (this.enabled == true) { _xscale = size; _yscale = size; att = random(regen); if (_root.bullets2 == 20) { _root.bullets2 = 0; } if (_root.circle._x > this._x && att == 0) { shootRight(); } if (_root.circle._x < this._x && att == 1) { shootLeft(); } if (_root.circle._y < this._y && att == 2) { shootUp(); } if (_root.circle._y > this._y && att == 3) { shootDown(); } if (advanced == 1) { if (_root.circle._y < this._y && _root.circle._x < this._x && att == 4) { shootLUp(); } if (_root.circle._y < this._y && _root.circle._x > this._x && att == 5) { shootRUp(); } if (_root.circle._y > this._y && _root.circle._x < this._x && att == 6) { shootLDown(); } if (_root.circle._y > this._y && _root.circle._x > this._x && att == 7) { shootRDown(); } } if (moveS == 0) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x > _root.circle._x) { left(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x < _root.circle._x) { right(); } } } if (moveS == 1) { if (this._y > _root.circle._y && dead == false) { up(); } if (this._x > _root.circle._x) { left(); } if (this._y < _root.circle._y && dead == false) { down(); } if (this._x < _root.circle._x) { right(); } } if (moveS == 2) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x < _root.circle._x) { right(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x > _root.circle._x) { left(); } } } if (moveS == 3) { if (this._x > _root.circle._x) { left(); if (this._y > _root.circle._y && dead == false) { up(); } } if (this._x < _root.circle._x) { right(); if (this._y < _root.circle._y && dead == false) { down(); } } } if (moveS == 4) { if (this._x > _root.circle._x) { left(); if (this._y < _root.circle._y && dead == false) { down(); } } if (this._x < _root.circle._x) { right(); if (this._y > _root.circle._y && dead == false) { up(); } } } if (_parent.circle.hitTest((getBounds(_parent)).xMax, _y, true) && dead == false) { this._x -= speed + rebound; _root.circle._x += speed + rebound; } if (_parent.circle.hitTest((getBounds(_parent)).xMin, _y, true) && dead == false) { this._x += speed + rebound; _root.circle._x -= speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMax, true) && dead == false) { this._y -= speed + rebound; _root.circle._y += speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMin, true) && dead == false) { this._y += speed + rebound; _root.circle._y -= speed + rebound; } i = 0; while (i < 35) { nameVal = 'bullet' + i; if (_root[nameVal].hitTest(this)) { _root.exSpeed = 5; _root.brokenSize = 10; trace('Target hit by ' + nameVal); health -= _root.playerDamage; ++_root.hit; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubey, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = _root[nameVal]._x; _root[exNvar]._y = _root[nameVal]._y; _root[nameVal].removeMovieClip(); } ++i; } if (health <= 0) { if (pow == 0) { spawnPower(); } if (pow == 1) { spawnSpeed(); } if (pow == 2) { spawnHealth(); } if (pow == 3) { spawnShields(); } dead = true; _root.scoreStage = '+' + val; ++_root.scoreOnStage; _root.theScore += val; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; i = 0; while (i < maxDrop) { _root.brokenSize = 30; _root.exSpeed = 2; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubey, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; ++i; } ++_root.killed; this.removeMovieClip(); } } } } instance green of movieClip 97 { onClipEvent (load) { function right() { _x = _x + speed; _rotation = 90; } function left() { _x = _x - speed; _rotation = -90; } function up() { _y = _y - speed; _rotation = 0; } function down() { _y = _y + speed; _rotation = 180; } function shootDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserdown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserup, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRight() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserright, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLeft() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserleft, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } advanced = _root.advanced; dead = false; speed = _root.enSpeed; fixedSpeed = speed; slowSpeed = speed / 2; rebound = 6; i = 0; health = _root.enHealth; moveS = random(5); size = _root.enSize; pow = random(75); val = _root.enemyVal; maxDrop = _root.drop; regen = _root.enFireSpeed; e = 0; j = 0; loc = random(4); if (loc == 0) { _x = random(1340); _y = -40; } if (loc == 1) { _x = random(1340); _y = 1044; } if (loc == 2) { _x = 1320; _y = random(1054); } if (loc == 3) { _x = -40; _y = random(1054); } } onClipEvent (enterFrame) { if (this.enabled == true) { _xscale = size; _yscale = size; att = random(regen); if (_root.bullets2 == 20) { _root.bullets2 = 0; } if (_root.circle._x > this._x && att == 0) { shootRight(); } if (_root.circle._x < this._x && att == 1) { shootLeft(); } if (_root.circle._y < this._y && att == 2) { shootUp(); } if (_root.circle._y > this._y && att == 3) { shootDown(); } if (advanced == 1) { if (_root.circle._y < this._y && _root.circle._x < this._x && att == 4) { shootLUp(); } if (_root.circle._y < this._y && _root.circle._x > this._x && att == 5) { shootRUp(); } if (_root.circle._y > this._y && _root.circle._x < this._x && att == 6) { shootLDown(); } if (_root.circle._y > this._y && _root.circle._x > this._x && att == 7) { shootRDown(); } } if (moveS == 0) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x > _root.circle._x) { left(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x < _root.circle._x) { right(); } } } if (moveS == 1) { if (this._y > _root.circle._y && dead == false) { up(); } if (this._x > _root.circle._x) { left(); } if (this._y < _root.circle._y && dead == false) { down(); } if (this._x < _root.circle._x) { right(); } } if (moveS == 2) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x < _root.circle._x) { right(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x > _root.circle._x) { left(); } } } if (moveS == 3) { if (this._x > _root.circle._x) { left(); if (this._y > _root.circle._y && dead == false) { up(); } } if (this._x < _root.circle._x) { right(); if (this._y < _root.circle._y && dead == false) { down(); } } } if (moveS == 4) { if (this._x > _root.circle._x) { left(); if (this._y < _root.circle._y && dead == false) { down(); } } if (this._x < _root.circle._x) { right(); if (this._y > _root.circle._y && dead == false) { up(); } } } if (_parent.circle.hitTest((getBounds(_parent)).xMax, _y, true) && dead == false) { this._x -= speed + rebound; _root.circle._x += speed + rebound; } if (_parent.circle.hitTest((getBounds(_parent)).xMin, _y, true) && dead == false) { this._x += speed + rebound; _root.circle._x -= speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMax, true) && dead == false) { this._y -= speed + rebound; _root.circle._y += speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMin, true) && dead == false) { this._y += speed + rebound; _root.circle._y -= speed + rebound; } i = 0; while (i < 35) { nameVal = 'bullet' + i; if (_root[nameVal].hitTest(this)) { _root.exSpeed = 5; _root.brokenSize = 10; trace('Target hit by ' + nameVal); health -= _root.playerDamage; ++_root.hit; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubeg, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = _root[nameVal]._x; _root[exNvar]._y = _root[nameVal]._y; _root[nameVal].removeMovieClip(); } ++i; } if (health <= 0) { if (pow == 0) { spawnPower(); } if (pow == 1) { spawnSpeed(); } if (pow == 2) { spawnHealth(); } if (pow == 3) { spawnShields(); } dead = true; _root.scoreStage = '+' + val; ++_root.scoreOnStage; _root.theScore += val; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; i = 0; while (i < maxDrop) { _root.brokenSize = 30; _root.exSpeed = 2; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubeg, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; ++i; } ++_root.killed; this.removeMovieClip(); } } } } instance blue of movieClip 97 { onClipEvent (load) { function right() { _x = _x + speed; _rotation = 90; } function left() { _x = _x - speed; _rotation = -90; } function up() { _y = _y - speed; _rotation = 0; } function down() { _y = _y + speed; _rotation = 180; } function shootDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserdown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserup, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRight() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserright, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLeft() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserleft, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } advanced = _root.advanced; dead = false; speed = _root.enSpeed; fixedSpeed = speed; slowSpeed = speed / 2; rebound = 6; i = 0; health = _root.enHealth; moveS = random(5); size = _root.enSize; pow = random(75); val = _root.enemyVal; maxDrop = _root.drop; regen = _root.enFireSpeed; e = 0; j = 0; loc = random(4); if (loc == 0) { _x = random(1340); _y = -40; } if (loc == 1) { _x = random(1340); _y = 1044; } if (loc == 2) { _x = 1320; _y = random(1054); } if (loc == 3) { _x = -40; _y = random(1054); } } onClipEvent (enterFrame) { if (this.enabled == true) { _xscale = size; _yscale = size; att = random(regen); if (_root.bullets2 == 20) { _root.bullets2 = 0; } if (_root.circle._x > this._x && att == 0) { shootRight(); } if (_root.circle._x < this._x && att == 1) { shootLeft(); } if (_root.circle._y < this._y && att == 2) { shootUp(); } if (_root.circle._y > this._y && att == 3) { shootDown(); } if (advanced == 1) { if (_root.circle._y < this._y && _root.circle._x < this._x && att == 4) { shootLUp(); } if (_root.circle._y < this._y && _root.circle._x > this._x && att == 5) { shootRUp(); } if (_root.circle._y > this._y && _root.circle._x < this._x && att == 6) { shootLDown(); } if (_root.circle._y > this._y && _root.circle._x > this._x && att == 7) { shootRDown(); } } if (moveS == 0) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x > _root.circle._x) { left(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x < _root.circle._x) { right(); } } } if (moveS == 1) { if (this._y > _root.circle._y && dead == false) { up(); } if (this._x > _root.circle._x) { left(); } if (this._y < _root.circle._y && dead == false) { down(); } if (this._x < _root.circle._x) { right(); } } if (moveS == 2) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x < _root.circle._x) { right(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x > _root.circle._x) { left(); } } } if (moveS == 3) { if (this._x > _root.circle._x) { left(); if (this._y > _root.circle._y && dead == false) { up(); } } if (this._x < _root.circle._x) { right(); if (this._y < _root.circle._y && dead == false) { down(); } } } if (moveS == 4) { if (this._x > _root.circle._x) { left(); if (this._y < _root.circle._y && dead == false) { down(); } } if (this._x < _root.circle._x) { right(); if (this._y > _root.circle._y && dead == false) { up(); } } } if (_parent.circle.hitTest((getBounds(_parent)).xMax, _y, true) && dead == false) { this._x -= speed + rebound; _root.circle._x += speed + rebound; } if (_parent.circle.hitTest((getBounds(_parent)).xMin, _y, true) && dead == false) { this._x += speed + rebound; _root.circle._x -= speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMax, true) && dead == false) { this._y -= speed + rebound; _root.circle._y += speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMin, true) && dead == false) { this._y += speed + rebound; _root.circle._y -= speed + rebound; } i = 0; while (i < 35) { nameVal = 'bullet' + i; if (_root[nameVal].hitTest(this)) { _root.exSpeed = 5; _root.brokenSize = 10; trace('Target hit by ' + nameVal); health -= _root.playerDamage; ++_root.hit; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubeb, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = _root[nameVal]._x; _root[exNvar]._y = _root[nameVal]._y; _root[nameVal].removeMovieClip(); } ++i; } if (health <= 0) { if (pow == 0) { spawnPower(); } if (pow == 1) { spawnSpeed(); } if (pow == 2) { spawnHealth(); } if (pow == 3) { spawnShields(); } dead = true; _root.scoreStage = '+' + val; ++_root.scoreOnStage; _root.theScore += val; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; i = 0; while (i < maxDrop) { _root.brokenSize = 30; _root.exSpeed = 2; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCubeb, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; ++i; } ++_root.killed; this.removeMovieClip(); } } } } movieClip 99 { } instance brokenCube of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + _root.exSpeed; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { if (this.hitTest(_root.circle)) { _root.health += 0.25; _root.scoreStage = '+1'; ++_root.scoreOnStage; _root.theScore += 1; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; this.removeMovieClip(); } _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance brokenCubeo of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + 2; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { if (this.hitTest(_root.circle)) { _root.circle.nextFrame(); _root.health += 0.25; _root.scoreStage = '+2'; ++_root.scoreOnStage; _root.theScore += 2; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; this.removeMovieClip(); } _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance brokenCubey of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + 2; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { if (this.hitTest(_root.circle)) { _root.health += 0.25; _root.scoreStage = '+3'; ++_root.scoreOnStage; _root.theScore += 3; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; this.removeMovieClip(); } _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance brokenCubeg of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + 2; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { if (this.hitTest(_root.circle)) { _root.health += 0.5; _root.scoreStage = '+4'; ++_root.scoreOnStage; _root.theScore += 4; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; this.removeMovieClip(); } _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance brokenCubeb of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + 2; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { if (this.hitTest(_root.circle)) { _root.health += 0.75; _root.scoreStage = '+5'; ++_root.scoreOnStage; _root.theScore += 5; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; this.removeMovieClip(); } _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } instance brokenCubev of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + 2; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { if (this.hitTest(_root.circle)) { _root.health += 1; _root.scoreStage = '+6'; ++_root.scoreOnStage; _root.theScore += 6; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; this.removeMovieClip(); } _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } movieClip 104 { frame 10 { stop(); } frame 21 { stop(); } frame 32 { stop(); } frame 45 { stop(); } } instance soundEngine of movieClip 104 { onClipEvent (load) { _root.healthPow._x = 999999; _root.speedPow._x = 999999; _root.firePow._x = 999999; _root.shieldsPow._x = 999999; _root.red.enabled = false; _root.red._visible = false; _root.orange.enabled = false; _root.yellow.enabled = false; _root.green.enabled = false; _root.blue.enabled = false; _root.purple.enabled = false; _root.healthPow.enabled = false; _root.red._x = 999999; _root.orange._x = 999999; _root.yellow._x = 999999; _root.green._x = 999999; _root.blue._x = 999999; _root.purple._x = 999999; _root.rightUp._visible = false; _root.rightDown._visible = false; _root.leftUp._visible = false; _root.leftDown._visible = false; } } instance red of movieClip 97 { onClipEvent (load) { function right() { _x = _x + speed; _rotation = 90; } function left() { _x = _x - speed; _rotation = -90; } function up() { _y = _y - speed; _rotation = 0; } function down() { _y = _y + speed; _rotation = 180; } function shootDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserdown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserup, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRight() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserright, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLeft() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.laserleft, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootLUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.leftUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRUp() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightUp, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function shootRDown() { bulletVal = 'ebullet' + _root.bullets2; duplicateMovieClip(_root.rightDown, bulletVal, _root.getNextHighestDepth()); ++_root.bullets2; _root[bulletVal]._x = this._x; _root[bulletVal]._y = this._y; trace('Enemy Fired ' + bulletVal); } function spawnHealth() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.healthPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnSpeed() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.speedPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnPower() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.firePow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } function spawnShields() { ++_root.powerups; powerUp = 'HealthPU' + _root.powerups; duplicateMovieClip(_root.shieldsPow, powerUp, _root.getNextHighestDepth()); trace('God has given birth to ' + powerUp); _root[powerUp]._x = this._x; _root[powerUp]._y = this._y; } advanced = _root.advanced; dead = false; speed = _root.enSpeed; fixedSpeed = speed; slowSpeed = speed / 2; rebound = 6; i = 0; health = _root.enHealth; moveS = random(5); size = _root.enSize; pow = random(75); val = _root.enemyVal; maxDrop = _root.drop; regen = _root.enFireSpeed; e = 0; j = 0; loc = random(4); if (loc == 0) { _x = random(1340); _y = -40; } if (loc == 1) { _x = random(1340); _y = 1044; } if (loc == 2) { _x = 1320; _y = random(1054); } if (loc == 3) { _x = -40; _y = random(1054); } } onClipEvent (enterFrame) { if (this.enabled == true) { _xscale = size; _yscale = size; att = random(regen); if (_root.bullets2 == 20) { _root.bullets2 = 0; } if (_root.circle._x > this._x && att == 0) { shootRight(); } if (_root.circle._x < this._x && att == 1) { shootLeft(); } if (_root.circle._y < this._y && att == 2) { shootUp(); } if (_root.circle._y > this._y && att == 3) { shootDown(); } if (advanced == 1) { if (_root.circle._y < this._y && _root.circle._x < this._x && att == 4) { shootLUp(); } if (_root.circle._y < this._y && _root.circle._x > this._x && att == 5) { shootRUp(); } if (_root.circle._y > this._y && _root.circle._x < this._x && att == 6) { shootLDown(); } if (_root.circle._y > this._y && _root.circle._x > this._x && att == 7) { shootRDown(); } } if (moveS == 0) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x > _root.circle._x) { left(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x < _root.circle._x) { right(); } } } if (moveS == 1) { if (this._y > _root.circle._y && dead == false) { up(); } if (this._x > _root.circle._x) { left(); } if (this._y < _root.circle._y && dead == false) { down(); } if (this._x < _root.circle._x) { right(); } } if (moveS == 2) { if (this._y > _root.circle._y && dead == false) { up(); if (this._x < _root.circle._x) { right(); } } if (this._y < _root.circle._y && dead == false) { down(); if (this._x > _root.circle._x) { left(); } } } if (moveS == 3) { if (this._x > _root.circle._x) { left(); if (this._y > _root.circle._y && dead == false) { up(); } } if (this._x < _root.circle._x) { right(); if (this._y < _root.circle._y && dead == false) { down(); } } } if (moveS == 4) { if (this._x > _root.circle._x) { left(); if (this._y < _root.circle._y && dead == false) { down(); } } if (this._x < _root.circle._x) { right(); if (this._y > _root.circle._y && dead == false) { up(); } } } if (_parent.circle.hitTest((getBounds(_parent)).xMax, _y, true) && dead == false) { this._x -= speed + rebound; _root.circle._x += speed + rebound; } if (_parent.circle.hitTest((getBounds(_parent)).xMin, _y, true) && dead == false) { this._x += speed + rebound; _root.circle._x -= speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMax, true) && dead == false) { this._y -= speed + rebound; _root.circle._y += speed + rebound; } if (_parent.circle.hitTest(_x, (getBounds(_parent)).yMin, true) && dead == false) { this._y += speed + rebound; _root.circle._y -= speed + rebound; } i = 0; while (i < 35) { nameVal = 'bullet' + i; if (_root[nameVal].hitTest(this)) { _root.exSpeed = 5; _root.brokenSize = 10; trace('Target hit by ' + nameVal); health -= _root.playerDamage; ++_root.hit; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCube, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = _root[nameVal]._x; _root[exNvar]._y = _root[nameVal]._y; _root[nameVal].removeMovieClip(); this.play(); } else { this.gotoAndStop(1); } ++i; } if (health <= 0) { if (pow == 0) { spawnPower(); } if (pow == 1) { spawnSpeed(); } if (pow == 2) { spawnHealth(); } if (pow == 3) { spawnShields(); } dead = true; _root.scoreStage = '+' + val; ++_root.scoreOnStage; _root.theScore += val; plusVar = 'plus' + _root.scoreOnStage; duplicateMovieClip(_root.plusOne, plusVar, _root.getNextHighestDepth()); _root[plusVar]._x = this._x; _root[plusVar]._y = this._y; _root.scoreTOS = 5; i = 0; while (i < maxDrop) { _root.brokenSize = 30; _root.exSpeed = 2; ++_root.explosions; exNvar = 'explosion' + _root.explosions; duplicateMovieClip(_root.brokenCube, exNvar, _root.getNextHighestDepth()); _root[exNvar]._x = this._x; _root[exNvar]._y = this._y; ++i; } ++_root.killed; this.removeMovieClip(); } } } } instance brokenCubep of movieClip 99 { onClipEvent (load) { if (_visible == true) { _root.soundEngine.gotoAndPlay('brokenBeep'); _alpha = 100; s = random(60) + _root.brokenSize; dir = random(12); speed = random(10) + 2; r = random(30); stageTime = 1000; } } onClipEvent (enterFrame) { if (_visible == true) { _xscale = s; _yscale = s; _rotation = _rotation + r; if (dir == 0) { _x = _x + (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 1) { _x = _x + (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 2) { _x = _x - (random(3) + speed); _y = _y + (random(3) + speed); } if (dir == 3) { _x = _x - (random(3) - speed); _y = _y - (random(3) - speed); } if (dir == 4) { _x = _x - (random(4) + speed); _y = _y - random(3); } if (dir == 5) { _x = _x - (random(4) + speed); _y = _y + random(3); } if (dir == 6) { _x = _x + (random(4) + speed); _y = _y - random(3); } if (dir == 7) { _x = _x + (random(4) + speed); _y = _y + random(3); } if (dir == 8) { _x = _x + random(3); _y = _y - (random(4) + speed); } if (dir == 9) { _x = _x - random(3); _y = _y - (random(4) + speed); } if (dir == 10) { _x = _x - random(3); _y = _y + (random(4) + speed); } if (dir == 11) { _x = _x + random(3); _y = _y + (random(4) + speed); } if (this._x > 1280 || this._x < 0 || this._y > 1024 || this._y < 0) { this.removeMovieClip(); } } } } button 108 { on (press) { _root.gotoAndStop(2); stopAllSounds(); _root.clicks = 0; _root.hit = 0; _root.fired = 0; _root.killed = 0; _root.health = 100; _root.scoreOnStage = 0; _root.i = 0; _root.bullets = 0; _root.bullets2 = 0; _root.playerDamage = 5; _root.enemyDamage = 5; _root.powerups = 0; _root.globalDepth = 0; _root.explosions = 0; _root.enemies = 0; _root.brokenSize = 30; _root.bars = 0; _root.regen = 20; _root.playerSpeed = 9; _root.dead = false; i = 0; while (i < _root.bullets) { bullName = 'bullet' + i; removeMovieClip(_root[bullName]); ++i; } i = 0; while (i < _root.bullets2) { bullName2 = 'bullet' + i; removeMovieClip(_root[bullName2]); ++i; } i = 0; while (i < _root.enemies) { eName = 'enemy' + i; removeMovieClip(_root[eName]); ++i; } _root.retry._x = 10000; } } movieClip 118 { } movieClip 120 { }




http://swfchan.com/27/134394/info.shtml
Created: 9/2 -2019 23:13:21 Last modified: 9/2 -2019 23:13:21 Server time: 22/12 -2024 04:18:48