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

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

stay-up.swf

This is the info page for
Flash #112161

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


ActionScript [AS1/AS2]
Combined Code
movieClip 13 Trampoline { frame 1 { stop(); } } movieClip 17 Block { frame 1 { gotoAndStop(Math.ceil(Math.random() * 3)); } } movieClip 19 Trail2 { } // unknown tag 88 length 63 movieClip 30 { } movieClip 34 { } movieClip 35 { } button 37 { on (release) { getURL('http://www.unboundedgames.com/', '_blank'); } } // unknown tag 88 length 68 button 41 { on (release) { getURL('http://cdn.mochiads.com/c/g/stay-up_v1.zip', '_self'); } } movieClip 43 { } movieClip 45 { } movieClip 46 { instance of movieClip 43 { onClipEvent (enterFrame) { this._rotation += 3; } } instance of movieClip 45 { onClipEvent (enterFrame) { this._rotation += 3; } } } movieClip 49 { } movieClip 50 { } movieClip 51 { } movieClip 58 gameOverScreen { frame 1 { button.onPress = function () { trace('button target path: ' + this); _global.Fuel = 100; this._parent._parent.gameOver = false; this._parent._parent.player._x = 200; this._parent._parent.player._y = -18016; this._parent._parent.died = false; this._parent._parent.firstPlatform = false; this._parent._parent.score = 0; this._parent._parent.onPlatform = 0; this._parent._parent.blockSpeed = 3; this._parent._parent.blockLimit = 12; this._parent._parent.blockFirst = this._parent._parent.blockTotal + 1; this._parent._parent.specialingCounter = 0; this._parent._parent.specialing = false; this._parent._parent.springLimit = 350; this._parent._parent.springSpeed = 4; this._parent._parent.springTime = 0; this._parent._parent.coinCombo = 0; this._parent._parent.coinComboTime = 99; this._parent.removeMovieClip(); }; button2.onPress = function () { this._parent._parent.gotoAndStop(3); this._parent.removeMovieClip(); }; this.onEnterFrame = function () { if (Key.isDown(13)) { _global.Fuel = 100; this._parent.gameOver = false; this._parent.player._x = 200; this._parent.player._y = -18016; this._parent.died = false; this._parent.firstPlatform = false; this._parent.score = 0; this._parent.onPlatform = 0; this._parent.blockSpeed = 3; this._parent.blockLimit = 12; this._parent.blockFirst = this._parent.blockTotal + 1; this._parent.specialingCounter = 0; this._parent.specialing = false; this._parent.coinCombo = 0; this._parent.coinComboTime = 99; this.removeMovieClip(); } this._parent.coinCombo = 0; this._parent.coinComboTime = 99; }; } } button 61 { on (release) { getURL('http://cdn.mochiads.com/c/g/stay-up_v1.zip', '_blank'); } } movieClip 62 playScreen { frame 1 { button.onPress = function () { this._parent._parent.gameOver = false; this._parent._parent.player._x = -200; this._parent._parent.player._y = -916; this._parent.removeMovieClip(); }; this.onEnterFrame = function () { if (Key.isDown(13)) { this._parent.gameOver = false; this._parent.player._x = -200; this._parent.player._y = -916; this.removeMovieClip(); } }; } } movieClip 65 gameOver { frame 1 { button.onPress = function () {}; } } movieClip 67 waves { } movieClip 69 Trail4 { } movieClip 73 Trail7 { } movieClip 75 DT { } movieClip 78 { frame 1 { this.onEnterFrame = function () { if (this._parent._parent.springTrail) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } if (Key.isDown(37) || Key.isDown(65)) { this._rotation -= 21; } if (Key.isDown(39) || Key.isDown(68)) { this._rotation += 21; } }; } } movieClip 81 Player { } movieClip 83 Trail5 { } movieClip 85 Trail6 { } movieClip 87 { } movieClip 93 fuel { instance of movieClip 87 { onClipEvent (enterFrame) { this._rotation -= 7; } } instance of movieClip 87 { onClipEvent (enterFrame) { this._rotation += 17; } } } movieClip 95 Trail3 { } movieClip 103 coin { } movieClip 105 Trail { } movieClip 107 spikeBall { } frame 1 { function doNothing() {} function link() { getURL('http://www.unboundedgames.com/', '_blank'); } MENU = new ContextMenu(); MENU.hideBuiltInItems(); item1 = new ContextMenuItem('Joseph Lormand', doNothing); item2 = new ContextMenuItem('Austin Henley', doNothing); item3 = new ContextMenuItem('Unboundedgames', link); item4 = new ContextMenuItem('____________________', doNothing); item5 = new ContextMenuItem('(Quality Automagically Adjusts)', doNothing); MENU.customItems.push(item1); MENU.customItems.push(item2); MENU.customItems.push(item3); MENU.customItems.push(item4); MENU.customItems.push(item5); this.menu = MENU; _parent.menu = MENU; _global.menu = MENU; } frame 1 { function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; var pv; mb = '__mochibot__'; mbc = 'mochibot.com'; g = _global ? _global : _level0._root; if (g[mb + swfid]) { return g[mb + swfid]; } s = System.security; x = mc._root.getSWFVersion; fv = x ? mc.getSWFVersion() : (_global ? 6 : 5); if (!s) { s = {}; } sb = s.sandboxType; if (sb == 'localWithFile') { return null; } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } pv = (fv == 5) ? /:$version : System.capabilities.version; u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : ''); lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv); g[mb + 'level'] = lv; if (fv == 5) { res = '_level' + lv; if (!eval(res)) { loadMovieNum(u, lv); } return res; } res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); return res; } stop(); var _mochiads_game_id = '652190ca246c0306'; mochi.as2.MochiServices.connect('652190ca246c0306'); if (Math.random() * 100 < 60) { mochi.as2.MochiAd.showPreGameAd({'id': '652190ca246c0306', 'res': '550x500'}); } else { mochi.as2.MochiAd.showPreGameAd({'id': '1a44e599ef27c5d1', 'res': '550x500'}); } __com_mochibot__('f5651913', this, 10301, true); } movieClip 110 { } movieClip 112 { } instance of movieClip 112 { onClipEvent (load) { this.swapDepths(15000000); } } movieClip 131 __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 v22 = 11000; var v25 = 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 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 v21 = options.color; delete options.color; var v19 = options.background; delete options.background; var v23 = options.outline; delete options.outline; var v5 = v6.createEmptyMovieClip('_outline', 1); v5.beginFill(v19); 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(v21); 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, v23, 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 = v22; chk.ad_timeout = v25; 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; } }; mc.lc.regContLC = function (lc_name) { mc._containerLCName = lc_name; }; var sendHostProgress = false; mc.lc.sendHostLoadProgress = function (lc_name) { sendHostProgress = true; }; mc.lc.adLoaded = options.ad_loaded; mc.lc.adSkipped = options.ad_skipped; mc.lc.adjustProgress = function (msec) { var 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 v9 = {'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, v9); var clip = options.clip; var v8 = 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 mc = clip._mochiad; mc.onUnload = function () { options.ad_finished(); }; var v4 = mochi.as2.MochiAd._getRes(options); var v10 = v4[0]; var v7 = v4[1]; mc._x = v10 * 0.5; mc._y = v7 * 0.5; var chk = mc.createEmptyMovieClip('_mochiad_wait', 3); chk.ad_timeout = v8; chk.started = getTimer(); chk.showing = false; mc.lc.adLoaded = options.ad_loaded; mc.lc.adSkipped = options.ad_skipped; mc.lc.rpc = function (callbackID, arg) { mochi.as2.MochiAd.rpc(clip, callbackID, arg); }; mc.rpcTestFn = function (s) { trace('[MOCHIAD rpcTestFn] ' + s); return s; }; var v20 = false; mc.lc.regContLC = function (lc_name) { mc._containerLCName = lc_name; }; 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 v13 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'}; options = mochi.as2.MochiAd._parseOptions(options, v13); options.swfv = options.clip.getSWFVersion() || 6; options.mav = mochi.as2.MochiAd.getVersion(); var v7 = options.clip; if (!mochi.as2.MochiAd._isNetworkAvailable()) { return null; } if (v7._mochiad_loaded) { return null; } var v12 = options.depth; delete options.depth; var v6 = v7.createEmptyMovieClip('_mochiad', v12); var v11 = mochi.as2.MochiAd._getRes(options); options.res = v11[0] + 'x' + v11[1]; options.server += options.id; delete options.id; v7._mochiad_loaded = true; if (v7._url.indexOf('http') != 0) { trace('[MochiAd] NOTE: Security Sandbox Violation errors below are normal'); } var v4 = v6.createEmptyMovieClip('_mochiad_ctr', 1); for (var v8 in options) { v4[v8] = options[v8]; } var v10 = v4.server; delete v4.server; var v14 = mochi.as2.MochiAd._allowDomains(v10); v6.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 v9 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_'); v5.mc = v6; v5.name = v9; v5.hostname = v14; v5.allowDomain = function (d) { return true; }; v5.allowInsecureDomain = v5.allowDomain; v5.connect(v9); v6.lc = v5; v4.lc = v9; v4.st = getTimer(); v4.loadMovie(v10 + '.swf', 'POST'); return v6; }; 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 132 __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 133 __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.3 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.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=' + /:$version, 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, 'clip': mochi.as2.MochiServices._clip, '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.MochiCoins.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.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': break; case '4': case '5': case '6': case '7': case '8': case '9': case 'a': case 'b': case 'c': case 'd': case 'e': } default: trace('WARNING: Board ID contains illegal characters: ' + bid); return undefined; } ++v1; } }; v1.addLinkEvent = function (url, burl, btn, onClick) { var timeout = 1500; var t0 = getTimer(); var v2 = new Object(); v2.mav = mochi.as2.MochiServices.getVersion(); v2.swfv = btn.getSWFVersion() || 6; v2.swfurl = btn._url; v2.fv = System.capabilities.version; v2.os = System.capabilities.os; v2.lang = System.capabilities.language; v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY; var s = '?'; var v3 = 0; for (var v6 in v2) { if (v3 != 0) { s += '&'; } ++v3; s = s + v6 + '=' + escape(v2[v6]); } if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) { var ping = btn.createEmptyMovieClip('ping', 777); var v7 = btn.createEmptyMovieClip('nettest', 778); mochi.as2.MochiServices.netupAttempted = true; ping.loadMovie('http://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 134 __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 135 __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.trigger = function (kind, obj) { if (obj == undefined) { obj = {}; } else { if (obj.kind != undefined) { trace('WARNING: optional arguements package contains key \'id\', it will be overwritten'); obj.kind = kind; } } mochi.as2.MochiServices.send('events_triggerEvent', {'eventObject': obj}, 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.startGame = function () { mochi.as2.MochiEvents.gameStart = (new Date()).getTime(); mochi.as2.MochiEvents.trigger('start_game'); }; v1.endGame = function () { var v1 = (new Date()).getTime() - mochi.as2.MochiEvents.gameStart; mochi.as2.MochiEvents.trigger('end_game', {'time': v1}); }; v1.startLevel = function () { mochi.as2.MochiEvents.levelStart = (new Date()).getTime(); mochi.as2.MochiEvents.trigger('start_level'); }; v1.endLevel = function () { var v1 = (new Date()).getTime() - mochi.as2.MochiEvents.levelStart; mochi.as2.MochiEvents.trigger('end_level', {'time': v1}); }; 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 136 __Packages.mochi.as2.MochiCoins { #initclip if (!_global.mochi) { _global.mochi = new Object(); } if (!_global.mochi.as2) { _global.mochi.as2 = new Object(); } if (!_global.mochi.as2.MochiCoins) { var v1 = function () {}; mochi.as2.MochiCoins = v1; var v2 = v1.prototype; v1.getVersion = function () { return mochi.as2.MochiServices.getVersion(); }; v1.showStore = function (options) { mochi.as2.MochiServices.send('coins_showStore', {'options': options}, null, null); }; v1.showItem = function (options) { if (options == undefined || typeof options.item != 'string') { trace('ERROR: showItem call must pass an Object with an item key'); return undefined; } mochi.as2.MochiServices.send('coins_showItem', {'options': options}, null, null); }; v1.showVideo = function (options) { if (options == undefined || typeof options.item != 'string') { trace('ERROR: showVideo call must pass an Object with an item key'); return undefined; } mochi.as2.MochiServices.send('coins_showVideo', {'options': options}, null, null); }; v1.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.getStoreItems = function () { mochi.as2.MochiServices.send('coins_getStoreItems'); }; 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.MochiCoins._dispatcher.addEventListener(eventType, delegate); }; v1.triggerEvent = function (eventType, args) { mochi.as2.MochiCoins._dispatcher.triggerEvent(eventType, args); }; v1.removeEventListener = function (eventType, delegate) { mochi.as2.MochiCoins._dispatcher.removeEventListener(eventType, delegate); }; v1.LOGGED_IN = 'LoggedIn'; v1.LOGGED_OUT = 'LoggedOut'; v1.LOGIN_SHOW = 'LoginShow'; v1.LOGIN_HIDE = 'LoginHide'; v1.STORE_SHOW = 'StoreShow'; v1.STORE_HIDE = 'StoreHide'; v1.PROFILE_SHOW = 'ProfileShow'; v1.PROFILE_HIDE = 'ProfileHide'; v1.PROPERTIES_SAVED = 'PropertySaved'; v1.WIDGET_LOADED = 'WidgetLoaded'; v1.ITEM_OWNED = 'ItemOwned'; v1.ITEM_NEW = 'ItemNew'; v1.STORE_ITEMS = 'StoreItems'; 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.MochiCoins.prototype, null, 1); } #endinitclip } movieClip 137 __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 138 __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(); } frame 2 { function toggleSound() { if (_global.SoundOn) { snd1.setVolume(0); _global.SoundOn = false; } else { snd1.setVolume(80); _global.SoundOn = true; } } if (_global.SoundOn == undefined) { _global.SoundOn = true; var snd1 = new Sound(); snd1.attachSound('sound1'); snd1.setVolume(150); snd1.start(0, 1000000); var mus1 = new Sound(); mus1.attachSound('music1'); mus1.start(0, 1000000); } i = 1; while (i < 10) { this['snd' + i] = new Sound(); this['snd' + i].attachSound('sound' + i); ++i; } } frame 2 { function levelStep() { ++blockTime; ++springTime; ++spikeTime; ++coinComboTime; if (_global.Time % fuelLimit == 0) { spawnFuel(); } if ((_global.Time % springLimit == 0 || Math.random() * 750 < 2) && springTime > 40) { spawnSpring(); } if (_global.Time % spikeLimit == 0 && score > spikeStart) { spawnSpike(); } if (_global.Time % blockLimit == 0 || blockTotal == 0) { spawnBlock(); } if ((_global.Time % coinLimit == 0 || Math.random() * 75 < 1) && score > 50) { spawnCoin(); } } function spawnBlock() { ++blockTotal; objectHolder.attachMovie('Block', 'block' + blockTotal, _global.cDepth); ++_global.cDepth; B = objectHolder['block' + blockTotal]; if (blockTotal == blockFirst) { spikeLimit = 100; _global.Time = 0; B._x = Math.random() * 525; player._x = B._x + 16; player._y = B._y - 64; onPlatform = true; onGround = false; } else { B._x = Math.random() * 525; scaleMod = Math.round(_global.Time / 7); if (scaleMod > 245) { scaleMod = 240; } B._xscale = Math.random() * (265 - scaleMod) + 20; } B._y = blockTop; B.onEnterFrame = function () { this._y += blockSpeed; this.Xbound = false; this.DX = player._x - this._x; this.DX2 = this._x - player._x - vX; this.X2 = this._x + this._width; if (this.DX >= -(player._width / 4) && this.DX < this._width + player._width / 4) { this.Xbound = true; } this.DY = this._y - player._y - player._height / 2; this.DY2 = this._y - player._y - vY - player._height / 2; this.Y2 = this._y + this._height; if (vY > 0 && (this.DY < 5 || this.DY2 < 4) && this.Xbound && (this.DY > -15 || this.DY2 > -18)) { player._y = this._y - player._height / 2; if (onPlatform == 1) { jumping = false; } onPlatform = 2; onGround = false; firstPlatform = true; if (vY > -5) { vY = blockSpeed; } } if (this._y > 520) { removeMovieClip(this); } }; blockTime = 0; } function spawnSpike() { if (spikeLimit > 20) { --spikeLimit; } ++spikeTotal; objectHolder.attachMovie('spikeBall', 'spike' + spikeTotal, _global.cDepth); ++_global.cDepth; S = objectHolder['spike' + spikeTotal]; S._x = Math.random() * 450 + 50; S._y = blockTop; S.YSpeed = 7 + Math.random() * 4; S.XSpeed = Math.random() * 6 - 3; S.onEnterFrame = function () { this._y += this.YSpeed; this._x += this.XSpeed; this._rotation += 5 * this.XSpeed; if (this.hit.hitTest(this._parent._parent.player) && this.hitPlayer != true && !springTrail) { this._parent._parent.snd5.start(0, 1); player._visible = false; i = 0; while (i < 5) { var v3 = this._parent.attachMovie('Trail6', par + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = player._x; v3._y = player._y; v3._rotation = i * 72; v3.Speed = 18; v3.Life = 9; v3.onEnterFrame = function () { run(this); --this.Life; if (this.Life < 1) { this.removeMovieClip(); } }; ++i; } i = 0; while (i < 15) { v3 = this._parent.attachMovie('Trail2', par + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = player._x + Math.random() * 2 - 1; v3._y = player._y + Math.random() * 2 - 1; v3._rotation = i * 24; v3.Speed = 29 + Math.random() * 3; v3.Life = 9; v3.onEnterFrame = function () { run(this); --this.Life; if (this.Life < 3) { onGround = true; died = true; } if (this.Life < 1) { player._visible = true; this.removeMovieClip(); } }; ++i; } this.hitPlayer = true; } if (this.Die == true) { removeMovieClip(this); } if (this._y > 480 && this.Die != true) { if (this._x > -5 && this._x < 555) { splash(this._x, this._y - 5); this.Die = true; } } }; } function spawnCoin() { ++coinTotal; objectHolder.attachMovie('coin', 'coin' + coinTotal, _global.cDepth); ++_global.cDepth; C = objectHolder['coin' + coinTotal]; C._x = Math.random() * 500 + 25; C._y = -100; C.YSpeed = 3 + Math.random() * 3; C.onEnterFrame = function () { this._y += this.YSpeed; if (this.hitTest(this._parent._parent.player)) { this._parent._parent.snd6.start(0, 1); ++coinCombo; coinComboTime = 0; scorePlus = 25 + coinCombo * 25; this._parent._parent.score += scorePlus; if (coinCombo > 1) { spawnText(this._x, this._y - 15, 'Combo: ' + coinCombo); } spawnText(this._x, this._y, 'Score + ' + scorePlus); i = 0; while (i < 3) { var v3 = this._parent.attachMovie('Trail3', par + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = this._x; v3._y = this._y; v3._rotation = i * 120; v3.Speed = 14; v3.Life = 9; v3.onEnterFrame = function () { run(this); --this.Life; if (this.Life < 1) { this.removeMovieClip(); } }; ++i; } this.removeMovieClip(); } if (this._y > 520) { removeMovieClip(this); } }; } function spawnFuel() { ++fuelTotal; objectHolder.attachMovie('fuel', 'fuel' + fuelTotal, _global.cDepth); ++_global.cDepth; F = objectHolder['fuel' + fuelTotal]; F._x = Math.random() * 500 + 25; F._y = blockTop; F.YSpeed = 3 + Math.random() * 3; F.onEnterFrame = function () { this._y += this.YSpeed; this._x += this.XSpeed; if (this.hitTest(this._parent._parent.player)) { this._parent._parent.snd7.start(0, 1); if (_global.Fuel < 0) { _global.Fuel = 0; } spawnText(this._x, this._y, 'Fuel + 25'); _global.Fuel += 25; if (_global.Fuel > 100) { _global.Fuel = 100; } i = 0; while (i < 3) { var v3 = this._parent.attachMovie('Trail4', par + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = this._x; v3._y = this._y; v3._rotation = i * 120; v3.Speed = 16; v3.Life = 8; v3.onEnterFrame = function () { run(this); --this.Life; if (this.Life < 1) { this.removeMovieClip(); } }; ++i; } this.removeMovieClip(); } if (this._y > 520) { removeMovieClip(this); } }; } function spawnSpring() { ++springTotal; objectHolder.attachMovie('Trampoline', 'spring' + springTotal, _global.cDepth); ++_global.cDepth; S = objectHolder['spring' + springTotal]; S._y = Math.random() * 50 + 400; S._x = springStartingX; springTime = 0; S.hit = 0; S.onEnterFrame = function () { --this.hit; this._x += springSpeed; if (this._x > 600) { removeMovieClip(this); } this.Xbound = false; this.DX = player._x - this._x; this.DX2 = this._x - player._x - vX; this.X2 = this._x + this._width; if (this.DX >= -(player._width / 4) && this.DX < this._width + player._width / 4) { this.Xbound = true; } this.DY = this._y - player._y - player._height / 2; this.DY2 = this._y - player._y - vY - player._height / 2; this.Y2 = this._y + this._height; if (vY > 0 && (this.DY < 5 || this.DY2 < 4) && this.Xbound && (this.DY > -15 || this.DY2 > -18)) { player._y = this._y - player._height / 2; jumping = true; onGround = false; springTrail = true; if (this.hit == 1) { vY = -55; this._parent._parent.snd3.start(0, 1); } else { vY = 2; } this.gotoAndPlay(2); this.hit = 2; } }; springTime = 0; } function splash(X, Y) { this.snd8.start(0, 1); ii = 0; while (ii < 6) { var v3 = this.attachMovie('Trail5', par + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = X; v3._y = Y; v3._rotation = 90 - 35 * ii; v3.Speed = 40; v3.Life = 8; v3.onEnterFrame = function () { run(this); --this.Life; this._y += 6 - this.Life; if (this.Life < 1) { this.removeMovieClip(); } }; ++ii; } } function spawnText(X, Y, string) { var v3 = this.attachMovie('DT', 'dt' + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = X; v3._y = Y - 10; v3.Life = 15; v3._alpha = 80; v3.textBox.text = string; v3.onEnterFrame = function () { --this._y; --this.Life; if (this.Life < 7) { this._alpha -= 10; } if (this.Life < 1) { this.removeMovieClip(); } }; } function run(Self) { Self._x += Math.sin(Self._rotation * 0.0174532925199433) * Self.Speed / 10; Self._y += (Math.cos(Self._rotation * 0.0174532925199433) * Self.Speed / 10) * -1; } _global.cDepth = 0; _global.Fuel = 100; var player = this.attachMovie('player', 'playerInstance', 99999); trace(player); ++_global.cDepth; player._xscale = 60; player._yscale = 60; player._x = -200; player._y = -1816; vX = 0; vY = 0; jumping = false; gravity = 3.6; onPlatform = 0; onGround = true; firstPlatform = false; score = 0; died = false; gameOver = true; blockSpeed = 3; wavesCounter = 9; wavesDirection = 0; specialing = false; specialingCounter = 0; specialingLimit = 72; bounce = false; var blockLimit = 12; var blockTop = -50; var blockTotal = 0; blockFirst = 1; springLimit = 350; springTime = 0; springSpeed = 4; springStartingX = -50; springTotal = 0; springTrail = false; spikeLimit = 100; spikeTime = 0; spikeStart = 500; spikeTotal = 0; coinLimit = 40; coinTime = 0; coinStart = 200; coinTotal = 0; coinCombo = 0; coinComboTime = 99; fuelLimit = 275; fuelTime = 0; fuelStart = 400; fuelTotal = 0; _global.Time = 0; var playScreen = this.attachMovie('playScreen', 'playScreen', 999999); playScreen._x = 75; playScreen._y = 65; var waves = this.attachMovie('waves', 'waves', 9999998); var waves2 = this.attachMovie('waves', 'waves', 9999999); waves._y = 482; waves._x = -45; waves2._y = 475; waves2._x = -54; this.onEnterFrame = function () { ++_global.Time; if (wavesCounter == 54) { wavesDirection = 0; } if (wavesCounter == -54) { wavesDirection = 1; } if (wavesDirection == 1) { ++waves._x; --waves2._x; ++wavesCounter; } if (wavesDirection == 0) { --waves._x; ++waves2._x; --wavesCounter; } if (!gameOver) { if (onGround == false && firstPlatform == true) { score += 1; } if ((onGround == true && firstPlatform == true || died == true) && gameOver == false) { gameOver = true; var v4 = this.attachMovie('gameOverScreen', 'gameOverScreen', 999999); v4._x = 75; v4._y = 65; player._y = -900; } --onPlatform; if (Key.isDown(37) || Key.isDown(65)) { vX = -10; } if (Key.isDown(39) || Key.isDown(68)) { vX = 10; } if (Key.isDown(38) || Key.isDown(87)) { if (!jumping && onPlatform && vY >= blockSpeed - 5 && vY <= blockSpeed + 5) { snd4.start(0, 1); jumping = true; vY = -26; onPlatform = 0; onGround = false; } } levelStep(); player._x += vX; vX = 0; if (onPlatform > 0) { vY = 3; } else { vY += gravity; } player._y += vY; if (player._y < 10 && score > 75 && gameOver != true) { player._y = 10; vY = 0; } if (player._x < 16) { player._x = 16; } if (player._x > 534) { player._x = 534; } if (player._y > 484) { player._y = 484; jumping = false; onGround = true; } if (vY > -1) { springTrail = false; } if (vY > blockSpeed + 5) { jumping = true; } if (springTrail) { player.gotoAndStop(2); } else { player.gotoAndStop(1); } if (onPlatform < 1 && (!Key.isDown(32) || springTrail) && player._visible == true) { if (!springTrail) { var v3 = this.attachMovie('Trail', 'T' + _global.cDepth, _global.cDepth); ++_global.cDepth; } else { var v3 = this.attachMovie('Trail7', 'T' + _global.cDepth, _global.cDepth); ++_global.cDepth; } v3._x = player._x; v3._y = player._y; v3.Life = 10; v3.onEnterFrame = function () { --this.Life; this._alpha -= 9; if (this.Life < 1) { this.removeMovieClip(); } }; } if (Key.isDown(32) && !springTrail && _global.Fuel > 0 && player._y > 0 && player._visible == true) { snd2.start(0, 1); if (_global.Fuel == 1) { spawnText(player._x, player._y, 'No Fuel'); } --_global.Fuel; if (vY > 14) { vY = 14; } if (vY > -15) { vY -= 6; } v3 = this.attachMovie('Trail2', 'T' + _global.cDepth, _global.cDepth); ++_global.cDepth; v3._x = player._x; v3._y = player._y + player._height / 3; v3.Life = 13; v3.XS = Math.random() * 2 - 1; v3.onEnterFrame = function () { this._x += this.XS; this._y += 3; --this.Life; if (this.Life < 6) { this._alpha -= 12; } if (this.Life < 1) { this.removeMovieClip(); } }; } } if (player._y >= 479) { splash(player._x, player._y - 10); onGround = true; died = true; } blockSpeed = 3 + _global.Time / 600; if (blockSpeed > 6) { blockSpeed = 6; } if (_global.Time % 300 == 0) { --blockLimit; } if (blockLimit < 7) { blockLimit = 7; } if (coinComboTime > 50) { if (coinCombo > 0) { spawnText(player._x, player._y, 'Combo Lost'); } coinCombo = 0; } }; this.createEmptyMovieClip('objectHolder', _global.cDepth); ++_global.cDepth; } movieClip 116 { } movieClip 119 { instance of movieClip 116 { onClipEvent (enterFrame) { this._x = _global.Fuel; } } } movieClip 123 { frame 1 { this.onLoad = function () { if (_global.SoundOn) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } }; this.onEnterFrame = function () { if (_global.SoundOn) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } }; } } button 125 { on (press) { toggleSound(); } } movieClip 128 { instance of movieClip 116 { onClipEvent (enterFrame) { this._x = 100 - this._parent._parent.coinComboTime * 2; if (this._x < 1 || this._parent._parent.died == true) { this._parent._alpha -= 20; } else { this._parent._alpha = 100; } if (this._parent._alpha < 0) { this._parent._alpha = 0; } } } } instance of movieClip 128 { onClipEvent (load) { this._alpha = 0; } } frame 3 { var o = {'n': [1, 15, 13, 12, 11, 15, 10, 7, 9, 7, 12, 1, 4, 8, 12, 12], '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': '1fdcbfa797c148cc', 'score': score}); } frame 4 { gotoAndStop(2); }




http://swfchan.com/23/112161/info.shtml
Created: 12/3 -2019 12:00:46 Last modified: 12/3 -2019 12:00:46 Server time: 03/05 -2024 12:11:13