Frame 1
function gotjuice() {
}
function gotjuicetime() {
}
function juicevisit() {
var randbit = (Math.random() * 1000000);
var adbit = ("?randbit=" + randbit);
juicemonitor.adbitt = randbit;
juicemonitor.theurl = _root._url;
juicemonitor.campaignid = camp;
juicemonitor.sendAndLoad("http://www.juiceometer.com/juicevisit.php" + adbit, juicemonitor, "POST");
}
function juiceplay() {
var randbit = (Math.random() * 1000000);
var adbit = ("?randbit=" + randbit);
juicemonitor.adbitt = randbit;
juicemonitor.theurl = _root._url;
juicemonitor.campaignid = camp;
juicemonitor.sendAndLoad("http://www.juiceometer.com/juiceplay.php" + adbit, juicemonitor, "POST");
}
function juicein(aclicknum) {
var randbit = (Math.random() * 1000000);
var adbit = ("?randbit=" + randbit);
juicemonitor.adbitt = randbit;
juicemonitor.theurl = _root._url;
juicemonitor.campaignid = camp;
juicemonitor.clicknum = aclicknum;
juicemonitor.sendAndLoad("http://www.juiceometer.com/juicein.php" + adbit, juicemonitor, "POST");
}
function juicetime() {
var randbit = (Math.random() * 1000000);
var adbit = ("?randbit=" + randbit);
juicetimemonitor.adbitt = randbit;
juicetimemonitor.campaignid = camp;
juicetimemonitor.sendAndLoad("http://www.juiceometer.com/juicetime.php" + adbit, juicetimemonitor, "POST");
}
var camp = 34;
var sendload = new LoadVars();
sendload.onLoad = sentstuff;
var juicemonitor = new LoadVars();
juicemonitor.onLoad = gotjuice;
var juicetimemonitor = new LoadVars();
juicetimemonitor.onLoad = gotjuicetime;
juicevisit();
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndPlay (2);
}
Frame 4
var aha = new Sound();
aha.attachSound("aha");
var oh = new Sound();
oh.attachSound("oahh");
var finale = new Sound();
finale.attachSound("finale");
stop();
Frame 8
function dealnoise() {
dealsound.start(0, 1);
}
var globalsound = new Sound();
globalsound.setVolume(40);
var dealsound = new Sound(fps);
dealsound.attachSound("deal");
dealsound.setVolume(70);
Frame 10
function setup() {
zcount = 1;
var c = 0;
while (c < 26) {
thisclip = ocard.duplicateMovieClip("girl" + c, zcount);
thisclip._x = -220;
thisclip._y = 30;
zcount++;
thisclip = ocard.duplicateMovieClip("ngirl" + c, zcount);
thisclip._x = 450;
thisclip._y = 550;
zcount++;
c++;
}
}
function newlevel() {
vid.playdir = 1;
snaps = 0;
newhand();
gamelevel++;
pack = new Array();
var s = 0;
while (s < 4) {
var n = 1;
while (n < 14) {
var obj = {suit:s, number:n};
pack.push(obj);
n++;
}
s++;
}
shuffle();
hands[0] = new Array();
hands[1] = new Array();
var n = 0;
while (n < 26) {
thisc = pack.pop();
hands[0].push(thisc);
n++;
}
hands[1] = pack;
odealspeed = odealspeed - 1;
dealspeed = odealspeed;
girlsnapspeed = (dealspeed / 2) + (Math.random() * (dealspeed * 1));
}
function deleteallcards() {
var c = 0;
while (c < 26) {
thisclip = eval ("girl" + c);
thisclip.removeMovieClip();
zcount++;
thisclip = eval ("ngirl" + c);
thisclip.removeMovieClip();
zcount++;
c++;
}
}
function newhand() {
cardcount = 0;
counter = 0;
issnap = false;
snapcounter = 0;
usersnapped = false;
girlsnapped = false;
newhandcounter = -1;
poolcards = new Array();
ccard = -1;
ncard = -2;
deleteallcards();
setup();
girlsnapspeed = (dealspeed / 2) + (Math.random() * (dealspeed * 1));
girlhand.removeMovieClip();
userhand.removeMovieClip();
}
function forcesnap() {
var usernum = hands[1][hands[1].length - 1].number;
var m = 0;
while (m < hands[0].length) {
if (hands[0][m].number == usernum) {
var tempcard = hands[0][m];
hands[0].push(tempcard);
hands[0].splice(m, 1);
return(true);
}
m++;
}
return(false);
}
function shuffle() {
var s = 0;
while (s < pack.length) {
var numa = s;
var numb = numa;
while (numb == numa) {
numb = Math.round(Math.random() * (pack.length - 1));
}
var carda = pack[numa];
var cardb = pack[numb];
var tempcard = {suit:carda.suit, number:carda.number};
pack[numa] = {suit:cardb.suit, number:cardb.number};
pack[numb] = {suit:tempcard.suit, number:tempcard.number};
s++;
}
}
function snapped() {
usersnapped = true;
userhand.play();
userhand = ouserhand.duplicateMovieClip("userhand", lastz + 1);
lastz = lastz + 1;
if (issnap) {
if (!girlsnapped) {
girlwon = false;
newhandcounter = 0;
_root.oh.start();
}
} else {
_root.aha.start();
girlwon = true;
girlsnapped = true;
newhandcounter = 0;
issnap = true;
}
}
function sp(anum) {
adj = Math.floor(anum * (fps.fps / 12));
return(adj);
}
var cardcount = 0;
var counter = 0;
var girlsgo = true;
var pack = new Array();
var hands = new Array();
hands[0] = new Array();
hands[1] = new Array();
var poolcards = new Array();
var ccard = -1;
var ncard = -2;
var zcount = 1;
var issnap = false;
var snapcounter = 0;
var usersnapped = false;
var girlsnapped = false;
var newhandcounter = -1;
var snaps = 0;
var pausecounter = 0;
var lastz = 1;
var girlwon = false;
ouserhand._visible = false;
ogirlhand._visible = false;
var gamelevel = 0;
var timesincesnap = 0;
var odealspeed = 15;
var dealspeed = odealspeed;
var girlsnapspeed = ((dealspeed / 2) + (Math.random() * (dealspeed * 1)));
var loops = new Array(0, {s:1, e:101}, {s:102, e:249}, {s:250, e:450}, {s:451, e:615}, {s:706, e:895}, {s:1040, e:1129}, {s:1040, e:1129}, {s:1040, e:1129}, {s:1040, e:1130}, {s:1040, e:1130});
var gameover = false;
var havelost = false;
setup();
newlevel();
Frame 11
pausecounter++;
if (pausecounter > 5) {
counter++;
if ((counter > sp(dealspeed / 2)) and (counter < sp(dealspeed))) {
girlcarddisp = hands[0].length;
boycarddisp = hands[1].length;
}
if ((counter > sp(dealspeed)) and (!issnap)) {
ccard = ncard;
var z = (cardcount * 10);
dealspeed = dealspeed - 0.2;
if (dealspeed < 8) {
dealspeed = 8;
}
var thiscard = 0;
if (girlsgo) {
if (hands[0].length < 1) {
if (!gameover) {
_root.finale.start();
}
if (gamelevel < 6) {
nextround.shownext();
newlevel();
} else {
gameover = true;
havelost = false;
}
return(false);
}
var thisclip = eval ("girl" + cardcount);
thiscard = hands[0].pop();
} else {
if (hands[1].length < 1) {
if (!gameover) {
_root.aha.start();
}
gameover = true;
havelost = true;
return(false);
}
var thisclip = eval ("ngirl" + cardcount);
thiscard = hands[1].pop();
z = z + 5;
}
poolcards.push(thiscard);
ncard = thiscard.number;
issnap = false;
if (ncard == (ccard + 0)) {
issnap = true;
snaps++;
snapcounter = 0;
dealspeed = (odealspeed + dealspeed) / 2;
} else {
snapcounter++;
if ((snapcounter > (3 + girlsgo)) and (snaps == 0)) {
forcesnap();
}
}
thisclip.swapDepths(z);
lastz = z;
thisclip.changecard(thiscard);
thisclip.dealin(350 + (Math.random() * 10), (150 + (20 * girlsgo)) + (Math.random() * (10 * girlsgo)), 0);
counter = 0;
if (!girlsgo) {
cardcount++;
}
girlsgo = !girlsgo;
if (cardcount > 4) {
var thisclip = eval ("ngirl" + (cardcount - 5));
thisclip.removeMovieClip();
var thisclip = eval ("girl" + (cardcount - 5));
thisclip.removeMovieClip();
}
}
if (issnap and (!girlsnapped)) {
snapcounter++;
if ((snapcounter > sp(girlsnapspeed)) or usersnapped) {
_root.aha.start();
girlsnapped = true;
girlhand = ogirlhand.duplicateMovieClip("girlhand", lastz + 1);
lastz = lastz + 1;
girlhand.play();
if (!usersnapped) {
newhandcounter = 0;
girlwon = true;
}
}
}
if (newhandcounter > -1) {
newhandcounter++;
if (newhandcounter > 12) {
newhand();
} else if (newhandcounter > 10) {
girlhand.pullback();
userhand.pullback();
if (girlwon) {
var c = cardcount;
while (c > (cardcount - 10)) {
var thisclip = eval ("ngirl" + c);
thisclip.targy = 30;
thisclip.targx = -220;
var thisclip = eval ("girl" + c);
thisclip.targy = -30;
thisclip.targx = -220;
c--;
}
hands[0] = poolcards.concat(hands[0]);
} else {
var c = cardcount;
while (c > (cardcount - 10)) {
var thisclip = eval ("ngirl" + c);
thisclip.targy = 550;
thisclip.targx = 450;
var thisclip = eval ("girl" + c);
thisclip.targy = 550;
thisclip.targx = 450;
c--;
}
hands[1] = poolcards.concat(hands[1]);
}
poolcards = new Array();
girlcarddisp = hands[0].length;
boycarddisp = hands[1].length;
}
}
}
Frame 12
gotoAndPlay (11);
Symbol 9 MovieClip Frame 1
function runanim() {
var perc = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
perc = Math.round(perc);
loddisp = ("loading: " + perc) + "%";
}
this.onEnterFrame = runanim;
stop();
Symbol 78 MovieClip Frame 1
function runanim() {
this._y = this._y + ((targy - this._y) / 2);
}
function clicked() {
getURL ("http://www.juiceometer.com/juiceout.php?campaignid=34&clicknum=1&clickdest=http://www.givemepink.com/go/593386/19/9/y/snap", "_blank");
}
function rollover() {
targy = origy - 55;
anim.play();
}
function rolloff() {
targy = origy;
anim.stop();
}
this.onEnterFrame = runanim;
this.onRollOver = rollover;
this.onRollOut = rolloff;
this.onPress = clicked;
targy = this._y;
origy = targy;
anim.stop();
stop();
Symbol 84 Button
on (press) {
getURL ("http://www.juiceometer.com/juiceout.php?campaignid=34&clicknum=0&clickdest=http://www.thelovebot.com", "_blank", "GET");
}
Symbol 90 Button
on (press) {
_root.juiceplay();
gotoAndPlay (5);
}
Symbol 93 MovieClip Frame 1
function getfps() {
framecounter++;
var now = new Date().getTime();
if ((now - lasttime) > 1000) {
lasttime = now;
fps = framecounter;
framecounter = 0;
fpsdisplay = fps;
}
}
this.onEnterFrame = getfps;
var lasttime = new Date().getTime();
var framecounter = 0;
stop();
Symbol 98 Button
on (press) {
_root.juiceplay();
gotoAndPlay (10);
}
Symbol 100 MovieClip Frame 1
function runanim() {
curframe = curframe + playdir;
if ((curframe < _root.loops[_root.gamelevel].s) and (playdir < 0)) {
curframe = _root.loops[_root.gamelevel].s;
playdir = playdir * -1;
}
if ((curframe > _root.loops[_root.gamelevel].e) and (playdir > 0)) {
curframe = _root.loops[_root.gamelevel].e;
playdir = playdir * -1;
}
gotoAndPlay(Math.floor(curframe));
}
this.onEnterFrame = runanim;
var playdir = 1;
var curframe = 1;
var startframe = 1;
gotoAndStop(startframe);
curframe = startframe;
Symbol 102 Button
on (press) {
getURL ("http://www.juiceometer.com/juiceout.php?campaignid=34&clicknum=4&clickdest=http://www.givemepink.com/go/593386/19/9/y/snap", "_blank");
}
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 2
stop();
Symbol 117 MovieClip Frame 3
stop();
Symbol 117 MovieClip Frame 4
stop();
Symbol 119 MovieClip Frame 1
function showsuit() {
sharktype = _parent.suit;
var c = 1;
while (c <= 10) {
var thisclip = eval ("s" + c);
thisclip.gotoAndStop(_parent.suit + 1);
c++;
}
this._quality = "BEST";
}
var sharktype = _parent.suit;
showsuit();
stop();
Symbol 119 MovieClip Frame 2
showsuit();
stop();
Symbol 119 MovieClip Frame 3
showsuit();
stop();
Symbol 119 MovieClip Frame 4
showsuit();
stop();
Symbol 119 MovieClip Frame 5
showsuit();
stop();
Symbol 119 MovieClip Frame 6
showsuit();
stop();
Symbol 119 MovieClip Frame 7
showsuit();
stop();
Symbol 119 MovieClip Frame 8
showsuit();
stop();
Symbol 119 MovieClip Frame 9
showsuit();
stop();
Symbol 119 MovieClip Frame 10
showsuit();
stop();
Symbol 119 MovieClip Frame 11
showsuit();
stop();
Symbol 119 MovieClip Frame 12
showsuit();
stop();
Symbol 119 MovieClip Frame 13
showsuit();
stop();
Symbol 124 MovieClip Frame 1
function resetme() {
this._y = origy;
waituntil = 0;
counter = 0;
cardback._visible = true;
dealt = false;
}
function dealin(atarg, anxtarg, await) {
dealt = true;
targy = atarg;
targx = anxtarg;
waituntil = await;
_root.dealnoise();
}
function runanim() {
if (dealt) {
counter++;
if (counter > waituntil) {
if (uped < 10) {
changecard({number:thenumber, suit:suit});
uped++;
}
rotam = (this._rotation - destrot) / 4;
moveam = (this._y - targy) / 2;
if (Math.abs(moveam) < 1) {
this._y = targy;
desrot = this._rotation;
} else {
this._rotation = this._rotation - rotam;
this._y = this._y - moveam;
}
moveam = (this._x - targx) / 2;
if (Math.abs(moveam) < 1) {
this._x = targx;
} else {
this._x = this._x - moveam;
}
}
}
}
function randcard() {
if (!hidden) {
cardback._visible = false;
}
thenumber = 1 + Math.round(Math.random() * 12);
suit = Math.round(Math.random() * 3);
topsymbol.gotoAndPlay(suit + 1);
bottomsymbol.gotoAndPlay(suit + 1);
midnumbers.gotoAndPlay(thenumber);
midnumbers.showsuit();
var dnumber = thenumber;
if (thenumber == 11) {
dnumber = "J";
}
if (thenumber == 12) {
dnumber = "Q";
}
if (thenumber == 13) {
dnumber = "K";
}
if (thenumber == 1) {
dnumber = "A";
}
topnumber.textfield.html = true;
topnumber.thenumber = ((("<P ALIGN=\"CENTER\"><FONT COLOR=\"" + suitcolours[suit]) + "\">") + dnumber) + "</FONT></P>";
bottomnumber.thenumber = "5";
}
function changecard(acard) {
if (!hidden) {
cardback._visible = false;
}
this.enabled = true;
thenumber = acard.number;
suit = acard.suit;
topsymbol.gotoAndStop(suit + 1);
bottomsymbol.gotoAndStop(suit + 1);
midnumbers.gotoAndStop(thenumber);
midnumbers.showsuit();
var dnumber = thenumber;
if (thenumber == 11) {
dnumber = "J";
}
if (thenumber == 12) {
dnumber = "Q";
}
if (thenumber == 13) {
dnumber = "K";
}
if (thenumber == 1) {
dnumber = "A";
}
topnumber.thenumber = ((("<P ALIGN=\"CENTER\"><b><FONT COLOR=\"" + suitcolours[suit]) + "\">") + dnumber) + "</FONT></b></P>";
bottomnumber.thenumber = ((("<P ALIGN=\"CENTER\"><b><FONT COLOR=\"" + suitcolours[suit]) + "\">") + dnumber) + "</FONT></b></P>";
}
function showcard() {
cardback._visible = false;
}
function hidecard() {
cardback._visible = true;
}
function clickedme() {
_root.snapped();
}
var suitnames = new Array("hearts", "diamonds", "spades", "clubs");
var suitcolours = new Array("#FF0000", "#FF0000", "#000000", "#000000");
var thenumber = 1;
var suit = 0;
var dealt = false;
var hidden = false;
greyout._visible = false;
this.enabled = false;
this.onEnterFrame = runanim;
this._rotation = 50 - (Math.random() * 100);
var origy = this._y;
var destrot = (2 - (Math.random() * 4));
var targy = 160;
var targx = 160;
var counter = 0;
var waituntil = 0;
var uped = 0;
this.onPress = clickedme;
stop();
Symbol 139 MovieClip Frame 1
function pullback() {
this._x = this._x + 100;
this._y = this._y + 100;
}
Symbol 139 MovieClip Frame 3
stop();
Symbol 144 MovieClip Frame 1
function pullback() {
this._x = this._x - 100;
this._y = this._y - 100;
}
Symbol 144 MovieClip Frame 3
stop();
Symbol 147 MovieClip Frame 1
function shownext() {
this._visible = true;
counter = 0;
}
function runanim() {
if (this._visible) {
counter++;
if (counter > 20) {
this._visible = false;
}
}
}
this.onEnterFrame = runanim;
var counter = 0;
this._visible = false;
stop();
Symbol 158 Button
on (press) {
getURL ("http://www.juiceometer.com/juiceout.php?campaignid=34&clicknum=3&clickdest=http://galleries.givemepink.com/catalin/05/m1/593386/19/9/n/snap/index.html", "_blank", "GET");
}
Symbol 159 MovieClip Frame 1
function runanim() {
if (_root.gameover and (!_root.havelost)) {
this.swapDepths(1000000);
if (_root.firstgame) {
targx = -400;
} else {
targx = 195;
topbit = "Well Done!";
var minsbit = _root.mins;
if (minsbit < 1) {
minsbit = "";
} else if (minsbit < 2) {
minsbit = " 1 minute ";
} else {
minsbit = minsbit + " minutes ";
}
var secsbit = _root.secs;
if (secsbit < 1) {
secsbit = "exactly.";
} else if (secsbit < 2) {
secsbit = "1 second.";
} else {
secsbit = secsbit + " seconds.";
}
if ((minsbit != "") and (secsbit != "exactly.")) {
secsbit = "and " + secsbit;
}
maintext = ((((("You found all the pairs in " + minsbit) + "") + secsbit) + "\nIt took you only ") + _root.movesmade) + " moves!";
}
} else {
targx = -400;
}
this._x = this._x + ((targx - this._x) / 4);
}
this.onEnterFrame = runanim;
stop();
Symbol 164 Button
on (press) {
_root.gotoAndPlay(5);
}
Symbol 167 MovieClip Frame 1
function runanim() {
if (_root.timeup) {
if (_root.firstgame) {
targx = -400;
} else {
targx = 195;
topbit = "Well Done!";
var minsbit = _root.mins;
if (minsbit < 1) {
minsbit = "";
} else if (minsbit < 2) {
minsbit = " 1 minute ";
} else {
minsbit = minsbit + " minutes ";
}
var secsbit = _root.secs;
if (secsbit < 1) {
secsbit = "exactly.";
} else if (secsbit < 2) {
secsbit = "1 second.";
} else {
secsbit = secsbit + " seconds.";
}
if ((minsbit != "") and (secsbit != "exactly.")) {
secsbit = "and " + secsbit;
}
maintext = ((((("You found all the pairs in " + minsbit) + "") + secsbit) + "\nIt took you only ") + _root.movesmade) + " moves!";
}
} else {
targx = -400;
}
this._x = this._x + ((targx - this._x) / 4);
}
this.onEnterFrame = runanim;
stop();
Symbol 172 Button
on (press) {
getURL ("http://www.juiceometer.com/juiceout.php?campaignid=34&clicknum=2&clickdest=http://galleries.givemepink.com/catalin/05/m1/593386/19/9/n/snap/index.html", "_blank", "GET");
}
Symbol 174 Button
on (press) {
_root.juiceplay();
_root.deleteallcards();
_root.gotoAndPlay(9);
}
Symbol 175 MovieClip Frame 1
function runanim() {
if (_root.gameover and _root.havelost) {
this.swapDepths(1000000);
if (_root.firstgame) {
targx = -400;
} else {
targx = 195;
topbit = "Well Done!";
var minsbit = _root.mins;
if (minsbit < 1) {
minsbit = "";
} else if (minsbit < 2) {
minsbit = " 1 minute ";
} else {
minsbit = minsbit + " minutes ";
}
var secsbit = _root.secs;
if (secsbit < 1) {
secsbit = "exactly.";
} else if (secsbit < 2) {
secsbit = "1 second.";
} else {
secsbit = secsbit + " seconds.";
}
if ((minsbit != "") and (secsbit != "exactly.")) {
secsbit = "and " + secsbit;
}
maintext = ((((("You found all the pairs in " + minsbit) + "") + secsbit) + "\nIt took you only ") + _root.movesmade) + " moves!";
}
} else {
targx = -400;
}
this._x = this._x + ((targx - this._x) / 4);
}
this.onEnterFrame = runanim;
stop();