Frame 1
stop();
Instance of Symbol 26 MovieClip "bg_mc" in Frame 1
onClipEvent (load) {
if (_parent.initBgdep == undefined) {
_parent.initBgdep = this.getDepth();
}
this.swapDepths(14500);
}
Instance of Symbol 40 MovieClip in Frame 1
onClipEvent (load) {
this.swapDepths(35555);
}
Frame 2
stop();
_root.slidemusic_X = 0;
_root.slidesound_X = 0;
countmain = 0;
countsound = 0;
activate = 0;
bg_mc.levelNum = 1;
bg_mc.scoreVar = 0;
fscommand ("showmenu", false);
Instance of Symbol 47 MovieClip in Frame 2
onClipEvent (load) {
insDepth = this.getDepth();
this.swapDepths(14825);
}
Frame 3
_root.snd1.musicObj.start(0, 10000);
stop();
if (bg_mc.levelNum > 1) {
bg_mc.bonus = Number(360000 - (30000 * (bg_mc.levelNum - 1)));
LevelTiming = bg_mc.bonus;
} else {
bg_mc.bonus = Number(360000);
LevelTiming = bg_mc.bonus;
}
buts.useHandCursor = false;
blo_mc.bloc_btn.useHandCursor = false;
gap1 = 0;
onetime = 1;
totalDelay = 0;
function createRandomNumber() {
currentNo = random(52) + 2;
if (randomFlag[currentNo] == 0) {
randomFlag[currentNo] = 1;
return(currentNo);
}
j = 2;
while (j <= 53) {
if (randomFlag[j] == 0) {
randomFlag[j] = 1;
return(j);
}
j++;
}
}
var initialX:Number;
var initialY:Number;
topcard = new Array();
storeCards = new Array();
_root.topDepth = 15000;
_root.cardDepth = 14000;
i = 0;
while (i <= 8) {
_root["count" + i] = 0;
i++;
}
dragvars = new Array();
randomFlag = new Array();
t1 = new Array();
t2 = new Array();
t3 = new Array();
t4 = new Array();
t5 = new Array();
t6 = new Array();
t7 = new Array();
t8 = new Array();
maxCard = 52;
xInc = 30;
yInc = card._y;
ran = new Array();
i = 2;
while (i <= 53) {
randomFlag[i] = 0;
i++;
}
i = 1;
while (i <= maxCard) {
duplicateMovieClip (card, "card" + i, i);
ran[i] = createRandomNumber();
this["card" + i].gotoAndStop(ran[i]);
i++;
}
i = 1;
while (i <= maxCard) {
if (i == 1) {
t1[count1] = this["card" + i];
count1 = count1 + 1;
this["card" + i]._x = xInc + 50;
this["card" + i]._y = yInc;
this["card" + i].swapDepths(100 + i);
this["card" + i].ColNumber = 1;
}
if ((i > 1) && (i < 4)) {
t2[count2] = this["card" + i];
count2 = count2 + 1;
this["card" + i]._x = xInc + 125;
this["card" + i]._y = yInc;
yInc = yInc + 15;
this["card" + i].swapDepths(200 + (i - 1));
if (i == 2) {
this["card" + i].gotoAndStop(1);
}
this["card" + i].ColNumber = 2;
}
if ((i > 3) && (i < 7)) {
t3[count3] = this["card" + i];
count3 = count3 + 1;
this["card" + i]._x = xInc + 200;
this["card" + i]._y = yInc - 30;
yInc = yInc + 15;
this["card" + i].swapDepths(300 + (i - 3));
if ((i > 3) && (i < 6)) {
this["card" + i].gotoAndStop(1);
}
this["card" + i].ColNumber = 3;
}
if ((i > 6) && (i < 11)) {
t4[count4] = this["card" + i];
count4 = count4 + 1;
this["card" + i]._x = xInc + 275;
this["card" + i]._y = yInc - 75;
yInc = yInc + 15;
this["card" + i].swapDepths(400 + (i - 6));
if ((i > 6) && (i < 10)) {
this["card" + i].gotoAndStop(1);
}
this["card" + i].ColNumber = 4;
}
if ((i > 10) && (i < 16)) {
t5[count5] = this["card" + i];
count5 = count5 + 1;
this["card" + i]._x = xInc + 350;
this["card" + i]._y = yInc - 135;
yInc = yInc + 15;
this["card" + i].swapDepths(500 + (i - 10));
if ((i > 10) && (i < 15)) {
this["card" + i].gotoAndStop(1);
}
this["card" + i].ColNumber = 5;
}
if ((i > 15) && (i < 22)) {
t6[count6] = this["card" + i];
count6 = count6 + 1;
this["card" + i]._x = xInc + 425;
this["card" + i]._y = yInc - 210;
yInc = yInc + 15;
this["card" + i].swapDepths(600 + (i - 15));
if ((i > 15) && (i < 21)) {
this["card" + i].gotoAndStop(1);
}
this["card" + i].ColNumber = 6;
}
if ((i > 21) && (i < 29)) {
t7[count7] = this["card" + i];
count7 = count7 + 1;
this["card" + i]._x = xInc + 500;
this["card" + i]._y = yInc - 300;
yInc = yInc + 15;
this["card" + i].swapDepths(700 + (i - 21));
if ((i > 21) && (i < 28)) {
this["card" + i].gotoAndStop(1);
}
this["card" + i].ColNumber = 7;
}
if ((i > 28) && (i < 53)) {
t8[count8] = this["card" + i];
count8 = count8 + 1;
this["card" + i]._x = xInc + 50;
this["card" + i]._y = yInc - 500;
xInc = xInc - 2;
this["card" + i].gotoAndStop(1);
this["card" + i].ColNumber = 8;
}
i++;
}
function checkCardPosition(targetClip) {
function arrangefun() {
reduceLength = targetClip.ColNumber;
_root["t" + reduceLength].length = _root["t" + reduceLength].length - 1;
targetClip.ColNumber = i;
if (targetClip.initialY > 190) {
oldT = _root["t" + reduceLength].length - 1;
var cardName = eval ("t" + reduceLength);
var cardNumber;
cardNumber = String(cardName[oldT]).substr(12);
_root["t" + reduceLength][oldT].gotoAndStop(ran[cardNumber]);
}
}
cardfound = 0;
tempHitted = false;
i = 1;
while (i <= 7) {
hitCard = _root["t" + i].length - 1;
getnum = _root["t" + i][hitCard].nums - 1;
if (i != targetClip.ColNumber) {
if (_root.allowOnce != 1) {
if ((((_root.Dclick == 1) || (targetClip.hitTest(_root["t" + i][hitCard]))) && (targetClip.types != _root["t" + i][hitCard].types)) && (targetClip.nums == getnum)) {
_root.allowOnce = 1;
tempHitted = true;
if (targetClip.initialY < 190) {
_root.poped = 1;
tmpCardd = _root.topcard.pop();
_root.storeCards.pop();
_root["t" + i].push(tmpCardd);
}
hitColumnDepth = _root["t" + i][hitCard].getDepth();
targetClip.swapDepths(hitColumnDepth + 1);
j = 0;
while (j <= (_root.dragvars.length - 1)) {
if (_root.dragvars[j] != undefined) {
_root["t" + i].push(_root.dragvars[j]);
}
j++;
}
reduceLength = targetClip.ColNumber;
_root["t" + reduceLength].length = _root["t" + reduceLength].length - _root.dragCardsNum;
targetClip.ColNumber = _root["t" + i][hitCard].ColNumber;
oldT = _root["t" + reduceLength].length - 1;
var cardName = eval ("t" + reduceLength);
var cardNumber;
cardNumber = String(cardName[oldT]).substr(12);
if (targetClip.initialY > 190) {
_root["t" + reduceLength][oldT].gotoAndStop(ran[cardNumber]);
}
targetClip._x = _root["t" + i][hitCard]._x;
targetClip._y = _root["t" + i][hitCard]._y + 15;
jkl = 1;
j = 0;
while (j <= (_root.dragvars.length - 1)) {
if (_root.dragvars[j] != undefined) {
if (_root.dragvars[j] != targetClip) {
_root.dragvars[j]._x = targetClip._x;
_root.dragvars[j]._y = targetClip._y + (15 * jkl);
_root.dragvars[j].ColNumber = targetClip.ColNumber;
jkl = jkl + 1;
}
}
j++;
}
}
}
}
if ((((targetClip._currentframe == 14) || (targetClip._currentframe == 27)) || (targetClip._currentframe == 40)) || (targetClip._currentframe == 53)) {
i = 1;
while (i <= 7) {
hitClip = _root["mClip" + i];
if (_root.allowKings != 1) {
if ((_root["t" + i].length == 0) && ((_root.Dclick == 1) || (targetClip.hitTest(hitClip) == true))) {
_root.allowKings = 1;
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
tmpCardd = _root.topcard.pop();
_root.storeCards.pop();
_root["t" + i].push(tmpCardd);
}
targetClip.swapDepths((i * 100) + 1);
j = 0;
while (j <= (_root.dragvars.length - 1)) {
if (_root.dragvars[j] != undefined) {
_root["t" + i].push(_root.dragvars[j]);
}
j++;
}
reduceLength = targetClip.ColNumber;
_root["t" + reduceLength].length = _root["t" + reduceLength].length - _root.dragCardsNum;
targetClip.ColNumber = i;
if (targetClip.initialY > 190) {
oldT = _root["t" + reduceLength].length - 1;
var cardName = eval ("t" + reduceLength);
var cardNumber;
cardNumber = String(cardName[oldT]).substr(12);
_root["t" + reduceLength][oldT].gotoAndStop(ran[cardNumber]);
}
tempHitted = true;
targetClip._x = hitClip._x;
targetClip._y = hitClip._y;
jkb = 1;
j = 0;
while (j <= (_root.dragvars.length - 1)) {
if (_root.dragvars[j] != undefined) {
if (_root.dragvars[j] != targetClip) {
_root.dragvars[j]._x = targetClip._x;
_root.dragvars[j]._y = targetClip._y + (15 * jkb);
_root.dragvars[j].ColNumber = targetClip.ColNumber;
jkb = jkb + 1;
}
}
j++;
}
}
}
i++;
}
}
i++;
}
if ((targetClip.types == "red") || (targetClip.types == "black")) {
if (targetClip.nums == 1) {
l = 1;
while (l <= 4) {
if (_root.cardfound != 1) {
if (_root["arranger" + l].Ctop == 0) {
targetClip.swapDepths(Number(_root["arranger" + l].depthVar));
targetClip._x = _root["arranger" + l]._x;
targetClip._y = _root["arranger" + l]._y;
_root["arranger" + l].Ctop = 1;
_root["arranger" + l].Fname = targetClip.cardShape;
_root.cardfound = 1;
_root["arranger" + l].holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + (100 * bg_mc.levelNum);
tempHitted = true;
}
}
l++;
}
}
}
trace("dragCardsNumwww=" + _root.dragCardsNum);
if (((_root.Dclick == 1) && (_root.dragCardsNum == 1)) || (targetClip.hitTest(_root.arranger1.holdCards[holdCards.length - 1]) && (_root.dragCardsNum == 1))) {
if (targetClip.types == "red") {
if (arranger1.Fname == "heart") {
if ((targetClip._currentframe > 1) && (targetClip._currentframe <= 14)) {
diff = targetClip.nums - arranger1.Ctop;
if (diff == 1) {
arranger1.Ctop = targetClip.nums;
newDepth = Number(arranger1.Ctop) + Number(arranger1.depthVar);
targetClip.swapDepths(newDepth);
_root.mc1Count = _root.mc1Count + 1;
targetClip._x = arranger1._x;
targetClip._y = arranger1._y;
_root.arranger1.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger1.Fname == "daise") {
if ((targetClip._currentframe >= 15) && (targetClip._currentframe <= 27)) {
diff = targetClip.nums - arranger1.Ctop;
if (diff == 1) {
arranger1.Ctop = targetClip.nums;
newDepth = Number(arranger1.Ctop) + Number(arranger1.depthVar);
targetClip.swapDepths(newDepth);
_root.mc1Count = _root.mc1Count + 1;
targetClip._x = arranger1._x;
targetClip._y = arranger1._y;
_root.arranger1.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
if (targetClip.types == "black") {
if (arranger1.Fname == "spade") {
if ((targetClip._currentframe >= 28) && (targetClip._currentframe <= 40)) {
diff = targetClip.nums - arranger1.Ctop;
if (diff == 1) {
arranger1.Ctop = targetClip.nums;
newDepth = Number(arranger1.Ctop) + Number(arranger1.depthVar);
targetClip.swapDepths(newDepth);
_root.mc1Count = _root.mc1Count + 1;
targetClip._x = arranger1._x;
targetClip._y = arranger1._y;
_root.arranger1.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger1.Fname == "clover") {
if ((targetClip._currentframe >= 41) && (targetClip._currentframe <= 53)) {
diff = targetClip.nums - arranger1.Ctop;
if (diff == 1) {
arranger1.Ctop = targetClip.nums;
newDepth = Number(arranger1.Ctop) + Number(arranger1.depthVar);
targetClip.swapDepths(newDepth);
_root.mc1Count = _root.mc1Count + 1;
targetClip._x = arranger1._x;
targetClip._y = arranger1._y;
_root.arranger1.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
}
if (((_root.Dclick == 1) && (_root.dragCardsNum == 1)) || (targetClip.hitTest(_root.arranger2.holdCards[holdCards.length - 1]) && (_root.dragCardsNum == 1))) {
if (targetClip.types == "red") {
if (arranger2.Fname == "heart") {
if ((targetClip._currentframe > 1) && (targetClip._currentframe <= 14)) {
diff = targetClip.nums - arranger2.Ctop;
if (diff == 1) {
arranger2.Ctop = targetClip.nums;
newDepth = Number(arranger2.Ctop) + Number(arranger2.depthVar);
targetClip.swapDepths(newDepth);
_root.mc2Count = _root.mc2Count + 1;
targetClip._x = arranger2._x;
targetClip._y = arranger2._y;
_root.arranger2.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger2.Fname == "daise") {
if ((targetClip._currentframe >= 15) && (targetClip._currentframe <= 27)) {
diff = targetClip.nums - arranger2.Ctop;
if (diff == 1) {
arranger2.Ctop = targetClip.nums;
newDepth = Number(arranger2.Ctop) + Number(arranger2.depthVar);
targetClip.swapDepths(newDepth);
_root.mc2Count = _root.mc2Count + 1;
targetClip._x = arranger2._x;
targetClip._y = arranger2._y;
_root.arranger2.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
if (targetClip.types == "black") {
if (arranger2.Fname == "spade") {
if ((targetClip._currentframe >= 28) && (targetClip._currentframe <= 40)) {
diff = targetClip.nums - arranger2.Ctop;
if (diff == 1) {
arranger2.Ctop = targetClip.nums;
newDepth = Number(arranger2.Ctop) + Number(arranger2.depthVar);
targetClip.swapDepths(newDepth);
_root.mc2Count = _root.mc2Count + 1;
targetClip._x = arranger2._x;
targetClip._y = arranger2._y;
_root.arranger2.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger2.Fname == "clover") {
if ((targetClip._currentframe >= 41) && (targetClip._currentframe <= 53)) {
diff = targetClip.nums - arranger2.Ctop;
if (diff == 1) {
arranger2.Ctop = targetClip.nums;
newDepth = Number(arranger2.Ctop) + Number(arranger2.depthVar);
targetClip.swapDepths(newDepth);
_root.mc2Count = _root.mc2Count + 1;
targetClip._x = arranger2._x;
targetClip._y = arranger2._y;
_root.arranger2.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
}
if (((_root.Dclick == 1) && (_root.dragCardsNum == 1)) || (targetClip.hitTest(_root.arranger3.holdCards[holdCards.length - 1]) && (_root.dragCardsNum == 1))) {
if (targetClip.types == "red") {
if (arranger3.Fname == "heart") {
if ((targetClip._currentframe > 1) && (targetClip._currentframe <= 14)) {
diff = targetClip.nums - arranger3.Ctop;
if (diff == 1) {
arranger3.Ctop = targetClip.nums;
newDepth = Number(arranger3.Ctop) + Number(arranger3.depthVar);
targetClip.swapDepths(newDepth);
_root.mc3Count = _root.mc3Count + 1;
targetClip._x = arranger3._x;
targetClip._y = arranger3._y;
_root.arranger3.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger3.Fname == "daise") {
if ((targetClip._currentframe >= 15) && (targetClip._currentframe <= 27)) {
diff = targetClip.nums - arranger3.Ctop;
if (diff == 1) {
arranger3.Ctop = targetClip.nums;
newDepth = Number(arranger3.Ctop) + Number(arranger3.depthVar);
targetClip.swapDepths(newDepth);
_root.mc3Count = _root.mc3Count + 1;
targetClip._x = arranger3._x;
targetClip._y = arranger3._y;
_root.arranger3.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
if (targetClip.types == "black") {
if (arranger3.Fname == "spade") {
if ((targetClip._currentframe >= 28) && (targetClip._currentframe <= 40)) {
diff = targetClip.nums - arranger3.Ctop;
if (diff == 1) {
arranger3.Ctop = targetClip.nums;
newDepth = Number(arranger3.Ctop) + Number(arranger3.depthVar);
targetClip.swapDepths(newDepth);
_root.mc3Count = _root.mc3Count + 1;
targetClip._x = arranger3._x;
targetClip._y = arranger3._y;
_root.arranger3.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger3.Fname == "clover") {
if ((targetClip._currentframe >= 41) && (targetClip._currentframe <= 53)) {
diff = targetClip.nums - arranger3.Ctop;
if (diff == 1) {
arranger3.Ctop = targetClip.nums;
newDepth = Number(arranger3.Ctop) + Number(arranger3.depthVar);
targetClip.swapDepths(newDepth);
_root.mc3Count = _root.mc3Count + 1;
targetClip._x = arranger3._x;
targetClip._y = arranger3._y;
_root.arranger3.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
}
if (((_root.Dclick == 1) && (_root.dragCardsNum == 1)) || (targetClip.hitTest(_root.arranger4.holdCards[holdCards.length - 1]) && (_root.dragCardsNum == 1))) {
if (targetClip.types == "red") {
if (arranger4.Fname == "heart") {
if ((targetClip._currentframe > 1) && (targetClip._currentframe <= 14)) {
diff = targetClip.nums - arranger4.Ctop;
if (diff == 1) {
arranger4.Ctop = targetClip.nums;
newDepth = Number(arranger4.Ctop) + Number(arranger4.depthVar);
targetClip.swapDepths(newDepth);
_root.mc4Count = _root.mc4Count + 1;
targetClip._x = arranger4._x;
targetClip._y = arranger4._y;
_root.arranger4.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger4.Fname == "daise") {
if ((targetClip._currentframe >= 15) && (targetClip._currentframe <= 27)) {
diff = targetClip.nums - arranger4.Ctop;
if (diff == 1) {
arranger4.Ctop = targetClip.nums;
newDepth = Number(arranger4.Ctop) + Number(arranger4.depthVar);
targetClip.swapDepths(newDepth);
_root.mc4Count = _root.mc4Count + 1;
targetClip._x = arranger4._x;
targetClip._y = arranger4._y;
_root.arranger4.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
if (targetClip.types == "black") {
if (arranger4.Fname == "spade") {
if ((targetClip._currentframe >= 28) && (targetClip._currentframe <= 40)) {
diff = targetClip.nums - arranger4.Ctop;
if (diff == 1) {
arranger4.Ctop = targetClip.nums;
newDepth = Number(arranger4.Ctop) + Number(arranger4.depthVar);
targetClip.swapDepths(newDepth);
_root.mc4Count = _root.mc4Count + 1;
targetClip._x = arranger4._x;
targetClip._y = arranger4._y;
_root.arranger4.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
} else if (arranger4.Fname == "clover") {
if ((targetClip._currentframe >= 41) && (targetClip._currentframe <= 53)) {
diff = targetClip.nums - arranger4.Ctop;
if (diff == 1) {
arranger4.Ctop = targetClip.nums;
newDepth = Number(arranger4.Ctop) + Number(arranger4.depthVar);
targetClip.swapDepths(newDepth);
_root.mc4Count = _root.mc4Count + 1;
targetClip._x = arranger4._x;
targetClip._y = arranger4._y;
_root.arranger4.holdCards.push(targetClip);
arrangefun();
_root.snd2.correctObj.start(0, 1);
if ((targetClip.initialY < 190) && (_root.poped != 1)) {
_root.topcard.pop();
_root.storeCards.pop();
}
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeR / 1000) + _root.mc1Count);
tempHitted = true;
}
}
}
}
}
if (tempHitted == false) {
j = 1;
while (j <= 7) {
k = 0;
while (k <= (_root["t" + j].length - 1)) {
if (_root["t" + j][k] == targetClip) {
_root.ReplaceNum = k;
}
k++;
}
j++;
}
targetClip._x = targetClip.initialX;
targetClip._y = targetClip.initialY;
j = 0;
while (j <= (_root.dragvars.length - 1)) {
if (_root.dragvars[j] != undefined) {
if (_root.dragvars[j] != targetClip) {
_root.dragvars[j]._x = targetClip._x;
_root.dragvars[j]._y = targetClip._y + (15 * (j - _root.ReplaceNum));
ANumq = targetClip.ColNumber;
changeDepthq = ((ANumq * 100) + j) + 1;
_root.dragvars[j].swapDepths(changeDepthq);
}
}
j++;
}
nowDepth = targetClip.getDepth();
if (nowDepth < targetClip.initialDepth) {
if (targetClip.ColNumber < 8) {
ANum = targetClip.ColNumber;
cNum = _root["t" + ANum].length;
changeDepth = (ANum * 100) + cNum;
targetClip.swapDepths(changeDepth);
}
} else {
targetClip.swapDepths(targetClip.initialDepth);
}
}
}
Instance of Symbol 49 MovieClip in Frame 3
onClipEvent (enterFrame) {
_parent.dbInterface.updateScore(_parent.bg_mc.scoreVar);
}
Instance of Symbol 112 MovieClip "card" in Frame 3
onClipEvent (load) {
_root.once = 1;
_root.optionsclick = 1;
_root.mc1Count = 1;
_root.mc2Count = 1;
_root.mc3Count = 1;
_root.mc4Count = 1;
_root.blocks.Bbut.useHandCursor = false;
_root.blocks.swapDepths(17500);
_root.blo_mc.swapDepths(18000);
this.useHandCursor = false;
_root.Dclick = 0;
onPress = function () {
if (_parent.onetime == 1) {
_root.totalDelay = getTimer();
trace("dd=" + _root.totalDelay);
_parent.onetime = 0;
_root.starttime = 1;
}
initialY = this._y;
if (_currentframe != 1) {
initialDepth = this.getDepth();
initialX = this._x;
arrayNum = (initialDepth - (this.ColNumber * 100)) - 2;
_root.dragCardsNum = 1;
_root.thisCard = arrayNum + 1;
pressed = true;
_root.tmpnum = Number(_root["t" + this.ColNumber].length - 1);
curCard = _root["t" + this.ColNumber][_root.thisCard];
i = _root.thisCard;
while (i <= _root.tmpnum) {
_root.dragvars[i] = _root["t" + this.ColNumber][i];
_root["initialDep" + i] = _root["t" + this.ColNumber][i].getDepth();
i++;
}
this.swapDepths(_root.topDepth);
startDrag (this, true);
}
if ((this._x < 84) && (this._y < 190)) {
_parent.slide.gotoAndPlay(2);
names = _name;
_root.topcard.push(this);
_root.storeCards.push(names);
var cName = names;
var cNumber;
cNumber = String(cName).substr(4);
this.gotoAndStop(_parent.ran[cNumber]);
this._x = 200;
this.swapDepths(_root.cardDepth);
_root.cardDepth = _root.cardDepth + 1;
_root.blocks._x = _root.blocks._x + 2;
_root.snd2.correctObj.start(0, 1);
}
};
onRelease = (onReleaseOutside = function () {
if (_currentframe != 1) {
_root.allowOnce = 0;
gap2 = getTimer();
if ((gap2 - gap1) < 350) {
_root.Dclick = 1;
trace("doubleClick...");
_root.performIt = 1;
}
gap1 = gap2;
_root.poped = 0;
_root.allowKings = 0;
_parent.checkCardPosition(this);
pressed = false;
beginDepth = this.getDepth();
if ((_root.thisCard != undefined) || (_root.tmpnum != undefined)) {
if (_root.tempHitted == true) {
m = 1;
i = _root.thisCard;
while (i <= _root.tmpnum) {
if (_root.dragvars[i] != curCard) {
_root.dragvars[i].swapDepths(beginDepth + m);
m = m + 1;
}
i++;
}
}
}
stopDrag();
_root.Dclick = 0;
_root.dragvars = new Array();
}
});
}
onClipEvent (enterFrame) {
if (pressed == true) {
if (this.ColNumber != 8) {
_root.dragCardsNum = _root.dragvars.length - _root.thisCard;
j = _root.thisCard;
while (j <= _root.tmpnum) {
if (_root.dragvars[j] != curCard) {
_root.dragvars[j]._x = curCard._x;
yInc = Number(j - _root.thisCard);
_root.dragvars[j]._y = curCard._y + (15 * yInc);
_root.dragvars[j].swapDepths(_root.topDepth + ((j - _root.thisCard) + 1));
}
j++;
}
} else if (this.ColNumber == 8) {
_root.dragCardsNum = 1;
}
}
}
Instance of Symbol 114 MovieClip in Frame 3
onClipEvent (enterFrame) {
_parent.cScore = _parent.bg_mc.scoreVar;
if ((_root.starttime == 1) && (_root.optionsclick == 1)) {
tempTimeVar = getTimer() - _root.totalDelay;
_parent.bg_mc.bonus = _parent.LevelTiming - tempTimeVar;
_root.timeR = _parent.bg_mc.bonus;
if (_parent.bg_mc.bonus < 0) {
trace("game over");
i = 1;
while (i <= 52) {
removeMovieClip(_parent["card" + i]);
i++;
}
_parent.bg_mc.bonus = 0;
stopAllSounds();
_parent.bg_mc.swapDepths(_parent.initBgdep);
_parent.gotoAndStop("gameOver");
_root.starttime = 0;
}
}
if ((((_root.mc1Count == 13) && (_root.mc2Count == 13)) && (_root.mc3Count == 13)) && (_root.mc4Count == 13)) {
trace("Level Completed");
_root.timeRemain = _parent.bg_mc.bonus;
_root.newScore = _parent.bg_mc.scoreVar;
i = 1;
while (i <= 52) {
removeMovieClip(_parent["card" + i]);
i++;
}
_parent.gotoAndStop("levelComplete");
}
}
Instance of Symbol 148 MovieClip "controls" in Frame 3
onClipEvent (load) {
this.swapDepths(20000);
}
Instance of Symbol 149 MovieClip "slide" in Frame 3
onClipEvent (load) {
this.swapDepths(22000);
trace(this.getDepth());
}
Frame 4
stop();
bg_mc.scoreVar = bg_mc.scoreVar + Math.round((_root.timeRemain / 1000) + 1000);
newScore1 = ("YOUR CURRENT SCORE IS " + bg_mc.scoreVar) + " POINTS";
removeMovieClip(blocks);
removeMovieClip(controls);
removeMovieClip(slide);
Frame 5
stop();
newScore2 = cScore;
Instance of Symbol 183 MovieClip in Frame 5
onClipEvent (load) {
initGoverDepth = this.getDepth();
this.swapDepths(34535);
}
Symbol 17 Button
on (release) {
if (_root.starttime == 1) {
i = 1;
while (i <= 52) {
removeMovieClip(_parent["card" + i]);
i++;
}
_root.starttime = 0;
stopAllSounds();
this.swapDepths(_parent.initBgdep);
_parent.gotoAndStop("gameOver");
}
}
Symbol 25 Button
on (release) {
if (_root.once == 1) {
_root.optionPressed = getTimer();
_parent.controls.gotoAndPlay(2);
_root.once = 0;
_root.optionsclick = 0;
}
}
Symbol 28 MovieClip Frame 1
musicObj = new Sound(this);
musicObj.attachSound("bgmusic");
Symbol 29 MovieClip Frame 1
correctObj = new Sound(this);
correctObj.attachSound("Card1");
Symbol 39 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 1
stop();
LoaderBlk.useHandCursor = false;
Instance of Symbol 39 MovieClip in Symbol 40 MovieClip Frame 1
onClipEvent (load) {
total = _parent._parent.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _parent._parent.getBytesLoaded();
percent = int((loaded / total) * 100);
gotoAndStop(percent);
perText = percent + "%";
if (percent >= 100) {
_parent.gotoAndStop(2);
}
}
Symbol 40 MovieClip Frame 2
stop();
_parent.gotoAndStop("instruct");
Symbol 46 Button
on (release) {
_parent.cScore = 0;
_parent.bg_mc.scoreVar = 0;
_root.starttime = 0;
this.swapDepths(insDepth);
_parent.gotoAndStop("startGame");
}
Symbol 47 MovieClip Frame 1
blocks.useHandCursor = false;
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
types = "red";
nums = "1";
cardShape = "heart";
stop();
Symbol 112 MovieClip Frame 3
types = "red";
nums = "2";
stop();
Symbol 112 MovieClip Frame 4
types = "red";
nums = "3";
stop();
Symbol 112 MovieClip Frame 5
types = "red";
nums = "4";
stop();
Symbol 112 MovieClip Frame 6
types = "red";
nums = "5";
stop();
Symbol 112 MovieClip Frame 7
types = "red";
nums = "6";
stop();
Symbol 112 MovieClip Frame 8
types = "red";
nums = "7";
stop();
Symbol 112 MovieClip Frame 9
types = "red";
nums = "8";
stop();
Symbol 112 MovieClip Frame 10
types = "red";
nums = "9";
stop();
Symbol 112 MovieClip Frame 11
types = "red";
nums = "10";
stop();
Symbol 112 MovieClip Frame 12
types = "red";
nums = "11";
stop();
Symbol 112 MovieClip Frame 13
types = "red";
nums = "12";
stop();
Symbol 112 MovieClip Frame 14
types = "red";
nums = "13";
stop();
Symbol 112 MovieClip Frame 15
types = "red";
nums = "1";
cardShape = "daise";
stop();
Symbol 112 MovieClip Frame 16
types = "red";
nums = "2";
stop();
Symbol 112 MovieClip Frame 17
types = "red";
nums = "3";
stop();
Symbol 112 MovieClip Frame 18
types = "red";
nums = "4";
stop();
Symbol 112 MovieClip Frame 19
types = "red";
nums = "5";
stop();
Symbol 112 MovieClip Frame 20
types = "red";
nums = "6";
stop();
Symbol 112 MovieClip Frame 21
types = "red";
nums = "7";
stop();
Symbol 112 MovieClip Frame 22
types = "red";
nums = "8";
stop();
Symbol 112 MovieClip Frame 23
types = "red";
nums = "9";
stop();
Symbol 112 MovieClip Frame 24
types = "red";
nums = "10";
stop();
Symbol 112 MovieClip Frame 25
types = "red";
nums = "11";
stop();
Symbol 112 MovieClip Frame 26
types = "red";
nums = "12";
stop();
Symbol 112 MovieClip Frame 27
types = "red";
nums = "13";
stop();
Symbol 112 MovieClip Frame 28
types = "black";
nums = "1";
cardShape = "spade";
stop();
Symbol 112 MovieClip Frame 29
types = "black";
nums = "2";
stop();
Symbol 112 MovieClip Frame 30
types = "black";
nums = "3";
stop();
Symbol 112 MovieClip Frame 31
types = "black";
nums = "4";
stop();
Symbol 112 MovieClip Frame 32
types = "black";
nums = "5";
stop();
Symbol 112 MovieClip Frame 33
types = "black";
nums = "6";
stop();
Symbol 112 MovieClip Frame 34
types = "black";
nums = "7";
stop();
Symbol 112 MovieClip Frame 35
types = "black";
nums = "8";
stop();
Symbol 112 MovieClip Frame 36
types = "black";
nums = "9";
stop();
Symbol 112 MovieClip Frame 37
types = "black";
nums = "10";
stop();
Symbol 112 MovieClip Frame 38
types = "black";
nums = "11";
stop();
Symbol 112 MovieClip Frame 39
types = "black";
nums = "12";
stop();
Symbol 112 MovieClip Frame 40
types = "black";
nums = "13";
stop();
Symbol 112 MovieClip Frame 41
types = "black";
nums = "1";
cardShape = "clover";
stop();
Symbol 112 MovieClip Frame 42
types = "black";
nums = "2";
stop();
Symbol 112 MovieClip Frame 43
types = "black";
nums = "3";
stop();
Symbol 112 MovieClip Frame 44
types = "black";
nums = "4";
stop();
Symbol 112 MovieClip Frame 45
types = "black";
nums = "5";
stop();
Symbol 112 MovieClip Frame 46
types = "black";
nums = "6";
stop();
Symbol 112 MovieClip Frame 47
types = "black";
nums = "7";
stop();
Symbol 112 MovieClip Frame 48
types = "black";
nums = "8";
stop();
Symbol 112 MovieClip Frame 49
types = "black";
nums = "9";
stop();
Symbol 112 MovieClip Frame 50
types = "black";
nums = "10";
stop();
Symbol 112 MovieClip Frame 51
types = "black";
nums = "11";
stop();
Symbol 112 MovieClip Frame 52
types = "black";
nums = "12";
stop();
Symbol 112 MovieClip Frame 53
types = "black";
nums = "13";
stop();
Symbol 116 Button
on (release) {
i = 1;
while (i <= 7) {
hitCard = _root["t" + i].length;
trace((("t " + i) + " Length=") + hitCard);
trace("----------");
i++;
}
}
Symbol 117 Button
on (release) {
hitCard = _root.topcard.length;
i = 0;
while (i < hitCard) {
trace(_root.topcard[i].getDepth());
i++;
}
}
Symbol 126 Button
on (release) {
trace("_root.storeCards = " + _root.storeCards.length);
trace("_root.topcard = " + _root.topcard.length);
i = _root.storeCards.length - 1;
while (i >= 0) {
var tNum;
tNum = _root.storeCards[i].substr(4);
_root["card" + tNum]._x = (_root.xInc + 50) + (2 * i);
_root["card" + tNum]._y = _root.yInc - 500;
_root["card" + tNum].swapDepths(_root.cardDepth);
_root.cardDepth = _root.cardDepth + 1;
_root["card" + tNum].gotoAndStop(1);
i--;
}
k = _root.storeCards.length - 1;
var tNumk;
tNumk = _root.storeCards[k].substr(4);
_root.storeCards = new Array();
_root.topcard = new Array();
_root.cardDepth = 14000;
_root.blocks._x = 56.8;
_root.buts._x = _root["card" + tNumk]._x;
}
Symbol 142 Button
on (press) {
startDrag (this, true, left_M, top_M, right_M, bottom_M);
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 144 Button
on (press) {
startDrag (this, false, left_j, top_j, right_j, bottom_j);
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 147 Button
on (release) {
_root.once = 1;
_root.optionsclick = 1;
_root.slidemusic_X = slidemusic._x;
_root.slidesound_X = slidesound._x;
_root.totalDelay = _root.totalDelay + (getTimer() - _root.optionPressed);
gotoAndStop (1);
}
Symbol 148 MovieClip Frame 1
stop();
_root.activate = 0;
Symbol 148 MovieClip Frame 2
blocker.useHandCursor = false;
_root.activate = 1;
Symbol 148 MovieClip Frame 9
stop();
_root.activate = 1;
Instance of Symbol 143 MovieClip "slidemusic" in Symbol 148 MovieClip Frame 9
onClipEvent (load) {
right_M = _x + 100;
top_M = _y;
bottom_M = _y;
left_M = _x;
if (_root.countmain == 0) {
_x = (_x + 100);
} else {
_x = _root.slidemusic_X;
}
}
onClipEvent (enterFrame) {
_root.countmain = 1;
_root.snd1.musicObj.setVolume(_x - left_M);
}
Instance of Symbol 145 MovieClip "slidesound" in Symbol 148 MovieClip Frame 9
onClipEvent (load) {
top_j = _y;
bottom_j = _y;
left_j = _x;
right_j = _x + 100;
if (_root.countsound == 0) {
_x = (_x + 100);
} else {
_x = _root.slidesound_X;
}
}
onClipEvent (enterFrame) {
_root.countsound = 1;
_root.snd2.correctObj.setVolume(_x - left_j);
_root.snd3.wrongObj.setVolume(_x - left_j);
}
Symbol 149 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
Ctop = 0;
depthVar = 10000;
holdCards = new Array();
Fname = "";
Symbol 165 MovieClip Frame 1
Ctop = 0;
depthVar = 11000;
holdCards = new Array();
Fname = "";
Symbol 166 MovieClip Frame 1
Ctop = 0;
depthVar = 12000;
holdCards = new Array();
Fname = "";
Symbol 167 MovieClip Frame 1
Ctop = 0;
depthVar = 13000;
holdCards = new Array();
Fname = "";
Symbol 174 Button
on (release) {
stopAllSounds();
_root.starttime = 0;
bg_mc.levelNum = bg_mc.levelNum + 1;
bg_mc.scoreVar = bg_mc.scoreVar;
gotoAndStop ("startGame");
}
Symbol 179 Button
on (release) {
getURL ("http://www.ikoncity.com/ic-master.asp?pageID=805", "_blank");
}
Symbol 181 Button
on (release) {
this.swapDepths(initGoverDepth);
_parent.gotoAndStop(2);
}