[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (43 B)
ifFrameLoaded (40) {
gotoAndPlay (5);
}
Frame 4 (17 B)
gotoAndPlay (1);
Frame 6 (3.24 KiB) ●
function Q_randomizeQs() {
var i = Q_maxQuestions;
while (i >= 1) {
var rand = Math.ceil(Math.random() * i);
var newNum = i;
theDealArrayNEW[i] = theDealArray[rand];
trace("theDealArrayNEW[i] is " + theDealArrayNEW[i]);
theDealArray.splice(rand, 1);
i--;
}
}
removeMovieClip(game_over);
menu.swapDepths(99000);
skillLevel = 1;
skillLevel_1_Deals = new Array(164, 892, 1012, 1081, 1150, 1529, 2508, 2514, 3178, 3225, 3250, 4929, 5055, 5152, 5213, 5300, 5814, 5877, 5907, 6749, 6893, 7018, 7058, 7167, 7807, 8355, 8471, 8961, 9998, 10772, 11863, 11987, 12392, 12411, 12676, 13214, 13464, 13532, 14014, 14624, 14826, 15140, 15196, 17772, 17871, 18026, 18150, 18427, 19951, 20533, 21657, 21900, 22663, 23328, 24176, 24919, 25001, 25904, 26719, 27121, 27853, 28856, 30329, 30418, 30584, 30755, 30849, 31185, 31316, 33, 37, 38, 51, 54, 56, 58, 59, 77, 79, 85, 87, 91, 94, 97, 98, 99, 103, 104, 105, 109, 113, 116, 134, 144, 150, 151, 155, 163, 164, 166, 173, 179, 180, 186, 195, 198);
skillLevel_4_Deals = new Array(169, 178, 285, 454, 575, 598, 617, 657, 775, 829, 988, 1025, 1136, 1443, 1495, 1661, 1734, 1941, 2081, 2240, 2241, 2563, 2670, 2802, 3015, 3130, 3289, 3685, 3772, 4368, 4609, 4625, 4946, 5157, 5254, 5463, 5707, 5979, 6017, 6139, 6255, 6365, 6498, 6775, 6834, 6918, 7000, 7057, 7107, 7303, 7305, 7477, 7700, 8182, 8454, 8591, 8613, 8820, 8927, 9209, 9278, 9784, 9790, 9877, 10288, 10370, 10692, 11281, 11304, 11819, 11944, 12006, 12021, 12166, 12319, 12330, 12381, 12753, 12773, 12795, 13007, 13015, 13304, 13388, 13584, 13751, 13867, 13926, 14027, 14070, 14267, 14410, 14623, 14904, 15339, 15382, 15512, 15562, 15695, 15704, 15710, 16129, 16202, 16407, 17426, 17467, 17680, 17683, 17736, 17863, 17985, 18118, 18192, 18356, 18600, 18623, 18872, 18947, 19013, 19146, 19590, 19767, 19837, 19880, 20055, 20112, 20418, 20489, 20547, 20581, 20589, 20725, 20737, 20757, 20810, 20830, 21278, 21454, 21491, 21560, 21939, 22177, 22521, 22661, 22907, 23156, 23874, 24104, 24591, 24735, 25014, 25129, 25246, 25315, 25375, 25424, 25450, 25558, 25599, 25602, 25957, 25995, 26061, 26194, 26294, 26576, 26629, 26693, 27040, 27201, 27390, 27938, 28118, 28952, 29230, 29345, 29435, 29462, 29474, 29580, 29596, 29628, 29676, 30057, 30414, 30506, 30663, 30887, 30897, 30952, 31044, 31049, 31302, 31465, 31601, 31631, 31675, 31729, 31945);
if (skillLevel == 1) {
fGameNum = skillLevel_1_Deals[random(skillLevel_1_Deals.length)];
} else if (skillLevel == 4) {
fGameNum = skillLevel_4_Deals[random(skillLevel_4_Deals.length)];
} else {
skillLevel = "R";
fGameNum = random(32000);
}
url = (("http://skill.skilljam.com/CardShuffler/Shuffler.exe?fGameNum=" + fGameNum) + "&timeStamp=") + getTimer();
theDealOLD = "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51";
theDealArray = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51);
Q_maxQuestions = 51;
theDealArrayNEW = new Array();
Q_randomizeQs();
theDeal = theDealArrayNEW.toString();
theDealLoaded = "yes";
loadingbar.percent_loaded = 0;
gamestatus = " ";
stop();
Frame 7 (1 B)
Frame 14 (8 B)
stop();
Frame 20 (2.18 KiB) ●
function checkHomeRow() {
i = 0;
while (i < 52) {
eligable = 0;
_root[i].card_outline._visible = false;
if (_root.card_valueArr[i] == 1) {
if (_root.homerowArr[0] == "empty") {
eligable = 1;
} else if (_root.homerowArr[1] == "empty") {
eligable = 1;
} else if (_root.homerowArr[2] == "empty") {
eligable = 1;
} else if (_root.homerowArr[3] == "empty") {
eligable = 1;
}
} else if ((_root.homerowArr[0] == (_root.card_valueArr[i] - 1)) && (_root.card_suitArr[i] == _root.homerowArr[4])) {
eligable = 1;
} else if ((_root.homerowArr[1] == (_root.card_valueArr[i] - 1)) && (_root.card_suitArr[i] == _root.homerowArr[5])) {
eligable = 1;
} else if ((_root.homerowArr[2] == (_root.card_valueArr[i] - 1)) && (_root.card_suitArr[i] == _root.homerowArr[6])) {
eligable = 1;
} else if ((_root.homerowArr[3] == (_root.card_valueArr[i] - 1)) && (_root.card_suitArr[i] == _root.homerowArr[7])) {
eligable = 1;
}
if ((eligable == 1) && ((204 < _root[i]._y) || (_root[i]._x < 280))) {
isOnTop = 1;
ii = 0;
while (ii < 52) {
if ((_root[ii]._x == _root[i]._x) && (_root[i]._y < _root[ii]._y)) {
isOnTop = 0;
}
ii++;
}
if (isOnTop == 1) {
_root[i].card_outline._visible = true;
_root[i].card_outline.gotoAndPlay(1);
_root.statusmessage = "BLINKNG CARD(s) MAY BE MOVED TO THE HOME ROW!";
}
}
i++;
}
}
removeMovieClip("showInst");
if (theDealLoaded != "yes") {
gotoAndPlay(_currentframe - 1 +4);
_root.statusmessage = "LOADING DEAL";
} else {
undoArr = new Array("empty", "empty", "empty", 0);
homerowArr = new Array("empty", "empty", "empty", "empty", "empty", "empty", "empty", "empty");
freeCellArr = new Array(0, 0, 0, 0);
game_duration = 10;
bonus_timer = 0.1666667;
_root.bonustimer.timer_sweeper._rotation = 0;
_root.bonustimer.cover1._visible = false;
_root.bonustimer.cover2._visible = true;
_root.bonus_timermessage = "10";
_root.current_bonus = 10;
thedeck = theDeal.split(",");
thedeck[0] = 0;
trace("length is " + thedeck.length);
trace("thedeck is " + thedeck);
gotoAndPlay (26);
}
Frame 26 (11 B)
score = 0;
Frame 31 (1.14 KiB) ●
pos_colArr = new Array(15, 82, 149, 216, 283, 350, 417, 484);
pos_rowArr = new Array(215, 232, 249, 266, 283, 300, 317);
card_suitArr = new Array(52);
card_valueArr = new Array(52);
card_colorArr = new Array(52);
row = 1;
wLeft = 52;
currentDepth = 10;
i = 0;
do {
col = 1;
while (8 >= col) {
thecard = new Number(thedeck[i]);
name = new String(thedeck[i]);
trace("name is " + name);
trace("i is " + i);
duplicateMovieClip ("tempcard", name, _root.currentDepth++);
_root[name]._x = pos_colArr[col - 1];
_root[name]._y = pos_rowArr[row - 1];
_root[name].cardface.gotoAndStop(thecard + 1);
card_valueArr[name] = Math.floor(thecard / 4) + 1;
card_suitArr[name] = thecard % 4;
if (((thecard % 4) == 0) || ((thecard % 4) == 3)) {
card_colorArr[name] = 0;
} else {
card_colorArr[name] = 1;
}
i++;
if (i >= 52) {
break;
}
col++;
}
row++;
} while (i < 52);
tempcard._visible = false;
_root.starttime = getTimer();
_root.bonus_starttime = getTimer();
_root.timer.gotoAndPlay(1);
_root.bonustimer.gotoAndPlay(1);
_root.statusmessage = "PLAY!";
_root.checkHomeRow();
stop();
Frame 34 (706 B)
i = 0;
do {
col = 1;
while (8 >= col) {
thecard = new Number(thedeck[i]);
name = new String(thedeck[i]);
removeMovieClip(name);
i++;
if (i >= 52) {
break;
}
col++;
}
row++;
} while (i < 52);
gamestatus = "game_over";
stopDrag();
if ((_root.user_ended_game == 1) && (0 < timer.timer_miliseconds)) {
timer.gotoAndPlay("stoptimer");
_root.user_ended_game = 0;
} else if (0 < timer.timer_miliseconds) {
timer.gotoAndPlay("bonus");
_root.statusmessage = "CALCULATING BONUS";
} else {
timer.gotoAndPlay("stoptimer");
_root.statusmessage = "TIME EXPIRED";
}
_root.game_over.swapDepths(1000);
bonustimer.gotoAndStop("pause");
stop();
Frame 37 (66 B)
_root.testtime = getTimer();
removeMovieClip(tempcard);
stop();
Frame 43 (135 B)
if (_root.vf == "1") {
gotoAndPlay (45);
} else if (waiting < getTimer()) {
gotoAndPlay (52);
} else {
gotoAndPlay (40);
}
Frame 45 (133 B)
regurg = ((("endgame.asp?gametype=23&cat=" add _root.cat) add "&tourscore=") + _root.score) + "";
getURL (regurg);
stop();
Frame 51 (18 B)
gotoAndPlay (45);
Frame 52 (8 B)
stop();
Frame 53 (8 B)
stop();
Frame 54 (13 B)
prevFrame();
Frame 55 (18 B)
gotoAndPlay (52);
Frame 99 (28 B)
showInst.swapDepths(99000);
Symbol 14 Button (66 B)
on (press) {
removeMovieClip(menu);
_root.gotoAndStop("init");
}
Symbol 19 Button (96 B)
on (press) {
removeMovieClip(menu);
_root.hints = false;
_root.gotoAndStop("instructions");
}
Symbol 24 Button (71 B)
on (press) {
_root.hints = true;
_root.gotoAndStop("instructions");
}
Symbol 140 MovieClip Frame 1 (8 B)
stop();
Symbol 143 MovieClip Frame 1 (1 B)
Symbol 143 MovieClip Frame 10 (17 B)
gotoAndPlay (3);
Symbol 144 Button (14.1 KiB) ● ●
on (press) {
isInvalidCard = 0;
begin_x = this._x;
begin_y = this._y;
if ((_root._ymouse < 204) && (_root._xmouse >= 278)) {
_root.sounds.gotoAndPlay("bad_move");
isInvalidCard = 1;
_root.statusmessage = "CAN'T MOVE CARDS FROM HOME ROW";
} else {
myString = new String(this);
currentcard = myString.substring(8, myString.length);
isOnTop = 1;
i = 0;
while (i < 52) {
if ((_root[i]._x == this._x) && (this._y < _root[i]._y)) {
isOnTop = 0;
}
i++;
}
if ((isOnTop == 1) && (_root.suspend == 0)) {
_root.currentDepth++;
this.swapDepths(_root.currentDepth);
this._alpha = 75;
startDrag (this);
} else {
_root.sounds.gotoAndPlay("bad_move");
isInvalidCard = 1;
_root.statusmessage = "CAN ONLY MOVE TOP CARDS";
}
}
}
on (release, releaseOutside) {
stopDrag();
end_x = this._x;
end_y = this._y;
offset_x = Math.abs(begin_x - end_x);
offset_y = Math.abs(begin_y - end_y);
if (((10 >= offset_x) && (10 >= offset_y)) && (isInvalidCard == 0)) {
if ((getTimer() - lastclick) < 300) {
eligable = 0;
if (_root.card_valueArr[currentcard] == 1) {
if (_root.homerowArr[0] == "empty") {
eligable = 1;
slot = 1;
_root.homerowArr[0] = 1;
_root.homerowArr[4] = _root.card_suitArr[currentcard];
} else if (_root.homerowArr[1] == "empty") {
eligable = 1;
slot = 2;
_root.homerowArr[1] = 1;
_root.homerowArr[5] = _root.card_suitArr[currentcard];
} else if (_root.homerowArr[2] == "empty") {
eligable = 1;
slot = 3;
_root.homerowArr[2] = 1;
_root.homerowArr[6] = _root.card_suitArr[currentcard];
} else if (_root.homerowArr[3] == "empty") {
eligable = 1;
slot = 4;
_root.homerowArr[3] = 1;
_root.homerowArr[7] = _root.card_suitArr[currentcard];
}
} else if ((_root.homerowArr[0] == (_root.card_valueArr[currentcard] - 1)) && (_root.card_suitArr[currentcard] == _root.homerowArr[4])) {
eligable = 1;
slot = 1;
_root.homerowArr[0] = _root.card_valueArr[currentcard];
} else if ((_root.homerowArr[1] == (_root.card_valueArr[currentcard] - 1)) && (_root.card_suitArr[currentcard] == _root.homerowArr[5])) {
eligable = 1;
slot = 2;
_root.homerowArr[1] = _root.card_valueArr[currentcard];
} else if ((_root.homerowArr[2] == (_root.card_valueArr[currentcard] - 1)) && (_root.card_suitArr[currentcard] == _root.homerowArr[6])) {
eligable = 1;
slot = 3;
_root.homerowArr[2] = _root.card_valueArr[currentcard];
} else if ((_root.homerowArr[3] == (_root.card_valueArr[currentcard] - 1)) && (_root.card_suitArr[currentcard] == _root.homerowArr[7])) {
eligable = 1;
slot = 4;
_root.homerowArr[3] = _root.card_valueArr[currentcard];
}
if (eligable == 1) {
this._x = _root["homerow_" + slot]._x;
this._y = _root["homerow_" + slot]._y;
this._alpha = 100;
_root.cardsleft--;
scoreIncrease = 25 + _root.current_bonus;
_root.score = _root.score + scoreIncrease;
if ((begin_x == _root.freecell_1._x) && (begin_y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((begin_x == _root.freecell_2._x) && (begin_y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((begin_x == _root.freecell_3._x) && (begin_y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((begin_x == _root.freecell_4._x) && (begin_y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = scoreIncrease;
if (0 >= _root.cardsleft) {
_root.gotoAndStop("game_over");
_root.statusmessage = "YOU SOLVED IT!";
} else {
_root.sounds.gotoAndPlay("home");
_root.bonus_starttime = getTimer();
_root.bonustimer.gotoAndPlay("countdown");
_root.statusmessage = "NICE WORK!";
_root.checkHomeRow();
}
} else if ((_root.freeCellArr[0] == 0) && (204 < begin_y)) {
_root.freeCellArr[0] = 1;
this._x = _root.freecell_1._x;
this._y = _root.freecell_1._y;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "OK";
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else if ((_root.freeCellArr[1] == 0) && (204 < begin_y)) {
_root.freeCellArr[1] = 1;
this._x = _root.freecell_2._x;
this._y = _root.freecell_2._y;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "OK";
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else if ((_root.freeCellArr[2] == 0) && (204 < begin_y)) {
_root.freeCellArr[2] = 1;
this._x = _root.freecell_3._x;
this._y = _root.freecell_3._y;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "OK";
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else if ((_root.freeCellArr[3] == 0) && (204 < begin_y)) {
_root.freeCellArr[3] = 1;
this._x = _root.freecell_4._x;
this._y = _root.freecell_4._y;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "OK";
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else {
this._alpha = 100;
this._x = begin_x;
this._y = begin_y;
_root.sounds.gotoAndPlay("bad_move");
}
} else {
lastclick = getTimer();
this._alpha = 100;
this._x = begin_x;
this._y = begin_y;
}
} else if (isInvalidCard == 0) {
isInvalidDrop = 0;
myString3 = new String(eval (this._droptarget));
landingcard3 = myString3.substring(8, myString3.length);
landingcard = landingcard3;
if ((_root._ymouse < 204) && (_root._xmouse < 278)) {
if (((((landingcard3 == "freecell_1") && (_root.freeCellArr[0] == 0)) || ((landingcard3 == "freecell_2") && (_root.freeCellArr[1] == 0))) || ((landingcard3 == "freecell_3") && (_root.freeCellArr[2] == 0))) || ((landingcard3 == "freecell_4") && (_root.freeCellArr[3] == 0))) {
if (landingcard3 == "freecell_1") {
_root.freeCellArr[0] = 1;
} else if (landingcard3 == "freecell_2") {
_root.freeCellArr[1] = 1;
} else if (landingcard3 == "freecell_3") {
_root.freeCellArr[2] = 1;
} else if (landingcard3 == "freecell_4") {
_root.freeCellArr[3] = 1;
}
this._x = _root[landingcard3]._x;
this._y = _root[landingcard3]._y;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "OK";
if ((begin_x == _root.freecell_1._x) && (begin_y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((begin_x == _root.freecell_2._x) && (begin_y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((begin_x == _root.freecell_3._x) && (begin_y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((begin_x == _root.freecell_4._x) && (begin_y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else {
isInvalidDrop = 1;
}
} else if ((_root._ymouse < 204) && (_root._xmouse >= 278)) {
if (((((landingcard3 == "homerow_1") || (landingcard3 == "homerow_2")) || (landingcard3 == "homerow_3")) || (landingcard3 == "homerow_4")) && (_root.card_valueArr[currentcard] == 1)) {
this._x = _root[landingcard3]._x;
this._y = _root[landingcard3]._y;
this._alpha = 100;
_root.cardsleft--;
scoreIncrease = 25 + _root.current_bonus;
_root.score = _root.score + scoreIncrease;
_root.sounds.gotoAndPlay("home");
_root.bonus_starttime = getTimer();
_root.bonustimer.gotoAndPlay("countdown");
_root.statusmessage = "WAY TO TAKE THE ACE HOME!";
if (landingcard3 == "homerow_1") {
_root.homerowArr[0] = 1;
_root.homerowArr[4] = _root.card_suitArr[currentcard];
} else if (landingcard3 == "homerow_2") {
_root.homerowArr[1] = 1;
_root.homerowArr[5] = _root.card_suitArr[currentcard];
} else if (landingcard3 == "homerow_3") {
_root.homerowArr[2] = 1;
_root.homerowArr[6] = _root.card_suitArr[currentcard];
} else if (landingcard3 == "homerow_4") {
_root.homerowArr[3] = 1;
_root.homerowArr[7] = _root.card_suitArr[currentcard];
}
if ((begin_x == _root.freecell_1._x) && (begin_y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((begin_x == _root.freecell_2._x) && (begin_y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((begin_x == _root.freecell_3._x) && (begin_y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((begin_x == _root.freecell_4._x) && (begin_y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = scoreIncrease;
_root.checkHomeRow();
} else if (((_root.card_valueArr[landingcard] + 1) == _root.card_valueArr[currentcard]) && (_root.card_suitArr[landingcard] == _root.card_suitArr[currentcard])) {
this._x = _root[landingcard]._x;
this._y = _root[landingcard]._y;
this._alpha = 100;
_root.cardsleft--;
scoreIncrease = 25 + _root.current_bonus;
_root.score = _root.score + scoreIncrease;
if (_root[landingcard]._x == _root.homerow_1._x) {
_root.homerowArr[0] = _root.card_valueArr[currentcard];
} else if (_root[landingcard]._x == _root.homerow_2._x) {
_root.homerowArr[1] = _root.card_valueArr[currentcard];
} else if (_root[landingcard]._x == _root.homerow_3._x) {
_root.homerowArr[2] = _root.card_valueArr[currentcard];
} else if (_root[landingcard]._x == _root.homerow_4._x) {
_root.homerowArr[3] = _root.card_valueArr[currentcard];
}
if ((begin_x == _root.freecell_1._x) && (begin_y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((begin_x == _root.freecell_2._x) && (begin_y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((begin_x == _root.freecell_3._x) && (begin_y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((begin_x == _root.freecell_4._x) && (begin_y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = scoreIncrease;
if (0 >= _root.cardsleft) {
_root.gotoAndStop("game_over");
_root.statusmessage = "YOU SOLVED IT!";
} else {
_root.sounds.gotoAndPlay("home");
_root.bonus_starttime = getTimer();
_root.bonustimer.gotoAndPlay("countdown");
_root.statusmessage = "NICE WORK!";
_root.checkHomeRow();
}
} else {
isInvalidDrop = 1;
}
} else if ((((((((landingcard3 == "open_1") || (landingcard3 == "open_2")) || (landingcard3 == "open_3")) || (landingcard3 == "open_4")) || (landingcard3 == "open_5")) || (landingcard3 == "open_6")) || (landingcard3 == "open_7")) || (landingcard3 == "open_8")) {
this._x = _root[landingcard3]._x;
this._y = _root[landingcard3]._y;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "NEW COLUMN STARTED";
if ((begin_x == _root.freecell_1._x) && (begin_y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((begin_x == _root.freecell_2._x) && (begin_y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((begin_x == _root.freecell_3._x) && (begin_y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((begin_x == _root.freecell_4._x) && (begin_y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else if ((_root.card_valueArr[landingcard] == (_root.card_valueArr[currentcard] + 1)) && (_root.card_colorArr[landingcard] != _root.card_colorArr[currentcard])) {
isGoodDrop = 1;
i = 0;
while (i < 52) {
if ((_root[i]._x == _root[landingcard]._x) && (_root[landingcard]._y < _root[i]._y)) {
isGoodDrop = 0;
}
i++;
}
if (isGoodDrop == 1) {
this._x = _root[landingcard]._x;
this._y = _root[landingcard]._y + 17;
this._alpha = 100;
_root.sounds.gotoAndPlay("good_move");
_root.statusmessage = "OK";
if ((begin_x == _root.freecell_1._x) && (begin_y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((begin_x == _root.freecell_2._x) && (begin_y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((begin_x == _root.freecell_3._x) && (begin_y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((begin_x == _root.freecell_4._x) && (begin_y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
_root.undoArr[0] = currentcard;
_root.undoArr[1] = begin_x;
_root.undoArr[2] = begin_y;
_root.undoArr[3] = 0;
_root.checkHomeRow();
} else {
isInvalidDrop = 1;
}
} else {
isInvalidDrop = 1;
}
if (isInvalidDrop == 1) {
steps = 5;
if (end_x < begin_x) {
direction_x = 1;
} else {
direction_x = -1;
}
if (end_y < begin_y) {
direction_y = 1;
} else {
direction_y = -1;
}
step_x = (offset_x / steps) * direction_x;
step_y = (offset_y / steps) * direction_y;
step_count = 1;
origin_x = begin_x;
origin_y = begin_y;
_root.sounds.gotoAndPlay("bad_move");
_root.statusmessage = "CAN'T MOVE THERE.";
this._alpha = 100;
this.gotoAndPlay("snap_back");
}
}
}
Symbol 146 MovieClip Frame 1 (127 B)
if (_root.gamestatus == "game_over") {
gotoAndPlay (19);
}
lastclick = 0;
this._alpha = 100;
_root.suspend = 0;
stop();
Symbol 146 MovieClip Frame 9 (239 B)
if ((steps < step_count) || (5 >= (offset_x + offset_y))) {
this._x = origin_x;
this._y = origin_y;
gotoAndPlay (1);
} else {
_root.suspend = 1;
this._x = this._x + step_x;
this._y = this._y + step_y;
step_count++;
}
Symbol 146 MovieClip Frame 10 (32 B)
gotoAndPlay(_currentframe - 1);
Symbol 146 MovieClip Frame 19 (8 B)
stop();
Symbol 146 MovieClip Frame 24 (8 B)
stop();
Symbol 157 MovieClip Frame 1 (410 B)
playnexttick = 10;
gameoverplayed = 0;
timer_miliseconds = (_root.game_duration * 60) * 1000;
timer = timer_miliseconds;
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.floor((timer_miliseconds - ((m * 1000) * 60)) / 1000);
if (s < 10) {
s = "0" + s;
}
_root.timermessage = ((" " + m) + ":") + s;
timer_sweeper._rotation = 0;
cover1._visible = false;
cover2._visible = true;
stop();
Symbol 157 MovieClip Frame 2 (692 B)
timer_miliseconds = timer - (getTimer() - _root.starttime);
if (0 >= timer_miliseconds) {
_root.timermessage = "00:00";
timer_sweeper._rotation = 0;
_root.gotoAndPlay("game_over");
stop();
} else {
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.ceil((timer_miliseconds - ((m * 1000) * 60)) / 1000);
if ((m == 0) and (playnexttick == s)) {
_root.sounds.gotoAndPlay("timer_click");
playnexttick--;
}
if (s < 10) {
s = "0" + s;
}
_root.timermessage = ((" " + m) + ":") + s;
p = (timer - timer_miliseconds) / timer;
r = 360 * p;
timer_sweeper._rotation = r;
if (180 < r) {
cover1._visible = true;
cover2._visible = false;
}
}
Symbol 157 MovieClip Frame 3 (32 B)
gotoAndPlay(_currentframe - 1);
Symbol 157 MovieClip Frame 9 (669 B)
timer_miliseconds = timer_miliseconds - 20000;
_root.score = _root.score + 20;
if (0 >= timer_miliseconds) {
_root.timermessage = "00:00";
timer_sweeper._rotation = 0;
timer_bonus_display = "0";
gotoAndPlay (11);
} else {
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.ceil((timer_miliseconds - ((m * 1000) * 60)) / 1000);
timer_bonus_display = Math.floor(timer_miliseconds / 100);
if (s < 10) {
s = "0" + s;
}
_root.timermessage = ((" " + m) + ":") + s;
p = (timer - timer_miliseconds) / timer;
r = 360 * p;
timer_sweeper._rotation = r;
if (180 < r) {
cover1._visible = true;
cover2._visible = false;
}
}
Symbol 157 MovieClip Frame 10 (32 B)
gotoAndPlay(_currentframe - 1);
Symbol 157 MovieClip Frame 11 (23 B)
_root.play();
stop();
Symbol 158 MovieClip Frame 1 (8 B)
stop();
Symbol 158 MovieClip Frame 2 (340 B)
timer_miliseconds = (_root.bonus_timer * 60) * 1000;
timer = timer_miliseconds;
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.floor((timer_miliseconds - ((m * 1000) * 60)) / 1000);
_root.bonus_timermessage = " " + s;
timer_sweeper._rotation = 0;
cover1._visible = false;
cover2._visible = true;
_root.current_bonus = s;
Symbol 158 MovieClip Frame 3 (555 B)
timer_miliseconds = timer - (getTimer() - _root.bonus_starttime);
if (0 >= timer_miliseconds) {
_root.bonus_timermessage = "00";
timer_sweeper._rotation = 0;
_root.current_bonus = 0;
} else {
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.ceil((timer_miliseconds - ((m * 1000) * 60)) / 1000);
_root.bonus_timermessage = " " + s;
p = (timer - timer_miliseconds) / timer;
r = 360 * p;
timer_sweeper._rotation = r;
if (180 < r) {
cover1._visible = true;
cover2._visible = false;
}
_root.current_bonus = s;
}
Symbol 158 MovieClip Frame 4 (32 B)
gotoAndPlay(_currentframe - 1);
Symbol 195 MovieClip Frame 1 (8 B)
stop();
Symbol 195 MovieClip Frame 15 (17 B)
gotoAndStop (1);
Symbol 195 MovieClip Frame 27 (17 B)
gotoAndStop (1);
Symbol 195 MovieClip Frame 39 (17 B)
gotoAndStop (1);
Symbol 195 MovieClip Frame 51 (17 B)
gotoAndStop (1);
Symbol 195 MovieClip Frame 62 (17 B)
gotoAndStop (1);
Symbol 195 MovieClip Frame 85 (17 B)
gotoAndStop (1);
Symbol 201 Button (35 B)
on (release) {
gotoAndPlay (31);
}
Symbol 209 Button (2.76 KiB) ●
on (release) {
if (undoArr[0] != "empty") {
_root.sounds.gotoAndPlay("good_move");
if ((_root[undoArr[0]]._x == _root.freecell_1._x) && (_root[undoArr[0]]._y == _root.freecell_1._y)) {
_root.freeCellArr[0] = 0;
} else if ((_root[undoArr[0]]._x == _root.freecell_2._x) && (_root[undoArr[0]]._y == _root.freecell_2._y)) {
_root.freeCellArr[1] = 0;
} else if ((_root[undoArr[0]]._x == _root.freecell_3._x) && (_root[undoArr[0]]._y == _root.freecell_3._y)) {
_root.freeCellArr[2] = 0;
} else if ((_root[undoArr[0]]._x == _root.freecell_4._x) && (_root[undoArr[0]]._y == _root.freecell_4._y)) {
_root.freeCellArr[3] = 0;
}
if ((_root.undoArr[1] == _root.freecell_1._x) && (_root.undoArr[2] == _root.freecell_1._y)) {
_root.freeCellArr[0] = 1;
} else if ((_root.undoArr[1] == _root.freecell_2._x) && (_root.undoArr[2] == _root.freecell_2._y)) {
_root.freeCellArr[1] = 1;
} else if ((_root.undoArr[1] == _root.freecell_3._x) && (_root.undoArr[2] == _root.freecell_3._y)) {
_root.freeCellArr[2] = 1;
} else if ((_root.undoArr[1] == _root.freecell_4._x) && (_root.undoArr[2] == _root.freecell_4._y)) {
_root.freeCellArr[3] = 1;
}
t = _root[undoArr[0]]._x;
_root.currentDepth++;
_root[undoArr[0]].swapDepths(_root.currentDepth);
_root[undoArr[0]]._x = undoArr[1];
_root[undoArr[0]]._y = undoArr[2];
_root.score = _root.score - undoArr[3];
if (_root.undoArr[3] != 0) {
_root.cardsleft++;
if ((t == homerow_1._x) && (_root.card_valueArr[_root.undoArr[0]] == 1)) {
_root.homerowArr[0] = "empty";
_root.homerowArr[4] = "empty";
} else if ((t == homerow_2._x) && (_root.card_valueArr[_root.undoArr[0]] == 1)) {
_root.homerowArr[1] = "empty";
_root.homerowArr[5] = "empty";
} else if ((t == homerow_3._x) && (_root.card_valueArr[_root.undoArr[0]] == 1)) {
_root.homerowArr[2] = "empty";
_root.homerowArr[6] = "empty";
} else if ((t == homerow_4._x) && (_root.card_valueArr[_root.undoArr[0]] == 1)) {
_root.homerowArr[3] = "empty";
_root.homerowArr[7] = "empty";
} else if (t == homerow_1._x) {
_root.homerowArr[0] = _root.card_valueArr[_root.undoArr[0]] - 1;
} else if (t == homerow_2._x) {
_root.homerowArr[1] = _root.card_valueArr[_root.undoArr[0]] - 1;
} else if (t == homerow_3._x) {
_root.homerowArr[2] = _root.card_valueArr[_root.undoArr[0]] - 1;
} else if (t == homerow_4._x) {
_root.homerowArr[3] = _root.card_valueArr[_root.undoArr[0]] - 1;
}
}
_root.undoArr = new Array("empty", "empty", "empty", 0);
_root.bonustimer.timer = 0;
_root.bonustimer.cover1._visible = true;
_root.bonustimer.cover2._visible = false;
_root.checkHomeRow();
} else {
_root.sounds.gotoAndPlay("bad_move");
}
}
Symbol 216 Button (63 B)
on (release) {
_root.user_ended_game = 1;
gotoAndPlay (34);
}
Symbol 235 Button (316 B)
on (rollOver) {
thetempvalue = 1;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 236 Button (316 B)
on (rollOver) {
thetempvalue = 2;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 237 Button (316 B)
on (rollOver) {
thetempvalue = 3;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 238 Button (316 B)
on (rollOver) {
thetempvalue = 4;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 239 Button (316 B)
on (rollOver) {
thetempvalue = 5;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 240 Button (316 B)
on (rollOver) {
thetempvalue = 6;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 241 Button (316 B)
on (rollOver) {
thetempvalue = 7;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 242 Button (316 B)
on (rollOver) {
thetempvalue = 8;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 243 Button (316 B)
on (rollOver) {
thetempvalue = 9;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 244 Button (317 B)
on (rollOver) {
thetempvalue = 10;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 245 Button (317 B)
on (rollOver) {
thetempvalue = 11;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 246 Button (317 B)
on (rollOver) {
thetempvalue = 12;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 247 Button (317 B)
on (rollOver) {
thetempvalue = 13;
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("highlite");
}
i++;
}
}
on (rollOut, dragOut) {
i = 0;
while (i < 52) {
if (_root.card_valueArr[i] == thetempvalue) {
_root[i].gotoAndPlay("normal");
}
i++;
}
}
Symbol 266 MovieClip Frame 5 (8 B)
stop();
Symbol 284 MovieClip Frame 5 (8 B)
stop();
Symbol 288 MovieClip Frame 5 (8 B)
stop();
Symbol 292 MovieClip Frame 1 (81 B)
if ((_root.randNow == true) && (_root.switchOff == true)) {
stop();
}
Symbol 292 MovieClip Frame 5 (8 B)
stop();
Symbol 296 MovieClip Frame 5 (8 B)
stop();
Symbol 300 MovieClip Frame 5 (8 B)
stop();
Symbol 309 MovieClip Frame 5 (8 B)
stop();
Symbol 322 MovieClip Frame 1 (8 B)
stop();
Symbol 322 MovieClip Frame 2 (1 B)
Symbol 322 MovieClip Frame 3 (1 B)
Symbol 322 MovieClip Frame 4 (1 B)
Symbol 322 MovieClip Frame 5 (1 B)
Symbol 322 MovieClip Frame 6 (1 B)
Symbol 322 MovieClip Frame 7 (1 B)
Symbol 322 MovieClip Frame 8 (1 B)
Symbol 322 MovieClip Frame 9 (1 B)
Symbol 322 MovieClip Frame 40 (18 B)
gotoAndPlay (60);
Symbol 322 MovieClip Frame 45 (83 B)
x = (Math.random() * 2) + 2;
gotoAndStop(Math.round(x));
_root.winAnimation = 0;
Symbol 322 MovieClip Frame 60 (1 B)
Symbol 322 MovieClip Frame 88 (66 B)
gotoAndStop(kind);
_root.waitForScoreAnimation = false;
stop();
Symbol 322 MovieClip Frame 98 (14 B)
_root.play();
Symbol 322 MovieClip Frame 112 (82 B)
x = (Math.random() * 2) + 2;
randFrame = Math.round(x);
_root.winAnimation = 0;
Symbol 341 Button (100 B)
on (press) {
getURL ("http://www.gamerival.com/index.cfm?action=cash&game=0EF8CDB8", "_new");
}
Symbol 344 Button (45 B)
on (press) {
_root.gotoAndStop("loading");
}
Symbol 348 Button (122 B)
on (press) {
score = _root.score;
gcode = _root.gcode;
getURL ("http://www.gamerival.com/game.cfm", "_self", "POST");
}
Symbol 349 MovieClip Frame 1 (180 B)
scoreShowUpsell = ("Make sure your score of - " + _root.score) + " - for this game is recorded and then challenge your friends to a game.";
clearInterval(timeInterval);
stop();
Symbol 361 Button (32 B)
on (press) {
gotoAndPlay (5);
}
Symbol 370 Button (45 B)
on (press) {
_root.gotoAndStop("loading");
}
Symbol 374 Button (42 B)
on (press) {
_root.gotoAndStop("init");
}
Symbol 378 Button (28 B)
on (press) {
nextFrame();
}
Symbol 387 MovieClip Frame 1 (59 B)
stop();
if (_root.hints == true) {
gotoAndStop (12);
}
Symbol 388 Button (34 B)
on (press) {
_root.nextFrame();
}