Frame 3
function urlHandler(obj, item) {
getURL ("http://www.pastelgames.com");
}
function commentsHandler(obj, item) {
getURL ("http://www.pastelgames.com/index.php?dzial=comments&co=game&id=59");
}
function qualityHandler(obj, item) {
if (_quality == "HIGH") {
mHQ.customItems[2] = new ContextMenuItem(" Quality: toggle to HIGH", qualityHandler);
mHQ.customItems[2].separatorBefore = true;
_quality = "LOW";
} else {
mHQ.customItems[2] = new ContextMenuItem("Quality: toggle to LOW", qualityHandler);
mHQ.customItems[2].separatorBefore = true;
_quality = "HIGH";
}
}
var mHQ = new ContextMenu();
mHQ.hideBuiltInItems();
mHQ.customItems[0] = new ContextMenuItem("\u00A9 pastelgames.com", urlHandler);
mHQ.customItems[1] = new ContextMenuItem("all rights reserved", urlHandler);
mHQ.customItems[1].enabled = false;
mHQ.customItems[2] = new ContextMenuItem("Quality: toggle to LOW", qualityHandler);
mHQ.customItems[2].separatorBefore = true;
this.menu = mHQ;
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
fscommand ("fullscreen", true);
var u = this._url;
trace(u);
if (u.substr(0, 4) == "file") {
this.createEmptyMovieClip("offlinemask", this.getNextHighestDepth());
var bd = (new flash.display.BitmapData(550, 420, false, 0));
this.offlinemask.attachBitmap(bd, 0);
this.setMask(this.offlinemask);
}
Frame 9
stop();
Frame 10
function EncrpytString(strVal) {
var _local7 = "aHfEjcDebChGiAfIjDbEjacD";
var _local8 = _local7.length;
var _local11 = "0";
var _local3 = "";
var _local9 = strVal.length;
var _local1 = 0;
_local3 = "";
var _local4;
var _local6;
var _local2;
var _local5 = 0;
nCnt = 0;
while (nCnt < _local9) {
_local4 = strVal.charCodeAt(nCnt);
if (_local4 >= 128) {
_local4 = "X";
}
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local4 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local4 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
nCnt++;
}
_local5 = _local5 % 256;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local5 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local5 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
return(_local3);
}
function GetUrlParam(strUrl, strParam) {
var _local4 = strUrl.toLowerCase();
var _local1 = _local4.indexOf(strParam);
var _local5 = strParam.length;
if (_local1 > 0) {
var _local3;
var _local2 = _local4.indexOf("&", _local1 + _local5);
if (_local2 > 0) {
_local3 = _local2 - _local1;
} else {
_local3 = strUrl.length - _local1;
}
return(strUrl.substr(_local1 + _local5, _local3));
}
return("");
}
function GetBaseUrl(strUrl) {
var _local1 = strUrl.toLowerCase();
var _local2 = _local1.length;
var _local3 = _local1.indexOf("?", 0);
if (_local3 > 0) {
_local2 = _local3;
}
var _local4 = "download";
if (_local1.substr(0, 4) == "http") {
_local4 = strUrl.substr(7, _local2 - 7);
}
return(_local4);
}
function startGame() {
trace("startGame");
gameMC._visible = true;
splashMC._visible = false;
events = {};
events.backToMenu = system.Delegate.create(this, showMenu);
events.saveScore = system.Delegate.create(this, saveScore);
events.tryAgain = system.Delegate.create(this, startGame);
events.comments = system.Delegate.create(this, getComments);
var _local2 = new Trampopo_game(gameMC, events);
}
function getComments() {
trace("com ment, comm");
getURL ("http://www.pastelgames.com/index.php?dzial=comments&co=game&id=59");
}
function downloadIt() {
getURL ((("http://www.arcadetown.com/partner/download.asp?gameid=missiontoneptune&aid=" + _root.GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
function downloadIt() {
getURL ((("http://www.arcadetown.com/free_content/index.asp?gameid=missiontoneptune&aid=" + _root.GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
function saveScore(player, score) {
if (player == undefined) {
getURL ("http://www.arcadetown.com/missiontoneptune/view_high_scores.asp", "_blank");
return(undefined);
}
trace("score is " + [score, player]);
var _local1 = (player + "|") + score;
var _local2 = EncrpytString(_local1);
getURL ("http://www.arcadetown.com/missiontoneptune/hs.asp?" + _local2, "_blank");
showMenu();
}
function getMore() {
getURL ((("http://www.arcadetown.com/index.asp?gameid=missiontoneptune&aid=" + GetUrlParam(_url, "aid=")) + "&refer=") + GetBaseUrl(_url), "_blank");
}
function enableSound(s) {
if (s) {
soundman.enable();
footer.p_enableSND._visible = false;
} else {
soundman.mute();
footer.p_enableSND._visible = true;
}
footer.p_disableSND._visible = !footer.p_enableSND._visible;
}
function showMenu() {
new extensions.movieclip.SimpleButton(splashMC.p_play, system.Delegate.create(this, startGame));
new extensions.movieclip.SimpleButton(splashMC.p_comment, system.Delegate.create(this, getComments));
new extensions.movieclip.SimpleButton(splashMC.p_score, system.Delegate.create(this, saveScore));
new extensions.movieclip.SimpleButton(splashMC.p_more, system.Delegate.create(this, getMore));
new extensions.movieclip.SimpleButton(splashMC.p_arcade, system.Delegate.create(this, getMore));
new extensions.movieclip.SimpleButton(splashMC.p_downl, system.Delegate.create(this, downloadIt));
new extensions.movieclip.SimpleButton(splashMC.p_add2site, system.Delegate.create(this, add2side));
new extensions.movieclip.SimpleButton(footer.p_enableSND, system.Delegate.create(this, enableSound, true));
new extensions.movieclip.SimpleButton(footer.p_disableSND, system.Delegate.create(this, enableSound, false));
gameMC._visible = false;
splashMC._visible = true;
}
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;
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);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&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);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
var soundman = SoundManager.getInstance(this);
enableSound(true);
splashMC._visible = false;
gameMC._visible = false;
stop();
Button.prototype.tabEnabled = false;
MovieClip.prototype.tabEnabled = false;
footer.TF.htmlText = "<p align='center'>Mission to Neptune | created by ";
footer.TF.htmlText = footer.TF.htmlText + "<u><a href='http://www.pastelgames.com' target='_blank'>Pastel Games</a></u>";
footer.TF.htmlText = footer.TF.htmlText + " | \u00A9 2008 | ";
footer.TF.htmlText = footer.TF.htmlText + "<u><a href='http://pastelgames.com/index.php?dzial=game_play&game=59' target='_blank'>comment this game</a></u></p>";
__com_mochibot__("fcae9047", this, 10301, true);
__com_mochibot__("21bc7a93", this, 10301, true);
Frame 18
gotoAndStop ("game");
Symbol 8 MovieClip Frame 1
onEnterFrame = function () {
if (_parent.getBytesLoaded() != _parent.getBytesTotal()) {
_parent.stop();
} else {
_parent.gotoAndStop("library");
}
percent = Math.round((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100);
maska._yscale = percent;
};
Symbol 27 MovieClip Frame 1
var isMoving = false;
stop();
Symbol 57 MovieClip [item] Frame 1
stop();
Symbol 57 MovieClip [item] Frame 16
stop();
Symbol 57 MovieClip [item] Frame 31
stop();
Symbol 57 MovieClip [item] Frame 45
stop();
Symbol 57 MovieClip [item] Frame 61
stop();
Symbol 57 MovieClip [item] Frame 76
stop();
Symbol 57 MovieClip [item] Frame 91
stop();
Symbol 57 MovieClip [item] Frame 106
stop();
Symbol 57 MovieClip [item] Frame 121
stop();
Symbol 57 MovieClip [item] Frame 132
stop();
Symbol 57 MovieClip [item] Frame 144
stop();
Symbol 66 MovieClip Frame 1
function standardAction() {
stop();
}
var onItemOpened = standardAction;
var onItemClosed = standardAction;
var onItemLighted = standardAction;
stop();
Symbol 66 MovieClip Frame 25
stop();
onItemOpen();
Symbol 66 MovieClip Frame 44
stop();
onItemLightedOut();
Symbol 66 MovieClip Frame 63
stop();
onItemClose();
Symbol 66 MovieClip Frame 82
stop();
onItemClosed();
Symbol 68 MovieClip Frame 1
stop();
this._visible = false;
Symbol 68 MovieClip Frame 2
var cont = true;
this._visible = true;
Symbol 68 MovieClip Frame 93
if (cont) {
gotoAndPlay ("cont");
}
Symbol 68 MovieClip Frame 124
this._visible = false;
Symbol 77 MovieClip Frame 19
gotoAndPlay ("start");
Symbol 88 MovieClip Frame 1
var power;
if (power == undefined) {
power = 0;
stop();
}
Symbol 88 MovieClip Frame 19
if (power == 1) {
stop();
}
if (power == -1) {
stop();
}
Symbol 88 MovieClip Frame 50
if (power == 2) {
stop();
}
if (power == -1) {
stop();
}
Symbol 88 MovieClip Frame 84
if (power == 3) {
stop();
}
if (power == -1) {
stop();
}
Symbol 88 MovieClip Frame 119
if (power == 2) {
stop();
}
Symbol 88 MovieClip Frame 139
if (power == 1) {
stop();
} else {
gotoAndPlay ("1to2");
}
Symbol 88 MovieClip Frame 160
if (power == 1) {
stop();
}
Symbol 88 MovieClip Frame 181
if (power == 3) {
stop();
}
if (power == -1) {
stop();
}
Symbol 89 MovieClip Frame 1
gotoAndStop ("start");
Symbol 89 MovieClip Frame 19
gotoAndStop ("start");
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 61
stop();
Symbol 115 MovieClip Frame 150
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 131 MovieClip [jumper_start] Frame 1
stop();
Symbol 138 MovieClip [jumper_jump] Frame 1
var acc = 0;
var onJumperFall;
var onJumperStroke;
stop();
Symbol 138 MovieClip [jumper_jump] Frame 37
gotoAndPlay ("waiting");
Symbol 138 MovieClip [jumper_jump] Frame 46
var acc = 0;
gotoAndStop ("start");
Symbol 138 MovieClip [jumper_jump] Frame 55
var acc = 0;
gotoAndStop ("start");
Symbol 138 MovieClip [jumper_jump] Frame 98
onJumperFall();
Symbol 138 MovieClip [jumper_jump] Frame 123
onJumperStroke();
stop();
Symbol 144 MovieClip Frame 1
var score = "0";
Symbol 149 MovieClip Frame 10
stop();
Symbol 149 MovieClip Frame 21
stop();
Symbol 149 MovieClip Frame 30
stop();
Symbol 149 MovieClip Frame 39
stop();
Symbol 149 MovieClip Frame 61
stop();
Symbol 152 MovieClip Frame 10
stop();
Symbol 152 MovieClip Frame 21
stop();
Symbol 152 MovieClip Frame 30
stop();
Symbol 152 MovieClip Frame 39
stop();
Symbol 152 MovieClip Frame 61
stop();
Symbol 155 MovieClip Frame 10
stop();
Symbol 155 MovieClip Frame 21
stop();
Symbol 155 MovieClip Frame 30
stop();
Symbol 155 MovieClip Frame 39
stop();
Symbol 155 MovieClip Frame 61
stop();
Symbol 158 MovieClip Frame 10
stop();
Symbol 158 MovieClip Frame 21
stop();
Symbol 158 MovieClip Frame 30
stop();
Symbol 158 MovieClip Frame 39
stop();
Symbol 158 MovieClip Frame 61
stop();
Symbol 161 MovieClip Frame 1
var score = "You scored";
Symbol 164 MovieClip Frame 1
var nickname = "";
Symbol 171 MovieClip Frame 1
var info = "info ...";
Symbol 175 MovieClip Frame 1
var info = "instruction";
Symbol 178 MovieClip Frame 1
var info = "0";
Symbol 181 MovieClip Frame 1
var info = "0";
Symbol 182 MovieClip Frame 1
p_hit._visible = false;
Symbol 186 MovieClip Frame 10
stop();
Symbol 186 MovieClip Frame 21
stop();
Symbol 186 MovieClip Frame 30
stop();
Symbol 186 MovieClip Frame 39
stop();
Symbol 186 MovieClip Frame 61
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 53
if (isbutton == true) {
stop();
}
Symbol 220 MovieClip Frame 54
stop();
this._parent.play();
Symbol 228 MovieClip Frame 10
stop();
Symbol 228 MovieClip Frame 21
stop();
Symbol 228 MovieClip Frame 30
stop();
Symbol 228 MovieClip Frame 39
stop();
Symbol 228 MovieClip Frame 61
stop();
Symbol 233 MovieClip Frame 10
stop();
Symbol 233 MovieClip Frame 21
stop();
Symbol 233 MovieClip Frame 30
stop();
Symbol 233 MovieClip Frame 39
stop();
Symbol 233 MovieClip Frame 61
stop();
Symbol 238 MovieClip Frame 10
stop();
Symbol 238 MovieClip Frame 21
stop();
Symbol 238 MovieClip Frame 30
stop();
Symbol 238 MovieClip Frame 39
stop();
Symbol 238 MovieClip Frame 61
stop();
Symbol 243 MovieClip Frame 10
stop();
Symbol 243 MovieClip Frame 21
stop();
Symbol 243 MovieClip Frame 30
stop();
Symbol 243 MovieClip Frame 39
stop();
Symbol 243 MovieClip Frame 61
stop();
Symbol 268 MovieClip Frame 10
stop();
Symbol 268 MovieClip Frame 22
gotoAndPlay ("start");
Symbol 268 MovieClip Frame 31
stop();
Symbol 268 MovieClip Frame 40
gotoAndPlay ("start");
Symbol 268 MovieClip Frame 62
stop();
Symbol 274 MovieClip Frame 10
stop();
Symbol 274 MovieClip Frame 21
stop();
Symbol 274 MovieClip Frame 30
stop();
Symbol 274 MovieClip Frame 39
stop();
Symbol 274 MovieClip Frame 61
stop();
Symbol 277 MovieClip Frame 10
stop();
Symbol 277 MovieClip Frame 21
stop();
Symbol 277 MovieClip Frame 30
stop();
Symbol 277 MovieClip Frame 39
stop();
Symbol 277 MovieClip Frame 61
stop();
Symbol 284 MovieClip Frame 1
gotoAndPlay (2);
Symbol 284 MovieClip Frame 71
bg.onRelease = this._parent.getMore;
stop();
Symbol 284 MovieClip Frame 120
this._parent.showMenu();
Symbol 284 MovieClip Frame 134
this._visible = false;
stop();
Symbol 294 MovieClip [__Packages.extensions.movieclip.SimpleButton] Frame 0
class extensions.movieclip.SimpleButton
{
var MC;
function SimpleButton (tMC, _release, _rollover, _rollout, _press, _releaseoutside, _dragin, _dragout) {
MC = tMC;
MC.isbutton = true;
rolloutAction = _rollout;
rolloverAction = _rollover;
releaseoutsideAction = ((_releaseoutside == undefined) ? (_release) : (_releaseoutside));
releaseAction = _release;
pressAction = _press;
MC.onRollOver = system.Delegate.create(this, RollOver);
MC.onRollOut = system.Delegate.create(this, RollOut);
MC.onRelease = system.Delegate.create(this, Release);
MC.onPress = system.Delegate.create(this, Press);
MC.onReleaseOutside = system.Delegate.create(this, ReleaseOutside);
MC.onDragOver = _dragin;
MC.onDragOut = _dragout;
for (var _local2 in MC) {
if (_local2.indexOf("hit") != -1) {
((MC.hitArea = MC[_local2]))._visible = false;
}
}
MC.gotoAndPlay("start");
}
function RollOut() {
MC.gotoAndPlay("rollout");
rolloutAction();
}
function RollOver() {
MC.gotoAndPlay("rollover");
rolloverAction();
}
function ReleaseOutside() {
trace("rel outs");
MC.gotoAndPlay("release");
releaseoutsideAction();
}
function Release() {
trace("relaes");
MC.gotoAndPlay("release");
releaseAction();
}
function Press() {
if (pressAction != undefined) {
MC.gotoAndPlay("onpress");
pressAction();
} else {
MC.gotoAndStop("release");
}
}
var rolloutAction = null;
var rolloverAction = null;
var releaseoutsideAction = null;
var releaseAction = null;
var pressAction = null;
}
Symbol 295 MovieClip [__Packages.system.Delegate] Frame 0
class system.Delegate
{
function Delegate () {
}
static function create(obj, func) {
var extraArgs = arguments.slice(2);
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local3 = arguments.concat(extraArgs);
return(_local4.apply(_local2, _local3));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
}
Symbol 296 MovieClip [__Packages.Trampopo_game] Frame 0
class Trampopo_game
{
var MC, externalevents, timer, keyboard, sndman, arrXtnd, globalize, scoreValue, pointer, coinsMC, itemsMC, aliensMC, platform_spectrum, thisLevel, gamestage_xMax, items_fullTable, items_toGet, rows_itemsOn, rows_coinsOn, rows_aliensOn, rows_grid, rows_areaX, gamestage_xMin, jumper, jumperVX, jumperVY, platform, platformRotation, jumperBounds, platformBounds, jumperX, jumperY, levelsTable;
function Trampopo_game (_MC, ev, test) {
MC = _MC;
externalevents = ev;
timer = system.Timer.getInstance(MC);
keyboard = keyboardPackage.Keyboard.getInstance();
sndman = SoundManager.getInstance();
arrXtnd = new ArrayXProtos();
globalize = new extensions.movieclip.GlobalizeLocalize(MC);
keyboard.addListener(this);
setStage();
setGameArea(0, 0, 550, 400);
setPlatform(MC.platform);
setPlatformColors(false);
scoreValue = 0;
platform_energy = 0;
setScore();
setLevels();
Mouse.addListener(this);
Mouse.hide();
if (test) {
pointer = new Object();
Mouse.show();
} else {
Mouse.show();
newLevel();
}
}
function onKeyUp(keycode) {
switch (keycode) {
case 37 :
case 39 :
jumper_acceleration = 0;
accelerateJumper();
}
}
function onKeyDown(keycode) {
if (keycode == keyboard.getKeyCode("P")) {
if (paused) {
timer.addListener(MC, 0, system.Delegate.create(this, goOn), 0);
MC.pausegame.gotoAndStop("play");
} else {
timer.removeListener(MC);
MC.pausegame.gotoAndStop("play");
MC.pausegame.gotoAndStop("pause");
MC.pausegame.swapDepths(200);
}
paused = !paused;
}
if (paused) {
return(undefined);
}
switch (keycode) {
case keyboard.getKeyCode("N") :
break;
case keyboard.getKeyCode("C") :
trace("change colors");
setPlatformColors(!platform_useColors);
break;
case keyboard.getKeyCode("M") :
externalevents.switchSound(!sndman.__get__enabled());
break;
case 38 :
case keyboard.getKeyCode("W") :
switchPlatform("up");
break;
case 40 :
case keyboard.getKeyCode("S") :
switchPlatform("dn");
break;
case 37 :
case keyboard.getKeyCode("A") :
if (jumper_canJumping) {
jumper_acceleration = -jumper_accValue;
accelerateJumper();
}
break;
case 39 :
case keyboard.getKeyCode("D") :
if (!jumper_canJumping) {
break;
}
jumper_acceleration = jumper_accValue;
accelerateJumper();
}
}
function onMouseDown() {
if ((paused || (endGame)) || (jumper_mustWait)) {
return(undefined);
}
if (jumper_canJumping) {
trace("switch platform!");
switchPlatform("up");
} else {
jumpJumper();
}
}
function get MouseX() {
return(MC._xmouse);
}
function get MouseY() {
return(MC._ymouse);
}
function checkDistance(x0, y0, x1, y1) {
var _local2 = x1 - x0;
var _local1 = y1 - y0;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function setStage() {
MC.nextlevel._visible = false;
MC.gameover._visible = false;
MC.pausegame._visible = true;
MC.pausegame.swapDepths(200);
MC.items.swapDepths(150);
MC.scorefield.swapDepths(151);
coinsMC = MC.createEmptyMovieClip("coinscontainer", 10);
itemsMC = MC.createEmptyMovieClip("itemscontainer", 20);
aliensMC = MC.createEmptyMovieClip("alienscontainer", 30);
var _local2 = system.Delegate.create(this, onKeyDown, 80);
var _local3 = system.Delegate.create(this, pause_noJumping, true);
var _local4 = system.Delegate.create(this, pause_noJumping, false);
var _local5 = new extensions.movieclip.SimpleButton(MC.pausegame.p_pause, _local2, _local3, _local4);
platform_spectrum = new Array();
platform_spectrum[1] = MC.spectrum1;
platform_spectrum[2] = MC.spectrum2;
platform_spectrum[3] = MC.spectrum3;
sndman.play("snd_ambient", true);
}
function setGameArea(stage_xmin, stage_ymin, stage_xmax, stage_ymax) {
stageBounds.xMin = stage_xmin;
stageBounds.yMin = stage_ymin;
stageBounds.xMax = stage_xmax;
stageBounds.yMax = stage_ymax;
}
function setBackgrounds(lvl) {
trace("BG LVL " + lvl);
var _local3 = "background_";
var _local2;
if (lvl == 0) {
_local2 = MC.bg_front1;
_local2.gotoAndStop(_local3 + "start");
_local2._x = 0;
_local2._y = stageBounds.yMax;
MC.bg_front2._visible = false;
_local2 = MC.bg_far1;
_local2._x = 0;
_local2._y = stageBounds.yMax;
MC.bg_far1._visible = true;
MC.bg_far2._visible = false;
} else {
if (lvl == undefined) {
_local3 = _local2.swap2bg;
} else {
_local3 = _local3 + ((thisLevel.gameOver == true) ? "end" : (lvl % gamestage_backgrounds));
}
_local2 = MC.bg_front2;
if (_local2.isMoving == false) {
_local2.gotoAndStop(_local3);
_local2._x = stageBounds.xMax;
_local2._y = stageBounds.yMax;
_local2._visible = true;
_local2.isMoving = true;
_local2.swap2bg = "";
timer.addListener(_local2, 0, system.Delegate.create(this, moveBackground, _local3), 0);
} else {
_local2.swap2bg = _local3;
}
}
}
function moveBackground(bg) {
var _local2 = MC.bg_front2;
var _local3 = MC.bg_far1;
var _local4 = (Math.PI * _local2._x) / _local2._width;
MC.bg_front1._x = MC.bg_front1._x - (background_speed * (0.5 + Math.sin(_local4)));
_local2._x = MC.bg_front1.getBounds(MC).xMax;
_local3._x = _local3._x - (background2_speed * (0.5 + Math.sin(_local4)));
MC.bg_far2._x = _local3._x + _local3._width;
if (_local3._x <= (-_local3._width)) {
_local3._x = 0;
MC.bg_far2._x = _local3._width;
}
MC.bg_far2._visible = _local3.getBounds(MC).xMax <= gamestage_xMax;
if (_local2._x <= 0) {
_local2.isMoving = false;
_local2._visible = false;
MC.bg_front1._x = 0;
MC.bg_front1.gotoAndStop(bg);
if (_local2.swap2bg != "") {
setBackgrounds();
} else {
timer.removeListener(_local2);
}
}
}
function closeItems(it) {
var _local3;
if ((it != undefined) && (it != 0)) {
_local3 = MC.items["holder" + (it - 1)];
_local3.onItemClose = system.Delegate.create(this, closeItems, it - 1);
_local3.gotoAndPlay("close");
} else {
var _local2 = 0;
while (_local2 < 7) {
_local3 = MC.items["holder" + _local2];
_local3.onItemClose = null;
_local3.gotoAndStop("start");
_local2++;
}
shuffleItems();
showItems(thisLevel.items);
}
}
function shuffleItems() {
var _local3 = new Array();
var _local2 = 1;
while (_local2 <= items_noOfSymbols) {
_local3.push(_local2);
_local2++;
}
items_fullTable = arrXtnd.shuffle(_local3);
items_toGet = _local3.slice(0, thisLevel.items);
}
function showItems(it) {
var _local3;
var _local2;
if ((it != undefined) && (it != 0)) {
_local2 = thisLevel.items - it;
_local3 = MC.items["holder" + _local2];
trace([_local3, "i co ?", it - 1, items_toGet[_local2], items_fullTable[_local2]]);
_local3.item.gotoAndStop("item" + items_toGet[_local2]);
_local3.onItemOpen = system.Delegate.create(this, showItems, it - 1);
_local3.gotoAndPlay("openitem");
} else {
jumper_mustWait = false;
}
}
function displayStartView() {
var _local8 = thisLevel.itemsStartView.concat();
var _local10 = thisLevel.coinsStartView.concat();
var _local14 = thisLevel.aliens.concat();
rows_itemsOn = new Array();
rows_coinsOn = new Array();
rows_aliensOn = new Array();
var _local2;
var _local21 = thisLevel.coins != 0;
var _local22 = _local14.join("") != "000";
rows_grid = new Array();
rows_areaX = new Array();
var _local23 = (stageBounds.xMax - stageBounds.xMin) / 2;
var _local13 = int(rows_wideX.length / 2);
var _local5 = rows_wideX.length;
rows_areaX[_local13] = _local23 - ((0.5 * (_local5 % 2)) * rows_wideX[_local13]);
var _local4 = _local13;
while (_local4 > 0) {
rows_areaX[_local4 - 1] = rows_areaX[_local4] - rows_wideX[_local4 - 1];
_local4--;
}
_local4 = _local13;
while (_local4 < _local5) {
rows_areaX[_local4 + 1] = rows_areaX[_local4] + rows_wideX[_local4];
_local4++;
}
_local4 = 0;
while (_local4 < _local8.length) {
rows_grid[_local4] = [];
var _local12 = Math.ceil((rowsDepthY[_local4][1] - rowsDepthY[_local4][0]) / rows_stepY[_local4]);
var _local3 = 0;
while (_local3 < _local5) {
var _local9 = (_local4 * _local5) + _local3;
if (_local8[_local4][_local3] != 0) {
_local2 = itemsMC.attachMovie("item", "i" + _local9, _local9, {_width:1, _height:1});
rows_grid[_local4][_local3] = _local2;
var _local7 = (rows_itemsOn[rows_itemsOn.length] = new Object());
var _local6 = _local8[_local4][_local3] - 1;
_local7._MC = _local2;
_local7._time = (items_stagetime * (0.5 + Math.random())) + getTimer();
_local7._c = _local3;
_local7._r = _local4;
_local7.item = ((_local6 < 0) ? (items_fullTable[random(items_fullTable.length)]) : (items_toGet[_local6]));
_local7.isOut = false;
_local2.gotoAndStop("item" + _local7.item);
trace(["this item has no " + _local7.item, _local2._currentframe]);
_local2._x = rows_areaX[_local3] + random(rows_wideX[_local3]);
_local2._y = rowsDepthY[_local4][0] + ((random(2) ? -1 : 1) * random(_local12));
} else if (itemsMC["i" + ((_local4 * _local5) + _local3)] != undefined) {
itemsMC["i" + _local9].removeMovieClip();
}
_local3++;
}
_local4++;
}
for (var _local20 in aliensMC) {
if (aliensMC[_local20] instanceof MovieClip) {
aliensMC[_local20].removeMovieClip();
}
}
if (_local22) {
_local4 = 0;
while (_local4 < _local14.length) {
var _local12 = Math.ceil((rowsDepthY[_local4][1] - rowsDepthY[_local4][0]) / rows_stepY[_local4]);
if (_local14[_local4] != 0) {
var _local3 = 0;
while (rows_grid[_local4][_local3] != undefined) {
_local3++;
}
var _local9 = (_local4 * _local5) + _local3;
_local2 = aliensMC.attachMovie("alien", "i" + _local9, _local9, {_width:1, _height:1});
rows_grid[_local4][_local3] = _local2;
var _local7 = (rows_aliensOn[rows_aliensOn.length] = new Object());
_local7._MC = _local2;
_local7._time = (items_stagetime * (0.5 + Math.random())) + getTimer();
_local7._c = _local3;
_local7._r = _local4;
_local2._x = rows_areaX[_local3] + random(rows_wideX[_local3]);
_local2._y = rowsDepthY[_local4][0] + ((random(2) ? -1 : 1) * random(_local12));
}
moveAliens = onAliensMoving;
_local4++;
}
}
for (var _local20 in coinsMC) {
if (coinsMC[_local20] instanceof MovieClip) {
coinsMC[_local20].removeMovieClip();
}
}
if (_local21) {
var _local9 = 0;
_local4 = 0;
while (_local4 < _local10.length) {
if (_local10[_local4] != 0) {
_local9++;
_local2 = coinsMC.attachMovie("coin", "i" + _local9, _local9, {_alpha:0});
var _local11 = (random(2) ? -1 : 1);
rows_coinsOn.push({_MC:_local2, dir:_local11, _times:_local10[_local4]});
_local2._x = ((_local11 == 1) ? (gamestage_xMin) : (gamestage_xMax));
var _local12 = Math.ceil((rowsDepthY[_local4][1] - rowsDepthY[_local4][0]) / rows_stepY[_local4]);
_local2._y = rowsDepthY[_local4][0] + ((random(2) ? -1 : 1) * random(_local12));
}
moveCoins = onCoinsMoving;
_local4++;
}
}
moveItems = onItemsMoving;
}
function checkElementHitted() {
var _local2;
var _local3;
if (!jumper_canFlying) {
return(undefined);
}
for (var _local5 in rows_itemsOn) {
_local2 = rows_itemsOn[_local5];
_local3 = globalize.globalizeMC(_local2._MC);
if (jumper.hitTest(_local3.x, _local3.y, true) && (!_local2.isOut)) {
_local2.isOut = true;
trace(["You have got ITEM " + _local2.item, thisLevel.items - items_toGet.length]);
if (items_toGet[0] == _local2.item) {
if (jumper_canCatchBonus) {
scoreValue = scoreValue + score_comboValue;
}
sndman.play("snd_gooditem");
scoreValue = scoreValue + score_itemValue;
platform_energy = platform_energy + items_energyValue;
_local2._MC.gotoAndPlay("collect");
var _local4 = MC.items["holder" + (thisLevel.items - items_toGet.length)];
_local4.gotoAndPlay("ligthout");
_local4.onItemLightedOut = system.Delegate.create(this, setItemCatched);
items_toGet.splice(0, 1);
_local2._time = getTimer();
jumper_canCatchBonus = true;
} else {
sndman.play("snd_baditem");
scoreValue = score_startValue;
jumper_canFlying = false;
jumperVX = 0;
jumperVY = 0;
jumper.gotoAndPlay("stroke");
closeItems(thisLevel.items);
}
}
}
for (var _local5 in rows_aliensOn) {
_local2 = rows_aliensOn[_local5];
_local3 = globalize.globalizeMC(_local2._MC);
if (jumper.hitTest(_local3.x, _local3.y, true)) {
scoreValue = scoreValue + score_strokeValue;
sndman.play("snd_alien");
trace("ALIEN has got You");
jumper_canFlying = false;
jumperVX = 0;
jumperVY = 0;
jumper.gotoAndPlay("stroke");
}
}
for (var _local5 in rows_coinsOn) {
_local2 = rows_coinsOn[_local5];
_local3 = globalize.globalizeMC(_local2._MC);
if (jumper.hitTest(_local3.x, _local3.y, true)) {
scoreValue = scoreValue + score_coinValue;
platform_energy = platform_energy + coins_energyValue;
sndman.play("snd_coin");
trace("You have got COIN");
var _local4 = _local2._MC;
_local4.gotoAndPlay("collect");
_local2.collected = true;
}
}
}
function setItemCatched() {
if (items_toGet.length == 0) {
scoreValue = scoreValue + score_endlevelValue;
newLevel();
}
}
function checkElementSize(tMC) {
if (tMC._xscale > 0) {
if (tMC._xscale < 100) {
tMC._yscale = (tMC._xscale = tMC._xscale + items_scalestep);
} else if (tMC._xscale > 100) {
tMC._yscale = (tMC._xscale = 100);
}
}
}
function onItemsMoving() {
var _local3;
var _local8;
var _local9;
var _local10;
var _local2;
var _local6 = 0;
while (_local6 < rows_itemsOn.length) {
_local2 = rows_itemsOn[_local6];
_local3 = _local2._MC;
_local8 = _local2._time;
_local9 = _local2._c;
_local10 = _local2._r;
checkElementSize(_local3);
if (getTimer() > _local8) {
_local3._alpha = _local3._alpha - items_fadestep;
if (_local3._alpha < 0) {
if (_local2.isOut) {
_local2.isOut = false;
}
_local2.item = (random(thisLevel.maxBad) ? (items_fullTable[random(items_fullTable.length)]) : (items_toGet[0]));
_local3.gotoAndStop("item" + _local2.item);
var _local4;
var _local5;
do {
_local4 = random(rows_grid.length);
_local5 = random(rows_wideX.length);
} while (rows_grid[_local4][_local5] != undefined);
rows_grid[_local4][_local5] = _local3;
rows_grid[_local10][_local9] = undefined;
_local2._c = _local5;
_local2._r = _local4;
var _local7 = Math.ceil((rowsDepthY[_local4][1] - rowsDepthY[_local4][0]) / rows_stepY[_local4]);
_local3._x = rows_areaX[_local5] + random(rows_wideX[_local5]);
_local3._y = rowsDepthY[_local4][0] + ((random(2) ? -1 : 1) * random(_local7));
_local3._width = (_local3._height = 1);
_local3._alpha = 100;
_local2._time = (items_stagetime * (0.5 + Math.random())) + getTimer();
}
}
_local6++;
}
}
function onAliensMoving() {
var _local4;
var _local14;
var _local15;
var _local16;
var _local2;
var _local6 = 0;
while (_local6 < rows_aliensOn.length) {
_local2 = rows_aliensOn[_local6];
_local4 = _local2._MC;
_local14 = _local2._time;
_local15 = _local2._c;
_local16 = _local2._r;
checkElementSize(_local4);
if (getTimer() > _local14) {
if (rows_aliensOn[_local6].vector == undefined) {
var _local3;
var _local5;
do {
_local3 = 1 + random(rows_grid.length - 1);
_local5 = random(rows_wideX.length);
} while (rows_grid[_local3][_local5] != undefined);
rows_grid[_local3][_local5] = _local4;
rows_grid[_local16][_local15] = undefined;
_local2._c = _local5;
_local2._r = _local3;
_local2.vector = new Object();
var _local13 = Math.ceil((rowsDepthY[_local3][1] - rowsDepthY[_local3][0]) / rows_stepY[_local3]);
var _local8 = rows_areaX[_local5] + random(rows_wideX[_local5]);
var _local7 = rowsDepthY[_local3][0] + ((random(2) ? -1 : 1) * random(_local13));
var _local12 = checkDistance(_local4._x, _local4._y, _local8, _local7);
var _local9 = Math.atan2(_local7 - _local4._y, _local8 - _local4._x);
var _local11 = (_local2.vector.x = aliens_speed * Math.cos(_local9));
var _local10 = (_local2.vector.y = aliens_speed * Math.sin(_local9));
_local2.vector.newX = _local8;
_local2.vector.newY = _local7;
_local2.steps = int(_local12 / aliens_speed);
_local4._xscale = ((_local2.vector.x > 0) ? -100 : 100);
} else {
var _local11 = _local2.vector.x;
var _local10 = _local2.vector.y;
_local4._x = _local4._x + _local11;
_local4._y = _local4._y + _local10;
_local2.steps--;
if (_local2.steps < 0) {
_local2._time = (items_stagetime * (0.5 + Math.random())) + getTimer();
delete _local2.vector;
}
}
}
_local6++;
}
}
function onCoinsMoving() {
var _local2;
var _local7;
var _local6;
var _local3;
var _local5 = 0;
while (_local5 < rows_coinsOn.length) {
_local3 = rows_coinsOn[_local5];
_local2 = _local3._MC;
_local7 = _local3._times;
_local6 = _local3.dir;
if (_local3.collected == true) {
_local2._alpha = _local2._alpha - items_fadestep;
if (_local2._alpha < 0) {
if (_local3._times--) {
_local2.gotoAndPlay("ccw");
_local2._x = ((_local6 > 0) ? (stageBounds.xMax) : (stageBounds.xMin));
_local3.collected = false;
} else {
_local2.removeMovieClip();
rows_coinsOn.splice(Number(_local5), 1);
}
}
} else if (_local2._alpha < 100) {
_local2._alpha = _local2._alpha + items_fadestep;
} else {
_local2._alpha = 100;
_local2._x = _local2._x + (_local6 * aliens_speed);
var _local4 = 0;
if (((_local6 > 0) && (_local2._x > stageBounds.xMax)) || ((_local6 < 0) && (_local2._x < stageBounds.xMin))) {
_local2._alpha = 0;
_local4 = (random(2) ? -1 : 1);
_local3.dir = _local4;
}
if (_local4 < 0) {
_local2._x = stageBounds.xMax;
} else if (_local4 > 0) {
_local2._x = stageBounds.xMin;
}
}
_local5++;
}
}
function actualizeEnergy() {
var _local2 = MC.energy;
platform_energy = ((platform_energy > platform_maxEnergyValue) ? (platform_maxEnergyValue) : (platform_energy));
if (!endLevel) {
platform_energy = platform_energy - platform_energydownvalue;
if (platform_energy <= 0) {
endGame = true;
gameOver();
} else if ((getTimer() > platform_nextBlinkTime) && (platform_energy <= platform_energyemergency)) {
_local2.item._visible = !_local2.item._visible;
if (_local2.item._visible) {
sndman.play("snd_energy");
}
platform_nextBlinkTime = getTimer() + platform_blinkTime;
}
}
_local2.energyline.bar._y = ((-_local2.energyline.bar._height) * platform_energy) / platform_maxEnergyValue;
}
function setPlatform(tMC) {
platform = tMC;
moveJumper = jumperMoveWithPlatform;
jumper._visible = true;
tMC = MC.energy;
tMC.gotoAndStop("fuel");
tMC.item.gotoAndStop("fuel");
tMC.energyline.bar._y = -tMC.energyline.bar._height;
}
function setPlatformColors(rainbow) {
rainbow = rainbow == true;
if (rainbow) {
for (var _local2 in platform_spectrum) {
platform_spectrum[_local2].gotoAndStop("color" + _local2);
}
platform.plasma.gotoAndStop("on" + platform_pos);
platform.arrow1.gotoAndStop("on" + ((platform_pos > 0) * platform_pos));
platform.arrow2.gotoAndStop("on" + ((platform_pos > 1) * platform_pos));
platform.arrow3.gotoAndStop("on" + ((platform_pos == 3) * platform_pos));
} else {
for (var _local2 in platform_spectrum) {
platform_spectrum[_local2].gotoAndStop("nocolor");
}
platform.plasma.gotoAndStop("on3");
platform.arrow1.gotoAndStop("on" + ((platform_pos > 0) * 3));
platform.arrow2.gotoAndStop("on" + ((platform_pos > 1) * 3));
platform.arrow3.gotoAndStop("on" + ((platform_pos == 3) * 3));
}
platform_useColors = rainbow;
}
function switchPlatform(dir) {
var _local2 = platform_pos;
sndman.play("snd_switchplatform");
dir = ((dir == undefined) ? "up" : (dir));
var _local4 = dir == "up";
trace([dir, _local4]);
if (_local4) {
platform_pos = ((platform_pos == platform_gravity.length) ? 1 : (platform_pos + 1));
} else {
platform_pos = ((platform_pos <= 1) ? (platform_gravity.length) : (platform_pos - 1));
}
trace(["platform_pos", _local2, platform_pos]);
if (platform_useColors) {
platform.plasma.power = platform_pos;
platform.plasma.gotoAndPlay((_local2 + "to") + platform_pos);
platform.arrow1.gotoAndStop("on" + ((platform_pos > 0) * platform_pos));
platform.arrow2.gotoAndStop("on" + ((platform_pos > 1) * platform_pos));
platform.arrow3.gotoAndStop("on" + ((platform_pos == 3) * platform_pos));
} else {
platform.plasma.power = -1;
platform.plasma.gotoAndStop("on3");
platform.arrow1.gotoAndStop("on" + ((platform_pos > 0) * 3));
platform.arrow2.gotoAndStop("on" + ((platform_pos > 1) * 3));
platform.arrow3.gotoAndStop("on" + ((platform_pos == 3) * 3));
}
platform_spectrum[_local2]._visible = false;
platform_spectrum[platform_pos]._visible = true;
platform.d1._visible = (!(platform_pos % 2)) || (platform_pos == 3);
platform.d2._visible = platform_pos % 2;
platform.d3._visible = (!(platform_pos % 2)) || (platform_pos == 3);
gravity = platform_gravity[platform_pos - 1];
}
function accelerateJumper() {
if (!jumper_canFlying) {
return(undefined);
}
if (!jumper_acceleration) {
jumper.man.d.gotoAndStop("stop");
} else {
jumper.man.d.gotoAndPlay("start");
}
}
function jumperMoveWithPlatform() {
jumper._x = platform._x;
jumper._y = platform._y;
jumper._rotation = platform._rotation;
}
function rotatePlatform() {
platformRotation = Math.atan2(MouseY - platform._y, MouseX - platform._x);
platformRotation = ((platformRotation > 0) ? (-platformRotation) : (platformRotation)) + PI05;
platform._rotation = (platformRotation = platformRotation * PI180d);
if (platform._rotation > platform_maxRotation) {
platform._rotation = platform_maxRotation;
} else if (platform._rotation < (-platform_maxRotation)) {
platform._rotation = -platform_maxRotation;
}
platform.shadow._rotation = -platform._rotation;
}
function movePlatform() {
var _local2 = platform._x - Math.round(MouseX);
platform._x = platform._x - (_local2 / platform_speed);
}
function showJumper() {
jumper = MC.jumper;
jumper.swapDepths(100);
if (jumper == undefined) {
trace("error: no JUMPER added...");
}
jumper_canJumping = false;
jumper.gotoAndStop("start");
moveJumper = jumperMoveWithPlatform;
}
function jumpJumper() {
if (jumper == undefined) {
trace("error: no jumper added...");
return(undefined);
}
trace("jumping");
var _local2 = "jumper";
sndman.play("snd_jump");
jumperVX = 0;
jumperVY = -jumper_speed;
jumper.gotoAndStop("start");
jumper.man.gotoAndStop("fly_up");
platform.gotoAndPlay("shoot");
moveJumper = onJumperMoving;
gravity = platform_gravity[platform_pos - 1];
jumper_canJumping = true;
jumper_canFlying = true;
jumper_canCatchBonus = false;
}
function onJumperMoving() {
var _local2 = jumper._x + jumperVX;
var _local4 = jumper._y + jumperVY;
jumperBounds = jumper.getBounds(MC);
if (((jumperBounds.xMin + jumperVX) < stageBounds.xMin) || ((jumperBounds.xMax + jumperVX) > stageBounds.xMax)) {
_local2 = jumper._x - jumperVX;
jumperVX = -jumperVX;
}
jumperBounds = jumper.getBounds(platform);
platformBounds = platform.getBounds();
if (jumperVY > 0) {
if (jumper_canFlying) {
jumper.man.gotoAndStop("fly_down");
}
if ((((jumperBounds.yMax >= (-jumper_speed)) && (jumperBounds.xMin > platformBounds.xMin)) && (jumperBounds.xMax < platformBounds.xMax)) && (!jumper_mustWait)) {
var _local3 = Math.atan2(0.5 * (platformBounds.xMax - platformBounds.xMin), platform._x - jumper._x) - PI05;
jumperVX = Math.sin(_local3) * jumper_speed;
jumperVY = -Math.abs(Math.cos(_local3) * jumper_speed);
_local2 = jumper._x + jumperVX;
_local4 = (jumper._y + jumperVY) - gravity;
jumper.gotoAndStop("start");
jumper.man.gotoAndStop("fly_up");
platform.gotoAndPlay("shoot");
jumper_canFlying = true;
jumper_canCatchBonus = false;
sndman.play("snd_jump");
} else if (jumper._y > (platform._y + (platform._height / 2))) {
moveJumper = null;
scoreValue = scoreValue + score_falldownValue;
jumper.onJumperFall = system.Delegate.create(this, showJumper);
jumper.gotoAndPlay("fall");
sndman.play("snd_fall");
return(undefined);
}
}
jumperVY = jumperVY + gravity;
if (jumper_canFlying) {
jumperVX = jumperVX + jumper_acceleration;
if (jumperVX > (0.5 * jumper_speed)) {
jumperVX = 0.5 * jumper_speed;
jumper_acceleration = 0;
} else if (jumperVX < (-0.5 * jumper_speed)) {
jumperVX = -0.5 * jumper_speed;
jumper_acceleration = 0;
}
if (jumper_acceleration != 0) {
jumper._xscale = ((jumper_acceleration > 0) ? -100 : 100);
} else {
jumper._xscale = ((jumperVX > 0) ? -100 : 100);
}
}
jumper._x = _local2;
jumper._y = _local4;
jumperX = jumper._x;
jumperY = jumper._y;
}
function setScore(alternate) {
if (alternate != undefined) {
MC.scorefield.score = alternate;
} else if (scoreValue) {
scoreValue = ((scoreValue < 0) ? 0 : (scoreValue));
var _local2 = Number(MC.scorefield.score);
var _local3 = Number(Math.round(scoreValue) + score_addString);
if (isNaN(_local2)) {
MC.scorefield.score = _local3;
} else {
if (_local2 < _local3) {
trace([_local2, _local3]);
MC.scorefield.score = _local2 + Math.ceil((_local3 - _local2) / score_stepdisplay);
return(false);
}
if (_local2 > _local3) {
trace([_local2, _local3]);
MC.scorefield.score = _local2 + Math.floor((_local3 - _local2) / score_stepdisplay);
return(false);
}
}
} else {
MC.scorefield.score = "0";
}
return(true);
}
function goOn() {
moveNewRow();
moveJumper();
movePointer();
checkElementHitted();
movePlatform();
rotatePlatform();
actualizeEnergy();
moveItems();
moveCoins();
moveAliens();
setScore();
}
function setLevels() {
gameLevel = 0;
var _local2 = (levelsTable = new Array());
_local2[0] = new Object();
_local2[0].description = "free willy";
_local2[0].instruction = "catch symbol to open the cage.";
_local2[0].items = 1;
_local2[0].coins = 0;
_local2[0].maxBad = 0;
_local2[0].maxGood = 1;
_local2[0].itemsStartView = [[0, 1, 0], [0, 0, 0], [0, 0, 0]];
_local2[0].coinsStartView = [0, 0, 0];
_local2[0].aliens = [0, 0, 0];
_local2[1] = new Object();
_local2[1].description = "feel the gravity";
_local2[1].instruction = "click anywhere use up and down arrow keys to change the height of your jump.";
_local2[1].items = 1;
_local2[1].coins = 0;
_local2[1].maxBad = 0;
_local2[1].maxGood = 1;
_local2[1].itemsStartView = [[0, 0, 0], [0, 0, 0], [0, 1, 0]];
_local2[1].coinsStartView = [0, 0, 0];
_local2[1].aliens = [0, 0, 0];
_local2[2] = new Object();
_local2[2].description = "more symbols...";
_local2[2].instruction = "collect items in the right order, otherwise level resets...";
_local2[2].items = 2;
_local2[2].coins = 0;
_local2[2].maxBad = 0;
_local2[2].maxGood = 2;
_local2[2].itemsStartView = [[0, 0, 0], [0, 0, 0], [2, 0, 1]];
_local2[2].coinsStartView = [0, 0, 0];
_local2[2].aliens = [0, 0, 0];
_local2[3] = new Object();
_local2[3].description = "Combo collect";
_local2[3].instruction = "try to catch two symbols in one jump for more points";
_local2[3].items = 2;
_local2[3].coins = 0;
_local2[3].maxBad = 1;
_local2[3].maxGood = 1;
_local2[3].itemsStartView = [[0, 0, 0], [0, -1, 0], [0, 0, 1]];
_local2[3].coinsStartView = [0, 0, 0];
_local2[3].aliens = [0, 0, 0];
_local2[4] = new Object();
_local2[4].description = "more treats";
_local2[4].instruction = "catch coins for more points.";
_local2[4].items = 2;
_local2[4].coins = 1;
_local2[4].maxBad = 1;
_local2[4].maxGood = 1;
_local2[4].itemsStartView = [[0, -1, 0], [0, 0, 0], [0, 0, 1]];
_local2[4].coinsStartView = [0, 1, 0];
_local2[4].aliens = [0, 0, 0];
_local2[5] = new Object();
_local2[5].description = "save your platform";
_local2[5].instruction = "Watch out for the energy bar at the bottom.";
_local2[5].items = 2;
_local2[5].coins = 1;
_local2[5].maxBad = 2;
_local2[5].maxGood = 2;
_local2[5].itemsStartView = [[-1, 0, 0], [0, 0, 0], [0, 0, -1]];
_local2[5].coinsStartView = [0, 1, 0];
_local2[5].aliens = [0, 0, 0];
_local2[6] = new Object();
_local2[6].description = "enemy lines";
_local2[6].instruction = "look out for the pesky aliens.";
_local2[6].items = 2;
_local2[6].coins = 1;
_local2[6].maxBad = 1;
_local2[6].maxGood = (_local2[6].itemsStartView = [[0, 1, 0], [0, 0, 0], [0, 0, 0]]);
_local2[6].coinsStartView = [0, -1, 0];
_local2[6].aliens = [0, 0, 1];
_local2[7] = new Object();
_local2[7].description = "more work";
_local2[7].instruction = "as you advance, the combination of symbols get longer...";
_local2[7].items = 4;
_local2[7].coins = -1;
_local2[7].maxBad = 2;
_local2[7].maxGood = 2;
_local2[7].itemsStartView = [[-1, 0, 0], [0, 0, 2], [0, 1, 0]];
_local2[7].coinsStartView = [1, 0, 0];
_local2[7].aliens = [0, 0, 0];
_local2[8] = new Object();
_local2[8].description = "try to save them all...";
_local2[8].instruction = "now you know everything.";
_local2[8].items = 4;
_local2[8].coins = -1;
_local2[8].maxBad = 2;
_local2[8].maxGood = 2;
_local2[8].itemsStartView = [[0, 0, 0], [0, -1, 0], [1, 0, 0]];
_local2[8].coinsStartView = [0, -1, 0];
_local2[8].aliens = [1, 0, 0];
_local2[9] = new Object();
_local2[9].description = "you're on the right path";
_local2[9].instruction = "force is strong with you";
_local2[9].items = 4;
_local2[9].coins = -1;
_local2[9].maxBad = 2;
_local2[9].maxGood = 2;
_local2[9].itemsStartView = [[-1, 0, 0], [1, 0, 0], [0, 0, -1]];
_local2[9].coinsStartView = [1, 0, 1];
_local2[9].aliens = [0, 1, 0];
_local2[10] = new Object();
_local2[10].description = "don't abandon your keen";
_local2[10].instruction = "they're depending on you";
_local2[10].items = 5;
_local2[10].coins = -1;
_local2[10].maxBad = 3;
_local2[10].maxGood = 1;
_local2[10].itemsStartView = [[1, 0, 0], [0, 0, -1], [-1, 0, 0]];
_local2[10].coinsStartView = [0, 0, 0];
_local2[10].aliens = [0, 1, 0];
_local2[11] = new Object();
_local2[11].description = "more aliens";
_local2[11].instruction = "that damn fool called a friend";
_local2[11].items = 6;
_local2[11].coins = 0;
_local2[11].maxBad = 3;
_local2[11].maxGood = 1;
_local2[11].itemsStartView = [[0, 0, 0], [-1, 0, -1], [0, 0, 0]];
_local2[11].coinsStartView = [0, 0, 0];
_local2[11].aliens = [1, 1, 0];
_local2[12] = new Object();
_local2[12].description = "you're this close...";
_local2[12].instruction = "... of becoming a national hero";
_local2[12].items = 7;
_local2[12].coins = 0;
_local2[12].maxBad = 3;
_local2[12].maxGood = 1;
_local2[12].itemsStartView = [[-1, 0, -1], [0, 0, 0][0]];
_local2[12].coinsStartView = [0, 0, 0];
_local2[12].aliens = [1, 0, 1];
_local2[13] = new Object();
_local2[13].description = "you're the man. congratulations";
_local2[13].instruction = "let's leave this unfriendly planet.";
_local2[13].gameOver = true;
}
function startNewLevel(dogoon) {
dogoon = dogoon == true;
paused = false;
MC.cage.gotoAndPlay("start");
MC.pausegame._visible = dogoon;
MC.nextlevel._visible = !dogoon;
MC.nextlevel.swapDepths(MC.getNextHighestDepth());
if (dogoon) {
platform_spectrum[1]._visible = true;
platform_pos = 1;
platform.d1._visible = false;
platform.d2._visible = true;
platform.d3._visible = false;
platform.arrow2.gotoAndStop("on0");
platform.arrow3.gotoAndStop("on0");
if (platform_useColors) {
platform.plasma.power = 1;
platform.plasma.gotoAndPlay("0to1");
} else {
platform.plasma.power = -1;
platform.plasma.gotoAndStop("on3");
platform.arrow1.gotoAndStop("on3");
}
endLevel = false;
score_startValue = scoreValue;
jumper_mustWait = true;
jumper.gotoAndPlay("waiting");
platform_energy = platform_maxEnergyValue;
MC.energy.item._visible = true;
showJumper();
closeItems();
displayStartView();
timer.addListener(MC, 0, system.Delegate.create(this, goOn), 0);
}
}
function newLevel(dogoon) {
trace(["COUNT COUNT!!!", platform_energy]);
endLevel = true;
if (platform_energy > 0) {
if (platform_energy < 1) {
scoreValue = scoreValue + (platform_energy * score_energyValue);
platform_energy = 0;
scoreValue = Math.round(scoreValue);
} else {
scoreValue = scoreValue + ((score_energyValue * score_stepdisplay) / 2);
platform_energy = platform_energy - (score_stepdisplay / 2);
}
setScore((isNaN(score_addString) ? (Math.round(scoreValue) + score_addString) : (Math.round(scoreValue * Number("1" + score_addString)))));
actualizeEnergy();
sndman.play("snd_points");
timer.addListener(MC, 100, system.Delegate.create(this, newLevel), 0);
return(undefined);
}
timer.removeListener(MC);
sndman.play("snd_newlevel");
setScore("");
closeItems();
dogoon = dogoon == true;
paused = true;
if (gameLevel != 0) {
MC.cage.gotoAndPlay("flyout");
} else {
MC.cage.gotoAndStop("start");
}
MC.pausegame._visible = dogoon;
MC.nextlevel._visible = !dogoon;
MC.nextlevel.swapDepths(MC.getNextHighestDepth());
platform_spectrum[1]._visible = false;
platform_spectrum[2]._visible = false;
platform_spectrum[3]._visible = false;
thisLevel = levelsTable[gameLevel];
MC.nextlevel.intro.info = thisLevel.description;
MC.nextlevel.instr.info = thisLevel.instruction;
var _local2 = thisLevel.gameOver == true;
MC.nextlevel.level.info = (_local2 ? "Congratulations!" : ("level " + gameLevel));
MC.nextlevel.cont.info = (_local2 ? "end" : "continue");
setBackgrounds(gameLevel);
timer.removeListener(MC);
if (_local2) {
endGame = true;
new extensions.movieclip.SimpleButton(MC.nextlevel, system.Delegate.create(this, gameOver));
} else {
new extensions.movieclip.SimpleButton(MC.nextlevel, system.Delegate.create(this, startNewLevel, true));
}
gameLevel++;
}
function gameOver() {
setScore();
sndman.play("snd_baditem");
timer.removeListener(MC);
keyboard.removeListener(this);
MC.nextlevel._visible = false;
MC.pausegame._visible = false;
var _local2 = MC.gameover;
_local2._visible = true;
_local2.swapDepths(200);
_local2.score.score = ("You scored\n" + MC.scorefield.score) + " points";
new extensions.movieclip.SimpleButton(_local2.p_menu, externalevents.backToMenu);
new extensions.movieclip.SimpleButton(_local2.p_save, system.Delegate.create(this, saveScore, MC.gameover.nick));
new extensions.movieclip.SimpleButton(_local2.p_tryagain, externalevents.tryAgain);
new extensions.movieclip.SimpleButton(_local2.p_comments, externalevents.comments);
}
function saveScore(tMC) {
if ((tMC.nickname == "") || (tMC.nickname == player_defaultnick)) {
tMC.nickname = player_defaultnick;
Selection.setFocus(tMC.TF);
Selection.setSelection(0, tMC.TF.text.length);
} else {
externalevents.saveScore(tMC.nickname, scoreValue + score_addString);
}
}
function pause_noJumping(v) {
jumper_canJumping = !v;
}
var stageBounds = {xMin:0, yMin:0, xMax:0, yMax:0};
var startGame = 0;
var gameLevel = 0;
var endLevel = false;
var endGame = false;
var gamestage_backgrounds = 3;
var background_speed = 10;
var background2_speed = 5;
var jumper_speed = 10;
var jumper_acceleration = 0;
var jumper_accValue = 0.25;
var jumperColors = 5;
var jumper_canJumping = false;
var jumper_canCatchBonus = false;
var jumper_canFlying = true;
var jumper_mustWait = false;
var jumper_addColor = false;
var rowsDepthY = [[200, 250], [125, 175], [50, 100]];
var rows_wideX = [120, 120, 120];
var rows_stepY = [25, 25, 25];
var items_noOfSymbols = 7;
var items_scalestep = 5;
var items_fadestep = 5;
var items_stagetime = 7000;
var items_energyValue = 30;
var coins_energyValue = 15;
var aliens_speed = 5;
var score_startValue = 0;
var score_addString = "0";
var score_itemValue = 10;
var score_coinValue = 5;
var score_comboValue = 25;
var score_endlevelValue = 50;
var score_falldownValue = -2.5;
var score_strokeValue = -2.5;
var score_energyValue = 0.1;
var score_stepdisplay = 5;
var platform_maxRotation = 15;
var platform_speed = 10;
var platform_pos = 0;
var platform_energy = 100;
var platform_energydownvalue = 0.1;
var platform_maxEnergyValue = 100;
var platform_energyemergency = 25;
var platform_blinkTime = 500;
var platform_nextBlinkTime = 0;
var platform_lastdir = "up";
var platform_gravity = [0.65, 0.35, 0.2];
var platform_useColors = false;
var PI180d = 57.2957795130823;
var PI05 = (Math.PI/2);
var gravity = 0.2;
var paused = false;
var slowmotion = false;
var player_nickname = "Your NickName";
var player_defaultnick = "Your NickName";
var moveJumper = null;
var movePointer = null;
var moveNewRow = null;
var moveItems = null;
var moveCoins = null;
var moveAliens = null;
}
Symbol 297 MovieClip [__Packages.system.Timer] Frame 0
class system.Timer
{
static var myInstance, _listeners, MC, _enabled;
function Timer (_MC) {
if (myInstance == undefined) {
if (_MC == undefined) {
} else {
myInstance = this;
_listeners = {};
enable();
MC = _MC;
}
}
}
function echo() {
trace("Timer ho ho");
}
static function getInstance(_MC) {
if (myInstance == undefined) {
myInstance = new system.Timer(_MC);
}
return(myInstance);
}
function oEF() {
var _local4 = getTimer();
var _local2 = {};
var _local3 = 0;
for (var _local5 in _listeners) {
_local3++;
_local2 = _listeners[_local5];
if (_local2.nextTime < _local4) {
_local2.fn();
_local2.nextTime = _local2.nextTime + _local2.stepTime;
if (_local2.times > 0) {
if ((--_local2.times) == 0) {
removeListener(_local5);
}
}
}
}
if (_local3 == 0) {
trace("Timer. Koniec oEFa");
rm_oEF();
}
}
function rm_oEF() {
delete MC.onEnterFrame;
}
function set_oEF() {
MC.onEnterFrame = system.Delegate.create(this, oEF);
}
function enable() {
set_oEF();
_enabled = true;
}
function disable() {
rm_oEF();
_enabled = false;
}
function get enabled() {
return(_enabled);
}
function set enabled(_value) {
if (_value == true) {
enable();
} else {
disable();
}
//return(enabled);
}
function addListener(obj, time, todo, times) {
trace("Timer. Addlistener " + obj);
_listeners[String(obj)] = {stepTime:time, fn:todo, times:times, nextTime:getTimer() + time};
if (_enabled) {
set_oEF();
}
}
function removeListener(obj) {
delete _listeners[String(obj)];
}
}
Symbol 298 MovieClip [__Packages.keyboardPackage.Keyboard] Frame 0
class keyboardPackage.Keyboard extends AsBroadcaster
{
static var myInstance;
var screenKeyboards, pressedKeys, disabledKeys, onKeyUp, onKeyDown, broadcastMessage;
function Keyboard () {
super();
Key.addListener(this);
screenKeyboards = new Array();
pressedKeys = new Array();
disabledKeys = new Array();
setCodeTable();
onKeyUp = onKeyUp_withoutScreenKeyboard;
onKeyDown = onKeyDown_withoutScreenKeyboard;
AsBroadcaster.initialize(this);
}
function getKeyCode(str) {
str = str.toUpperCase();
if (Key[str] != undefined) {
return(Key[str]);
}
if (keyCode[str] != undefined) {
return(keyCode[str]);
}
return(str.charCodeAt(0));
}
function getKeyName(code) {
if (keyCodeName[code] != undefined) {
return(keyCodeName[code]);
}
return(undefined);
}
function excludeKey(key, keybMC) {
if (keybMC != undefined) {
if (screenKeyboards[String(keybMC)] != undefined) {
screenKeyboards[String(keybMC)].disableKey(key);
}
} else if (screenKeyboards.length > 0) {
for (var _local3 in screenKeyboards) {
screenKeyboards[_local3].disableKey(key);
}
}
disabledKeys[key] = true;
}
function sendEvent(keyevent, pressed) {
broadcastMessage(keyevent, pressed);
}
function isAnyKeyPressed() {
for (var _local2 in pressedKeys) {
if (pressedKeys[_local2]) {
return(true);
}
}
return(false);
}
function onKeyDown_withoutScreenKeyboard() {
var _local2 = Key.getCode();
pressedKeys[_local2] = true;
onKeyUp();
sendEvent("onKeyDown", _local2);
}
function onKeyUp_withoutScreenKeyboard() {
var _local2 = Key.getCode();
var _local3 = Key.isDown;
for (_local2 in pressedKeys) {
if (!_local3(_local2)) {
delete pressedKeys[_local2];
sendEvent("onKeyUp", _local2);
}
}
}
function onKeyDown_withScreenKeyboard(pressedkey) {
var _local4 = false;
if (pressedkey == undefined) {
pressedkey = Key.getCode();
} else {
_local4 = true;
}
pressedKeys[pressedkey] = true;
for (pressedkey in pressedKeys) {
if (pressedKeys[pressedkey]) {
for (var _local3 in screenKeyboards) {
screenKeyboards[_local3].onPress(pressedkey);
}
}
}
if (!_local4) {
onKeyUp();
} else {
sendEvent("onScreenKeyDown", pressedkey);
}
sendEvent("onKeyDown", pressedkey);
}
function onKeyUp_withScreenKeyboard(pressedkey) {
pressedkey = ((pressedkey == undefined) ? (Key.getCode()) : (pressedkey));
var _local4 = Key.isDown;
for (pressedkey in pressedKeys) {
if (!_local4(pressedkey)) {
for (var _local3 in screenKeyboards) {
screenKeyboards[_local3].onRelease(pressedkey);
}
delete pressedKeys[pressedkey];
sendEvent("onKeyUp", pressedkey);
}
}
}
function addScreenKeyboard(keybMC) {
screenKeyboards[String(keybMC)] = new keyboardPackage.ScreenKeyboard(keybMC);
onKeyDown = onKeyDown_withScreenKeyboard;
onKeyUp = onKeyUp_withScreenKeyboard;
}
function removeScreenKeyboard(_MC) {
delete screenKeyboards[String(_MC)];
if (screenKeyboards.length == 0) {
onKeyUp = onKeyUp_withoutScreenKeyboard;
onKeyDown = onKeyDown_withoutScreenKeyboard;
}
}
function setCodeTable() {
keyCode = new Array();
keyCode.ESC = (keyCode.ESCAPE = 27);
keyCode.F1 = 112;
keyCode.F2 = 113;
keyCode.F3 = 114;
keyCode.F4 = 115;
keyCode.F5 = 116;
keyCode.F6 = 117;
keyCode.F7 = 118;
keyCode.F8 = 119;
keyCode.F9 = 120;
keyCode.F10 = 120;
keyCode.F11 = 122;
keyCode.F12 = 123;
keyCode.CAPSLOCK = (keyCode["CAPS LOCK"] = (keyCode.CAPS_LOCK = 20));
keyCode.NUMLOCK = (keyCode["NUM LOCK"] = (keyCode.NUM_LOCK = 144));
keyCode.SCROLLLOCK = (keyCode["SCROLL LOCK"] = (keyCode.SCROLL_LOCK = 145));
keyCode.TAB = 9;
keyCode.ALT = (keyCode["RIGHT ALT"] = (keyCode.RIGHT_ALT = 18));
keyCode.CONTROL = (keyCode.CTRL = 17);
keyCode.SHIFT = (keyCode.SFT = 16);
keyCode.BACKSPACE = (keyCode["BACK SPACE"] = (keyCode.BACK_SPACE = 8));
keyCode.BCKSPC = (keyCode.BSPACE = 8);
keyCode.ENTER = (keyCode.RETURN = 13);
keyCode.SPACE = (keyCode.SPC = 32);
keyCode.PAUSE = (keyCode.BREAK = 19);
keyCode["`"] = (keyCode["~"] = (keyCode.TILDE = 192));
keyCode["1"] = 49;
keyCode["2"] = 50;
keyCode["3"] = 51;
keyCode["4"] = 52;
keyCode["5"] = 53;
keyCode["6"] = 54;
keyCode["7"] = 55;
keyCode["8"] = 56;
keyCode["9"] = 57;
keyCode["0"] = 48;
keyCode["-"] = (keyCode._ = (keyCode.MINUS = 189));
keyCode["="] = (keyCode["+"] = (keyCode.PLUS = 187));
keyCode.Q = 81;
keyCode.W = 87;
keyCode.E = 69;
keyCode.R = 82;
keyCode.T = 84;
keyCode.Y = 89;
keyCode.U = 85;
keyCode.I = 73;
keyCode.O = 79;
keyCode.P = 80;
keyCode.A = 65;
keyCode.S = 83;
keyCode.D = 68;
keyCode.F = 70;
keyCode.G = 71;
keyCode.H = 72;
keyCode.J = 74;
keyCode.K = 75;
keyCode.L = 76;
keyCode.Z = 90;
keyCode.X = 88;
keyCode.C = 67;
keyCode.V = 86;
keyCode.B = 66;
keyCode.N = 78;
keyCode.M = 77;
keyCode["["] = (keyCode["{"] = 219);
keyCode["]"] = (keyCode["}"] = 221);
keyCode["\\"] = (keyCode["|"] = (keyCode.PIPE = (keyCode.BACKSLASH = (keyCode.BACKSLASH = 220))));
keyCode[";"] = (keyCode[":"] = 186);
keyCode["'"] = (keyCode["\""] = 222);
keyCode[","] = (keyCode["<"] = (keyCode.COMMA = 188));
keyCode["."] = (keyCode[">"] = (keyCode.DOT = 190));
keyCode["/"] = (keyCode["?"] = (keyCode.SLASH = 191));
keyCode.MOUSEMENU = (keyCode["RMB MENU"] = (keyCode.RMBMENU = 93));
keyCode.INSERT = (keyCode.INS = 45);
keyCode.DELETE = (keyCode.DEL = (keyCode.DELETEKEY = 46));
keyCode.HOME = 36;
keyCode.END = 35;
keyCode["PAGE UP"] = (keyCode.PAGE_UP = (keyCode.PAGEUP = (keyCode.PGUP = 33)));
keyCode["PAGE DOWN"] = (keyCode.PAGE_DOWN = (keyCode.PAGEDOWN = 34));
keyCode["PAGE DN"] = (keyCode.PAGE_DN = (keyCode.PAGEDN = (keyCode.PGDN = 34)));
keyCode["LEFT ARROW"] = (keyCode.LEFT_ARROW = (keyCode.LEFTARROW = 37));
keyCode["RIGHT ARROW"] = (keyCode.RIGHT_ARROW = (keyCode.RIGHTARROW = 39));
keyCode["UP ARROW"] = (keyCode.UP_ARROW = (keyCode.UPARROW = 38));
keyCode["DOWN ARROW"] = (keyCode.DOWN_ARROW = (keyCode.DOWNARROW = 40));
keyCode["DN ARROW"] = (keyCode.DN_ARROW = (keyCode.DNARROW = 40));
keyCode["NUMERIC SLASH"] = (keyCode.NUMERICSLASH = (keyCode["NUMERIC-SLASH"] = (keyCode.NUMERIC_SLASH = 111)));
keyCode["NUMKEY SLASH"] = (keyCode.NUMKEYSLASH = (keyCode["NUMKEY-SLASH"] = (keyCode.NUMKEY_SLASH = 111)));
keyCode["NUM SLASH"] = (keyCode.NUMSLASH = (keyCode["NUM-SLASH"] = (keyCode.NUM_SLASH = 111)));
keyCode["NUMERIC ASTERIX"] = (keyCode.NUMERICASTERIX = (keyCode["NUMERIC-ASTERIX"] = (keyCode.NUMERIC_ASTERIX = 106)));
keyCode["NUMKEY ASTERIX"] = (keyCode.NUMKEYASTERIX = (keyCode["NUMKEY-ASTERIX"] = (keyCode.NUMKEY_ASTERIX = 106)));
keyCode["NUM ASTERIX"] = (keyCode.NUMASTERIX = (keyCode["NUM-ASTERIX"] = (keyCode.NUM_ASTERIX = 106)));
keyCode["NUMERIC MINUS"] = (keyCode.NUMERICMINUS = (keyCode["NUMERIC-MINUS"] = (keyCode.NUMERIC_MINUS = 109)));
keyCode["NUMKEY MINUS"] = (keyCode.NUMKEYMINUS = (keyCode["NUMKEY-MINUS"] = (keyCode.NUMKEY_MINUS = 109)));
keyCode["NUM MINUS"] = (keyCode.NUMMINUS = (keyCode["NUM-MINUS"] = (keyCode.NUM_MINUS = 109)));
keyCode["NUMERIC PLUS"] = (keyCode.NUMERICPLUS = (keyCode["NUMERIC-PLUS"] = (keyCode.NUMERIC_PLUS = 107)));
keyCode["NUMKEY PLUS"] = (keyCode.NUMKEYPLUS = (keyCode["NUMKEY-PLUS"] = (keyCode.NUMKEY_PLUS = 107)));
keyCode["NUM PLUS"] = (keyCode.NUMPLUS = (keyCode["NUM-PLUS"] = (keyCode.NUM_PLUS = 107)));
keyCode["NUMERIC DOT"] = (keyCode.NUMERICDOT = (keyCode["NUMERIC-DOT"] = (keyCode.NUMERIC_DOT = 110)));
keyCode["NUMKEY DOT"] = (keyCode.NUMKEYDOT = (keyCode["NUMKEY-DOT"] = (keyCode.NUMKEY_DOT = 110)));
keyCode["NUM DOT"] = (keyCode.NUMDOT = (keyCode["NUM-DOT"] = (keyCode.NUM_DOT = 110)));
keyCode["NUM/"] = (keyCode["NUM /"] = (keyCode["NUM-/"] = (keyCode["NUM_/"] = 111)));
keyCode["NUM*"] = (keyCode["NUM *"] = (keyCode["NUM-*"] = (keyCode["NUM_*"] = 106)));
keyCode["NUM-"] = (keyCode["NUM -"] = (keyCode["NUM--"] = (keyCode["NUM_-"] = 109)));
keyCode.NUM7 = (keyCode["NUM 7"] = (keyCode["NUM-7"] = (keyCode.NUM_7 = 103)));
keyCode.NUM8 = (keyCode["NUM 8"] = (keyCode["NUM-8"] = (keyCode.NUM_8 = 104)));
keyCode.NUM9 = (keyCode["NUM 9"] = (keyCode["NUM-9"] = (keyCode.NUM_9 = 105)));
keyCode["NUM+"] = (keyCode["NUM +"] = (keyCode["NUM-+"] = (keyCode["NUM_+"] = 107)));
keyCode.NUM4 = (keyCode["NUM 4"] = (keyCode["NUM-4"] = (keyCode.NUM_4 = 100)));
keyCode.NUM5 = (keyCode["NUM 5"] = (keyCode["NUM-5"] = (keyCode.NUM_5 = 101)));
keyCode.NUM6 = (keyCode["NUM 6"] = (keyCode["NUM-6"] = (keyCode.NUM_6 = 102)));
keyCode.NUM1 = (keyCode["NUM 1"] = (keyCode["NUM-1"] = (keyCode.NUM_1 = 97)));
keyCode.NUM2 = (keyCode["NUM 2"] = (keyCode["NUM-2"] = (keyCode.NUM_2 = 98)));
keyCode.NUM3 = (keyCode["NUM 3"] = (keyCode["NUM-3"] = (keyCode.NUM_3 = 99)));
keyCode.NUM0 = (keyCode["NUM 0"] = (keyCode["NUM-0"] = (keyCode.NUM_0 = 96)));
keyCode["NUM."] = (keyCode["NUM ."] = (keyCode["NUM-."] = (keyCode["NUM_."] = 110)));
keyCode["NUMERIC/"] = (keyCode["NUMERIC /"] = (keyCode["NUMERIC-/"] = (keyCode["NUMERIC_/"] = 111)));
keyCode["NUMERIC*"] = (keyCode["NUMERIC *"] = (keyCode["NUMERIC-*"] = (keyCode["NUMERIC_*"] = 106)));
keyCode["NUMERIC-"] = (keyCode["NUMERIC -"] = (keyCode["NUMERIC--"] = (keyCode["NUMERIC_-"] = 109)));
keyCode.NUMERIC7 = (keyCode["NUMERIC 7"] = (keyCode["NUMERIC-7"] = (keyCode.NUMERIC_7 = 103)));
keyCode.NUMERIC8 = (keyCode["NUMERIC 8"] = (keyCode["NUMERIC-8"] = (keyCode.NUMERIC_8 = 104)));
keyCode.NUMERIC9 = (keyCode["NUMERIC 9"] = (keyCode["NUMERIC-9"] = (keyCode.NUMERIC_9 = 105)));
keyCode["NUMERIC+"] = (keyCode["NUMERIC +"] = (keyCode["NUMERIC-+"] = (keyCode["NUMERIC_+"] = 107)));
keyCode.NUMERIC4 = (keyCode["NUMERIC 4"] = (keyCode["NUMERIC-4"] = (keyCode.NUMERIC_4 = 100)));
keyCode.NUMERIC5 = (keyCode["NUMERIC 5"] = (keyCode["NUMERIC-5"] = (keyCode.NUMERIC_5 = 101)));
keyCode.NUMERIC6 = (keyCode["NUMERIC 6"] = (keyCode["NUMERIC-6"] = (keyCode.NUMERIC_6 = 102)));
keyCode.NUMERIC1 = (keyCode["NUMERIC 1"] = (keyCode["NUMERIC-1"] = (keyCode.NUMERIC_1 = 97)));
keyCode.NUMERIC2 = (keyCode["NUMERIC 2"] = (keyCode["NUMERIC-2"] = (keyCode.NUMERIC_2 = 98)));
keyCode.NUMERIC3 = (keyCode["NUMERIC 3"] = (keyCode["NUMERIC-3"] = (keyCode.NUMERIC_3 = 99)));
keyCode.NUMERIC0 = (keyCode["NUMERIC 0"] = (keyCode["NUMERIC-0"] = (keyCode.NUMERIC_0 = 96)));
keyCode["NUMERIC."] = (keyCode["NUMERIC ."] = (keyCode["NUMERIC-."] = (keyCode["NUMERIC_."] = 110)));
keyCode["NUMKEY/"] = (keyCode["NUMKEY /"] = (keyCode["NUMKEY-/"] = (keyCode["NUMKEY_/"] = 111)));
keyCode["NUMKEY*"] = (keyCode["NUMKEY *"] = (keyCode["NUMKEY-*"] = (keyCode["NUMKEY_*"] = 106)));
keyCode["NUMKEY-"] = (keyCode["NUMKEY -"] = (keyCode["NUMKEY--"] = (keyCode["NUMKEY_-"] = 109)));
keyCode.NUMKEY7 = (keyCode["NUMKEY 7"] = (keyCode["NUMKEY-7"] = (keyCode.NUMKEY_7 = 103)));
keyCode.NUMKEY8 = (keyCode["NUMKEY 8"] = (keyCode["NUMKEY-8"] = (keyCode.NUMKEY_8 = 104)));
keyCode.NUMKEY9 = (keyCode["NUMKEY 9"] = (keyCode["NUMKEY-9"] = (keyCode.NUMKEY_9 = 105)));
keyCode["NUMKEY+"] = (keyCode["NUMKEY +"] = (keyCode["NUMKEY-+"] = (keyCode["NUMKEY_+"] = 107)));
keyCode.NUMKEY4 = (keyCode["NUMKEY 4"] = (keyCode["NUMKEY-4"] = (keyCode.NUMKEY_4 = 100)));
keyCode.NUMKEY5 = (keyCode["NUMKEY 5"] = (keyCode["NUMKEY-5"] = (keyCode.NUMKEY_5 = 101)));
keyCode.NUMKEY6 = (keyCode["NUMKEY 6"] = (keyCode["NUMKEY-6"] = (keyCode.NUMKEY_6 = 102)));
keyCode.NUMKEY1 = (keyCode["NUMKEY 1"] = (keyCode["NUMKEY-1"] = (keyCode.NUMKEY_1 = 97)));
keyCode.NUMKEY2 = (keyCode["NUMKEY 2"] = (keyCode["NUMKEY-2"] = (keyCode.NUMKEY_2 = 98)));
keyCode.NUMKEY3 = (keyCode["NUMKEY 3"] = (keyCode["NUMKEY-3"] = (keyCode.NUMKEY_3 = 99)));
keyCode.NUMKEY0 = (keyCode["NUMKEY 0"] = (keyCode["NUMKEY-0"] = (keyCode.NUMKEY_0 = 96)));
keyCode["NUMKEY."] = (keyCode["NUMKEY ."] = (keyCode["NUMKEY-."] = (keyCode["NUMKEY_."] = 110)));
var _local1;
for (var _local2 in keyCode) {
_local1 = keyCode[_local2];
if (keyCodeName[_local1] == undefined) {
keyCodeName[_local1] = _local2;
} else if ((_local2.indexOf(" ") != -1) || (_local2.length == 1)) {
if (keyCodeName[_local1].length == 1) {
keyCodeName[_local1] = ((_local2 + " (\"") + keyCodeName[_local1]) + "\")";
} else {
keyCodeName[_local1] = _local2;
}
}
}
}
static function getInstance() {
if (myInstance == undefined) {
myInstance = new keyboardPackage.Keyboard();
}
return(myInstance);
}
static var keyCode = new Array();
static var keyCodeName = new Array();
}
Symbol 299 MovieClip [__Packages.keyboardPackage.ScreenKeyboard] Frame 0
class keyboardPackage.ScreenKeyboard
{
var MC, keyboard, usedKeys;
function ScreenKeyboard (_MC) {
MC = _MC;
trace("a new screen keyboard: " + _MC);
keyboard = keyboardPackage.Keyboard.getInstance();
usedKeys = new Array();
setKeys();
}
function onPress(key) {
key_onPress(usedKeys[key], key);
}
function onRelease(key) {
key_onRelease(usedKeys[key], key);
}
function key_onPress(tMC, key) {
tMC.gotoAndStop("pressed");
}
function key_onRelease(tMC, key) {
tMC.enabled = true;
tMC.gotoAndStop("released");
}
function mouse_onRollOver(tMC, key) {
usedKeys[key].isMouse = false;
tMC.gotoAndStop("mouseOver");
}
function mouse_onRollOut(tMC, key) {
tMC.gotoAndStop("released");
usedKeys[key].isMouse = false;
}
function mouse_onPress(tMC, key) {
tMC.gotoAndStop("pressed");
usedKeys[key].isMouse = true;
keyboard.onKeyDown(key);
}
function mouse_onRelease(tMC, key) {
keyboard.onKeyUp(key);
}
function setKeys() {
var _local3;
var _local2;
var _local5;
var _local8;
var _local6;
var _local4;
for (var _local7 in MC) {
if ((MC[_local7] instanceof MovieClip) && (_local7.indexOf("key") != -1)) {
_local3 = MC[_local7];
_local2 = _local7.substring(_local7.lastIndexOf("_") + 1).toUpperCase();
_local4 = _local2.split("NUM")[1];
if (((!isNaN(_local4)) && (_local4.length == 2)) && (_local4 != undefined)) {
_local2 = "NUM" + String.fromCharCode(Number(_local4));
}
if ((!isNaN(Number(_local2))) && (_local2.length > 1)) {
_local2 = String.fromCharCode(Number(_local2));
}
_local5 = keyboard.getKeyCode(_local2);
usedKeys[_local5] = _local3;
_local3.onPress = system.Delegate.create(this, mouse_onPress, _local3, _local5);
_local3.onRelease = system.Delegate.create(this, mouse_onRelease, _local3, _local5);
_local3.onRollOver = system.Delegate.create(this, mouse_onRollOver, _local3, _local5);
_local3.onRollOut = (_local3.onReleaseOutside = system.Delegate.create(this, mouse_onRollOut, _local3, _local5));
_local6 = _local3.letter.label;
_local6.autoSize = "center";
if (_local2.length > 1) {
if (_local4) {
_local2 = _local2.split("NUM")[1];
} else {
_local2 = _local2.substr(0, 1) + _local2.substr(1).toLowerCase();
}
}
_local6.text = _local2;
}
}
}
}
Symbol 300 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager
{
static var myInstance;
var MC, played, _vol;
function SoundManager (_MC) {
MC = _MC;
trace("new SoundManager");
played = new Array();
_enabled = true;
_vol = 100;
muted_vol = 100;
}
static function getInstance() {
if (myInstance == undefined) {
myInstance = new SoundManager();
}
return(myInstance);
}
function setVolume(v) {
_vol = v;
play();
}
function enable() {
trace("Sounds enable");
var _local2;
_enabled = true;
_vol = muted_vol;
for (var _local3 in played) {
_local2 = played[_local3];
_local2.setVolume(_vol);
}
}
function get enabled() {
return(_enabled);
}
function isPlaying(soundname, MC) {
var _local2 = played[((MC == undefined) ? (soundname) : (String(MC)))];
if (_local2 != undefined) {
return(_local2.isPlaying);
}
return(false);
}
function mute() {
trace("Sounds mute");
var _local2;
_enabled = false;
muted_vol = _vol;
_vol = 0;
for (var _local3 in played) {
_local2 = played[_local3];
_local2.setVolume(0);
}
}
function remove(soundname) {
if (played[soundname] != undefined) {
stop(soundname);
delete played[soundname];
}
}
function pause(soundname) {
trace("pause " + soundname);
var _local2;
var _local3;
var _local4;
_local2 = played[soundname];
if (_local2 != undefined) {
_local3 = Math.round(_local2.position / 1000);
_local4 = Math.round(_local2.duration / 1000);
trace([_local3, _local4]);
_local2.pause = ((_local3 < _local4) ? (_local3) : 0);
_local2.isPlaying = false;
_local2.stop();
} else {
for (var _local5 in played) {
_local2 = played[_local5];
_local3 = Math.round(_local2.position / 1000);
_local4 = Math.round(_local2.duration / 1000);
_local2.pause = ((_local3 < _local4) ? (_local3) : 0);
trace([_local3, _local4]);
_local2.isPlaying = false;
_local2.stop(_local5);
}
}
}
function stop(soundname, MC) {
trace("stop " + soundname);
var _local2;
if (soundname != undefined) {
if (MC == undefined) {
_local2 = played[soundname];
} else {
_local2 = played[String(MC)];
}
_local2.pause = 0;
_local2.isPlaying = false;
_local2.stop(soundname);
} else {
for (var _local3 in played) {
_local2 = played[_local3];
_local2.stop(_local3);
_local2.pause = 0;
_local2.isPlaying = false;
}
}
}
function play(soundname, loop, MC, oncomplete) {
loop = loop == true;
trace("play " + soundname);
var _local2;
if (MC == undefined) {
_local2 = (played[soundname] = new Sound());
} else {
_local2 = (played[String(MC)] = new Sound());
}
_local2.isPlaying = true;
_local2.attachSound(soundname);
_local2.start();
_local2.setVolume(_vol);
if (loop) {
_local2.onSoundComplete = function () {
this.start();
};
} else {
_local2.onSoundComplete = function () {
this.isPlaying = false;
};
}
}
function onComplete(soundname) {
trace("Complete " + soundname);
var _local2 = played[soundname];
if (_local2 == undefined) {
return(undefined);
}
if ((_local2.onComplete == undefined) && (_local2.loop == false)) {
remove(soundname);
} else if (_local2.loop) {
_local2.onComplete();
_local2.start();
} else {
_local2.onComplete();
_local2.stop();
}
}
var _enabled = true;
var muted_vol = 100;
}
Symbol 301 MovieClip [__Packages.ArrayXProtos] Frame 0
class ArrayXProtos
{
function ArrayXProtos () {
}
function shuffle(arr) {
var _local1 = function () {
return((random(2) ? -1 : 1));
};
return(arr.sort(_local1));
}
function getShuffled(arr) {
arr = arr.concat();
return(arr.shuffle());
}
}
Symbol 302 MovieClip [__Packages.extensions.movieclip.GlobalizeLocalize] Frame 0
class extensions.movieclip.GlobalizeLocalize
{
var _MC, x0, y0, x, y;
function GlobalizeLocalize (_MC) {
MC = (_MC);
}
function get MC() {
return(_MC);
}
function set MC(MC_) {
var _local2;
_MC = MC_;
_local2 = globalizeMC();
x0 = _local2.x;
y0 = _local2.y;
//return(MC);
}
function globalizeXY(px, py) {
var _local2 = {x:px, y:py};
_MC.localToGlobal(_local2);
x = _local2.x;
y = _local2.y;
return({x:_local2.x, y:_local2.y});
}
function localizeXY(px, py) {
var _local2 = {x:px, y:py};
_MC.globalToLocal(_local2);
x = _local2.x;
y = _local2.y;
return({x:_local2.x, y:_local2.y});
}
function globalizeMC(sourceMC, targetMC) {
var _local2 = new Object();
if (targetMC != undefined) {
_local2.x = sourceMC._x;
_local2.y = sourceMC._y;
sourceMC.localToGlobal(_local2);
targetMC.globalToLocal(_local2);
} else {
if (sourceMC != undefined) {
_local2.x = sourceMC._x;
_local2.y = sourceMC._y;
} else {
_local2.x = 0;
_local2.y = 0;
}
_MC.localToGlobal(_local2);
}
x = _local2.x;
y = _local2.y;
return({x:_local2.x, y:_local2.y});
}
function localizeMC(sourceMC, targetMC) {
var _local2 = new Object();
if (targetMC != undefined) {
_local2.x = sourceMC._x;
_local2.y = sourceMC._y;
sourceMC.localToGlobal(_local2);
targetMC.globalToLocal(_local2);
} else {
if (sourceMC != undefined) {
_local2.x = sourceMC._x;
_local2.y = sourceMC._y;
} else {
_local2.x = 0;
_local2.y = 0;
}
_MC.globalToLocal(_local2);
}
x = _local2.x;
y = _local2.y;
return({x:_local2.x, y:_local2.y});
}
function globalizeRotation(rot) {
rot = ((rot == undefined) ? 0 : (rot));
while (MC._parent != undefined) {
rot = rot + MC._rotation;
MC = (MC._parent);
}
return(rot);
}
function localizeRotation(rot) {
rot = ((rot == undefined) ? 0 : (rot));
while (MC._parent != undefined) {
rot = rot + MC._rotation;
MC = (MC._parent);
}
return(rot);
}
}
Symbol 293 MovieClip [coin] Frame 32
gotoAndPlay ("cw");
Symbol 293 MovieClip [coin] Frame 63
gotoAndPlay ("ccw");
Symbol 293 MovieClip [coin] Frame 76
stop();