Frame 1
function init() {
loadingdata.bg.onPress = null;
loadingdata.bg.useHandCursor = false;
loadingdata.swapDepths(2);
clearInterval(initInterval);
startLoading();
}
function startLoading() {
onEnterFrame = function () {
if (this.getBytesTotal() < 0) {
return(undefined);
}
percent = Math.ceil((this.getBytesLoaded() * 100) / this.getBytesTotal());
percent = (Boolean(percent) ? (percent) : 0);
loadingdata.percent = ("Loading " + percent.toString()) + "%";
loadingdata.line._xscale = percent;
if ((percent == 100) && (showIntro)) {
onEnterFrame = launch;
}
};
}
function launch() {
if (pauseInc == 0) {
loadingdata.removeMovieClip();
gotoAndStop (2);
delete this.onEnterFrame;
}
pauseInc--;
}
stop();
var pauseInc = 10;
Stage.showMenu = false;
Stage.scaleMode = "noScale";
this.tabEnabled = false;
this.tabIndex = 0;
initInterval = setInterval(init, 100);
Frame 2
function initGames() {
if (_url.indexOf("http://") == -1) {
this._visible = true;
} else {
this._visible = true;
}
oScene = new com.Scene(this.engine);
this.onMouseMove = function () {
renderScene();
};
maxVolumeSound = 100;
soundBack = new Sound(sound_mc);
soundBack.attachSound("soundBackground");
soundBack.setVolume(0);
soundBack.start(0, 999);
soundBack.onSoundComplete = function () {
soundBack.stop();
soundBack.start(0, 999);
};
sound_UP_DOWN(true);
}
function sound_UP_DOWN(flag) {
sound_mc.flag = flag;
sound_mc.onEnterFrame = function () {
var _local2 = soundBack.getVolume();
if (this.flag) {
_local2 = _local2 + 2;
soundBack.setVolume(_local2);
if (_local2 >= maxVolumeSound) {
soundBack.setVolume(maxVolumeSound);
delete this.enterFrame;
}
} else {
_local2--;
soundBack.setVolume(_local2);
if (_local2 <= 0) {
soundBack.setVolume(0);
delete this.enterFrame;
}
}
};
}
function startNextLevel() {
this.engine._alpha = 0;
this.engine.useHandCursor = false;
delete this.engine.onPress;
oScene.createEngine(level);
renderScene();
this.playGame.level = level;
this.engine.onEnterFrame = function () {
this._alpha = this._alpha + 5;
if (this._alpha > 100) {
this._alpha = 100;
delete this.onEnterFrame;
}
};
}
function endLevel() {
this.engine.onPress = null;
this.engine.onEnterFrame = function () {
this._alpha = this._alpha - 3;
if (this._alpha < 0) {
this._alpha = 0;
delete this.onEnterFrame;
if (this.flag) {
startNextLevel();
} else {
youWin();
}
}
};
level++;
if (level > maxLevel) {
level = 1;
this.engine.flag = false;
delete menu.dataSave.data.level;
menu.dataSave.data.level.flush();
} else {
this.engine.flag = true;
if ((menu.dataSave.data.level < level) || (menu.dataSave.data.level == undefined)) {
menu.dataSave.data.level = level;
}
}
}
function youWin() {
this.menu.youWin_mc._visible = true;
this.playGame.endGames();
}
function renderScene() {
var _local2 = -135 + ((-this.engine._ymouse) / dec);
if (_local2 > -90) {
_local2 = -90;
} else if (_local2 < -180) {
_local2 = -180;
}
var _local3 = -135 + ((-this.engine._xmouse) / dec);
if (_local3 > -90) {
_local3 = -90;
} else if (_local3 < -180) {
_local3 = -180;
}
oScene.render(_local2, _local3);
}
stop();
Stage.scaleMode = "noScale";
var dec = 3.5;
var level = 1;
var maxLevel = 30;
this._visible = false;
initGames();
Symbol 6 Button
on (press) {
getURL ("http://www.microgames.info", "blank");
}
Symbol 15 MovieClip Frame 120
stop();
_parent.showIntro = true;
Symbol 67 MovieClip [__Packages.com.Scene] Frame 0
class com.Scene
{
var f, dim, clip, matrix, nodes, i;
function Scene (oClip) {
f = 300;
dim = 1.85;
clip = oClip;
matrix = new com.Matrix();
}
function createEngine(level) {
clip.depth = 0;
deleteCub();
if (level == 1) {
var _local5 = 3;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "-1";
_local3["0"]["1"]["1"] = "-1";
_local3["0"]["1"]["2"] = "-1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "2";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["1"] = "-1";
_local3["1"]["0"]["2"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["0"] = "-1";
_local3["1"]["1"]["2"] = "3";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["0"] = "-1";
_local3["1"]["2"]["1"] = "3";
_local3["1"]["2"]["2"] = "-1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["2"] = "1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "-1";
_local3["2"]["1"]["1"] = "-1";
_local3["2"]["1"]["2"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["2"] = "2";
} else if (level == 2) {
var _local5 = 3;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "1";
_local3["0"]["0"]["1"] = "-1";
_local3["0"]["0"]["2"] = "-1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["2"] = "1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "-1";
_local3["0"]["2"]["1"] = "-1";
_local3["0"]["2"]["2"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "2";
_local3["1"]["0"]["1"] = "-1";
_local3["1"]["0"]["2"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["2"] = "3";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["0"] = "3";
_local3["1"]["2"]["1"] = "-1";
_local3["1"]["2"]["2"] = "-1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["2"] = "4";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "4";
_local3["2"]["1"]["1"] = "-1";
_local3["2"]["1"]["2"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["2"] = "2";
} else if (level == 3) {
var _local5 = 3;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "-1";
_local3["0"]["0"]["1"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "1";
_local3["0"]["1"]["1"] = "2";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["1"] = "3";
_local3["0"]["2"]["2"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["1"] = "3";
_local3["2"] = new Array();
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "-1";
_local3["2"]["2"]["1"] = "2";
} else if (level == 4) {
var _local5 = 3;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "-1";
_local3["0"]["1"]["2"] = "-1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["2"] = "1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "2";
_local3["1"]["0"]["2"] = "3";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["0"] = "3";
_local3["1"]["1"]["1"] = "2";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["2"] = "4";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "-1";
_local3["2"]["1"]["1"] = "1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "4";
} else if (level == 5) {
var _local5 = 3;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "1";
_local3["0"]["0"]["2"] = "2";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "3";
_local3["1"] = new Array();
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["2"] = "3";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "-1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["0"] = "-1";
_local3["2"]["0"]["1"] = "1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "-1";
_local3["2"]["1"]["1"] = "2";
} else if (level == 6) {
var _local5 = 3;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "2";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "-1";
_local3["0"]["2"]["1"] = "-1";
_local3["0"]["2"]["2"] = "-1";
_local3["1"] = new Array();
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["1"] = "2";
_local3["2"] = new Array();
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "1";
} else if (level == 7) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["3"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["1"] = "-1";
_local3["1"]["0"]["2"] = "-1";
_local3["1"]["0"]["3"] = "-1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["3"] = "-1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["3"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "2";
_local3["2"]["3"]["2"] = "1";
_local3["2"]["3"]["3"] = "2";
} else if (level == 8) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["1"]["2"] = "2";
_local3["0"]["1"]["3"] = "-1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["3"] = "-1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["3"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["2"] = "1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["2"] = "-1";
_local3["2"]["0"]["3"] = "2";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "-1";
_local3["2"]["1"]["2"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "-1";
_local3["2"]["2"]["1"] = "3";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "-1";
_local3["2"]["3"]["3"] = "3";
} else if (level == 9) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["2"] = "1";
_local3["0"]["0"]["3"] = "2";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "3";
_local3["0"]["1"]["2"] = "4";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "2";
_local3["1"]["0"]["2"] = "5";
_local3["1"]["0"]["3"] = "6";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["0"] = "5";
_local3["1"]["1"]["1"] = "-1";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["0"] = "6";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["2"] = "4";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["2"] = "3";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "1";
} else if (level == 10) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "2";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["3"] = "2";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["1"] = "3";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "-1";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["1"] = "3";
_local3["1"]["3"]["2"] = "-1";
_local3["1"]["3"]["3"] = "4";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["0"] = "-1";
_local3["2"]["0"]["1"] = "-1";
_local3["2"]["0"]["2"] = "1";
_local3["2"]["0"]["3"] = "4";
} else if (level == 11) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "2";
_local3["1"] = new Array();
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["1"] = "3";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["0"] = "4";
_local3["1"]["2"]["2"] = "4";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["0"] = "-1";
_local3["1"]["3"]["2"] = "3";
_local3["1"]["3"]["3"] = "5";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["3"] = "1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["3"] = "5";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["3"] = "2";
} else if (level == 12) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["1"] = "2";
_local3["0"]["2"]["2"] = "3";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["1"] = "-1";
_local3["1"]["1"]["2"] = "4";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["1"] = "4";
_local3["1"]["2"]["2"] = "3";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["1"] = "1";
_local3["2"]["1"]["2"] = "2";
} else if (level == 13) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["1"] = "-1";
_local3["0"]["2"]["2"] = "2";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["1"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["0"] = "-1";
_local3["1"]["2"]["1"] = "-1";
_local3["1"]["2"]["2"] = "3";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["1"] = "3";
_local3["2"]["0"]["2"] = "4";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["1"] = "5";
_local3["2"]["2"]["3"] = "4";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "2";
_local3["2"]["3"]["3"] = "5";
} else if (level == 14) {
var _local5 = 4;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "-1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["3"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "2";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "3";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["0"] = "2";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["0"] = "4";
_local3["2"]["0"]["1"] = "3";
_local3["2"]["0"]["3"] = "-1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["2"] = "1";
_local3["2"]["1"]["3"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["3"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "4";
_local3["2"]["3"]["3"] = "-1";
} else if (level == 15) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "-1";
_local3["0"]["0"]["1"] = "-1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "-1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "1";
_local3["0"]["2"]["1"] = "2";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["4"] = "3";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["4"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["1"] = "-1";
_local3["1"]["0"]["2"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["0"] = "-1";
_local3["1"]["1"]["1"] = "2";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["0"] = "-1";
_local3["1"]["2"]["2"] = "1";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["0"] = "-1";
_local3["1"]["3"]["4"] = "-1";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["2"] = "3";
_local3["1"]["4"]["3"] = "-1";
_local3["1"]["4"]["4"] = "-1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["3"] = "-1";
_local3["2"]["0"]["4"] = "-1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["4"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "-1";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "-1";
_local3["2"]["4"]["1"] = "-1";
_local3["2"]["4"]["2"] = "-1";
} else if (level == 16) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["4"] = "2";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["2"] = "3";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["2"] = "4";
_local3["1"] = new Array();
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["2"] = "5";
_local3["1"]["1"]["4"] = "1";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["3"] = "6";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "6";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["1"] = "4";
_local3["2"]["2"]["3"] = "5";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "3";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["2"] = "2";
} else if (level == 17) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["3"] = "2";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["3"] = "3";
_local3["0"]["4"]["4"] = "4";
_local3["1"] = new Array();
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["0"] = "2";
_local3["1"]["2"]["1"] = "4";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["3"] = "5";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "6";
_local3["2"]["2"]["4"] = "6";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["3"] = "3";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["1"] = "1";
_local3["2"]["4"]["4"] = "5";
} else if (level == 18) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["4"] = "-1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["1"]["4"] = "-1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["4"] = "-1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["0"] = "2";
_local3["0"]["3"]["4"] = "-1";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["4"] = "3";
_local3["1"] = new Array();
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["3"] = "-1";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["0"] = "3";
_local3["1"]["3"]["1"] = "4";
_local3["1"]["3"]["3"] = "-1";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["3"] = "-1";
_local3["1"]["4"]["4"] = "2";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["3"] = "-1";
_local3["2"]["0"]["4"] = "1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["1"] = "4";
_local3["2"]["1"]["3"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["3"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["3"] = "-1";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["3"] = "-1";
} else if (level == 19) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "1";
_local3["0"]["0"]["4"] = "2";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["2"] = "3";
_local3["0"]["2"]["3"] = "4";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["2"] = "5";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["1"] = "2";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "3";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["2"] = "1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "5";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "4";
} else if (level == 20) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "-1";
_local3["0"]["0"]["4"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "2";
_local3["0"]["1"]["3"] = "-1";
_local3["0"]["1"]["4"] = "-1";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["1"] = "-1";
_local3["0"]["4"]["2"] = "-1";
_local3["0"]["4"]["4"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["2"] = "-1";
_local3["1"]["0"]["3"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["2"] = "1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "3";
_local3["1"]["2"]["3"] = "4";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["3"] = "2";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "-1";
_local3["2"]["1"]["3"] = "4";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["0"] = "-1";
_local3["2"]["2"]["2"] = "3";
_local3["2"]["3"] = new Array();
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "-1";
} else if (level == 21) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["2"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "2";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "3";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["0"] = "4";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["0"] = "5";
_local3["0"]["4"]["4"] = "5";
_local3["1"] = new Array();
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "1";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["3"] = "2";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["1"] = "3";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["4"] = "4";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "6";
_local3["2"]["4"]["4"] = "6";
} else if (level == 22) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["1"]["2"] = "2";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["4"] = "3";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "4";
_local3["1"]["0"]["1"] = "1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "2";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["0"] = "4";
_local3["1"]["4"]["2"] = "3";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "5";
_local3["2"]["1"]["1"] = "6";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["2"] = "5";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "6";
} else if (level == 23) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "2";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "3";
_local3["1"]["0"]["2"] = "2";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["1"] = "4";
_local3["1"]["1"]["2"] = "5";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["0"] = "4";
_local3["2"]["1"]["3"] = "3";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "5";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "1";
} else if (level == 24) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "1";
_local3["0"]["0"]["3"] = "2";
_local3["0"]["0"]["4"] = "-1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["0"] = "1";
_local3["0"]["3"]["3"] = "3";
_local3["0"]["3"]["4"] = "-1";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["0"] = "-1";
_local3["0"]["4"]["3"] = "-1";
_local3["0"]["4"]["4"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["0"]["1"] = "-1";
_local3["1"]["0"]["4"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["0"] = "-1";
_local3["1"]["1"]["1"] = "4";
_local3["1"]["1"]["4"] = "3";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["0"] = "-1";
_local3["1"]["4"]["1"] = "2";
_local3["1"]["4"]["4"] = "5";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["0"] = "-1";
_local3["2"]["0"]["1"] = "6";
_local3["2"]["0"]["4"] = "6";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["0"] = "-1";
_local3["2"]["3"]["1"] = "5";
_local3["2"]["3"]["4"] = "4";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "-1";
_local3["2"]["4"]["1"] = "-1";
_local3["2"]["4"]["4"] = "-1";
} else if (level == 25) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["0"] = "-1";
_local3["0"]["0"]["1"] = "-1";
_local3["0"]["0"]["2"] = "-1";
_local3["0"]["0"]["3"] = "-1";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["0"] = "-1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "-1";
_local3["0"]["2"]["2"] = "1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["0"] = "-1";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["0"] = "-1";
_local3["0"]["4"]["4"] = "2";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "3";
_local3["1"]["0"]["4"] = "-1";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["4"] = "-1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["4"] = "-1";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["1"] = "4";
_local3["1"]["3"]["4"] = "-1";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["0"] = "3";
_local3["1"]["4"]["1"] = "-1";
_local3["1"]["4"]["2"] = "-1";
_local3["1"]["4"]["3"] = "-1";
_local3["1"]["4"]["4"] = "-1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["0"] = "2";
_local3["2"]["0"]["1"] = "-1";
_local3["2"]["0"]["2"] = "-1";
_local3["2"]["0"]["3"] = "-1";
_local3["2"]["0"]["4"] = "-1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["4"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["2"] = "4";
_local3["2"]["2"]["4"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["1"] = "1";
_local3["2"]["3"]["4"] = "-1";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "5";
_local3["2"]["4"]["4"] = "5";
} else if (level == 26) {
var _local5 = 5;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["1"]["2"] = "2";
_local3["0"]["1"]["3"] = "3";
_local3["0"]["1"]["4"] = "4";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "4";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["1"] = "3";
_local3["2"]["0"]["2"] = "2";
_local3["2"]["0"]["3"] = "1";
_local3["2"]["0"]["4"] = "5";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "5";
} else if (level == 27) {
var _local5 = 6;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "1";
_local3["0"]["2"]["2"] = "2";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["1"] = "-1";
_local3["0"]["4"]["2"] = "-1";
_local3["0"]["4"]["3"] = "-1";
_local3["0"]["4"]["4"] = "-1";
_local3["0"]["4"]["5"] = "-1";
_local3["0"]["5"] = new Array();
_local3["0"]["5"]["1"] = "3";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "4";
_local3["1"]["1"] = new Array();
_local3["1"]["1"]["2"] = "5";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["3"] = "4";
_local3["1"]["5"] = new Array();
_local3["1"]["5"]["1"] = "5";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["4"] = "-1";
_local3["2"]["0"]["5"] = "6";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["4"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["4"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["1"] = "2";
_local3["2"]["3"]["2"] = "6";
_local3["2"]["3"]["3"] = "1";
_local3["2"]["3"]["4"] = "-1";
_local3["2"]["4"] = new Array();
_local3["2"]["4"]["0"] = "-1";
_local3["2"]["4"]["1"] = "-1";
_local3["2"]["4"]["2"] = "-1";
_local3["2"]["4"]["3"] = "-1";
_local3["2"]["4"]["4"] = "-1";
_local3["2"]["5"] = new Array();
_local3["2"]["5"]["4"] = "3";
} else if (level == 28) {
var _local5 = 6;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["3"] = "1";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["5"] = "2";
_local3["0"]["4"] = new Array();
_local3["0"]["4"]["5"] = "3";
_local3["0"]["5"] = new Array();
_local3["0"]["5"]["5"] = "4";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["1"] = "5";
_local3["1"]["0"]["2"] = "1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["5"] = "2";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["1"] = "5";
_local3["2"]["0"]["2"] = "6";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["3"] = "3";
_local3["2"]["5"] = new Array();
_local3["2"]["5"]["3"] = "6";
_local3["2"]["5"]["4"] = "4";
} else if (level == 29) {
var _local5 = 6;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["2"] = "1";
_local3["0"]["5"] = new Array();
_local3["0"]["5"]["3"] = "2";
_local3["0"]["5"]["5"] = "3";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["1"] = "2";
_local3["1"]["0"]["4"] = "3";
_local3["1"]["3"] = new Array();
_local3["1"]["3"]["4"] = "4";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["4"] = "5";
_local3["2"] = new Array();
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["1"] = "-1";
_local3["2"]["1"]["2"] = "-1";
_local3["2"]["1"]["3"] = "-1";
_local3["2"]["1"]["4"] = "-1";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["1"] = "-1";
_local3["2"]["2"]["2"] = "-1";
_local3["2"]["2"]["3"] = "-1";
_local3["2"]["2"]["4"] = "-1";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["1"] = "6";
_local3["2"]["3"]["4"] = "5";
_local3["2"]["5"] = new Array();
_local3["2"]["5"]["1"] = "1";
_local3["2"]["5"]["4"] = "4";
_local3["2"]["5"]["5"] = "6";
} else if (level == 30) {
var _local5 = 6;
var _local3 = new Array();
_local3["0"] = new Array();
_local3["0"]["0"] = new Array();
_local3["0"]["0"]["3"] = "2";
_local3["0"]["1"] = new Array();
_local3["0"]["1"]["1"] = "1";
_local3["0"]["2"] = new Array();
_local3["0"]["2"]["0"] = "3";
_local3["0"]["2"]["3"] = "4";
_local3["0"]["3"] = new Array();
_local3["0"]["3"]["2"] = "5";
_local3["0"]["3"]["5"] = "-1";
_local3["0"]["5"] = new Array();
_local3["0"]["5"]["1"] = "6";
_local3["0"]["5"]["5"] = "-1";
_local3["1"] = new Array();
_local3["1"]["0"] = new Array();
_local3["1"]["0"]["0"] = "-1";
_local3["1"]["2"] = new Array();
_local3["1"]["2"]["2"] = "-1";
_local3["1"]["4"] = new Array();
_local3["1"]["4"]["0"] = "4";
_local3["1"]["4"]["4"] = "-1";
_local3["1"]["5"] = new Array();
_local3["1"]["5"]["2"] = "-1";
_local3["2"] = new Array();
_local3["2"]["0"] = new Array();
_local3["2"]["0"]["5"] = "1";
_local3["2"]["1"] = new Array();
_local3["2"]["1"]["2"] = "2";
_local3["2"]["2"] = new Array();
_local3["2"]["2"]["5"] = "3";
_local3["2"]["3"] = new Array();
_local3["2"]["3"]["4"] = "5";
_local3["2"]["5"] = new Array();
_local3["2"]["5"]["0"] = "-1";
_local3["2"]["5"]["3"] = "6";
}
_global.amountFace = _local5;
var _local7 = new com.Cub(clip, nodes);
var _local6 = new com.Plane(clip, nodes, _local5, _local3);
}
function refreshScene() {
i = 0;
var _local4 = _global.polygons.length;
while (i < _local4) {
var _local3 = _global.polygons[i];
_local3.clickStatus = false;
_local3.complite = false;
if (_local3.stopPolygon) {
_local3.polyType.oStatus = 0;
_local3.polyType.complite = false;
} else if (_local3.polyType.type > 0) {
_local3.polyType.type = 0;
}
_local3.draw();
i++;
}
_global.selectType = 0;
_global.undoArray = new Array();
}
function undo() {
var _local4 = _global.undoArray.length;
if (_local4 != 0) {
var _local3 = 0;
while (_local3 < _local4) {
_global.undoArray[_local3].poly.polyType.type = _global.undoArray[_local3].type;
_global.undoArray[_local3].poly.draw();
_local3++;
}
_global.undoArray[0].poly.checkStatusLines();
_global.undoArray[0].poly.selectFace();
_local3 = 0;
var _local5 = _global.startPoint.length;
while (_local3 < _local5) {
var _local2 = _global.startPoint[_local3].poly;
if (_local2.polyType.type == _global.selectType) {
_local2.polyType.oStatus = 1;
} else if (_local2.polyType.complite) {
_local2.polyType.oStatus = 2;
} else {
_local2.polyType.oStatus = 0;
}
_local2.draw();
_local3++;
}
_global.undoArray = new Array();
}
}
function deleteCub() {
for (var _local3 in clip) {
if (typeof(clip[_local3]) == "movieclip") {
clip[_local3].removeMovieClip();
}
}
nodes = new Array();
_global.polygons = new Array();
_global.map = new Array();
_global.startPoint = new Array();
_global.undoArray = new Array();
_global.selectType = 0;
}
function render(xangle, yangle) {
matrix.rotate(xangle, yangle);
i = 0;
var _local3 = nodes.length;
while (i < _local3) {
nodes[i].rotate(matrix, f, dim);
i++;
}
i = 0;
var _local4 = _global.polygons.length;
while (i < _local4) {
_global.polygons[i].draw();
i++;
}
}
}
Symbol 68 MovieClip [__Packages.com.Matrix] Frame 0
class com.Matrix
{
var rad, sinTable, cosTable, cxa, sxa, cya, sya;
function Matrix () {
rad = (Math.PI/180);
sinTable = new Array();
cosTable = new Array();
var _local2 = -900;
while (_local2 >= -1800) {
sinTable[_local2] = Math.sin((_local2 / 10) * rad);
cosTable[_local2] = Math.cos((_local2 / 10) * rad);
_local2--;
}
}
function rotate(xangle, yangle) {
xangle = int(xangle * 10);
yangle = int(yangle * 10);
cxa = cosTable[xangle];
sxa = sinTable[xangle];
cya = cosTable[yangle];
sya = sinTable[yangle];
}
}
Symbol 69 MovieClip [__Packages.com.Cub] Frame 0
class com.Cub
{
var clip, nodes, n0, n1, n2, n3, n4, n5, n6, n7, poly0, poly1, poly2;
function Cub (_clip, _nodes) {
clip = _clip;
nodes = _nodes;
create();
}
function create() {
n0 = new com.Node(-50, -50, -50);
n1 = new com.Node(-50, -50, 50);
n2 = new com.Node(50, -50, 50);
n3 = new com.Node(50, -50, -50);
n4 = new com.Node(-50, 50, -50);
n5 = new com.Node(-50, 50, 50);
n6 = new com.Node(50, 50, 50);
n7 = new com.Node(50, 50, -50);
var _local3 = 0;
while (_local3 < 8) {
nodes.push(this["n" + _local3]);
_local3++;
}
var _local4 = -2;
poly0 = new com.Polygon(clip.createEmptyMovieClip("cub_mc_" + clip.depth, clip.depth++), _local4);
poly0.addNode(n4);
poly0.addNode(n5);
poly0.addNode(n6);
poly0.addNode(n7);
poly1 = new com.Polygon(clip.createEmptyMovieClip("cub_mc_" + clip.depth, clip.depth++), _local4);
poly1.addNode(n7);
poly1.addNode(n6);
poly1.addNode(n2);
poly1.addNode(n3);
poly2 = new com.Polygon(clip.createEmptyMovieClip("cub_mc_" + clip.depth, clip.depth++), _local4);
poly2.addNode(n0);
poly2.addNode(n4);
poly2.addNode(n7);
poly2.addNode(n3);
_local3 = 0;
while (_local3 < 3) {
_global.polygons.push(this["poly" + _local3]);
_local3++;
}
}
}
Symbol 70 MovieClip [__Packages.com.Node] Frame 0
class com.Node
{
var $x, $y, $z, sx, sy;
function Node (a, b, c) {
$x = (a ? (a) : 0);
$y = (b ? (b) : 0);
$z = (c ? (c) : 0);
sx = $x;
sy = $y;
}
function rotate(m, f, dim) {
var _local3 = ($z * m.cya) - ($x * m.sya);
var _local5 = ($z * m.sya) + ($x * m.cya);
var _local6 = ($y * m.sxa) + (_local3 * m.cxa);
var _local7 = ($y * m.cxa) - (_local3 * m.sxa);
var _local4 = (f / (f + _local6)) * dim;
sx = _local5 * _local4;
sy = _local7 * _local4;
}
function get x() {
return(sx);
}
function get y() {
return(sy);
}
}
Symbol 71 MovieClip [__Packages.com.Polygon] Frame 0
class com.Polygon
{
var nodes, polySound, clickStatus, complite, stopPolygon, polyType, clip, obj, pass, poitsFound, i;
function Polygon (_clip, _typePolygon) {
var _local3 = parseInt(_typePolygon, 10);
nodes = new Array();
polySound = new com.Sounds(_clip);
clickStatus = false;
complite = false;
if ((_typePolygon == undefined) || (_local3 < 1)) {
stopPolygon = false;
if (_local3 < 0) {
polyType = new com.Types(_local3);
} else {
polyType = new com.Types(0);
}
} else {
_global.startPoint.push({poly:this, i:_global.polygons.length});
stopPolygon = true;
polyType = new com.Types(_local3);
}
clip = _clip;
clip.obj = this;
clip.useHandCursor = false;
clip.onPress = clickToPolygon;
clip.onRelease = (clip.onReleaseOutside = deleteAutoSelect);
}
function addNode(a, b) {
nodes.push({node:a, control:b});
}
function clickToPolygon() {
_global.undoArray = new Array();
if (obj.stopPolygon) {
obj.polySound.playSound("clickToEndPoint");
_global.selectType = obj.polyType.type;
obj.selectFace();
} else if (((_global.selectType > 0) && (obj.polyType.type >= 0)) && (obj.polyType.type != _global.selectType)) {
_global.undoArray.push({poly:obj, type:obj.polyType.type});
obj.polySound.playSound("clickToFace");
obj.polyType.type = _global.selectType;
}
obj.draw();
obj.clip.onMouseMove = obj.autoSelect;
}
function autoSelect() {
var _local3 = 3;
var _local5 = _global.polygons.length;
while (_local3 < _local5) {
var _local2 = _global.polygons[_local3];
if (_local2.clip.hitTest(_xmouse, _ymouse, true)) {
if (_local2.polyType.type != _global.selectType) {
if ((!_local2.stopPolygon) && (_local2.polyType.type >= 0)) {
_global.undoArray.push({poly:_local2, type:_local2.polyType.type});
_local2.polyType.type = _global.selectType;
_local2.polySound.playSound("clickToFace");
_local2.draw();
break;
}
}
}
_local3++;
}
}
function deleteAutoSelect() {
delete obj.clip.onMouseMove;
if (_global.selectType > 0) {
obj.checkStatusLines();
}
}
function selectFace() {
polyType.oStatus = 1;
var _local4 = 0;
var _local5 = _global.startPoint.length;
while (_local4 < _local5) {
var _local3 = _global.startPoint[_local4].poly;
if (_local3.polyType.type == polyType.__get__type()) {
_local3.polyType.oStatus = 1;
} else if (_local3.polyType.complite) {
_local3.polyType.oStatus = 2;
} else {
_local3.polyType.oStatus = 0;
}
_local3.draw();
_local4++;
}
}
function changeStatusComlite(poly) {
var _local4 = false;
if (!poly.polyType.complite) {
var _local3 = 0;
var _local5 = _global.startPoint.length;
while (_local3 < _local5) {
var _local2 = _global.startPoint[_local3].poly;
if (_local2.polyType.type == poly.polyType.type) {
_local2.polyType.complite = true;
_local2.polyType.oStatus = 2;
_local4 = true;
}
_local2.draw();
_local3++;
}
}
return(_local4);
}
function changeStatusNoComlite(poly) {
var _local4 = false;
if (poly.polyType.complite) {
var _local3 = 0;
var _local5 = _global.startPoint.length;
while (_local3 < _local5) {
var _local2 = _global.startPoint[_local3].poly;
if (_local2.polyType.type == poly.polyType.type) {
_local2.polyType.complite = false;
_local2.polyType.oStatus = 0;
_local4 = true;
}
_local2.draw();
_local3++;
}
}
return(_local4);
}
function checkStatusLines() {
var _local9 = false;
var _local11 = false;
var _local10 = 0;
var _local12 = _global.startPoint.length;
var _local8 = 1;
while (_local8 <= (_local12 / 2)) {
var _local4 = 0;
pass = new Array();
poitsFound = new Array();
while (_local4 < _local12) {
var _local3 = _global.startPoint[_local4].poly;
var _local5 = _local8.toString();
if (_local3.polyType.type == _local5) {
poitsFound.push(_global.startPoint[_local4].i);
while (true) {
var _local6 = poitsFound.length;
if (_local6 != 0) {
var _local7 = foundNextFace(poitsFound[0], _local5);
if (_local7) {
_local10++;
if (changeStatusComlite(_local3)) {
_local9 = true;
}
break;
}
} else {
if (changeStatusNoComlite(_local3)) {
_local11 = true;
}
break;
}
}
break;
}
_local4++;
}
_local8++;
}
if (_local11) {
polySound.playSound("lineNoComplite");
} else if (_local9) {
if (_local10 == (_local12 / 2)) {
polySound.playSound("winLevel");
clip._parent._parent.endLevel();
} else {
polySound.playSound("lineComplite");
}
}
}
function foundNextFace(i, type) {
var _local10 = false;
var _local3 = _global.amountFace;
var _local7 = _local3 * _local3;
var _local14 = i - 3;
var _local5 = int(_local14 / _local7);
var _local9 = Math.floor((_local14 - (_local5 * _local7)) / _local3);
var _local8 = _local14 % _local3;
var _local15 = _local9 - 1;
var _local11 = _local8;
if (_local15 < 0) {
if (_local5 == 1) {
_local15 = (_local3 - _local8) - 1;
_local11 = _local3 - 1;
} else {
_local15 = _local3 - 1;
}
var _local17 = 0;
_local17 = ((_local5 != 0) ? (_local17) : 10);
} else {
var _local17 = _local5;
}
var _local13 = (3 + ((_local15 * _local3) + _local11)) + (_local17 * _local7);
if ((_global.polygons[_local13].polyType.type == type) && (!pass[_local13])) {
if (_global.polygons[_local13].stopPolygon) {
_local10 = true;
} else {
pass[i] = true;
poitsFound.push(_local13);
}
}
_local15 = _local9 + 1;
_local11 = _local8;
if (_local15 >= _local3) {
_local15 = 0;
var _local17 = _local5 + 2;
} else {
var _local17 = _local5;
}
_local13 = (3 + ((_local15 * _local3) + _local11)) + (_local17 * _local7);
if ((_global.polygons[_local13].polyType.type == type) && (!pass[_local13])) {
if (_global.polygons[_local13].stopPolygon) {
_local10 = true;
} else {
pass[i] = true;
poitsFound.push(_local13);
}
}
_local15 = _local9;
_local11 = _local8 + 1;
if (_local11 >= _local3) {
if (_local5 == 0) {
_local15 = 0;
_local11 = (_local3 - _local9) - 1;
} else {
_local11 = 0;
}
var _local17 = 1;
_local17 = ((_local5 != 1) ? (_local17) : 10);
} else {
var _local17 = _local5;
}
_local13 = (3 + ((_local15 * _local3) + _local11)) + (_local17 * _local7);
if ((_global.polygons[_local13].polyType.type == type) && (!pass[_local13])) {
if (_global.polygons[_local13].stopPolygon) {
_local10 = true;
} else {
pass[i] = true;
poitsFound.push(_local13);
}
}
_local15 = _local9;
_local11 = _local8 - 1;
if (_local11 < 0) {
if (_local5 == 0) {
_local15 = _local3 - 1;
_local11 = (_local3 - _local8) - 1;
} else {
_local11 = _local3 - 1;
}
var _local17 = 2;
_local17 = ((_local5 == 1) ? (_local17) : 10);
} else {
var _local17 = _local5;
}
_local13 = (3 + ((_local15 * _local3) + _local11)) + (_local17 * _local7);
if ((_global.polygons[_local13].polyType.type == type) && (!pass[_local13])) {
if (_global.polygons[_local13].stopPolygon) {
_local10 = true;
} else {
pass[i] = true;
poitsFound.push(_local13);
}
}
for (var _local12 in poitsFound) {
if (poitsFound[_local12] == i) {
var _local4 = _local12;
poitsFound.splice(_local4, 1);
}
}
return(_local10);
}
function draw() {
i = 1;
clip.clear();
var _local5 = ((nodes[1].node.x - nodes[0].node.x) * (nodes[2].node.y - nodes[0].node.y)) - ((nodes[1].node.y - nodes[0].node.y) * (nodes[2].node.x - nodes[0].node.x));
if (_local5 < 0) {
var _local3 = polyType.__get__simpleStyle();
clip.moveTo(nodes[0].node.x, nodes[0].node.y);
if (_local3.__get__linealpha() != 0) {
clip.lineStyle(_local3.__get__lineweight(), _local3.__get__linecolor(), _local3.__get__linealpha());
}
clip.beginFill(_local3.__get__fillcolor(), _local3.__get__fillalpha());
var _local4 = nodes.length;
while (i < _local4) {
if (nodes[i].control) {
var _local2 = polyType.__get__advanceStyle();
clip.moveTo(nodes[i].node.x, nodes[i].node.y);
if (_local2.__get__linealpha() != 0) {
clip.lineStyle(_local2.__get__lineweight(), _local2.__get__linecolor(), _local2.__get__linealpha());
}
clip.beginFill(_local2.__get__fillcolor(), _local2.__get__fillalpha());
i++;
} else {
clip.lineTo(nodes[i].node.x, nodes[i].node.y);
i++;
}
}
clip.endFill();
}
}
function set type(a) {
polyType = a;
//return(type);
}
function get type() {
return(polyType);
}
}
Symbol 72 MovieClip [__Packages.com.Types] Frame 0
class com.Types
{
static var colorSelect;
var oStatus, oType, styleBlack, styleBlack2, styleEmty, styleSimple1, styleSimple2, styleSimple3, styleSimple4, styleSimple5, styleSimple6, styleAdvanceBlack, styleAdvanceSelect, styleAdvanceComlite;
function Types (_t) {
colorSelect = randomAlternative(6);
oStatus = 0;
oType = _t;
styleBlack = new com.Style();
styleBlack.fillcolor = 1973790 /* 0x1E1E1E */;
styleBlack.lineweight = 0;
styleBlack.linealpha = 0;
styleBlack2 = new com.Style();
styleBlack2.__set__fillcolor(0);
styleBlack2.__set__linecolor(140);
styleBlack2.__set__lineweight(0);
styleBlack2.__set__linealpha(100);
styleEmty = new com.Style();
styleEmty.fillcolor = 6513507 /* 0x636363 */;
styleEmty.lineweight = 0;
styleEmty.linealpha = 0;
styleSimple1 = new com.Style();
styleSimple1.fillcolor = 25599;
styleSimple1.lineweight = 0;
styleSimple1.linealpha = 0;
styleSimple2 = new com.Style();
styleSimple2.__set__fillcolor(65280);
styleSimple2.__set__lineweight(0);
styleSimple2.__set__linealpha(0);
styleSimple3 = new com.Style();
styleSimple3.fillcolor = 16776960 /* 0xFFFF00 */;
styleSimple3.lineweight = 0;
styleSimple3.linealpha = 0;
styleSimple4 = new com.Style();
styleSimple4.fillcolor = 16646144 /* 0xFE0000 */;
styleSimple4.lineweight = 0;
styleSimple4.linealpha = 0;
styleSimple5 = new com.Style();
styleSimple5.fillcolor = 16686080 /* 0xFE9C00 */;
styleSimple5.lineweight = 0;
styleSimple5.linealpha = 0;
styleSimple6 = new com.Style();
styleSimple6.__set__fillcolor(13369599);
styleSimple6.__set__lineweight(0);
styleSimple6.__set__linealpha(0);
styleAdvanceBlack = new com.Style();
styleAdvanceBlack.fillcolor = 0;
styleAdvanceBlack.linecolor = 0;
styleAdvanceBlack.lineweight = 0;
styleAdvanceBlack.linealpha = 100;
styleAdvanceSelect = new com.Style();
styleAdvanceSelect.fillcolor = 16777215 /* 0xFFFFFF */;
styleAdvanceSelect.linecolor = 0;
styleAdvanceSelect.lineweight = 0;
styleAdvanceSelect.fillalpha = 70;
styleAdvanceSelect.linealpha = 100;
}
function randomAlternative(n) {
var _local1 = new Array();
var _local6 = new Array();
var _local2 = 0;
while (_local2 < n) {
var _local4 = _local2 + 1;
_local1.push(_local4);
_local2++;
}
var _local3;
_local2 = 0;
while (_local2 < n) {
_local3 = random(_local1.length);
_local6.push(_local1[_local3]);
_local1.splice(_local3, 1);
_local2++;
}
return(_local6);
}
function get type() {
return(oType);
}
function set type(a) {
oType = a;
//return(type);
}
function get simpleStyle() {
if (oType <= 0) {
var _local2 = oType;
} else {
var _local2 = colorSelect[oType - 1];
}
switch (_local2) {
case -1 :
return(styleBlack2);
case -2 :
return(styleBlack);
case 0 :
return(styleEmty);
case 1 :
return(styleSimple1);
case 2 :
return(styleSimple2);
case 3 :
return(styleSimple3);
case 4 :
return(styleSimple4);
case 5 :
return(styleSimple5);
case 6 :
return(styleSimple6);
}
return(new com.Style());
}
function get advanceStyle() {
switch (oStatus) {
case 0 :
return(styleAdvanceBlack);
case 1 :
return(styleAdvanceSelect);
case 2 :
var _local2 = simpleStyle;
styleAdvanceComlite = new com.Style();
styleAdvanceComlite.__set__fillcolor(_local2.fillcolor);
styleAdvanceComlite.__set__linecolor(0);
styleAdvanceComlite.__set__lineweight(0);
styleAdvanceComlite.__set__linealpha(100);
return(styleAdvanceComlite);
}
}
}
Symbol 73 MovieClip [__Packages.com.Style] Frame 0
class com.Style
{
var lWeight, lAlpha, fAlpha, lColor, fColor;
function Style () {
lWeight = 0;
lAlpha = 100;
fAlpha = 100;
lColor = 52224;
fColor = 0;
}
function set linealpha(a) {
lAlpha = a;
//return(linealpha);
}
function set lineweight(a) {
lWeight = a;
//return(lineweight);
}
function set linecolor(a) {
lColor = a;
//return(linecolor);
}
function set fillalpha(a) {
fAlpha = a;
//return(fillalpha);
}
function set fillcolor(a) {
fColor = a;
//return(fillcolor);
}
function get linealpha() {
return(lAlpha);
}
function get lineweight() {
return(lWeight);
}
function get linecolor() {
return(lColor);
}
function get fillalpha() {
return(fAlpha);
}
function get fillcolor() {
return(fColor);
}
}
Symbol 74 MovieClip [__Packages.com.Sounds] Frame 0
class com.Sounds
{
var winLevel, clickToFace, clickToEndPoint, lineComplite, lineNoComplite;
function Sounds (obj) {
winLevel = new Sound(obj);
winLevel.attachSound("winLevel");
winLevel.onSoundComplete = emptyFuncForSound;
clickToFace = new Sound(obj);
clickToFace.attachSound("clickToFace");
clickToFace.onSoundComplete = emptyFuncForSound;
clickToEndPoint = new Sound(obj);
clickToEndPoint.attachSound("clickToEndPoint");
clickToEndPoint.onSoundComplete = emptyFuncForSound;
lineComplite = new Sound(obj);
lineComplite.attachSound("lineComplite");
lineComplite.onSoundComplete = emptyFuncForSound;
lineNoComplite = new Sound(obj);
lineNoComplite.attachSound("lineNoComplite");
lineNoComplite.onSoundComplete = emptyFuncForSound;
}
function playSound(type) {
lineNoComplite.setVolume(60);
switch (type) {
case "clickToFace" :
clickToFace.start();
break;
case "clickToEndPoint" :
clickToEndPoint.start();
break;
case "lineComplite" :
lineComplite.start();
break;
case "lineNoComplite" :
lineNoComplite.start();
break;
case "winLevel" :
lineNoComplite.setVolume(30);
winLevel.start();
}
}
function emptyFuncForSound() {
}
}
Symbol 75 MovieClip [__Packages.com.Plane] Frame 0
class com.Plane
{
var clip, nodes, n0, n1, n2, n3, n4, n5, n6, n7, poly0;
function Plane (_clip, _nodes, _plane, _stopPoint) {
clip = _clip;
nodes = _nodes;
createPlanes(_plane, _stopPoint);
}
function createPlanes(_plane, _stopPoint) {
var _local12 = 2;
var _local3 = (100 / _plane) - _local12;
var _local8 = _local3 / 5;
var _local11 = 0;
while (_local11 < 3) {
var _local5 = 0;
while (_local5 < _plane) {
var _local4 = 0;
while (_local4 < _plane) {
if (parseInt(_stopPoint[_local11][_local4][_local5], 10) > 0) {
var _local13 = 8;
var _local10 = true;
} else {
var _local13 = 4;
var _local10 = false;
}
var _local7 = (50 - (_local12 / 2)) - (_local12 * _local4);
var _local6 = (50 - (_local12 / 2)) - (_local12 * _local5);
switch (_local11) {
case 0 :
n0 = new com.Node((-_local7) + (_local4 * _local3), 50.1, _local6 - ((_local5 + 1) * _local3));
n1 = new com.Node((-_local7) + (_local4 * _local3), 50.1, _local6 - (_local5 * _local3));
n2 = new com.Node((-_local7) + ((_local4 + 1) * _local3), 50.1, _local6 - (_local5 * _local3));
n3 = new com.Node((-_local7) + ((_local4 + 1) * _local3), 50.1, _local6 - ((_local5 + 1) * _local3));
if (_local10) {
n4 = new com.Node(((-_local7) + (_local4 * _local3)) + _local8, 50.1, (_local6 - ((_local5 + 1) * _local3)) + _local8);
n5 = new com.Node(((-_local7) + (_local4 * _local3)) + _local8, 50.1, (_local6 - (_local5 * _local3)) - _local8);
n6 = new com.Node(((-_local7) + ((_local4 + 1) * _local3)) - _local8, 50.1, (_local6 - (_local5 * _local3)) - _local8);
n7 = new com.Node(((-_local7) + ((_local4 + 1) * _local3)) - _local8, 50.1, (_local6 - ((_local5 + 1) * _local3)) + _local8);
}
break;
case 1 :
n0 = new com.Node(50.1, _local6 - ((_local5 + 1) * _local3), (-_local7) + (_local4 * _local3));
n1 = new com.Node(50.1, _local6 - (_local5 * _local3), (-_local7) + (_local4 * _local3));
n2 = new com.Node(50.1, _local6 - (_local5 * _local3), (-_local7) + ((_local4 + 1) * _local3));
n3 = new com.Node(50.1, _local6 - ((_local5 + 1) * _local3), (-_local7) + ((_local4 + 1) * _local3));
if (_local10) {
n4 = new com.Node(50.1, (_local6 - ((_local5 + 1) * _local3)) + _local8, ((-_local7) + (_local4 * _local3)) + _local8);
n5 = new com.Node(50.1, (_local6 - (_local5 * _local3)) - _local8, ((-_local7) + (_local4 * _local3)) + _local8);
n6 = new com.Node(50.1, (_local6 - (_local5 * _local3)) - _local8, ((-_local7) + ((_local4 + 1) * _local3)) - _local8);
n7 = new com.Node(50.1, (_local6 - ((_local5 + 1) * _local3)) + _local8, ((-_local7) + ((_local4 + 1) * _local3)) - _local8);
}
break;
case 2 :
n0 = new com.Node((-_local7) + (_local4 * _local3), _local6 - ((_local5 + 1) * _local3), -50.1);
n1 = new com.Node((-_local7) + (_local4 * _local3), _local6 - (_local5 * _local3), -50.1);
n2 = new com.Node((-_local7) + ((_local4 + 1) * _local3), _local6 - (_local5 * _local3), -50.1);
n3 = new com.Node((-_local7) + ((_local4 + 1) * _local3), _local6 - ((_local5 + 1) * _local3), -50.1);
if (!_local10) {
break;
}
n4 = new com.Node(((-_local7) + (_local4 * _local3)) + _local8, (_local6 - ((_local5 + 1) * _local3)) + _local8, -50.1);
n5 = new com.Node(((-_local7) + (_local4 * _local3)) + _local8, (_local6 - (_local5 * _local3)) - _local8, -50.1);
n6 = new com.Node(((-_local7) + ((_local4 + 1) * _local3)) - _local8, (_local6 - (_local5 * _local3)) - _local8, -50.1);
n7 = new com.Node(((-_local7) + ((_local4 + 1) * _local3)) - _local8, (_local6 - ((_local5 + 1) * _local3)) + _local8, -50.1);
}
var _local9 = 0;
while (_local9 < _local13) {
nodes.push(this["n" + _local9]);
_local9++;
}
poly0 = new com.Polygon(clip.createEmptyMovieClip("cub_mc_" + clip.depth, clip.depth++), _stopPoint[_local11][_local4][_local5]);
poly0.addNode(n0);
poly0.addNode(n1);
poly0.addNode(n2);
poly0.addNode(n3);
if (_local10) {
poly0.addNode(n4, true);
poly0.addNode(n5);
poly0.addNode(n6);
poly0.addNode(n7);
}
_global.polygons.push(poly0);
_local4++;
}
_local5++;
}
_local11++;
}
}
}
Symbol 40 MovieClip Frame 1
function hide() {
this._visible = false;
}
function show() {
this._visible = true;
}
hide();
this.exitHelp.onRelease = function () {
hide();
_parent.menu.show();
};
Symbol 50 MovieClip Frame 1
function hide() {
_parent.sound_UP_DOWN(true);
this._visible = false;
}
function show() {
_parent.sound_UP_DOWN(false);
this._visible = true;
}
hide();
this.refreshCub.onRelease = function () {
if (_parent.oScene.clip._alpha == 100) {
_parent.oScene.refreshScene();
}
};
this.undoCub.onRelease = function () {
if (_parent.oScene.clip._alpha == 100) {
_parent.oScene.undo();
}
};
this.mainMenu.onRelease = (endGames = function () {
delete _parent.engine.onEnterFrame;
_parent.oScene.deleteCub();
hide();
_parent.menu.show();
});
Symbol 66 MovieClip Frame 1
function hide() {
this._visible = false;
}
function show() {
if (dataSave.data.level == undefined) {
continueGame._visible = false;
} else {
continueGame._visible = true;
}
this._visible = true;
}
var dataSave = SharedObject.getLocal("3d_ligic");
youWin_mc._visible = false;
show();
this.startGame.onRelease = function () {
hide();
youWin_mc._visible = false;
_parent.playGame.show();
_parent.level = 1;
_parent.startNextLevel();
};
this.continueGame.onRelease = function () {
hide();
youWin_mc._visible = false;
_parent.playGame.show();
_parent.level = dataSave.data.level;
_parent.startNextLevel();
};
this.helpGame.onRelease = function () {
hide();
_parent.helpGame.show();
};