Frame 1
function RunColor(OBJ, CR, CB, CG) {
aColor = new Color(OBJ);
aColor.getTransform();
aColorTransform = new Object();
aColorTransform.rb = CR;
aColorTransform.bb = CB;
aColorTransform.gb = CG;
aColor.setTransform(aColorTransform);
}
Stage.scaleMode = "noScale";
ReadInfo = "250|65|P";
MyVars = "500|500|1|Hentai puzzle de rullez|Molodec!|0|0|0|http://animenewsrider.com|000000|000000|000000";
mRG = "!zx";
LocalVars = MyVars.split("|");
LocalVars2 = ReadInfo.split("|");
Nav.txtTitle.text = LocalVars[3];
var BestTime;
Nav.APicture._width = 60;
Nav.APicture._height = 60;
BestTime = -1;
if (LocalVars2[2] != "P") {
if (Math.floor(LocalVars[1]) <= Math.floor(LocalVars2[1])) {
BackCover._y = (Nav._height / 2) - (Math.floor(LocalVars[1]) / 2);
ThePuzzle._y = BackCover._y;
}
} else if (Math.floor(LocalVars[0]) < Math.floor(LocalVars2[0])) {
BackCover._x = (Nav._width / 2) - (Math.floor(LocalVars[0]) / 2);
ThePuzzle._x = BackCover._x;
} else {
Nav._x = (Math.floor(LocalVars[0]) / 2) - (Nav._width / 2);
}
BackCover._width = Math.floor(LocalVars[0]);
BackCover._height = Math.floor(LocalVars[1]);
attachMovie("Comp", "mvComplete", 1400);
mvComplete._x = BackCover._x + ((BackCover._width / 2) - (mvComplete._width / 2));
mvComplete._y = BackCover._y + ((BackCover._height / 2) - (mvComplete._height / 2));
mvComplete.AniMessage.MsgComplete.text = LocalVars[4];
RunColor(mvComplete.AllDoneBack, Math.floor(LocalVars[5]), Math.floor(LocalVars[7]), Math.floor(LocalVars[6]));
RunColor(BackCover, Math.floor(LocalVars[5]), Math.floor(LocalVars[7]), Math.floor(LocalVars[6]));
RunColor(Nav.Background, Math.floor(LocalVars[5]), Math.floor(LocalVars[7]), Math.floor(LocalVars[6]));
RunColor(Nav.LinkButton, Math.floor(LocalVars[5]), Math.floor(LocalVars[7]), Math.floor(LocalVars[6]));
RunColor(Nav.StartButton, Math.floor(LocalVars[5]), Math.floor(LocalVars[7]), Math.floor(LocalVars[6]));
if (LocalVars[8] == "") {
Nav.LinkButton._visible = false;
Nav.LinkText._visible = false;
}
c = new color(Nav.txtTitle);
c.setRGB(parseInt(LocalVars[9], 16));
c = new color(Nav.LinkText);
c.setRGB(parseInt(LocalVars[9], 16));
c = new color(Nav.TitleText);
c.setRGB(parseInt(LocalVars[9], 16));
c = new color(mvComplete.AniMessage.MsgComplete);
c.setRGB(parseInt(LocalVars[9], 16));
c = new color(Nav.Stats);
c.setRGB(parseInt(LocalVars[10], 16));
mvComplete._visible = false;
bSound = new Sound();
bSound.attachSound("ASound");
if (DEV == 102) {
stop();
mvComplete._visible = true;
mvComplete.gotoAndPlay(2);
}
Frame 2
var moves = 0;
var cheatMode = 0;
var NoSq = 15;
var MvWid = Math.floor(LocalVars[0]);
var MvHei = Math.floor(LocalVars[1]);
var NoOn = Math.floor(LocalVars[2]);
var CellW = (MvWid / Math.sqrt(NoSq + 1));
var CellH = (MvHei / Math.sqrt(NoSq + 1));
arr2d = new Array(NoSq + 1);
var neglect = 0;
i = 0;
while (i < (NoSq + 1)) {
eval ("ThePuzzle.cellA" + i).removeMovieClip();
i++;
}
numArr = new Array(6, 12, 9, 7, 11, 3, 8, 14, 1, 5, 13, 2, 4, 10, 15);
i = random(NoSq - 5);
j = 0;
while (j < i) {
first = random(NoSq - 1);
second = random(NoSq - 1);
temp = numArr[first];
numArr[first] = numArr[second];
numArr[second] = temp;
j++;
}
if ((i % 2) == 0) {
numArr.reverse();
}
i = 0;
while (i < (NoSq + 1)) {
arr2d[i] = 1;
i++;
}
arr2d[random(NoSq)] = 0;
j = 0;
i = 0;
while (i < (NoSq + 1)) {
if (arr2d[i] == 0) {
neglect = i;
}
if ((i % Math.sqrt(NoSq + 1)) == 0) {
xcord = CellW / 2;
ycord = ((i / Math.sqrt(NoSq + 1)) * CellH) + (CellH / 2);
if (arr2d[i] != 0) {
ThePuzzle.attachMovie("cell1", "cellA" + i, j + 1);
ThePuzzle["cellA" + i].CellMask._width = CellW;
ThePuzzle["cellA" + i].CellMask._height = CellH;
ThePuzzle["cellA" + i].TheBut._width = CellW;
ThePuzzle["cellA" + i].TheBut._height = CellH;
ThePuzzle["cellA" + i].CellMask._x = (-CellW) / 2;
ThePuzzle["cellA" + i].CellMask._y = (-CellH) / 2;
ThePuzzle["cellA" + i].TheBut._x = ThePuzzle["cellA" + i].CellMask._x + (CellW / 2);
ThePuzzle["cellA" + i].TheBut._y = ThePuzzle["cellA" + i].CellMask._y + (CellH / 2);
if (NoOn == 1) {
ThePuzzle["cellA" + i].txtNumber._visible = false;
}
ThePuzzle["cellA" + i]._x = xcord;
ThePuzzle["cellA" + i]._y = ycord;
ThePuzzle["cellA" + i].num = numArr[j];
c = new color(ThePuzzle["cellA" + i].txtNumber);
c.setRGB(parseInt(LocalVars[11], 16));
AnRow = (numArr[j] - 1) / Math.sqrt(NoSq + 1);
AnCol = (numArr[j] - 1) % Math.sqrt(NoSq + 1);
AnCol = Math.floor(AnCol);
ThePuzzle["cellA" + i].PicturePart._width = MvWid;
ThePuzzle["cellA" + i].PicturePart._height = MvHei;
ThePuzzle["cellA" + i].PicturePart._x = ((-Math.floor(AnCol)) * CellW) - (CellW / 2);
ThePuzzle["cellA" + i].PicturePart._y = ((-Math.floor(AnRow)) * CellH) - (CellH / 2);
ThePuzzle["cellA" + i].num = numArr[j];
c = new color(ThePuzzle["cellA" + i].txtNumber);
c.setRGB(parseInt(LocalVars[11], 16));
j++;
}
} else {
xcord = xcord + CellW;
if (arr2d[i] != 0) {
ThePuzzle.attachMovie("cell1", "cellA" + i, j + 1);
ThePuzzle["cellA" + i].CellMask._width = CellW;
ThePuzzle["cellA" + i].CellMask._height = CellH;
ThePuzzle["cellA" + i].TheBut._width = CellW;
ThePuzzle["cellA" + i].TheBut._height = CellH;
ThePuzzle["cellA" + i].CellMask._x = (-CellW) / 2;
ThePuzzle["cellA" + i].CellMask._y = (-CellH) / 2;
ThePuzzle["cellA" + i].TheBut._x = ThePuzzle["cellA" + i].CellMask._x + (CellW / 2);
ThePuzzle["cellA" + i].TheBut._y = ThePuzzle["cellA" + i].CellMask._y + (CellH / 2);
if (NoOn == 1) {
ThePuzzle["cellA" + i].txtNumber._visible = false;
}
ThePuzzle["cellA" + i]._x = xcord;
ThePuzzle["cellA" + i]._y = ycord;
ThePuzzle["cellA" + i].num = numArr[j];
c = new color(ThePuzzle["cellA" + i].txtNumber);
c.setRGB(parseInt(LocalVars[11], 16));
AnRow = (numArr[j] - 1) / Math.sqrt(NoSq + 1);
AnCol = (numArr[j] - 1) % Math.sqrt(NoSq + 1);
AnCol = Math.floor(AnCol);
ThePuzzle["cellA" + i].PicturePart._width = MvWid;
ThePuzzle["cellA" + i].PicturePart._height = MvHei;
ThePuzzle["cellA" + i].PicturePart._x = ((-Math.floor(AnCol)) * CellW) - (CellW / 2);
ThePuzzle["cellA" + i].PicturePart._y = ((-Math.floor(AnRow)) * CellH) - (CellH / 2);
ThePuzzle["cellA" + i].num = numArr[j];
c = new color(ThePuzzle["cellA" + i].txtNumber);
c.setRGB(parseInt(LocalVars[11], 16));
j++;
}
}
i++;
}
instArr = new Array(NoSq);
i = 0;
j = 0;
while (i < (NoSq + 1)) {
if (i != neglect) {
instArr[j] = "cellA" + i;
j++;
}
i++;
}
i = 1;
while (i < instArr.length) {
tmp = instArr[i];
j = i - 1;
while (j >= 0) {
if (this[instArr[j]].num > this[tmp].num) {
instArr[j + 1] = instArr[j];
} else {
break;
}
j--;
}
instArr[j + 1] = tmp;
i++;
}
Frame 3
stop();
Symbol 10 Button
on (release) {
BaseMV = this._parent._parent;
if (BaseMV.moves == 0) {
BaseMV.MyTimer.gotoAndPlay(2);
}
row = (this._y - (BaseMV.CellH / 2)) / BaseMV.CellH;
col = (row * 4) + ((this._x - (BaseMV.CellW / 2)) / BaseMV.CellW);
if (BaseMV.arr2d[col - 4] != 0) {
if (_root.arr2d[col + 4] != 0) {
if (!(((((col != 0) && (col != 4)) && (col != 8)) && (col != 12)) && (BaseMV.arr2d[col - 1] == 0))) {
if (((((col != 3) && (col != 7)) && (col != 11)) && (col != 15)) && (BaseMV.arr2d[col + 1] == 0)) {
BaseMV.moves++;
BaseMV.arr2d[col] = 0;
BaseMV.arr2d[col + 1] = num;
this._x = (((col - (row * 4)) + 1) * BaseMV.CellW) + (BaseMV.CellW / 2);
}
} else {
BaseMV.moves++;
BaseMV.arr2d[col] = 0;
BaseMV.arr2d[col - 1] = num;
this._x = (((col - (row * 4)) - 1) * BaseMV.CellW) + (BaseMV.CellW / 2);
}
} else {
BaseMV.moves++;
BaseMV.arr2d[col] = 0;
BaseMV.arr2d[col + 4] = num;
this._y = ((row + 1) * _root.CellH) + (BaseMV.CellH / 2);
}
} else {
BaseMV.moves++;
BaseMV.arr2d[col] = 0;
BaseMV.arr2d[col - 4] = num;
this._y = ((row - 1) * BaseMV.CellH) + (BaseMV.CellH / 2);
}
if (BaseMV.arr2d.toString() == "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0") {
BaseMV.MyTimer.gotoAndStop(1);
if ((BaseMV.BestTime < 0) || (BaseMV.CurrentTimer < BaseMV.BestTime)) {
BaseMV.Nav.Stats.txtBest.text = BaseMV.Nav.Stats.txtTime.text;
BaseMV.Nav.Stats.BestTime = BaseMV.CurrentTimer;
}
BaseMV.bSound.start();
BaseMV.mvComplete._visible = true;
BaseMV.mvComplete.gotoAndPlay(2);
}
BaseMV.Nav.Stats.txtMoves.text = BaseMV.moves;
}
Symbol 17 Button
on (press) {
_parent._parent.mvComplete._visible = false;
}
Symbol 14 MovieClip [Comp] Frame 1
stop();
Symbol 14 MovieClip [Comp] Frame 12
gotoAndPlay (2);
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
StartTime = getTimer();
Symbol 23 MovieClip Frame 3
play();
Symbol 23 MovieClip Frame 4
NewTime = getTimer();
TheTimeSecs = (NewTime - StartTime) / 1000;
_parent.CurrentTimer = TheTimeSecs;
TotalMins = int(TheTimeSecs / 60);
TotalSe = int(TheTimeSecs - (TotalMins * 60));
if (TotalSe >= 10) {
FullTime = ((" " + TotalMins) + ":") + TotalSe;
} else {
FullTime = ((" " + TotalMins) + ":0") + TotalSe;
}
_parent.Nav.Stats.txtTime.text = FullTime;
gotoAndPlay (3);
Symbol 27 Button
on (press) {
_parent.gotoAndPlay(2);
_parent.moves = 0;
_parent.MyTimer.gotoAndStop(1);
_parent.Stats.txtMoves.text = "0";
_parent.Stats.txtTime.text = "0:00";
_parent.mvComplete.gotoAndStop(1);
_parent.mvComplete._visible = false;
if ((mRG == "xz!") && ((DEV != (102 & DEV)) != 10)) {
getURL ("http://www.instantfx.net/notreg.asp", "UnReg", "GET");
}
}
Symbol 28 Button
on (press) {
getURL (_parent.LocalVars[8], "_self", "POST");
}