Frame 1
function initSet() {
winFlag = false;
Angl = randRange(1, 160);
AngCome = Angl;
if (AngCome > 90) {
AngCome = AngCome - 90;
}
sdvFlag = false;
sdvNeed = 0;
a = 1;
while (a <= 4) {
SqrsArr[a] = Sq1.duplicateMovieClip("Sqr" + a, 100 + a);
sdv8[a] = 0;
a++;
}
duplicateMovieClip (SqFon_mc, "SqFonUp_mc", 500);
DirAngle = randRange(1, 360);
incr_x = Math.cos(DirAngle / 57.32) * Incr;
incr_y = Math.sin(DirAngle / 57.32) * Incr;
}
function makeSquare(a, CLR) {
SqrsArr[a].beginFill(CLR, 100);
SqrsArr[a].lineStyle(1, 0, 1);
SqrsArr[a].moveTo(-(PerspF / 2), TopsY[FrntP[a]]);
SqrsArr[a].lineTo((0 + wdth) + (PerspF / 2), TopsY[FrntP[a]]);
SqrsArr[a].lineTo((0 + wdth) - (PerspB / 2), TopsY[BackP[a]]);
SqrsArr[a].lineTo(0 + (PerspB / 2), TopsY[BackP[a]]);
SqrsArr[a].lineTo(-(PerspF / 2), TopsY[FrntP[a]]);
SqrsArr[a].endFill();
}
function makePicTop(a) {
PicTopArr[a].beginFill(16777215, 100);
PicTopArr[a].lineStyle(1, 0, 0);
PicTopArr[a].moveTo(-(PerspF / 2), TopsY[FrntP[a]]);
PicTopArr[a].lineTo((0 + wdth) + (PerspF / 2), TopsY[FrntP[a]]);
PicTopArr[a].lineTo((0 + wdth) - (PerspB / 2), TopsY[BackP[a]]);
PicTopArr[a].lineTo(0 + (PerspB / 2), TopsY[BackP[a]]);
PicTopArr[a].lineTo(-(PerspF / 2), TopsY[FrntP[a]]);
PicTopArr[a].endFill();
}
function makeMask(a) {
MaskArr[a].beginFill(16776960, 10);
MaskArr[a].lineStyle(1, 0, 0);
MaskArr[a].moveTo(-(PerspF / 2), TopsY[FrntP[a]]);
MaskArr[a].lineTo((0 + wdth) + (PerspF / 2), TopsY[FrntP[a]]);
MaskArr[a].lineTo((0 + wdth) - (PerspB / 2), TopsY[BackP[a]]);
MaskArr[a].lineTo(0 + (PerspB / 2), TopsY[BackP[a]]);
MaskArr[a].lineTo(-(PerspF / 2), TopsY[FrntP[a]]);
MaskArr[a].endFill();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var LEVEL = 0;
var VictoryLevel = 5;
stop();
duplicateMovieClip (dark1_mc, "darkUp_mc", 550);
duplicateMovieClip (help0_mc, "help_mc", 990);
help0_mc._visible = false;
dark1_mc._visible = false;
Play_btn._visible = false;
help_mc._visible = false;
darkUp_mc.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha - 0.5;
}
};
Play_btn.onRelease = function () {
winFlag = true;
a = 1;
while (a <= 4) {
SqrsArr[a].removeMovieClip();
PicTopArr[a].removeMovieClip();
MaskArr[a].removeMovieClip();
a++;
}
darkUp_mc.removeMovieClip();
play();
};
Help_btn.onRelease = function () {
help_mc._visible = !help_mc._visible;
InfoControl_mc._visible = !InfoControl_mc._visible;
};
SPP_btn.onRelease = function () {
getURL ("http://www.hilostripper.com/Live/connectStrip.php?trk=2", "_blank");
};
var i;
var j;
var a = 1;
var m;
var myPoint = new Object();
var PDX;
var PDY;
var winFlag = false;
var Angl = randRange(1, 160);
var AngCome = 0;
var SqrsArr = new Array(5);
var PicTopArr = new Array(5);
var MaskArr = new Array(5);
var wdth = 200;
var FourTops = new Array(5);
FourTops[1] = Square1_mc.P1;
FourTops[2] = Square1_mc.P2;
FourTops[3] = Square1_mc.P3;
FourTops[4] = Square1_mc.P4;
var TopsX = new Array(5);
var TopsY = new Array(5);
var f;
var FrntP = new Array(0, 1, 2, 3, 4);
var BackP = new Array(0, 4, 1, 2, 3);
var Clr = "0xFFFFFF";
var clr1 = "";
var Persp = 0;
var PerspF = 0;
var PerspB = 0;
var Alph;
var pixQ = 4;
var PixNamesTop = new Array(9);
PixNamesTop[1] = "PicFace01";
PixNamesTop[2] = "PicFace02";
PixNamesTop[3] = "PicFace03";
PixNamesTop[4] = "PicFace04";
PixNamesTop[5] = "PicFace05";
PixNamesTop[6] = "PicFace06";
PixNamesTop[7] = "PicFace07";
PixNamesTop[8] = "PicFace08";
var PixNamesDwn = new Array(5);
PixNamesDwn[1] = "PicDw01";
PixNamesDwn[2] = "PicDw02";
PixNamesDwn[3] = "PicDw03";
PixNamesDwn[4] = "PicDw04";
var Incr = 1.5;
var incr_x = 1;
var incr_y = 1;
var DirAngle = randRange(1, 360);
var sdv8 = new Array(5);
var sdvFlag = false;
var sdv4flag = false;
var sdvNeed = 0;
initSet();
CubeFly_mc.onEnterFrame = function () {
if (!winFlag) {
Sq1._x = Sq1._x + incr_x;
Sq1._y = Sq1._y + incr_y;
if (Sq1.hitTest(borderUp_mc)) {
Sq1._y = (Sq1._y + incr_y) + 4;
DirAngle = randRange(1, 180);
incr_x = Math.cos(DirAngle / 57.32) * Incr;
incr_y = Math.sin(DirAngle / 57.32) * Incr;
Sq1._x = Sq1._x + incr_x;
Sq1._y = Sq1._y + incr_y;
}
if (Sq1.hitTest(borderRt_mc)) {
Sq1._x = (Sq1._x - incr_x) - 4;
DirAngle = randRange(1, 180) + 90;
incr_x = Math.cos(DirAngle / 57.32) * Incr;
incr_y = Math.sin(DirAngle / 57.32) * Incr;
Sq1._x = Sq1._x + incr_x;
Sq1._y = Sq1._y + incr_y;
}
if (Sq1.hitTest(borderDw_mc)) {
Sq1._y = (Sq1._y - incr_y) - 4;
DirAngle = randRange(1, 180) - 180;
incr_x = Math.cos(DirAngle / 57.32) * Incr;
incr_y = Math.sin(DirAngle / 57.32) * Incr;
Sq1._x = Sq1._x + incr_x;
Sq1._y = Sq1._y + incr_y;
}
if (Sq1.hitTest(borderLf_mc)) {
Sq1._x = (Sq1._x + incr_x) + 4;
DirAngle = randRange(1, 180) - 90;
incr_x = Math.cos(DirAngle / 57.32) * Incr;
incr_y = Math.sin(DirAngle / 57.32) * Incr;
Sq1._x = Sq1._x + incr_x;
Sq1._y = Sq1._y + incr_y;
}
}
SqFonUp_mc._x = Sq1._x;
SqFonUp_mc._y = Sq1._y;
};
Square1_mc.onEnterFrame = function () {
if (!winFlag) {
Angl++;
if (Angl == 360) {
Angl = 0;
}
if (Angl == 270) {
if (sdv8[1] == 0) {
sdvNeed = 4;
} else {
sdvNeed = 0;
}
sdvFlag = true;
}
AngCome++;
if (AngCome >= 90) {
AngCome = 0;
}
Square1_mc._rotation = Angl;
f = 1;
while (f <= 4) {
myPoint.x = FourTops[f]._x;
myPoint.y = FourTops[f]._y;
Square1_mc.localToGlobal(myPoint);
TopsX[f] = myPoint.x;
TopsY[f] = myPoint.y;
f++;
}
a = 1;
while (a <= 4) {
SqrsArr[a].removeMovieClip();
SqrsArr[a] = Sq1.duplicateMovieClip("Sqr" + a, 300 + a);
PicTopArr[a].removeMovieClip();
PicTopArr[a] = Sq1.duplicateMovieClip("PicTop" + a, 200 + a);
MaskArr[a].removeMovieClip();
MaskArr[a] = Sq1.duplicateMovieClip("Msk" + a, 100 + a);
if ((Angl >= 0) && (Angl < 90)) {
SqrsArr[1]._visible = true;
SqrsArr[4]._visible = true;
SqrsArr[2]._visible = false;
SqrsArr[3]._visible = false;
PicTopArr[1]._visible = true;
PicTopArr[4]._visible = true;
PicTopArr[2]._visible = false;
PicTopArr[3]._visible = false;
}
if ((Angl >= 90) && (Angl < 180)) {
SqrsArr[1]._visible = false;
SqrsArr[4]._visible = true;
SqrsArr[2]._visible = false;
SqrsArr[3]._visible = true;
PicTopArr[1]._visible = false;
PicTopArr[4]._visible = true;
PicTopArr[2]._visible = false;
PicTopArr[3]._visible = true;
}
if ((Angl >= 180) && (Angl < 270)) {
SqrsArr[1]._visible = false;
SqrsArr[4]._visible = false;
SqrsArr[2]._visible = true;
SqrsArr[3]._visible = true;
PicTopArr[1]._visible = false;
PicTopArr[4]._visible = false;
PicTopArr[2]._visible = true;
PicTopArr[3]._visible = true;
}
if ((Angl >= 270) && (Angl < 360)) {
SqrsArr[1]._visible = true;
SqrsArr[4]._visible = false;
SqrsArr[2]._visible = true;
SqrsArr[3]._visible = false;
PicTopArr[1]._visible = true;
PicTopArr[4]._visible = false;
PicTopArr[2]._visible = true;
PicTopArr[3]._visible = false;
}
Persp = ((TopsX[BackP[a]] + 200) - (TopsX[FrntP[a]] + 200)) / 10;
if (SqrsArr[a]._visible) {
if (TopsX[FrntP[a]] < TopsX[BackP[a]]) {
AngShine = AngCome * 1.5;
if (AngShine < 16) {
AngShine = 16;
}
if (AngShine > 255) {
AngShine = 255;
}
Clr = "0x000000";
PerspF = 0;
PerspB = Persp;
Alph = ((90 - AngCome) / 90) * 100;
if (AngCome < 30) {
Alph = Alph + (30 - AngCome);
Clr = "0x000000";
}
} else {
AngShine = 135 + (AngCome * 2);
if (AngShine > 255) {
AngShine = AngShine - ((AngShine - 255) * 2);
}
Clr = (("0x" + AngShine.toString(16)) + AngShine.toString(16)) + AngShine.toString(16);
PerspF = Persp;
PerspB = 0;
Alph = (AngCome / 90) * 100;
if (AngShine >= 251) {
Alph = 75 - (255 - AngShine);
}
}
}
makeSquare(a, Clr);
makePicTop(a);
makeMask(a);
if (sdvFlag) {
if ((Angl == 270) && (AngCome == 0)) {
sdv8[1] = sdvNeed;
}
if ((Angl == 0) && (AngCome == 0)) {
sdv8[4] = sdvNeed;
}
if ((Angl == 90) && (AngCome == 0)) {
sdv8[3] = sdvNeed;
}
if ((Angl == 180) && (AngCome == 0)) {
sdv8[2] = sdvNeed;
}
sdv4flag = true;
j = 1;
while (j <= 4) {
if (sdv8[j] != sdv8[BackP[a]]) {
sdv4flag = false;
}
j++;
}
if (sdv4flag) {
sdvFlag = false;
}
}
PicTopArr[a].attachMovie(PixNamesTop[a + sdv8[a]], "pc", 3);
PicTopArr[a].setMask(MaskArr[a]);
PicTopArr[a]._x = Sq1._x;
PicTopArr[a]._y = TopsY[FrntP[a]] + Sq1._y;
PicTopArr[a]._yscale = (Math.abs(TopsY[FrntP[a]] - TopsY[BackP[a]]) / wdth) * 100;
SqrsArr[a]._alpha = Alph;
rot_txt.text = Angl;
a++;
}
}
};
var X_start;
var Bar_start = PogrBar_mc.barMask_mc._x;
var pctLoaded = 0;
PogrBar_mc.onEnterFrame = function () {
pctLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
this.barMask_mc._x = Bar_start + ((this.barMask_mc._width / 100) * pctLoaded);
Dark_mc._alpha = 100 - pctLoaded;
if (pctLoaded >= 100) {
LoadOK = true;
this._visible = false;
Dark_mc._visible = false;
Play_btn._visible = true;
}
};
Frame 2
function initGame() {
if (LEVEL < VictoryLevel) {
LEVEL++;
}
wdth = WDTH[LEVEL];
if (LEVEL == 1) {
RotScale = 100;
img1_btn._visible = false;
img2_btn._visible = false;
img3_btn._visible = false;
img4_btn._visible = false;
} else {
RotScale = (WDTH[LEVEL] / 200) * 100;
img1_btn._visible = true;
img2_btn._visible = true;
img3_btn._visible = true;
img4_btn._visible = true;
}
CubQ = CubsQuant[LEVEL];
crX = 0;
crY = 0;
horN = 0;
Sq1._y = SqYi[LEVEL];
m = 1;
while (m <= CubQ) {
SqrsArr[m] = new Array(5);
PicsLineArr[m] = new Array(5);
MaskArr[m] = new Array(5);
SqRotats[m] = Square1_mc.duplicateMovieClip("Rot" + m, 50 + m);
SqRotats[m]._xscale = RotScale;
SqRotats[m]._yscale = SqRotats[m]._xscale;
Creats[m] = Sq1.duplicateMovieClip("SqCr" + m, 10 + m);
Creats[m]._x = (Sq1._x + ShfXNew[LEVEL]) + crX;
Creats[m]._y = Sq1._y + crY;
crX = crX + SqXShift[LEVEL];
horN++;
if (horN >= HorQnt[LEVEL]) {
horN = 0;
crX = 0;
crY = crY + SqYShift[LEVEL];
}
m++;
}
i = 1;
while (i <= pixQ) {
PicGot[i] = false;
i++;
}
picsGotQ = 0;
pcsOK_txt.text = picsGotQ;
}
function initSet() {
winFlag = false;
AngCome[m] = 0;
m = 1;
while (m <= CubQ) {
a = 1;
while (a <= 4) {
SqrsArr[m][a] = Creats[m].duplicateMovieClip((("Sqr" + m) + "") + a, (700 + (m * 10)) + a);
PicsLineArr[m][a] = Creats[m].duplicateMovieClip((("PicTop" + m) + "") + a, (400 + (m * 10)) + a);
a++;
}
Angl[m] = randRange(1, 360);
AngCome[m] = Angl[m] % 90;
Creats[m].Live = 0;
Creats[m].Liv2Timer = 0;
Stopped[m] = false;
picStoped[m] = 0;
AnglInc[m] = randRange(5, 18) / 10;
m++;
}
i = 1;
while (i <= AllpixQ) {
PicBack[i]._visible = false;
i++;
}
DragBtn_mc._x = _xmouse;
DragBtn_mc._y = _ymouse;
DragBtn_mc.startDrag();
PressBtnFlag = true;
Chsn = 0;
wtW = 0;
picOK = false;
AllPixOK = false;
help_mc._visible = false;
Next_btn._visible = false;
PlayMore_btn._visible = false;
Victory_mc._visible = false;
Victory_mc._xscale = 100;
Victory_mc._yscale = Victory_mc._xscale;
YouWin_mc._visible = false;
YouWin_mc._xscale = 100;
YouWin_mc._yscale = YouWin_mc._xscale;
CongrNextLev_mc._visible = false;
CongrNextLev_mc._xscale = 100;
CongrNextLev_mc._yscale = CongrNextLev_mc._xscale;
Twistys_btn._visible = false;
Level_txt.text = LEVEL;
wtPrs = 0;
wtLive1 = 0;
wtImg = 0;
}
function RotatCube(m) {
SqRotats[m]._rotation = Angl[m];
myPoint.x = SqRotats[m].P1._x;
myPoint.y = SqRotats[m].P1._y;
SqRotats[m].localToGlobal(myPoint);
TopsX[1] = myPoint.x;
TopsY[1] = myPoint.y;
myPoint.x = SqRotats[m].P2._x;
myPoint.y = SqRotats[m].P2._y;
SqRotats[m].localToGlobal(myPoint);
TopsX[2] = myPoint.x;
TopsY[2] = myPoint.y;
myPoint.x = SqRotats[m].P3._x;
myPoint.y = SqRotats[m].P3._y;
SqRotats[m].localToGlobal(myPoint);
TopsX[3] = myPoint.x;
TopsY[3] = myPoint.y;
myPoint.x = SqRotats[m].P4._x;
myPoint.y = SqRotats[m].P4._y;
SqRotats[m].localToGlobal(myPoint);
TopsX[4] = myPoint.x;
TopsY[4] = myPoint.y;
a = 1;
while (a <= 4) {
SqrsArr[m][a].removeMovieClip();
SqrsArr[m][a] = Creats[m].duplicateMovieClip((("Sqr" + m) + "") + a, (700 + (m * 10)) + a);
MaskArr[m][a].removeMovieClip();
MaskArr[m][a] = Creats[m].duplicateMovieClip((("Msk" + m) + "") + a, (100 + (m * 10)) + a);
if ((Angl[m] >= 0) && (Angl[m] < 90)) {
if (Creats[m].Live == 0) {
SqrsArr[m][1]._visible = true;
SqrsArr[m][4]._visible = true;
SqrsArr[m][2]._visible = false;
SqrsArr[m][3]._visible = false;
}
PicsLineArr[m][1]._visible = true;
PicsLineArr[m][4]._visible = true;
PicsLineArr[m][2]._visible = false;
PicsLineArr[m][3]._visible = false;
}
if ((Angl[m] >= 90) && (Angl[m] < 180)) {
if (Creats[m].Live == 0) {
SqrsArr[m][1]._visible = false;
SqrsArr[m][4]._visible = true;
SqrsArr[m][2]._visible = false;
SqrsArr[m][3]._visible = true;
}
PicsLineArr[m][1]._visible = false;
PicsLineArr[m][4]._visible = true;
PicsLineArr[m][2]._visible = false;
PicsLineArr[m][3]._visible = true;
}
if ((Angl[m] >= 180) && (Angl[m] < 270)) {
if (Creats[m].Live == 0) {
SqrsArr[m][1]._visible = false;
SqrsArr[m][4]._visible = false;
SqrsArr[m][2]._visible = true;
SqrsArr[m][3]._visible = true;
}
PicsLineArr[m][1]._visible = false;
PicsLineArr[m][4]._visible = false;
PicsLineArr[m][2]._visible = true;
PicsLineArr[m][3]._visible = true;
}
if ((Angl[m] >= 270) && (Angl[m] < 360)) {
if (Creats[m].Live == 0) {
SqrsArr[m][1]._visible = true;
SqrsArr[m][4]._visible = false;
SqrsArr[m][2]._visible = true;
SqrsArr[m][3]._visible = false;
}
PicsLineArr[m][1]._visible = true;
PicsLineArr[m][4]._visible = false;
PicsLineArr[m][2]._visible = true;
PicsLineArr[m][3]._visible = false;
}
Persp = ((TopsX[BackP[a]] + 200) - (TopsX[FrntP[a]] + 200)) / 10;
if (SqrsArr[m][a]._visible) {
if (TopsX[FrntP[a]] < TopsX[BackP[a]]) {
Clr = "0x000000";
PerspF = 0;
PerspB = Persp;
Alph = ((90 - AngCome[m]) / 90) * 100;
if (AngCome[m] < 30) {
Alph = Alph + (30 - AngCome[m]);
}
if (AngCome[m] > 89) {
if (Alph > 90) {
trace((((((("2!! AngCome[" + m) + "]= ") + AngCome[m]) + " Alph ") + Alph) + " AngShine ") + AngShine);
}
Alph = 0;
}
} else {
if (AngCome[m] < 65) {
AngShine = 135 + (AngCome[m] * 2);
}
if (AngCome[m] > 65) {
AngShine = 320 - (AngCome[m] * 2);
}
if (AngShine > 255) {
AngShine = 255;
}
Clr = (("0x" + AngShine.toString(16)) + AngShine.toString(16)) + AngShine.toString(16);
PerspF = Persp;
PerspB = 0;
Alph = Math.round((AngCome[m] / 90) * 100);
if ((AngCome[m] >= 59) && (AngCome[m] < 65)) {
Alph = 75;
Clr = "0xFFFFFF";
}
if (AngCome[m] > 89) {
if (Alph > 90) {
}
Alph = 0;
}
}
if (AngCome[m] > 89) {
if (Alph > 90) {
}
}
}
makeSquare(m, a, Clr);
makeMask(m, a);
if (m <= HorQnt[LEVEL]) {
PicsLineArr[m][a].attachMovie(PixNamesTop[a + ShiftTop[LEVEL]], "pc", 3);
} else if ((m > HorQnt[LEVEL]) && (m <= (HorQnt[LEVEL] + HorQnt[LEVEL]))) {
PicsLineArr[m][a].attachMovie(PixNamesDwn[a + ShiftTop[LEVEL]], "pc", 3);
} else {
PicsLineArr[m][a].attachMovie(PixNames3rd[a + ShiftTop[LEVEL]], "pc", 3);
}
PicsLineArr[m][a].setMask(MaskArr[m][a]);
PicsLineArr[m][a]._x = 0;
PicsLineArr[m][a]._y = TopsY[FrntP[a]] + Creats[m]._y;
PicsLineArr[m][a]._yscale = (Math.abs(TopsY[FrntP[a]] - TopsY[BackP[a]]) / wdth) * 100;
SqrsArr[m][a]._alpha = Alph;
rot_txt.text = Angl[2];
a++;
}
}
function makeSquare(m, a, CLR) {
SqrsArr[m][a].beginFill(CLR, 100);
SqrsArr[m][a].lineStyle(1, 0, 1);
SqrsArr[m][a].moveTo(-(PerspF / 2), TopsY[FrntP[a]]);
SqrsArr[m][a].lineTo((0 + wdth) + (PerspF / 2), TopsY[FrntP[a]]);
SqrsArr[m][a].lineTo((0 + wdth) - (PerspB / 2), TopsY[BackP[a]]);
SqrsArr[m][a].lineTo(0 + (PerspB / 2), TopsY[BackP[a]]);
SqrsArr[m][a].lineTo(-(PerspF / 2), TopsY[FrntP[a]]);
SqrsArr[m][a].endFill();
}
function makePicTop(m, a) {
PicsLineArr[m][a].beginFill(16777215, 100);
PicsLineArr[m][a].lineStyle(1, 0, 0);
PicsLineArr[m][a].moveTo(-(PerspF / 2), TopsY[FrntP[a]]);
PicsLineArr[m][a].lineTo((0 + wdth) + (PerspF / 2), TopsY[FrntP[a]]);
PicsLineArr[m][a].lineTo((0 + wdth) - (PerspB / 2), TopsY[BackP[a]]);
PicsLineArr[m][a].lineTo(0 + (PerspB / 2), TopsY[BackP[a]]);
PicsLineArr[m][a].lineTo(-(PerspF / 2), TopsY[FrntP[a]]);
PicsLineArr[m][a].endFill();
}
function makeMask(m, a) {
MaskArr[m][a].beginFill(16776960, 10);
MaskArr[m][a].lineStyle(1, 0, 0);
MaskArr[m][a].moveTo(-(PerspF / 2), TopsY[FrntP[a]]);
MaskArr[m][a].lineTo((0 + wdth) + (PerspF / 2), TopsY[FrntP[a]]);
MaskArr[m][a].lineTo((0 + wdth) - (PerspB / 2), TopsY[BackP[a]]);
MaskArr[m][a].lineTo(0 + (PerspB / 2), TopsY[BackP[a]]);
MaskArr[m][a].lineTo(-(PerspF / 2), TopsY[FrntP[a]]);
MaskArr[m][a].endFill();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var i;
var j;
var a = 1;
var m;
var myPoint = new Object();
var PDX;
var PDY;
var winFlag = false;
var Angl = new Array(25);
var AngCome = new Array(25);
var PicsLineArr = new Array(25);
var MaskArr = new Array(25);
var wdthInit = 200;
var wdth = wdthInit;
var TopsX = new Array(5);
var TopsY = new Array(5);
var f;
var FrntP = new Array(0, 1, 2, 3, 4);
var BackP = new Array(0, 4, 1, 2, 3);
var PrevP = new Array(0, 2, 3, 4, 1);
var Clr = "0xFFFFFF";
var clr1 = "";
var Persp = 0;
var PerspF = 0;
var PerspB = 0;
var Alph;
var PressBtnFlag = true;
var Chsn = 0;
var pixQ = 4;
var AllpixQ = 20;
var PixNamesTop = new Array(25);
PixNamesTop[1] = "PicUp01";
PixNamesTop[2] = "PicUp02";
PixNamesTop[3] = "PicUp03";
PixNamesTop[4] = "PicUp04";
PixNamesTop[5] = "PicL2Up01";
PixNamesTop[6] = "PicL2Up02";
PixNamesTop[7] = "PicL2Up03";
PixNamesTop[8] = "PicL2Up04";
PixNamesTop[9] = "PicL3Up01";
PixNamesTop[10] = "PicL3Up02";
PixNamesTop[11] = "PicL3Up03";
PixNamesTop[12] = "PicL3Up04";
PixNamesTop[13] = "PicL4Up01";
PixNamesTop[14] = "PicL4Up02";
PixNamesTop[15] = "PicL4Up03";
PixNamesTop[16] = "PicL4Up04";
PixNamesTop[17] = "PicL5Up01";
PixNamesTop[18] = "PicL5Up02";
PixNamesTop[19] = "PicL5Up03";
PixNamesTop[20] = "PicL5Up04";
var PixNamesDwn = new Array(25);
PixNamesDwn[1] = "PicDw01";
PixNamesDwn[2] = "PicDw02";
PixNamesDwn[3] = "PicDw03";
PixNamesDwn[4] = "PicDw04";
PixNamesDwn[5] = "PicL2Dw01";
PixNamesDwn[6] = "PicL2Dw02";
PixNamesDwn[7] = "PicL2Dw03";
PixNamesDwn[8] = "PicL2Dw04";
PixNamesDwn[9] = "PicL3Mid01";
PixNamesDwn[10] = "PicL3Mid02";
PixNamesDwn[11] = "PicL3Mid03";
PixNamesDwn[12] = "PicL3Mid04";
PixNamesDwn[13] = "PicL4Mid01";
PixNamesDwn[14] = "PicL4Mid02";
PixNamesDwn[15] = "PicL4Mid03";
PixNamesDwn[16] = "PicL4Mid04";
PixNamesDwn[17] = "PicL5Mid01";
PixNamesDwn[18] = "PicL5Mid02";
PixNamesDwn[19] = "PicL5Mid03";
PixNamesDwn[20] = "PicL5Mid04";
var PixNames3rd = new Array(25);
PixNames3rd[9] = "PicL3Dwn01";
PixNames3rd[10] = "PicL3Dwn02";
PixNames3rd[11] = "PicL3Dwn03";
PixNames3rd[12] = "PicL3Dwn04";
PixNames3rd[13] = "PicL4Dwn01";
PixNames3rd[14] = "PicL4Dwn02";
PixNames3rd[15] = "PicL4Dwn03";
PixNames3rd[16] = "PicL4Dwn04";
PixNames3rd[17] = "PicL5Dwn01";
PixNames3rd[18] = "PicL5Dwn02";
PixNames3rd[19] = "PicL5Dwn03";
PixNames3rd[20] = "PicL5Dwn04";
var PicBack = new Array(25);
PicBack[1] = Pic1Back_mc;
PicBack[2] = Pic2Back_mc;
PicBack[3] = Pic3Back_mc;
PicBack[4] = Pic4Back_mc;
PicBack[5] = Pic1BackLev2_mc;
PicBack[6] = Pic2BackLev2_mc;
PicBack[7] = Pic3BackLev2_mc;
PicBack[8] = Pic4BackLev2_mc;
PicBack[9] = Pic1BackLev3_mc;
PicBack[10] = Pic2BackLev3_mc;
PicBack[11] = Pic3BackLev3_mc;
PicBack[12] = Pic4BackLev3_mc;
PicBack[13] = Pic1BackLev4_mc;
PicBack[14] = Pic2BackLev4_mc;
PicBack[15] = Pic3BackLev4_mc;
PicBack[16] = Pic4BackLev4_mc;
PicBack[17] = Pic1BackLev5_mc;
PicBack[18] = Pic2BackLev5_mc;
PicBack[19] = Pic3BackLev5_mc;
PicBack[20] = Pic4BackLev5_mc;
var Creats = new Array(25);
var CubQ = 6;
var SqRotats = new Array(25);
var Gran = new Array(0, 0, 270, 180, 90);
Gran[1] = 0;
Gran[4] = 90;
Gran[3] = 180;
Gran[2] = 270;
var Stopped = new Array(25);
var AllStopped = false;
var picStoped = new Array(25);
var picFound = 0;
var picOK = false;
var AllPixOK = false;
var picsGotQ = 0;
var PicGot = new Array(25);
var wtW = 0;
var wtPrs = 0;
var wtLive1 = 0;
var wtImg = 0;
var imgN = 0;
var AnglInc = new Array(25);
var ChGran;
var dAng;
var crX;
var crY;
var horN;
var SqrsArr = new Array(25);
var CubsQuant = new Array(0, 6, 8, 15, 18, 24);
var HorQnt = new Array(0, 3, 4, 5, 6, 8);
var SqXShift = new Array(0, 250, 187, 144, 120, 80);
var SqYShift = new Array(0, 300, 300, 175, 175, 95);
var SqYi = new Array(0, 50, 50, 35, 30, 80);
var ShfXNew = new Array(0, 0, 0, 0, 0, 40);
var WDTH = new Array(0, 200, 150, 112, 85, 63);
var RotScale = 100;
var ShiftTop = new Array(0, 0, 4, 8, 12, 16);
var ShiftBack = 4;
var BackPicFound;
levelUp_mc.setMask(levMask_mc);
SoundOn_btn._visible = false;
duplicateMovieClip (help0_mc, "help_mc", 990);
help0_mc._visible = false;
initGame();
initSet();
stop();
DragBtn_mc.onRelease = function () {
var _local1;
var _local2;
if (!winFlag) {
if (PressBtnFlag) {
PressBtnFlag = false;
wtPrs++;
Chsn = 0;
_local1 = 1;
while (_local1 <= CubQ) {
_local2 = 1;
while (_local2 <= 4) {
if (SqrsArr[_local1][_local2].hitTest(_xmouse, _ymouse, true)) {
if (Creats[_local1].Live == 0) {
Chsn = _local1;
}
if (Creats[_local1].Live == 3) {
Creats[_local1].Live = 0;
if (Angl[_local1] >= 360) {
Angl[_local1] = 0;
}
AngCome[_local1] = 0;
AnglInc[_local1] = 1.5;
PressBtnFlag = true;
}
}
_local2++;
}
_local1++;
}
if (Chsn > 0) {
_local2 = 1;
while (_local2 <= 4) {
if (SqrsArr[Chsn][_local2].hitTest(_xmouse, _ymouse, true)) {
if (SqrsArr[Chsn][_local2]._visible) {
Creats[Chsn].Live = 1;
ChGran = _local2;
}
}
_local2++;
}
}
}
}
};
stopLog_mc.onEnterFrame = function () {
if (Creats[Chsn].Live == 1) {
if (Gran[ChGran] == 0) {
if (Angl[Chsn] > 270) {
Angl[Chsn] = Angl[Chsn] - 360;
}
}
dAng = (Gran[ChGran] - Angl[Chsn]) / 10;
Creats[Chsn].Live = 2;
Creats[Chsn].Liv2Timer++;
wtLive1++;
}
if (Creats[Chsn].Live == 2) {
if (Math.abs(Gran[ChGran] - Angl[Chsn]) > 10) {
Angl[Chsn] = Angl[Chsn] + dAng;
RotatCube(Chsn);
i = 1;
while (i <= 4) {
SqrsArr[Chsn][i]._visible = false;
i++;
}
if (dAng < 0) {
SqrsArr[Chsn][BackP[ChGran]]._visible = true;
} else {
SqrsArr[Chsn][PrevP[ChGran]]._visible = true;
}
} else {
Angl[Chsn] = Gran[ChGran];
RotatCube(Chsn);
i = 1;
while (i <= 4) {
SqrsArr[Chsn][i]._visible = false;
i++;
}
Stopped[Chsn] = true;
picStoped[Chsn] = ChGran;
picFound = ChGran;
BackPicFound = picFound + (ShiftBack * (LEVEL - 1));
Creats[Chsn].Live = 3;
Creats[Chsn].Liv2Timer = 0;
Chsn = 0;
PressBtnFlag = true;
AllStopped = true;
j = 1;
while (j <= CubQ) {
if (!Stopped[j]) {
AllStopped = false;
}
j++;
}
if (AllStopped) {
picOK = true;
j = 1;
while (j <= CubQ) {
if (picStoped[j] != picFound) {
picOK = false;
}
j++;
}
if (picOK) {
PicBack[BackPicFound]._visible = true;
PicBack[BackPicFound]._alpha = 0;
PicGot[picFound] = true;
wtW++;
PressBtnFlag = false;
}
}
}
}
};
timer_mc.onEnterFrame = function () {
if (!winFlag) {
if (wtW > 0) {
wtW++;
if (PicBack[BackPicFound]._alpha < 100) {
PicBack[BackPicFound]._alpha = PicBack[BackPicFound]._alpha + 4;
} else {
PicBack[BackPicFound]._alpha = 100;
}
if (wtW >= 25) {
wtW = 0;
PicBack[BackPicFound]._alpha = 100;
winFlag = true;
Next_btn._visible = true;
Victory_mc._visible = true;
Twistys_btn._visible = true;
AllPixOK = true;
picsGotQ = 0;
m = 1;
while (m <= CubQ) {
j = 1;
while (j <= 4) {
SqrsArr[m][j].removeMovieClip();
PicsLineArr[m][j].removeMovieClip();
MaskArr[m][j].removeMovieClip();
j++;
}
m++;
}
j = 1;
while (j <= 4) {
if (!PicGot[j]) {
AllPixOK = false;
} else {
picsGotQ++;
pcsOK_txt.text = picsGotQ;
}
j++;
}
if (picsGotQ >= pixQ) {
Next_btn._visible = true;
Victory_mc._visible = false;
VictorySound_mc.play();
CongrNextLev_mc._visible = true;
if (LEVEL == VictoryLevel) {
PlayMore_btn._visible = true;
YouWin_mc._visible = true;
CongrNextLev_mc._visible = false;
Next_btn._visible = false;
}
} else {
SoundVictTelegr_mc.play();
}
}
}
}
if (wtPrs > 0) {
wtPrs++;
if (wtPrs >= 25) {
wtPrs = 0;
PressBtnFlag = true;
}
}
if (wtLive1 > 0) {
wtLive1++;
if (wtLive1 >= 50) {
wtLive1 = 0;
if (Chsn > 0) {
if (Creats[Chsn].Live == 2) {
Angl[Chsn] = Gran[ChGran];
RotatCube(Chsn);
}
}
}
}
j = 1;
while (j <= CubQ) {
if (Creats[j].Liv2Timer > 0) {
Creats[j].Liv2Timer++;
if (Creats[j].Liv2Timer > 50) {
Creats[j].Liv2Timer = 0;
Creats[j].Live = 3;
}
}
j++;
}
if (wtImg > 0) {
wtImg++;
if (wtImg > 25) {
if (PicBack[imgN]._alpha > 0) {
PicBack[imgN]._alpha = PicBack[imgN]._alpha - 4;
} else {
PicBack[imgN]._visible = false;
PicBack[imgN]._alpha = 100;
wtImg = 0;
}
}
}
};
Square1_mc.onEnterFrame = function () {
if (!winFlag) {
m = 1;
while (m <= CubQ) {
if (Creats[m].Live == 0) {
Angl[m] = Angl[m] + AnglInc[m];
if (Math.abs(360 - Angl[m]) <= 1) {
Angl[m] = 0;
}
if (Angl[m] <= 90) {
AngCome[m] = Angl[m];
}
if ((Angl[m] > 90) && (Angl[m] <= 180)) {
AngCome[m] = Angl[m] - 90;
}
if ((Angl[m] > 180) && (Angl[m] <= 270)) {
AngCome[m] = Angl[m] - 180;
}
if ((Angl[m] > 270) && (Angl[m] <= 360)) {
AngCome[m] = Angl[m] - 270;
}
RotatCube(m);
}
m++;
}
}
};
CongrNextLev_mc.onEnterFrame = function () {
if (this._visible) {
if (this._xscale < 200) {
this._xscale = this._xscale + 1;
this._yscale = this._xscale;
} else {
this._visible = false;
this._xscale = 100;
this._yscale = this._xscale;
}
}
};
Victory_mc.onEnterFrame = function () {
if (this._visible) {
if (this._xscale < 200) {
this._xscale = this._xscale + 1;
this._yscale = this._xscale;
} else {
this._visible = false;
this._xscale = 100;
this._yscale = this._xscale;
}
}
};
YouWin_mc.onEnterFrame = function () {
if (this._visible) {
if (this._xscale < 200) {
this._xscale = this._xscale + 1;
this._yscale = this._xscale;
} else {
this._visible = false;
this._xscale = 100;
this._yscale = this._xscale;
}
}
};
img1_btn.onRelease = function () {
var _local1;
if (!winFlag) {
_local1 = (LEVEL - 1) * ShiftBack;
i = 1;
while (i <= 4) {
PicBack[_local1 + i]._visible = false;
i++;
}
PicBack[_local1 + 1]._visible = true;
PicBack[_local1 + 1]._alpha = 100;
imgN = _local1 + 1;
wtImg++;
}
};
img2_btn.onRelease = function () {
var _local1;
if (!winFlag) {
_local1 = (LEVEL - 1) * ShiftBack;
i = 1;
while (i <= 4) {
PicBack[_local1 + i]._visible = false;
i++;
}
PicBack[_local1 + 2]._visible = true;
PicBack[_local1 + 2]._alpha = 100;
imgN = _local1 + 2;
wtImg++;
}
};
img3_btn.onRelease = function () {
var _local1;
if (!winFlag) {
_local1 = (LEVEL - 1) * ShiftBack;
i = 1;
while (i <= 4) {
PicBack[_local1 + i]._visible = false;
i++;
}
PicBack[_local1 + 3]._visible = true;
PicBack[_local1 + 3]._alpha = 100;
imgN = _local1 + 3;
wtImg++;
}
};
img4_btn.onRelease = function () {
var _local1;
if (!winFlag) {
_local1 = (LEVEL - 1) * ShiftBack;
i = 1;
while (i <= 4) {
PicBack[_local1 + i]._visible = false;
i++;
}
PicBack[_local1 + 4]._visible = true;
PicBack[_local1 + 4]._alpha = 100;
imgN = _local1 + 4;
wtImg++;
}
};
Next_btn.onRelease = function () {
if (picsGotQ >= pixQ) {
initGame();
}
initSet();
};
PlayMore_btn.onRelease = function () {
LEVEL = 0;
initGame();
initSet();
};
End_btn.onRelease = function () {
m = 1;
while (m <= CubQ) {
j = 1;
while (j <= 4) {
SqrsArr[m][j].removeMovieClip();
PicsLineArr[m][j].removeMovieClip();
MaskArr[m][j].removeMovieClip();
j++;
}
m++;
}
getURL ("http://www.hilostripper.com/Live/connectStrip.php", "_blank");
gotoAndPlay ("introstart");
};
Help_btn.onRelease = function () {
help_mc._visible = !help_mc._visible;
};
help_mc.onRelease = function () {
this._visible = false;
};
MoreGames_btn.onRelease = function () {
getURL ("http://www.hilostripper.com/Live/connectStrip.php?trk=2", "_blank");
};
Twistys_btn.onRelease = function () {
getURL ("http://secure.twistysnetwork.com/track/MTk0Mzg3OjU6NTc,27/", "_blank");
};
SoundOff_btn.onRelease = function () {
SoundOn_btn._visible = true;
this._visible = false;
};
SoundOn_btn.onRelease = function () {
SoundOff_btn._visible = true;
this._visible = false;
};
TEST_btn.onRelease = function () {
};
var levCng = false;
var memY = levelUp_mc.level_txt._y;
var Licr = 2;
var levOld = 0;
levelUp_mc.onEnterFrame = function () {
if (levOld != LEVEL) {
this.levelN_txt.text = LEVEL;
levCng = true;
if (LEVEL > levOld) {
Licr = 2;
} else {
Licr = -2;
this.levelN_txt._y = this.level_txt._y - 30;
}
}
if (levCng) {
this.level_txt._y = this.level_txt._y - Licr;
this.levelN_txt._y = this.levelN_txt._y - Licr;
if (Licr > 0) {
if (this.levelN_txt._y <= memY) {
this.level_txt.text = LEVEL;
this.level_txt._y = memY;
this.levelN_txt._y = this.level_txt._y + 30;
levCng = false;
levOld = LEVEL;
}
} else if (this.levelN_txt._y >= memY) {
this.level_txt.text = LEVEL;
this.level_txt._y = memY;
this.levelN_txt._y = this.level_txt._y + 30;
levCng = false;
levOld = LEVEL;
}
}
};
Symbol 242 MovieClip Frame 1
FLVbar_mc.setMask(barMask_mc);
Symbol 397 MovieClip Frame 1
stop();
Symbol 399 MovieClip Frame 1
stop();