Frame 1
fscommand ("FFish_Run", "gmBLD");
stop();
_root.onEnterFrame = function () {
if (getBytesTotal() != getBytesLoaded()) {
preloader.proc = parseInt(getBytesLoaded() / (getBytesTotal() / 100)) + "%";
} else {
gotoAndStop (2);
}
};
downloadURL = "http://activemediasoft.com/go/download.php";
morePuzzleUrl = "http://activemediasoft.com/go/more.php";
gameType = "puzzle";
copySTRING = "More free games from <u>www.ActiveMediaSoft.com</u>";
copyURL = "http://activemediasoft.com/go/site.php";
bannerURL = ((((("http://activemediasoft.com/banners/banner1.swf?gmName=" + escape(_parent.gameName)) + "&gmBuild=") + _parent.gameBUILD) + "&prType=") + _parent.gameType) + "";
if (gameBUILD == "exeBUILD") {
preloader._visible = false;
}
Frame 2
gameName = "Grand Canyon";
function strCOL() {
myColor = new Color(panel);
myColorTransform = new Object();
myColorTransform = set_color1;
myColor.setTransform(myColorTransform);
myColor = new Color(interface);
myColorTransform = new Object();
myColorTransform = set_color1;
myColor.setTransform(myColorTransform);
myColor = new Color(color1);
myColorTransform = new Object();
myColorTransform = set_color1;
myColor.setTransform(myColorTransform);
myColor = new Color(color2);
myColorTransform = new Object();
myColorTransform = set_color2;
myColor.setTransform(myColorTransform);
myColor = new Color(color3);
myColorTransform = new Object();
myColorTransform = set_color3;
myColor.setTransform(myColorTransform);
}
function changeColor(name) {
myColor = new Color(interface);
myColorTransform = new Object();
if (name == "color1") {
myColorTransform = set_color1;
}
if (name == "color2") {
myColorTransform = set_color2;
}
if (name == "color3") {
myColorTransform = set_color3;
}
myColor.setTransform(myColorTransform);
myColor = new Color(panel);
myColorTransform = new Object();
if (name == "color1") {
myColorTransform = set_color1;
}
if (name == "color2") {
myColorTransform = set_color2;
}
if (name == "color3") {
myColorTransform = set_color3;
}
myColor.setTransform(myColorTransform);
}
set_color1 = {ra:"100", rb:"1", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
set_color2 = {ra:"100", rb:"100", ga:"100", gb:"0", ba:"100", bb:"-50", aa:"100", ab:"0"};
set_color3 = {ra:"100", rb:"0", ga:"100", gb:"50", ba:"100", bb:"0", aa:"100", ab:"0"};
panel.swapDepths(30200);
strCOL();
stop();
Instance of Symbol 87 MovieClip [Grand Canyon] in Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 10 MovieClip Frame 40
gotoAndPlay (1);
Symbol 18 Button
on (release) {
goURL = ((((((_parent.copyURL + "?gmName=") + escape(_parent.gameName)) + "&gmBuild=") + _parent.gameBUILD) + "&prType=") + _parent.gameType) + "";
getURL (goURL);
}
Symbol 34 Button
on (release) {
_parent._parent.panel.gotoAndStop(3);
}
Symbol 37 Button
on (rollOver) {
if (_parent._parent.panel._currentframe == 1) {
_parent._parent.game.fullIMG(1);
}
}
on (rollOut) {
_parent._parent.game.fullIMG(0);
}
Symbol 40 Button
on (release) {
_parent.btMorePuzzles();
}
Symbol 43 Button
on (release) {
_parent.btDownload();
}
Symbol 47 MovieClip Frame 1
function btMorePuzzles() {
goURL = ((((((_parent.morePuzzleUrl + "?gmName=") + escape(_parent.gameName)) + "&gmBuild=") + _parent.gameBUILD) + "&prType=") + _parent.gameType) + "";
getURL (goURL);
}
function btDownload() {
goURL = ((((((_parent.downloadUrl + "?gmName=") + escape(_parent.gameName)) + "&gmBuild=") + _parent.gameBUILD) + "&prType=") + _parent.gameType) + "";
getURL (goURL);
}
if (_parent.gameBUILD == "exeBUILD") {
btPNL1._visible = false;
} else {
btPNL2._visible = false;
banner.loadMovie(_parent.bannerURL);
}
logo1 = _parent.gameName;
logo2 = _parent.gameName;
copyright = _parent.copySTRING;
gmTYPE = _parent.gameType;
Symbol 50 Button
on (release) {
_parent.changeColor(this._name);
}
Symbol 57 MovieClip Frame 1
stop();
Symbol 59 Button
on (press) {
_parent._parent.pressPuzzle(_parent._name);
}
on (rollOver) {
_parent._parent.tst = _parent.truPOS;
}
Symbol 60 MovieClip Frame 1
stop();
if ((_parent.truX == _parent._x) && (_parent.truY == _parent._y)) {
_parent.truPOS = 1;
} else {
_parent.truPOS = 0;
}
Symbol 60 MovieClip Frame 10
if ((_parent.truX == _parent._x) && (_parent.truY == _parent._y)) {
_parent.truPOS = 1;
} else {
_parent.truPOS = 0;
}
Symbol 62 MovieClip Frame 1
this.onEnterFrame = function () {
if (gamePlay == 1) {
tmpTIME = getTimer() - startTime;
tMIN = Math.floor(tmpTIME / 60000);
tSEC = Math.floor((tmpTIME / 1000) - (tMIN * 60));
if (tSEC < 10) {
tSEC = "0" + tSEC;
}
_parent.interface.sTime = (tMIN + ":") + tSEC;
}
};
function pressPuzzle(name) {
if (chkEND != 1) {
if (_parent.panel._currentframe == 1) {
if (CHKD_PUZ != 2) {
eval (name + ".btn").gotoAndStop(10);
FST_PUZ = eval (name);
FST_PUZ_X = eval (name)._x;
FST_PUZ_Y = eval (name)._y;
CHKD_PUZ = 2;
} else {
eval (name + ".btn").gotoAndPlay(10);
eval (FST_PUZ)._x = eval (name)._x;
eval (FST_PUZ)._y = eval (name)._y;
eval (name)._x = FST_PUZ_X;
eval (name)._y = FST_PUZ_Y;
if ((eval (name)._x == eval (name).truX) && (eval (name)._y == eval (name).truY)) {
eval (name).truPOS = 1;
} else {
eval (name).truPOS = 0;
}
if ((eval (FST_PUZ)._x == eval (FST_PUZ).truX) && (eval (FST_PUZ)._y == eval (FST_PUZ).truY)) {
eval (FST_PUZ).truPOS = 1;
} else {
eval (FST_PUZ).truPOS = 0;
}
eval (FST_PUZ + ".btn").play();
CHKD_PUZ = 1;
_parent.interface.sStep++;
chkEND = 1;
checkPUZZLE();
}
}
}
}
function checkPUZZLE() {
i = 0;
while (i < ((x_number * y_number) - 1)) {
if (eval ("puzzle" + i).truPOS == 1) {
goodPUZZLE = 1;
} else {
goodPUZZLE = 2;
break;
}
i++;
}
if (goodPUZZLE == 1) {
gamePlay = 0;
_parent.panel.gotoAndStop(2);
}
chkEND = 0;
}
function start_game(xn, yn) {
x_number = xn;
y_number = yn;
puzzle.msk._width = game_width / x_number;
puzzle.msk._height = game_height / y_number;
puzzle.btn._width = game_width / x_number;
puzzle.btn._height = game_height / y_number;
puzzle_width = game_width / x_number;
puzzle_height = game_height / y_number;
rcnt = 0;
while (eval ("puzzle" + rcnt)) {
removeMovieClip(eval ("puzzle" + rcnt));
rcnt++;
}
fst_array = new Array();
i = 0;
while (i < (x_number * y_number)) {
fst_array[i] = "puzzle" + i;
i++;
}
arrX = new Array();
arrY = new Array();
i = 0;
while (i < (x_number * y_number)) {
rnd = Math.round(Math.random() * (fst_array.length - 1));
duplicateMovieClip ("puzzle", fst_array[rnd], 10 + i);
name = eval (fst_array[rnd]);
name._x = Xcnt * puzzle_width;
name._y = Ycnt * puzzle_height;
arrX[i] = name._x;
arrY[i] = name._y;
name.msk._width = puzzle_width;
name.msk._height = puzzle_height;
name.btn._width = puzzle_width;
name.btn._height = puzzle_height;
Xcnt++;
if (Xcnt == x_number) {
Xcnt = 0;
Ycnt++;
}
if (Ycnt == y_number) {
Ycnt = 0;
}
fst_array.splice(rnd, 1);
_parent.panel.gotoAndStop(1);
FRST_GAME = 1;
i++;
}
z = 0;
while (z < arrX.length) {
eval ("puzzle" + z).truX = arrX[z];
eval ("puzzle" + z).truY = arrY[z];
z++;
}
cnt = 0;
y = 0;
while (y < y_number) {
x = 0;
while (x < x_number) {
name = eval ("puzzle" + cnt);
name.img.img.imgSRC.attachMovie(crIMG, "z321", 1);
name.img._x = name.img._x - (puzzle_width * x);
name.img._y = name.img._y - (puzzle_height * y);
cnt++;
x++;
}
y++;
}
_parent.interface.sStep = 0;
_parent.interface.sTime = "0:00";
gamePlay = 1;
startTime = getTimer();
fullImg(0);
}
crIMG = _parent.gameName;
puzzle.img.img.imgSRC.attachMovie(crIMG, "zzz", 3);
game_width = puzzle.img.msk._width;
game_height = puzzle.img.msk._height;
puzzle._x = -100;
puzzle._y = -100;
function fullImg(act) {
puzzle.msk._height = puzzle.img._height;
puzzle.msk._width = puzzle.img._width;
if (act == 1) {
puzzle._x = 0;
puzzle._y = 0;
} else if (FRST_GAME == 1) {
puzzle._x = -5000;
puzzle._y = -5000;
}
}
puzzle.swapDepths(12000);
puzzle.btn._visible = false;
fullImg(1);
startTIME = getTimer();
Symbol 70 Button
on (release) {
gotoAndStop (1);
}
Symbol 72 Button
on (release) {
_parent.game.start_game(6, 6);
}
Symbol 73 Button
on (release) {
_parent.game.start_game(7, 7);
}
Symbol 74 Button
on (release) {
_parent.game.start_game(8, 8);
}
Symbol 76 Button
on (release) {
_parent.game.start_game(4, 4);
}
Symbol 77 Button
on (release) {
_parent.game.start_game(5, 5);
}
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 2
score = (("Steps: " + _parent.interface.sStep) + " Time: ") + _parent.interface.sTime;
Symbol 84 MovieClip Frame 3
stop();