Frame 1
function loadSWF(theMCLoader, theListener, theSWF, theClip, theTargetClip, theDepthClip, theLoaderClip, theDestination, theX, theY, createClip) {
trace(theSWF);
theTargetClip[theMCLoader] = undefined;
theTargetClip[theListener] = undefined;
theTargetClip[theMCLoader] = new MovieClipLoader();
theTargetClip[theListener] = new Object();
theTargetClip[theListener].onLoadStart = function (target_mc) {
trace("*********First my_mcl instance*********");
trace("Your load has begun on movie clip = " + target_mc);
var _local1 = theTargetClip[theMCLoader].getProgress(target_mc);
trace(_local1.bytesLoaded + " = bytes loaded at start");
trace(_local1.bytesTotal + " = bytes total at start");
};
theTargetClip[theListener].onLoadProgress = function (target_mc, loadedBytes, totalBytes) {
trace("*********First my_mcl instance Progress*********");
trace("onLoadProgress() called back on movie clip " + target_mc);
trace(loadedBytes + " = bytes loaded at progress callback");
trace(totalBytes + " = bytes total at progress callback");
theFrame = int(100 * (loadedBytes / totalBytes));
if (theLoaderClip != "none") {
theLoaderClip.percentage = theFrame + "%";
}
};
theTargetClip[theListener].onLoadComplete = function (target_mc) {
trace("*********First my_mcl instance*********");
trace("Your load is done on movie clip = " + target_mc);
var _local1 = theTargetClip[theMCLoader].getProgress(target_mc);
trace(_local1.bytesLoaded + " = bytes loaded at end");
trace(_local1.bytesTotal + " = bytes total at end");
trace(target_mc._lockroot);
};
theTargetClip[theListener].onLoadInit = function (target_mc) {
trace("*********First my_mcl instance*********");
trace(("Movie clip = " + target_mc) + " is now initialized");
target_mc._x = theX;
target_mc._y = theY;
theTargetClip[theMCLoader].removeListener(theTargetClip[theListener]);
play();
};
theTargetClip[theListener].onLoadError = function (target_mc, errorCode) {
trace("*********First my_mcl instance*********");
trace("ERROR CODE = " + errorCode);
trace(("Your load failed on movie clip = " + target_mc) + newline);
};
theTargetClip[theMCLoader].addListener(theTargetClip[theListener]);
if (createClip) {
theTargetClip.createEmptyMovieClip(theClip, theDepthClip.getDepth());
}
theTargetClip[theMCLoader].loadClip(theSWF, theClip);
return(theTargetClip[theClip]);
}
function GSNHidePopups() {
GSNScore = 0;
_global.GSNScore = 0;
shareMC._visible = false;
highscoresMC._visible = false;
brokenMC._visible = false;
sendscoreMC._visible = false;
popupCoverMC._visible = false;
}
function GSNShare() {
this.attachMovie("share_popup", "shareMC", shareMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:true});
this.attachMovie("placeholder", "highscoresMC", highscoresMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "sendscoreMC", sendscoreMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "brokenMC", brokenMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "popupCoverMC", popupCoverMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false, _width:_global.GameWidth, _height:_global.GameHeight});
}
function GSNHighScores() {
this.attachMovie("placeholder", "shareMC", shareMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("highscores_popup", "highscoresMC", highscoresMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:true});
this.attachMovie("placeholder", "sendscoreMC", sendscoreMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "brokenMC", brokenMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "popupCoverMC", popupCoverMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false, _width:_global.GameWidth, _height:_global.GameHeight});
}
function GSNSendScore() {
trace("SHOW SEND SCORE");
this.attachMovie("placeholder", "shareMC", shareMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "highscoresMC", highscoresMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("sendscore_popup", "sendscoreMC", sendscoreMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:true});
this.attachMovie("placeholder", "brokenMC", brokenMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("popup_cover", "popupCoverMC", popupCoverMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false, _width:_global.GameWidth, _height:_global.GameHeight});
}
function GSNBroken() {
this.attachMovie("placeholder", "shareMC", shareMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "highscoresMC", highscoresMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("placeholder", "sendscoreMC", sendscoreMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:false});
this.attachMovie("broken_popup", "brokenMC", brokenMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:true});
this.attachMovie("popup_cover", "popupCoverMC", popupCoverMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight / 2, _visible:true, _width:_global.GameWidth, _height:_global.GameHeight});
}
function setMyText(theClip, theTextField) {
theText = theClip[theTextField] + " ";
theWord = "<id>";
while (theText.indexOf(theWord) != -1) {
textLoc = theText.indexOf(theWord);
str1 = theText.slice(0, textLoc);
str2 = theText.slice(textLoc + theWord.length, -1);
theText = (str1 + _global.GameID) + str2;
}
theWord = "<swf>";
if (_global.GameType) {
theSWF = "gsn_wrapper.swf?gameID=" + _global.GameID;
} else {
theSWF = _global.GameSWF + ".swf";
}
while (theText.indexOf(theWord) != -1) {
textLoc = theText.indexOf(theWord);
str1 = theText.slice(0, textLoc);
str2 = theText.slice(textLoc + theWord.length, -1);
theText = (str1 + theSWF) + str2;
}
theWord = "<dir>";
while (theText.indexOf(theWord) != -1) {
textLoc = theText.indexOf(theWord);
str1 = theText.slice(0, textLoc);
str2 = theText.slice(textLoc + theWord.length, -1);
theText = (str1 + _global.GameDIR) + str2;
}
theWord = "<width>";
while (theText.indexOf(theWord) != -1) {
textLoc = theText.indexOf(theWord);
str1 = theText.slice(0, textLoc);
str2 = theText.slice(textLoc + theWord.length, -1);
theText = (str1 + _global.GameWidth) + str2;
}
theWord = "<height>";
if (_global.GameType) {
theHeight = _global.GameHeight + 50;
} else {
theHeight = _global.GameHeight;
}
while (theText.indexOf(theWord) != -1) {
textLoc = theText.indexOf(theWord);
str1 = theText.slice(0, textLoc);
str2 = theText.slice(textLoc + theWord.length, -1);
theText = (str1 + theHeight) + str2;
}
theClip[theTextField] = theText;
}
_global.Wrapper = this;
_global.PHPServer = "http://www.gsn.com/minigames/assets/";
_global.SWFServer = "http://www.gsn.com/minigames/swfs/";
GSNScore = 0;
_global.GSNScore = 0;
var my_lv = new LoadVars();
if (gameID == VOID) {
gameID = 9;
}
my_lv.id = gameID;
my_lv.nocach = getTimer();
my_lv.onLoad = function (success) {
trace(success);
trace(my_lv.fresult);
if (success && (my_lv.fresult != "")) {
_global.GameArray = my_lv.fresult.split("|");
_global.GSN_URL = "http://www.gsn.com/";
trace(_global.GameArray);
_global.GameID = _global.GameArray[0];
_global.GameWidth = int(_global.GameArray[4]);
_global.GameHeight = int(_global.GameArray[5]);
_global.GameSWF = _global.GameArray[3];
_global.GameDIR = _global.GameArray[6];
_global.GameType = int(_global.GameArray[_global.GameArray.length - 1]);
play();
} else {
trace("NO GAME DATA FOUND");
}
};
stop();
my_lv.sendAndLoad(_global.PHPServer + "gsnwrapper.php", my_lv, "POST");
Frame 2
_global.GameClip = loadSWF("gameLoader", "gameListener", (_global.SWFServer + _global.GameSWF) + ".swf", "GSNgameMC", this, this.gameMC, this.loaderMC, 0, 0, 0, true);
_global.GameMovieClip = GSNgameMC;
_global.GameMovieClip._lockroot = true;
stop();
Instance of Symbol 178 MovieClip "loaderMC" in Frame 2
onClipEvent (load) {
this._x = _global.GameWidth / 2;
this._y = _global.GameHeight / 2;
}
Instance of Symbol 173 MovieClip [placeholder] "sendscoreMC" in Frame 2
onClipEvent (load) {
this._visible = false;
}
Frame 3
_global.GameMovieClip._lockroot = true;
this.loaderMC._visible = false;
this.attachMovie("navbar", "navMC", navMC.getDepth(), {_x:_global.GameWidth / 2, _y:_global.GameHeight + 25});
stop();
this.onEnterFrame = function () {
if ((GSNScore != 0) && (sendscoreMC._visible == false)) {
_global.GSNScore = GSNScore;
}
if ((_global.GSNScore != 0) && (sendscoreMC._visible == false)) {
trace("GOT HIGH SCORE");
this.GSNSendScore();
}
};
Symbol 13 Button
on (press) {
_global.PlayerName = playerName.toUpperCase();
if ((((_global.PlayerName.length > 0) && (_global.PlayerName != " ")) && (_global.PlayerName != " ")) && (_global.PlayerName != " ")) {
if (checkText(_global.PlayerName, "0123456789@._!#$%^&*()=+|[]{};:<>,?/\\\"")) {
gotoAndStop ("invalid entry");
} else if (FilterName(_global.PlayerName)) {
gotoAndStop ("invalid entry");
} else {
_global.UserInitials = _global.PlayerName;
gotoAndPlay ("submit");
}
}
}
Symbol 29 Button
on (press) {
gotoAndPlay ("got high score");
}
Symbol 30 MovieClip [sendscore_popup] Frame 1
trace("SUBMIT SCORE");
playername = "";
if (_global.GamePlayTime == undefined) {
trace("UNDEFINDED");
_global.GamePlayTime = getTimer();
_global.LastGamePlayTime = getTimer();
} else {
_global.GamePlayTime = getTimer() - _global.LastGamePlayTime;
_global.LastGamePlayTime = getTimer();
}
trace(_global.GamePlayTime);
theURL = _global.PHPServer + "gsnstats.php";
var my_lv = new LoadVars();
my_lv.gID = _global.GameID;
my_lv.gT = _global.GamePlayTime / 1000;
my_lv.nocach = getTimer();
my_lv.onLoad = function (success) {
trace(my_lv.fresult);
if (success) {
trace("Data has been sent and loaded successfully...");
gotoAndPlay ("get high scores");
} else {
trace("You have problem now...");
}
};
my_lv.sendAndLoad(theURL, my_lv, "POST");
stop();
Symbol 30 MovieClip [sendscore_popup] Frame 2
playername = "";
theURL = _global.PHPServer + "gsnscores.php";
var my_lv = new LoadVars();
my_lv.action = 1;
my_lv.gID = _global.GameID;
my_lv.numS = 50;
my_lv.order = 0;
my_lv.nocach = getTimer();
my_lv.onLoad = function (success) {
trace(my_lv.fresult);
if (success) {
theScores = my_lv.fresult.split(",");
trace(theScores);
highscores = "";
theItem = theScores[theScores.length - 1].split("|");
trace("Data has been sent and loaded successfully...");
if (theScores.length >= 50) {
_global.MinimumScore = int(String(theItem[2]));
} else {
_global.MinimumScore = 0;
}
trace("MIN SCORE = " + _global.MinimumScore);
if (int(_global.GSNScore) > int(_global.MinimumScore)) {
trace("GREATER");
_parent.popupCoverMC._visible = true;
gotoAndPlay ("got high score");
} else {
_global.GSNScore = 0;
_parent.GSNScore = 0;
_parent.sendscoreMC._visible = false;
}
} else {
trace("You have problem now...");
}
};
my_lv.sendAndLoad(theURL, my_lv, "POST");
stop();
Symbol 30 MovieClip [sendscore_popup] Frame 4
theURL = _global.PHPServer + "gsnfilter.txt";
var my_lv = new LoadVars();
my_lv.onData = function (src) {
if (src == undefined) {
trace("Error loading content.");
return(undefined);
}
_global.Filter = src.split(",");
trace(_global.Filter);
gotoAndPlay ("got filter");
};
my_lv.load(theURL);
stop();
Symbol 30 MovieClip [sendscore_popup] Frame 7
function FilterName(theName) {
f = 0;
while (f < _global.Filter.length) {
if (theName.toUpperCase() == _global.Filter[f]) {
return(true);
}
f++;
}
return(false);
}
function checkText(theText, theInvalidChars) {
c = 0;
while (c < theInvalidChars.length) {
if (theText.indexOf(theInvalidChars.substr(c, 1)) >= 0) {
return(true);
}
c++;
}
return(false);
}
if (_global.UserInitials != undefined) {
playerName = _global.UserInitials;
}
Selection.setFocus("initials");
stop();
Symbol 30 MovieClip [sendscore_popup] Frame 8
Symbol 30 MovieClip [sendscore_popup] Frame 11
function convertBinaryToHex(theValue) {
theHexValue = "";
theBinaryValue = String(theValue);
do {
theBinaryValue = "0" + theBinaryValue;
} while ((theBinaryValue.length % 4) != 0);
do {
theCurrentNum = theBinaryValue.slice(0, 4);
if (theCurrentNum == "0000") {
if (theHexValue != "") {
theHexValue = theHexValue + "0";
}
} else if (theCurrentNum == "0001") {
theHexValue = theHexValue + "1";
} else if (theCurrentNum == "0010") {
theHexValue = theHexValue + "2";
} else if (theCurrentNum == "0011") {
theHexValue = theHexValue + "3";
} else if (theCurrentNum == "0100") {
theHexValue = theHexValue + "4";
} else if (theCurrentNum == "0101") {
theHexValue = theHexValue + "5";
} else if (theCurrentNum == "0110") {
theHexValue = theHexValue + "6";
} else if (theCurrentNum == "0111") {
theHexValue = theHexValue + "7";
} else if (theCurrentNum == "1000") {
theHexValue = theHexValue + "8";
} else if (theCurrentNum == "1001") {
theHexValue = theHexValue + "9";
} else if (theCurrentNum == "1010") {
theHexValue = theHexValue + "A";
} else if (theCurrentNum == "1011") {
theHexValue = theHexValue + "B";
} else if (theCurrentNum == "1100") {
theHexValue = theHexValue + "C";
} else if (theCurrentNum == "1101") {
theHexValue = theHexValue + "D";
} else if (theCurrentNum == "1110") {
theHexValue = theHexValue + "E";
} else if (theCurrentNum == "1111") {
theHexValue = theHexValue + "F";
}
theBinaryValue = theBinaryValue.slice(4, theBinaryValue.length);
} while (theBinaryValue.length != 0);
return(theHexValue);
}
function convertDecimalToBinary(theValue) {
theBinaryValue = "";
if (theValue == 0) {
return("0");
}
do {
theBinaryValue = (theValue % 2) + theBinaryValue;
theValue = Math.floor(theValue / 2);
} while (theValue != 0);
return(theBinaryValue);
}
function convertDecimalToHex(theValue) {
theBinaryValue = convertDecimalToBinary(theValue);
return(convertBinaryToHex(theBinaryValue));
}
var my_lv = new LoadVars();
theURL = _global.PHPServer + "gsnscores.php";
my_lv.action = 2;
my_lv.gID = _global.GameID;
my_lv.uN = _global.PlayerName.toUpperCase();
my_lv.uS = _global.GSNScore;
my_lv.numS = 50;
my_lv.order = 0;
my_lv.uC = convertDecimalToHex(_global.GSNScore + 4356);
my_lv.nocach = getTimer();
my_lv.onLoad = function (success) {
trace(my_lv.fresult);
if (success) {
trace("Data has been sent and loaded successfully...");
gotoAndStop ("score sent");
} else {
trace("You have problem now...");
}
};
my_lv.sendAndLoad(theURL, my_lv, "POST");
stop();
Symbol 30 MovieClip [sendscore_popup] Frame 12
_global.GSNScore = 0;
_parent.GSNScore = 0;
_parent.GSNHidePopups();
stop();
Symbol 30 MovieClip [sendscore_popup] Frame 13
stop();
Instance of Symbol 32 MovieClip in Symbol 33 MovieClip [popup_cover] Frame 1
on (press) {
}
on (release) {
}
Symbol 63 MovieClip Frame 1
muted = false;
gotoAndStop (2);
Symbol 63 MovieClip Frame 2
toggleBut.onPress = function () {
_global.GameMovieClip.GSNSFXToggle(muted);
muted = true;
gotoAndStop (3);
};
Symbol 63 MovieClip Frame 3
toggleBut.onPress = function () {
_global.GameMovieClip.GSNSFXToggle(muted);
muted = false;
gotoAndStop (2);
};
Symbol 64 MovieClip [navbar] Frame 1
playButton.onPress = function () {
if (_global.GameMovieClip.GSNPlay()) {
trace("GSN PLAY");
_parent.GSNHidePopups();
} else {
trace("GSN PLAY NOT ACTIVE");
_parent.GSNBroken();
}
};
helpButton.onPress = function () {
if (_global.GameMovieClip.GSNHelp()) {
trace("GSN HELP");
_parent.GSNHidePopups();
} else {
trace("GSN HELP NOT ACTIVE");
_parent.GSNBroken();
}
};
aboutButton.onPress = function () {
if (_global.GameMovieClip.GSNAbout()) {
trace("GSN ABOUT");
_parent.GSNHidePopups();
} else {
trace("GSN ABOUT NOT ACTIVE");
_parent.GSNBroken();
}
};
shareButton.onPress = function () {
if (_global.GameMovieClip.GSNShare()) {
trace("GSN Share");
_parent.GSNShare();
} else {
trace("GSN HELP NOT ACTIVE");
_parent.GSNBroken();
}
};
scoresButton.onPress = function () {
if (_global.GameMovieClip.GSNScores()) {
trace("GSN HIGH SCORES");
_parent.GSNHighScores();
} else {
trace("GSN HELP NOT ACTIVE");
_parent.GSNBroken();
}
};
Symbol 69 MovieClip Frame 1
GSN.onPress = function () {
getURL (_global.GSN_URL, "_blank");
};
Symbol 76 MovieClip Frame 10
stop();
Symbol 85 MovieClip Frame 10
stop();
Symbol 91 MovieClip Frame 10
stop();
Symbol 102 Button
on (press) {
errorState = false;
if (email1 == undefined) {
email1 = "";
}
if (email2 == undefined) {
email2 = "";
}
if (email3 == undefined) {
email3 = "";
}
emails = "";
if (email1 != "") {
emails = (emails + email1) + ",";
}
if (email2 != "") {
emails = (emails + email2) + ",";
}
if (email3 != "") {
emails = (emails + email3) + ",";
}
emails = emails.substr(0, emails.length - 1);
trace(emails);
if (uname == undefined) {
uname = "";
}
if (tmessage == undefined) {
tmessage = "";
}
recipientEmails = emails.split(",");
r = 0;
while (r < recipientEmails.length) {
if ((((((checkText(recipientEmails[r], " `!#$%^&*()=+|'[]{};:<>,?/\\\"") || (recipientEmails[r].indexOf(" ") != -1)) || (recipientEmails[r].indexOf("@") == -1)) || (recipientEmails[r].indexOf(".") == -1)) || (recipientEmails[r].length < 6)) || (recipientEmails[r].lastIndexOf(".") < recipientEmails[r].indexOf("@"))) || (recipientEmails[r].lastIndexOf("@") != recipientEmails[r].indexOf("@"))) {
_parent.errorbox._visible = true;
_parent.errorbox.theText = "Sorry, one or more of the email addresses you entered is invalid. Please try again.";
errorState = true;
break;
}
r++;
}
if ((uname.length < 1) && (!errorState)) {
_parent.errorbox.theText = "Please enter your name and try again.";
_parent.errorbox._visible = true;
errorState = true;
}
trace(emails);
if (!errorState) {
theUrl = _global.PHPServer + "gsnmail.php";
var my_lv = new LoadVars();
my_lv.gID = _global.GameID;
my_lv.name = uname;
my_lv.to = emails;
my_lv.message = tmessage;
my_lv.nocach = getTimer();
trace(my_lv.to);
my_lv.onLoad = function (success) {
trace(my_lv.fresult);
if (success) {
if (my_lv.fresult == "sent") {
trace("Data has been sent and loaded successfully...");
_parent.gotoAndStop(3);
} else {
trace("There was an error from the PHP.");
}
} else {
trace("You have problem now...");
}
};
my_lv.sendAndLoad(theUrl, my_lv, "POST");
this._visible = false;
_parent.gotoAndStop(2);
}
}
Symbol 109 MovieClip Frame 1
function checkText(theText, theInvalidChars) {
i = 0;
while (i < theInvalidChars.length) {
if (theText.indexOf(theInvalidChars.substr(i, 1)) >= 0) {
return(true);
}
i++;
}
return(false);
}
Symbol 115 Button
on (press) {
this._visible = false;
}
Symbol 122 MovieClip Frame 11
stop();
Symbol 127 Button
on (press) {
_parent.sharefields.email1 = "";
_parent.sharefields.email2 = "";
_parent.sharefields.email3 = "";
_parent.sharefields._visible = true;
_parent.gotoAndStop(1);
}
Symbol 128 MovieClip Frame 10
stop();
Symbol 129 MovieClip Frame 1
stop();
Instance of Symbol 116 MovieClip "errorbox" in Symbol 129 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 129 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 3
stop();
Symbol 146 MovieClip [share_popup] Frame 1
stop();
emailButton.onPress = function () {
gotoAndStop (2);
};
embedButton.onPress = function () {
gotoAndStop (3);
};
linkButton.onPress = function () {
gotoAndStop (4);
};
Symbol 146 MovieClip [share_popup] Frame 2
stop();
Instance of Symbol 129 MovieClip in Symbol 146 MovieClip [share_popup] Frame 2
onClipEvent (load) {
if (_global.PHPServer == undefined) {
_global.PHPServer = "http://www.splashworks.com/php/";
_global.GameID = 1;
}
}
Symbol 146 MovieClip [share_popup] Frame 3
stop();
doneButton.onPress = function () {
gotoAndStop (1);
};
Instance of Symbol 136 MovieClip in Symbol 146 MovieClip [share_popup] Frame 3
onClipEvent (load) {
_global.Wrapper.setMyText(this, "embed");
}
Symbol 146 MovieClip [share_popup] Frame 4
stop();
doneButton.onPress = function () {
gotoAndStop (1);
};
Instance of Symbol 145 MovieClip in Symbol 146 MovieClip [share_popup] Frame 4
onClipEvent (load) {
_global.Wrapper.setMyText(this, "url");
}
Symbol 150 MovieClip Frame 14
gotoAndPlay ("loadback");
Symbol 160 Button
on (press) {
_global.scrollSpeed = 10;
}
on (release) {
_global.scrollSpeed = 0;
}
on (releaseOutside) {
_global.scrollSpeed = 0;
}
Symbol 163 Button
on (press) {
_global.scrollSpeed = -10;
}
on (release) {
_global.scrollSpeed = 0;
}
on (releaseOutside) {
_global.scrollSpeed = 0;
}
Symbol 164 Button
on (press) {
_global.autoScroll = true;
}
on (release) {
_global.autoScroll = false;
}
on (releaseOutside) {
_global.autoScroll = false;
}
Symbol 170 MovieClip Frame 1
theURL = _global.PHPServer + "gsnscores.php";
var my_lv = new LoadVars();
my_lv.action = 1;
my_lv.gID = _global.GameID;
my_lv.numS = 50;
my_lv.order = 0;
my_lv.nocach = getTimer();
my_lv.onLoad = function (success) {
trace(my_lv.fresult);
if (success) {
theScores = my_lv.fresult.split(",");
trace(theScores);
_global.HighScores = theScores;
trace("Data has been sent and loaded successfully...");
gotoAndStop (2);
} else {
trace("You have problem now...");
}
};
my_lv.sendAndLoad(theURL, my_lv, "POST");
stop();
Symbol 170 MovieClip Frame 2
theURL = _global.PHPServer + "gsnfilter.txt";
var my_lv = new LoadVars();
my_lv.onData = function (src) {
if (src == undefined) {
trace("Error loading content.");
return(undefined);
}
_global.Filter = src.split(",");
trace(_global.Filter);
gotoAndPlay (3);
};
my_lv.load(theURL);
stop();
Symbol 170 MovieClip Frame 4
stop();
Instance of Symbol 157 MovieClip in Symbol 170 MovieClip Frame 4
onClipEvent (load) {
function FilterName(theName) {
f = 0;
while (f < _global.Filter.length) {
if (theName.toUpperCase() == _global.Filter[f]) {
return(true);
}
f++;
}
return(false);
}
theListClip = this.list_data;
s = 0;
while (s < _global.HighScores.length) {
theData = _global.HighScores[s].split("|");
if (FilterName(theData[1])) {
theListClip.duplicateMovieClip("list_data" + s, (this.list_data.getDepth() + 1) + s, {theNum:theData[0], theName:"AAA", theScore:theData[2], _x:0, _y:this.list_data._y + (s * 25)});
} else {
theListClip.duplicateMovieClip("list_data" + s, (this.list_data.getDepth() + 1) + s, {theNum:theData[0], theName:theData[1], theScore:theData[2], _x:0, _y:this.list_data._y + (s * 25)});
}
s++;
}
this.startY = this._y;
this.list_data._visible = false;
_global.scrollSpeed = 0;
_global.autoScroll = false;
this.initSBY = _parent.scrollBox._y;
this.initY = this._y;
this.SBHeight = 83;
}
onClipEvent (enterFrame) {
if (_global.autoScroll) {
_parent.scrollBox._y = Math.min(this.initSBY + this.SBHeight, Math.max(this.initSBY, _parent._ymouse));
if (this._height > (_parent.theMask._height - 10)) {
this._y = this.initY + (((_parent.scrollBox._y - this.initSBY) / this.SBHeight) * (((-this._height) + _parent.theMask._height) - 10));
}
} else {
if (_global.scrollSpeed < 0) {
this._y = Math.max(this._y + _global.scrollSpeed, Math.min(this.startY, ((this.startY - this._height) + _parent.theMask._height) - 10));
_global.scrollSpeed = Math.max(-20, _global.scrollSpeed - 1);
} else if (_global.scrollSpeed > 0) {
this._y = Math.min(this._y + _global.scrollSpeed, this.startY);
_global.scrollSpeed = Math.min(20, _global.scrollSpeed + 1);
}
_parent.scrollBox._y = this.initSBY + (((this._y - this.initY) / (((-this._height) + _parent.theMask._height) - 10)) * this.SBHeight);
}
}