Frame 1
Stage.scaleMode = "showAll";
_global.gameWidth_int = 736.8;
_global.gameHeight_int = 512;
this.createEmptyMovieClip("preload_mc", 1);
var preloader = new Object();
preloader.width = 149.3;
preloader.height = 37.9;
preload_mc._x = (Stage.width - preloader.width) / 2;
preload_mc._y = (Stage.height - preloader.height) / 2;
preload_mc.loadMovie("preloader.swf");
this.onEnterFrame = function () {
var _local1 = this;
if (_local1._framesloaded == _local1._totalframes) {
preload_mc.removeMovieClip();
_local1.gotoAndPlay("frmGame");
delete _local1.onEnterFrame;
}
};
stop();
Frame 2
function arrayPosition(x_int, y_int) {
this.x_int = x_int;
this.y_int = y_int;
}
function arrayPosition(x_int, y_int) {
this.x_int = x_int;
this.y_int = y_int;
}
function randomizeChoices() {
count = 0;
while (count < gChoices.length) {
gRandomOrder[count] = count;
count++;
}
count = 0;
while (count < gChoices.length) {
var _local1 = parseInt(Math.random() * gChoices.length, 10);
var _local2 = gChoices[_local1];
gChoices[_local1] = gChoices[count];
gChoices[count] = _local2;
_local2 = gRandomOrder[_local1];
gRandomOrder[_local1] = gRandomOrder[count];
gRandomOrder[count] = _local2;
count++;
}
getChoice();
}
function getChoice() {
var _local1 = this;
gFirstTry_tf = true;
incorrectText_mc._visible = false;
var clipname = (("country_" + (gRandomOrder[gChoiceCount] + 1)) + ".mc");
_local1.attachMovie(clipname, gChoices[gChoiceCount], gChoiceCount);
var _local2 = _local1[gChoices[gChoiceCount]];
gClip2 = _local2;
if (ins_ok_btn._visible == true) {
_local2._visible = false;
}
_local2.border_mc._alpha = 65;
_local2.onPress = function () {
incorrectText_mc._visible = false;
var clip2 = this[gChoices[gChoiceCount]];
Mouse.hide();
if (audioMuted_tf == false) {
songKS.start();
}
this.startDrag();
};
_local2.firstTry_tf = true;
_local2.onEnterFrame = function () {
var _local2 = this;
if (!_local2.firstTry_tf) {
var _local1 = _local2.country_mc;
var border_mc = _local2.border_mc;
if (_local1._alpha != 60) {
_local1._alpha = 60;
}
}
};
_local2.onRelease = function () {
evaluateDrop(this);
};
_local2.onReleaseOutside = function () {
evaluateDrop(this);
};
var clip_W = (("country_" + (gRandomOrder[gChoiceCount] + 1)) + "_mc");
var _local3 = _local1[gChoices[gChoiceCount]];
_local3._x = 125;
_local3._y = 270 + (_local3._height / 2);
}
function flashHitArea(clip_mc) {
clip_mc.hitArea_mc._visible = !clip_mc.hitArea_mc._visible;
updateAfterEvent();
}
function evaluateDrop(dragMovie) {
dragMovie.stopDrag();
Mouse.show();
if (dragMovie._x < 240) {
var incorrectMsg_str = "<font face=\"_sans\" size=\"14\"><b><i>Oops! You must place the country on the map.</i></b></font>";
createIncorrectText(dragMovie, incorrectMsg_str);
if (audioMuted_tf == false) {
incorrect_sound.start();
}
} else {
previous_dragMovie = dragMovie;
x_target = eval (("country_" + (gRandomOrder[gChoiceCount] + 1)) + "_mc")._x;
y_target = eval (("country_" + (gRandomOrder[gChoiceCount] + 1)) + "_mc")._y;
distance_xy = ((dragMovie._x - x_target) * (dragMovie._x - x_target)) + ((dragMovie._y - y_target) * (dragMovie._y - y_target));
distance_xy = Math.sqrt(distance_xy);
distance_xy = Math.round(distance_xy);
placeChoice(dragMovie);
}
}
function placeChoice(dragMovie) {
clearInterval(gFlash_interval);
delete gFlash_interval;
var clipname = (("country_" + (gRandomOrder[gChoiceCount] + 1)) + "_mc");
var RandOrderNumb = gRandomOrder[gChoiceCount];
x_target = eval (clipname)._x;
y_target = eval (clipname)._y;
var correctDrop_tf = true;
if (incorrect_txt) {
incorrect_txt.removeTextField();
}
distance_xy = ((dragMovie._x - x_target) * (dragMovie._x - x_target)) + ((dragMovie._y - y_target) * (dragMovie._y - y_target));
distance_xy = Math.sqrt(distance_xy);
distance_xy = Math.round(distance_xy * 11.8);
if (distance_xy <= 136) {
distance_xy = 0;
SongNumber = 1 + parseInt(Math.random() * 5, 10);
if (SongNumber == PastSongNumber) {
SongNumber = 1 + parseInt(Math.random() * 5, 10);
}
PastSongNumber = SongNumber;
if (audioMuted_tf == false) {
eval ("song" + SongNumber).start();
}
if (gFirstTry_tf) {
gTotalCorrect++;
gCorrectCount = gCorrectCount + 1;
gCorrect[gCorrectCount] = RandOrderNumb;
}
} else {
correctDrop_tf = false;
gInCorrectCount = gInCorrectCount + 1;
gIncorrect[gInCorrectCount] = RandOrderNumb;
if (audioMuted_tf == false) {
incorrect_sound.start();
}
}
if (gFirstTry_tf) {
Total_Distance_Error = Total_Distance_Error + distance_xy;
Average_Distance_Error = Math.round(Total_Distance_Error / (gChoiceCount + 1));
}
gScoreText = ((((("Score:\t\t" + gTotalCorrect) + "/") + (gChoiceCount + 1)) + " of ") + gTotalCountries) + " questions";
gScoreText2 = ("Error:\t\t" + distance_xy) + " Miles";
gScoreText3 = ("Avg. Error:\t" + Average_Distance_Error) + " Miles";
if (correctDrop_tf) {
var clip_mc = this[gChoices[gChoiceCount]];
clip_mc.onPress = (clip_mc.onRelease = (clip_mc.onReleaseOutside = function () {
}));
abbrev_mc._x = gAbbrevPosition_array[gRandomOrder[gChoiceCount]].x_int;
abbrev_mc._y = gAbbrevPosition_array[gRandomOrder[gChoiceCount]].y_int;
var i = 900;
while (i < gAbbrevCount) {
eval ("abbrev" + i)._visible = true;
i++;
}
gAbbrevCount++;
if (gFirstTry_tf) {
positionState(dragMovie, clipName);
this[clipname].hitArea_mc._visible = false;
} else {
var dropClip_color = new Color(this[clipname].country_mc);
dropClip_color.setRGB(16740207);
if (this[clipname].hFlag == true) {
var clipY = (("country_" + (gRandomOrder[gChoiceCount] + 1)) + "y_mc");
this[clipname].hitArea_mc._alpha = 30;
this[clipname].country_mc._alpha = 40;
var dropClip_color = new Color(this[clipY]);
dropClip_color.setRGB(16777215);
this[clipname].hitArea_mc._visible = true;
}
positionState(dragMovie, clipName);
dragMovie.onEnterFrame = function () {
};
}
} else {
var dropClip_color = new Color(this[clipname].country_mc);
dropClip_color.setRGB(16711680);
var dropClip_color = new Color(this[clipname].hitArea_mc);
dropClip_color.setRGB(16711680);
this[clipname]._alpha = 100;
gFlash_interval = setInterval(flashHitArea, 200, this[clipname]);
}
if (audioMuted_tf == false) {
song.start();
}
if ((gChoiceCount < (gChoices.length - 1)) || (!correctDrop_tf)) {
ins_instructions._visible = false;
if (correctDrop_tf) {
gChoiceCount++;
getChoice();
} else {
var i = 900;
while (this["abbrev" + i]) {
this["abbrev" + i]._visible = false;
i++;
}
var clipname = eval (("country_" + (gRandomOrder[gChoiceCount] + 1)) + "_mc");
var x_int = (dragMovie._x - (dragMovie._width / 2));
var y_int = (dragMovie._y + (dragMovie._height / 2));
this.createTextField("incorrect_txt", 1000, x_int, y_int, 250, 100);
incorrect_txt._visible = false;
incorrect_txt.autoSize = true;
incorrect_txt.selectable = false;
incorrect_txt.multiline = true;
incorrect_txt.wordWrap = true;
incorrect_txt.html = true;
incorrectMsg_str = ("<font face=\"_sans\" size=\"14\"><b><i>The correct location of " + gNames[gRandomOrder[gChoiceCount]]) + " is shown in red. Please drop it there.</i></b></font>";
createIncorrectText(dragMovie, incorrectMsg_str);
gFirstTry_tf = false;
dragMovie.firstTry_tf = false;
}
} else {
var i = 900;
while (this["abbrev" + i]) {
this["abbrev" + i]._visible = false;
i++;
}
var gEndTime = getTimer();
TimeT = Math.round((gEndTime - gStartTime) / 1000);
var score = Math.round((gTotalCorrect / gChoices.length) * 100);
ShowScores_btn._visible = true;
briefInstructions_txt.backgroundColor = 16747660 /* 0xFF8C8C */;
briefInstructions_txt.htmlText = "<p align=\"center\">Click on the <b>Show Scores</b> button in the <b>Game Controls</b> box</p>";
GameOver_txt._visible = true;
ins_state_to_pick.text = "";
Incorrect_Text = Incorrect_Text + "";
}
}
function positionState(dragMovie, clipName) {
var _local3 = clipName;
dragMovie.removeMovieClip();
this[_local3]._alpha = 100;
this[_local3].border_mc._alpha = 60;
this[_local3]._visible = true;
var _local2 = new Color(this[_local3].country_mc);
if (gFirstTry_tf) {
countryString = String(_local3);
var _local1 = getCountryNumber(countryString);
if (gColors[_local1] == 1) {
_local2.setRGB(16777062);
} else if (gColors[_local1] == 2) {
_local2.setRGB(16764057);
} else if (gColors[_local1] == 3) {
_local2.setRGB(16754342);
} else if (gColors[_local1] == 4) {
_local2.setRGB(6750207);
} else if (gColors[_local1] == 5) {
_local2.setRGB(6750054);
} else if (gColors[_local1] == 6) {
_local2.setRGB(16751103);
}
}
}
function createIncorrectText(dragMovie, incorrectMsg_str) {
var _local2 = dragMovie;
var x_int = (_local2._x - (_local2._width / 2));
var y_int = (_local2._y + (_local2._height / 2));
this.createTextField("incorrect_txt", 1000, x_int, y_int, 250, 100);
incorrect_txt._visible = false;
incorrect_txt.autoSize = true;
incorrect_txt.selectable = false;
incorrect_txt.multiline = true;
incorrect_txt.wordWrap = true;
incorrect_txt.html = true;
incorrect_txt.htmlText = incorrectMsg_str;
var _local1 = 5;
if ((incorrect_txt._x + incorrect_txt._width) > Stage.width) {
incorrect_txt._x = Stage.width - incorrect_txt._width;
} else if (incorrect_txt._x < 0) {
incorrect_txt._x = _local1;
}
if ((incorrect_txt._y + incorrect_txt._height) > Stage.height) {
incorrect_txt._y = (Stage.height - incorrect_txt._height) - _local1;
}
var _local3 = incorrect_txt._height;
incorrect_txt.autoSize = false;
incorrect_txt._height = _local3 + 1;
incorrect_txt._visible = true;
}
function playAgain() {
correctItems_mc._visible = false;
missedItems_mc._visible = false;
countryHeader1_txt._visible = false;
countryHeader2_txt._visible = false;
countryHeader3_txt._visible = false;
countryHeader4_txt._visible = false;
gotoAndStop ("frmGame");
}
function exitGame() {
var _local1 = _root;
if (mode == "standalone") {
_local1.content_mc.unloadMovie();
_local1.logo_mc._visible = true;
_local1.tool_mc._visible = true;
_local1.menu_txt._visible = true;
_local1.scroll_mc._visible = true;
_local1.gContentSized = false;
_local1.titlebar_mc.titlebar_txt.text = "Sheppard Software - South & Central America Learning Games Menu";
} else {
getURL ("javascript:window.close();");
}
}
function getCountryNumber(countryString) {
var _local2 = countryString.lastIndexOf("_");
var _local1 = countryString.substring(0, _local2);
_local2 = _local1.lastIndexOf("_");
var _local3 = Number(_local1.substring(_local2 + 1, mcNum.length)) - 1;
return(_local3);
}
function GameOver() {
gotoAndStop ("frmScore");
}
var gChoices = ["Albania", "Andorra", "Austria", "Belarus", "Belgium", "Bosnia", "Bulgaria", "Croatia", "Czech Republic", "Denmark", "Estonia", "Finland", "France", "Germany", "Greece", "Hungary", "Iceland", "Ireland", "Italy", "Latvia", "Lithuania", "Luxembourg", "Macedonia(FYROM)", "Moldova", "Netherlands", "Norway", "Poland", "Portugal", "Romania", "Russia", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland", "Turkey", "Ukraine", "United Kingdom", "Serbia", "Liechtenstein", "Malta", "Monaco", "San Marino", "Vatican City", "Cyprus"];
var gNames = ["Albania", "Andorra", "Austria", "Belarus", "Belgium", "Bosnia", "Bulgaria", "Croatia", "Czech Republic", "Denmark", "Estonia", "Finland", "France", "Germany", "Greece", "Hungary", "Iceland", "Ireland", "Italy", "Latvia", "Lithuania", "Luxembourg", "Macedonia(FYROM)", "Moldova", "Netherlands", "Norway", "Poland", "Portugal", "Romania", "Russia", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland", "Turkey", "Ukraine", "United Kingdom", "Serbia", "Liechtenstein", "Malta", "Monaco", "San Marino", "Vatican City", "Cyprus"];
var gRegions = [5, 3, 4, 6, 2, 5, 5, 5, 4, 1, 6, 1, 2, 4, 5, 4, 1, 2, 3, 6, 6, 2, 5, 6, 2, 1, 4, 3, 5, 6, 4, 5, 3, 1, 4, 5, 6, 2, 5, 4, 3, 2, 3, 3, 5];
gColors = [1, 0, 1, 4, 4, 1, 1, 2, 2, 4, 4, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 0, 2, 1, 1, 1, 1, 5, 5, 5, 4, 4, 1, 3, 5, 5, 2, 1, 4, 0, 0, 0, 0, 0, 4];
incorrectText_mc._visible = false;
var gLinks = ["http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1004234.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/992562.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1032215.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1102180.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/999709.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1066886.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1059735.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1097128.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1108489.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1032760.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1106425.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1023629.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/998481.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1047864.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1009249.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1049641.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1025227.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1038581.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1065345.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1106666.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1106095.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1061821.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1067125.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/3038982.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1043423.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1023276.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1054681.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/994099.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1057466.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1102275.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1108491.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1097296.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/991960.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1021823.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1035212.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1022222.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1102303.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1038758.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1039269.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1066002.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1045691.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/2530481.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/2669927.stm", "http://news.bbc.co.uk/1/hi/world/europe/country_profiles/1066140.stm"];
country_2_mc.hFlag = true;
country_22_mc.hFlag = true;
country_40_mc.hFlag = true;
country_41_mc.hFlag = true;
country_42_mc.hFlag = true;
country_43_mc.hFlag = true;
country_44_mc.hFlag = true;
briefInstructions_txt.background = true;
briefInstructions_txt.backgroundColor = 16777164 /* 0xFFFFCC */;
ins_ok_btn._visible = false;
white_space_mc._visible = false;
if (GameStart_tf == null) {
ins_ok_btn._visible = true;
white_space_mc._visible = true;
GameStart_tf = true;
}
delete gScoreText;
delete gScoreText2;
delete gScoreText3;
scoreFormat = new TextFormat();
scoreFormat.tabStops = [50];
gScoreText_txt.setNewTextFormat(scoreFormat);
gScoreText2_txt.setNewTextFormat(scoreFormat);
gScoreText3_txt.setNewTextFormat(scoreFormat);
if (saved_audioMuted_tf == true) {
speakerBtn_mc.gotoAndStop("_off");
audioMuted_tf = true;
} else {
speakerBtn_mc.gotoAndStop("_on");
audioMuted_tf = false;
}
pronounciationSound = new Sound();
speakerBtn_mc.onRelease = function () {
audioMuted_tf = !audioMuted_tf;
if (audioMuted_tf) {
this.gotoAndStop("_off");
} else {
this.gotoAndStop("_on");
}
};
var gRandomOrder = new Array();
var gTotalCorrect = 0;
var gStartTime = getTimer();
var gIncorrect = new Array();
var gCorrect = new Array();
gCorrectCount = 0;
gIncorrectCount = 0;
ShowScores_btn._visible = false;
GameOver_txt._visible = false;
Incorrect_Text = "";
ins_ok_button._visible = false;
songKS = new Sound();
songKS.attachSound("keypress_sound");
PastSongNumber = 0;
song = new Sound();
song.attachSound("Latch_Slide");
song1 = new Sound();
song1.attachSound("good1_sound");
song2 = new Sound();
song2.attachSound("great2_sound");
song3 = new Sound();
song3.attachSound("right1_sound");
song4 = new Sound();
song4.attachSound("right5_sound");
song5 = new Sound();
song5.attachSound("yes2_sound");
incorrect_sound = new Sound();
incorrect_sound.attachSound("M_error");
gScoreText = ("Score:\t\t0/0 of " + gChoices.length) + " questions";
gScoreText2 = "Error:\t\t0 Miles";
Average_Distance_Error = 0;
gScoreText3 = ("Avg. Error:\t" + Average_Distance_Error) + " Miles";
var count = 0;
var gAbbrevPosition_array = new Array(gChoices.length);
var gAbbrevCount = 900;
var i = 900;
while (this["abbrev" + i]) {
this["abbrev" + i].removeMovieClip();
i++;
}
var i = 0;
while (this[gChoices[i]]) {
this[gChoices[i]].removeMovieClip();
i++;
}
while (count < gChoices.length) {
var clip_W = (("country_" + (count + 1)) + "_mc");
this[clip_W].country_mc._alpha = 100;
this[clip_W].hFlag = false;
this[clip_W].sizeFlag = false;
this[clip_W]._alpha = 0;
var dropClip_color = new Color(this[clip_W].country_mc);
countryString = String(clip_W);
var gNewNumb = getCountryNumber(countryString);
if (gColors[gNewNumb] == 1) {
dropClip_color.setRGB(16777062);
} else if (gColors[gNewNumb] == 2) {
dropClip_color.setRGB(16764057);
} else if (gColors[gNewNumb] == 3) {
dropClip_color.setRGB(16754342);
} else if (gColors[gNewNumb] == 4) {
dropClip_color.setRGB(6750207);
} else if (gColors[gNewNumb] == 5) {
dropClip_color.setRGB(6750054);
} else if (gColors[gNewNumb] == 6) {
dropClip_color.setRGB(16751103);
}
var clip_Y = (("country_" + (count + 1)) + "y_mc");
var dropClip_color = new Color(this[clip_Y]);
dropClip_color.setRGB(13421772);
this[clip_Y].hitarea_mc._visible = false;
this[clip_Y].country_name_mc._visible = false;
var clipname = eval (("country_name_" + (count + 1)) + "_mc");
countryName_str = clipname.name_txt.text;
clipname.name_txt.html = true;
clipname.name_txt.htmlText = ((("<u><a href=\"" + gLinks[count]) + "\" target=\"_blank\">") + countryName_str) + "</a></u>";
clipname.selectable = false;
clipname._visible = false;
gAbbrevPosition_array[count] = new arrayPosition(clipname._x, clipname._y);
gIncorrect[count] = 0;
gCorrect[count] = 0;
count++;
}
var gRandomOrder = new Array();
var gChoiceCount = 0;
var gTotalCorrect = 0;
var gStartTime = getTimer();
var gTotalCountries = gChoices.length;
Incorrect_Text = "";
ins_ok_button._visible = false;
songKS = new Sound();
songKS.attachSound("keypress_sound");
PastSongNumber = 0;
song = new Sound();
song.attachSound("Latch_Slide");
song1 = new Sound();
song1.attachSound("good1_sound");
song2 = new Sound();
song2.attachSound("great2_sound");
song3 = new Sound();
song3.attachSound("right1_sound");
song4 = new Sound();
song4.attachSound("right5_sound");
song5 = new Sound();
song5.attachSound("yes2_sound");
incorrect_sound = new Sound();
incorrect_sound.attachSound("M_error");
var Total_Distance_Error = 0;
randomizeChoices();
ShowScores_btn.onRelease = function () {
GameOver();
};
ins_ok_btn.onRelease = function () {
if (gNumTries == 0) {
gStartTime = getTimer();
}
gClip2._visible = true;
ins_ok_btn._visible = false;
white_space_mc._visible = false;
};
gameHelp_btn.onRelease = function () {
gClip2._visible = false;
ins_ok_btn._visible = true;
white_space_mc._visible = true;
};
stop();
Instance of Symbol 509 MovieClip [FScrollPaneSymbol] in Frame 2
//component parameters
onClipEvent (initialize) {
scrollContent = "";
hScroll = "auto";
vScroll = "auto";
dragContent = false;
}
Frame 3
function createTextColumn(container_mc, instanceName_str, depth_int, x_int, y_int, text_str, url_str) {
container_mc.createTextField(instanceName_str, depth_int, x_int, y_int, 0, 0);
var _local1 = container_mc[instanceName_str];
if (url_str != null) {
_local1.html = true;
review_TextFormat.bold = false;
review_TextFormat.color = 255;
review_TextFormat.underline = true;
review_TextFormat.target = _blank;
review_TextFormat.url = url_str;
} else {
_local1.html = false;
review_TextFormat.bold = true;
review_TextFormat.color = 0;
review_TextFormat.underline = false;
}
_local1.autoSize = true;
_local1.selectable = false;
_local1.setNewTextFormat(review_TextFormat);
_local1.text = text_str;
}
FScrollBar._visible = false;
checkboxPlacement_mc._visible = false;
var review_TextFormat = new TextFormat(globalStyleFormat.textFont, globalStyleFormat.textSize);
gStoredCorrectCount = gTotalCorrect;
var score = Math.round((gTotalCorrect / gChoices.length) * 100);
GameNumber = GameNumber + 1;
saved_audioMuted_tf = audioMuted_tf;
var scoreText = ((gTotalCorrect + "/") + gTotalCountries);
scoreText = scoreText + " ";
var scorePcText = (score + "% ");
if (score == 100) {
scorePcText = score + "% ";
}
var gameNumber_str = ("#" + GameNumber.toString());
if (GameNumber < 10) {
gameNumber_str = gameNumber_str + " ";
}
var TimeT_str = (TimeT.toString() + " ");
if (TimeT < 100) {
TimeT_str = TimeT_str + " ";
}
if (TimeT < 10) {
TimeT_str = TimeT_str + " ";
}
var Average_Distance_Error_str = (Average_Distance_Error.toString() + " ");
if (Average_Distance_Error < 1000) {
Average_Distance_Error_str = Average_Distance_Error_str + " ";
}
if (Average_Distance_Error < 100) {
Average_Distance_Error_str = Average_Distance_Error_str + " ";
}
if (Average_Distance_Error < 10) {
Average_Distance_Error_str = Average_Distance_Error_str + " ";
}
resultsString = (((((((((("<p>" + gameNumber_str) + " ") + scoreText) + " ") + scorePcText) + " ") + Average_Distance_Error_str) + " Miles") + " ") + TimeT_str) + "secs</p>";
TotalResultsString = resultsString + StoredResultsString;
results_textbox_txt.htmlText = "<p><b>Trial Score % Correct Avg. Error Time</b></p>" + TotalResultsString;
StoredResultsString = TotalResultsString;
if (results_textbox_txt.maxscroll > 1) {
FScrollBar._visible = true;
}
var col2X_int = (FScrollPane.getPaneWidth() / 2);
var headerCount = 9999;
var headerY_int = (reviewText_0._y + reviewText_0.textHeight);
createTextColumn(this, "countryHeader1_txt", headerCount++, reviewText_0._x, headerY_int, "Country");
headerY_int = reviewText_1._y + reviewText_1.textHeight;
createTextColumn(this, "countryHeader3_txt", headerCount++, reviewText_1._x, headerY_int, "Country");
this.createEmptyMovieClip("missedItems_mc", 1);
missedItems_mc._visible = false;
this.createEmptyMovieClip("correctItems_mc", 2);
correctItems_mc._visible = false;
if (gInCorrectCount == 0) {
var noneIncorrect_str = "Great job! You did not miss any!";
createTextColumn(missedItems_mc, "noIncorrect_txt", 1, 0, 0, noneIncorrect_str);
} else {
var count = 1;
while (count <= gInCorrectCount) {
var y_int = 0;
if (count > 1) {
var prev_txt = missedItems_mc[("country" + (count - 1)) + "_txt"];
y_int = prev_txt._y + prev_txt._height;
}
createTextColumn(missedItems_mc, ("country" + count) + "_txt", count, 0, y_int, gNames[gIncorrect[count]], gLinks[gIncorrect[count]]);
count++;
}
}
FScrollPane.setScrollContent(missedItems_mc);
missedItems_mc._visible = true;
var count = 1;
while (count <= gCorrectCount) {
var y_int = 0;
if (count > 1) {
var prev_txt = correctItems_mc[("country" + (count - 1)) + "_txt"];
y_int = prev_txt._y + prev_txt._height;
}
createTextColumn(correctItems_mc, ("country" + count) + "_txt", count, 0, y_int, gNames[gCorrect[count]], gLinks[gCorrect[count]]);
count++;
}
FScrollPane2.setScrollContent(correctItems_mc);
correctItems_mc._visible = true;
printScores_btn.onRelease = function () {
var _local1 = new Date();
var _local2 = _local1.getMinutes();
if (_local1.getMinutes() < 10) {
_local2 = "0" + _local1.getMinutes();
}
if (_local1.getHours() < 12) {
var _local3 = ((_local1.getHours() + ":") + _local2) + " AM";
} else if (_local1.getHours() == 12) {
var _local3 = ("12:" + _local2) + " PM";
} else {
var _local3 = (((_local1.getHours() - 12) + ":") + _local2) + " PM";
}
print_mc.createTextField("print_txt", 1, 0, 0, 0, 0);
print_txt = print_mc.print_txt;
print_txt.autoSize = true;
print_txt.html = true;
var print_str = "<p><font face=\"Courier New\" size=\"15\"><b>European Countries - Level Three - ";
print_str = print_str + ((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + "/") + _local1.getFullYear()) + " - ") + _local3) + "</b></font></p><p> </p>");
print_txt.htmlText = print_str + results_textbox_txt.htmlText;
print ("print_mc", "bmovie");
};
Instance of Symbol 509 MovieClip [FScrollPaneSymbol] in Frame 3
//component parameters
onClipEvent (initialize) {
scrollContent = "";
hScroll = "auto";
vScroll = "auto";
dragContent = false;
}
Instance of Symbol 509 MovieClip [FScrollPaneSymbol] "FScrollPane" in Frame 3
//component parameters
onClipEvent (initialize) {
scrollContent = "";
hScroll = "false";
vScroll = "auto";
dragContent = false;
}
Instance of Symbol 509 MovieClip [FScrollPaneSymbol] "FScrollPane2" in Frame 3
//component parameters
onClipEvent (initialize) {
scrollContent = "";
hScroll = "false";
vScroll = "auto";
dragContent = false;
}
Symbol 1 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
var _local1 = this;
var _local3 = _global;
_local1.enable = true;
_local1.focused = false;
_local1.useHandCursor = false;
_local1._accImpl = new Object();
_local1._accImpl.stub = true;
_local1.styleTable = new Array();
if (_local3.globalStyleFormat == undefined) {
_local3.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_local3._focusControl = new Object();
_local3._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_local3._focusControl);
}
if (_local1._name != undefined) {
_local1._focusrect = false;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1.tabChildren = false;
_local1.tabFocused = true;
if (_local1.hostStyle == undefined) {
globalStyleFormat.addListener(_local1);
} else {
_local1.styleTable = _local1.hostStyle;
}
_local1.deadPreview._visible = false;
_local1.deadPreview._width = (_local1.deadPreview._height = 1);
_local1.methodTable = new Object();
_local1.keyListener = new Object();
_local1.keyListener.controller = _local1;
_local1.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
_local1.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local2 in _local1.styleFormat_prm) {
_local1.setStyleProperty(_local2, _local1.styleFormat_prm[_local2]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
_local1.enable = ((arguments.length > 0) ? (enabledFlag) : true);
_local1.tabEnabled = (_local1.focusEnabled = enabledFlag);
if ((!_local1.enable) && (_local1.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
var _local1 = this;
_local1.width = w;
_local1.height = h;
_local1.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
var _local1 = this;
_local1.handlerObj = ((obj == undefined) ? (_local1._parent) : (obj));
_local1.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
var _local1 = this;
_local1.methodTable[methodName] = true;
_local1.onEnterFrame = _local1.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
var _local1 = this;
if (_local1.methodTable.setSize) {
_local1.setSize(_local1.width, _local1.height);
} else {
_local1.cleanUINotSize();
}
_local1.methodTable = new Object();
delete _local1.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
var _local1 = this;
for (var _local2 in _local1.methodTable) {
_local1[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
var inner = _local1.styleTable.focusRectInner.value;
var outer = _local1.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
_local1.createEmptyMovieClip("focusRect", 1000);
_local1.focusRect.controller = _local1;
_local1.focusRect.lineStyle(1, outer);
_local1.focusRect.moveTo(_local3, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2);
_local1.focusRect.lineStyle(1, inner);
_local1.focusRect.moveTo(_local3 + 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, _local2 + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
var _local1 = this;
_local1.tabFocused = false;
_local1.focusRect.removeMovieClip();
Selection.setFocus(_local1);
};
FUIComponentClass.prototype.drawFocusRect = function () {
var _local1 = this;
_local1.drawRect(-2, -2, _local1.width + 4, _local1.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
var _local1 = this;
_local1.focused = true;
Key.addListener(_local1.keyListener);
if (_local1.tabFocused) {
_local1.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
var _local1 = this;
_local1.tabFocused = true;
_local1.focused = false;
_local1.focusRect.removeMovieClip();
Key.removeListener(_local1.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
var _local1 = this;
_local1.handlerObj[_local1.changeHandler](_local1);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var _local1 = this;
var _local2 = propName;
if (value == "") {
} else {
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].useGlobal || (!global)) {
_local1.styleTable[_local2].value = value;
if (_local1.setCustomStyleProperty(_local2, value)) {
} else if (_local2 == "embedFonts") {
_local1.invalidate("setSize");
} else if (_local2.subString(0, 4) == "text") {
if (_local1.textStyle == undefined) {
_local1.textStyle = new TextFormat();
}
var textProp = _local2.subString(4, _local2.length);
_local1.textStyle[textProp] = value;
_local1.invalidate("setSize");
} else {
for (var j in _local1.styleTable[_local2].coloredMCs) {
var _local3 = new Color(_local1.styleTable[_local2].coloredMCs[j]);
if (_local1.styleTable[_local2].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local3.setTransform(myTObj);
} else {
_local3.setRGB(value);
}
}
}
_local1.styleTable[_local2].useGlobal = global;
}
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
var _local1 = this;
var _local2 = propName;
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].coloredMCs == undefined) {
_local1.styleTable[_local2].coloredMCs = new Object();
}
_local1.styleTable[_local2].coloredMCs[skinMCRef] = skinMCRef;
if (_local1.styleTable[_local2].value != undefined) {
var _local3 = new Color(skinMCRef);
_local3.setRGB(_local1.styleTable[_local2].value);
}
};
_global.FStyleFormat = function () {
var _local1 = arguments;
var _local2 = this;
_local2.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
_local2.listeners = new Object();
_local2.isGlobal = false;
if (_local1.length > 0) {
for (var _local3 in _local1[0]) {
_local2[_local3] = _local1[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < arguments.length) {
var _local3 = arguments[_local2];
_local1.listeners[arguments[_local2]] = _local3;
for (var i in _local1) {
if (_local1.isAStyle(i)) {
_local3.updateStyleProperty(_local1, i.toString());
}
}
_local2++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
var _local1 = this;
var _local2 = component;
_local1.listeners[_local2] = undefined;
for (var prop in _local1) {
if (_local1.isAStyle(prop)) {
if (_local2.styleTable[prop].useGlobal == _local1.isGlobal) {
_local2.styleTable[prop].useGlobal = true;
var _local3 = (_local1.isGlobal ? undefined : (globalStyleFormat[prop]));
_local2.setStyleProperty(prop, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local1 = this;
var _local2 = arguments;
var count = 0;
for (var i in _local1.listeners) {
var _local3 = _local1.listeners[i];
if (_local2.length > 0) {
var j = 0;
while (j < _local2.length) {
if (_local1.isAStyle(_local2[j])) {
_local3.updateStyleProperty(_local1, _local2[j]);
}
j++;
}
} else {
for (var j in _local1) {
if (_local1.isAStyle(j)) {
_local3.updateStyleProperty(_local1, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 14 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 24 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 33 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 34 MovieClip [UpArrow] Frame 1
stop();
Symbol 34 MovieClip [UpArrow] Frame 2
stop();
Symbol 34 MovieClip [UpArrow] Frame 3
stop();
Symbol 41 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 48 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 53 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 54 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 62 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 70 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 78 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 79 MovieClip [DownArrow] Frame 1
stop();
Symbol 79 MovieClip [DownArrow] Frame 2
stop();
Symbol 79 MovieClip [DownArrow] Frame 3
stop();
Symbol 477 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
mapCover_btn.useHandCursor = false;
Symbol 500 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 501 MovieClip [FScrollBarSymbol] Frame 1
#initclip 2
FScrollBarClass = function () {
var _local1 = this;
if (_local1._height == 4) {
} else {
_local1.init();
_local1.minPos = (_local1.maxPos = (_local1.pageSize = (_local1.largeScroll = 0)));
_local1.smallScroll = 1;
_local1.width = (_local1.horizontal ? (_local1._width) : (_local1._height));
_local1._xscale = (_local1._yscale = 100);
_local1.setScrollPosition(0);
_local1.tabEnabled = false;
if (_local1._targetInstanceName.length > 0) {
_local1.setScrollTarget(_local1._parent[_local1._targetInstanceName]);
}
_local1.tabChildren = false;
_local1.setSize(_local1.width);
}
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
var _local1 = this;
var _local2 = flag;
if (_local1.horizontal && (!_local2)) {
_local1._xscale = 100;
_local1._rotation = 0;
} else if (_local2 && (!_local1.horizontal)) {
_local1._xscale = -100;
_local1._rotation = -90;
}
_local1.horizontal = _local2;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
var _local1 = this;
if (!_local1.enable) {
} else {
_local1.pageSize = pSize;
_local1.minPos = Math.max(mnPos, 0);
_local1.maxPos = Math.max(mxPos, 0);
_local1.scrollPosition = Math.max(_local1.minPos, _local1.scrollPosition);
_local1.scrollPosition = Math.min(_local1.maxPos, _local1.scrollPosition);
if ((_local1.maxPos - _local1.minPos) <= 0) {
_local1.scrollThumb_mc.removeMovieClip();
_local1.upArrow_mc.gotoAndStop(3);
_local1.downArrow_mc.gotoAndStop(3);
_local1.downArrow_mc.onPress = (_local1.downArrow_mc.onRelease = (_local1.downArrow_mc.onDragOut = null));
_local1.upArrow_mc.onPress = (_local1.upArrow_mc.onRelease = (_local1.upArrow_mc.onDragOut = null));
_local1.scrollTrack_mc.onPress = (_local1.scrollTrack_mc.onRelease = null);
_local1.scrollTrack_mc.onDragOut = (_local1.scrollTrack_mc.onRollOut = null);
_local1.scrollTrack_mc.useHandCursor = false;
} else {
var _local2 = _local1.getScrollPosition();
_local1.upArrow_mc.gotoAndStop(1);
_local1.downArrow_mc.gotoAndStop(1);
_local1.upArrow_mc.onPress = (_local1.upArrow_mc.onDragOver = _local1.startUpScroller);
_local1.upArrow_mc.onRelease = (_local1.upArrow_mc.onDragOut = _local1.stopScrolling);
_local1.downArrow_mc.onPress = (_local1.downArrow_mc.onDragOver = _local1.startDownScroller);
_local1.downArrow_mc.onRelease = (_local1.downArrow_mc.onDragOut = _local1.stopScrolling);
_local1.scrollTrack_mc.onPress = (_local1.scrollTrack_mc.onDragOver = _local1.startTrackScroller);
_local1.scrollTrack_mc.onRelease = _local1.stopScrolling;
_local1.scrollTrack_mc.onDragOut = _local1.stopScrolling;
_local1.scrollTrack_mc.onRollOut = _local1.stopScrolling;
_local1.scrollTrack_mc.useHandCursor = false;
_local1.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
_local1.scrollThumb_mc._x = 0;
_local1.scrollThumb_mc._y = _local1.upArrow_mc._height;
_local1.scrollThumb_mc.onPress = _local1.startDragThumb;
_local1.scrollThumb_mc.controller = _local1;
_local1.scrollThumb_mc.onRelease = (_local1.scrollThumb_mc.onReleaseOutside = _local1.stopDragThumb);
_local1.scrollThumb_mc.useHandCursor = false;
_local1.thumbHeight = (_local1.pageSize / ((_local1.maxPos - _local1.minPos) + _local1.pageSize)) * _local1.trackSize;
_local1.thumbMid_mc = _local1.scrollThumb_mc.mc_sliderMid;
_local1.thumbTop_mc = _local1.scrollThumb_mc.mc_sliderTop;
_local1.thumbBot_mc = _local1.scrollThumb_mc.mc_sliderBot;
_local1.thumbHeight = Math.max(_local1.thumbHeight, 6);
_local1.midHeight = (_local1.thumbHeight - _local1.thumbTop_mc._height) - _local1.thumbBot_mc._height;
_local1.thumbMid_mc._yScale = (_local1.midHeight * 100) / _local1.thumbMid_mc._height;
_local1.thumbMid_mc._y = _local1.thumbTop_mc._height;
_local1.thumbBot_mc._y = _local1.thumbTop_mc._height + _local1.midHeight;
_local1.scrollTop = _local1.scrollThumb_mc._y;
_local1.trackHeight = _local1.trackSize - _local1.thumbHeight;
_local1.scrollBot = _local1.trackHeight + _local1.scrollTop;
_local2 = Math.min(_local2, _local1.maxPos);
_local1.setScrollPosition(Math.max(_local2, _local1.minPos));
}
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
var _local1 = this;
var _local2 = pos;
_local1.scrollPosition = _local2;
if (_local1.scrollThumb_mc != undefined) {
_local2 = Math.min(_local2, _local1.maxPos);
_local2 = Math.max(_local2, _local1.minPos);
}
_local1.scrollThumb_mc._y = (((_local2 - _local1.minPos) * _local1.trackHeight) / (_local1.maxPos - _local1.minPos)) + _local1.scrollTop;
_local1.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
var _local2 = enabledFlag;
var _local3 = _local1.enable;
if (_local2 && (!_local3)) {
_local1.enable = _local2;
if (_local1.textField != undefined) {
_local1.setScrollTarget(_local1.textField);
} else {
_local1.setScrollProperties(_local1.pageSize, _local1.cachedMinPos, _local1.cachedMaxPos);
_local1.setScrollPosition(_local1.cachedPos);
}
_local1.clickFilter = undefined;
} else if ((!_local2) && (_local3)) {
_local1.textField.removeListener(_local1);
_local1.cachedPos = _local1.getScrollPosition();
_local1.cachedMinPos = _local1.minPos;
_local1.cachedMaxPos = _local1.maxPos;
if (_local1.clickFilter == undefined) {
_local1.setScrollProperties(_local1.pageSize, 0, 0);
} else {
_local1.clickFilter = true;
}
_local1.enable = _local2;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
var _local1 = this;
if (_local1._height == 1) {
} else {
_local1.width = hgt;
_local1.scrollTrack_mc._yscale = 100;
_local1.scrollTrack_mc._yscale = (100 * _local1.width) / _local1.scrollTrack_mc._height;
if (_local1.upArrow_mc == undefined) {
_local1.attachMovie("UpArrow", "upArrow_mc", 1);
_local1.attachMovie("DownArrow", "downArrow_mc", 2);
_local1.downArrow_mc.controller = (_local1.upArrow_mc.controller = _local1);
_local1.upArrow_mc.useHandCursor = (_local1.downArrow_mc.useHandCursor = false);
_local1.upArrow_mc._x = (_local1.upArrow_mc._y = 0);
_local1.downArrow_mc._x = 0;
}
_local1.scrollTrack_mc.controller = _local1;
_local1.downArrow_mc._y = _local1.width - _local1.downArrow_mc._height;
_local1.trackSize = _local1.width - (2 * _local1.downArrow_mc._height);
if (_local1.textField != undefined) {
_local1.onTextChanged();
} else {
_local1.setScrollProperties(_local1.pageSize, _local1.minPos, _local1.maxPos);
}
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var _local1 = this;
var _local3 = _local1.smallScroll;
if (inc != "one") {
_local3 = ((_local1.largeScroll == 0) ? (_local1.pageSize) : (_local1.largeScroll));
}
var _local2 = _local1.getScrollPosition() + (mode * _local3);
if (_local2 > _local1.maxPos) {
_local2 = _local1.maxPos;
} else if (_local2 < _local1.minPos) {
_local2 = _local1.minPos;
}
_local1.setScrollPosition(_local2);
};
FScrollBarClass.prototype.startDragThumb = function () {
var _local1 = this;
_local1.lastY = _local1._ymouse;
_local1.onMouseMove = _local1.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
var _local1 = this;
_local1.scrollMove = _local1._ymouse - _local1.lastY;
_local1.scrollMove = _local1.scrollMove + _local1._y;
if (_local1.scrollMove < _local1.controller.scrollTop) {
_local1.scrollMove = _local1.controller.scrollTop;
} else if (_local1.scrollMove > _local1.controller.scrollBot) {
_local1.scrollMove = _local1.controller.scrollBot;
}
_local1._y = _local1.scrollMove;
var _local2 = _local1.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (_local1._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.minPos;
_local1.controller.isScrolling = true;
updateAfterEvent();
_local1.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
var _local1 = this;
_local1.controller.trackScroller();
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
var _local1 = this;
var _local2 = inc;
clearInterval(_local1.scrolling);
if (_local2 == "page") {
_local1.trackScroller();
} else {
_local1.scrollIt(_local2, mode);
}
_local1.scrolling = setInterval(_local1, "scrollInterval", 35, _local2, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
var _local1 = this;
if ((_local1.scrollThumb_mc._y + _local1.thumbHeight) < _local1._ymouse) {
_local1.scrollIt("page", 1);
} else if (_local1.scrollThumb_mc._y > _local1._ymouse) {
_local1.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
var _local1 = this;
_local1.controller.downArrow_mc.gotoAndStop(1);
_local1.controller.upArrow_mc.gotoAndStop(1);
clearInterval(_local1.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
var _local1 = this;
_local1.controller.upArrow_mc.gotoAndStop(2);
_local1.controller.scrollIt("one", -1);
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
var _local1 = this;
_local1.controller.downArrow_mc.gotoAndStop(2);
_local1.controller.scrollIt("one", 1);
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
var _local1 = this;
var _local2 = tF;
if (_local2 == undefined) {
_local1.textField.removeListener(_local1);
delete _local1.textField[(_local1.horizontal ? "hScroller" : "vScroller")];
if ((_local1.textField.hScroller != undefined) && (_local1.textField.vScroller != undefined)) {
_local1.textField.unwatch("text");
_local1.textField.unwatch("htmltext");
}
}
_local1.textField = undefined;
if (!(_local2 instanceof TextField)) {
} else {
_local1.textField = _local2;
_local1.textField[(_local1.horizontal ? "hScroller" : "vScroller")] = _local1;
_local1.onTextChanged();
_local1.onChanged = function () {
this.onTextChanged();
};
_local1.onScroller = function () {
var _local1 = this;
if (!_local1.isScrolling) {
if (!_local1.horizontal) {
_local1.setScrollPosition(_local1.textField.scroll);
} else {
_local1.setScrollPosition(_local1.textField.hscroll);
}
}
};
_local1.textField.addListener(_local1);
_local1.textField.watch("text", _local1.callback);
_local1.textField.watch("htmlText", _local1.callback);
}
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
var _local1 = this;
clearInterval(_local1.hScroller.synchScroll);
clearInterval(_local1.vScroller.synchScroll);
_local1.hScroller.synchScroll = setInterval(_local1.hScroller, "onTextChanged", 50);
_local1.vScroller.synchScroll = setInterval(_local1.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
var _local1 = this;
if ((!_local1.enable) || (_local1.textField == undefined)) {
} else {
clearInterval(_local1.synchScroll);
if (_local1.horizontal) {
var _local2 = _local1.textField.hscroll;
_local1.setScrollProperties(_local1.textField._width, 0, _local1.textField.maxhscroll);
_local1.setScrollPosition(Math.min(_local2, _local1.textField.maxhscroll));
} else {
var _local2 = _local1.textField.scroll;
var _local3 = _local1.textField.bottomScroll - _local1.textField.scroll;
_local1.setScrollProperties(_local3, 1, _local1.textField.maxscroll);
_local1.setScrollPosition(Math.min(_local2, _local1.textField.maxscroll));
}
}
};
FScrollBarClass.prototype.executeCallBack = function () {
var _local1 = this;
if (_local1.textField == undefined) {
super.executeCallBack();
} else if (_local1.horizontal) {
_local1.textField.hscroll = _local1.getScrollPosition();
} else {
_local1.textField.scroll = _local1.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 505 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 505 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 509 MovieClip [FScrollPaneSymbol] Frame 1
#initclip 3
function FScrollPaneClass() {
var _local1 = this;
function boolToString(str) {
var _local1 = str;
if (_local1 == "false") {
return(false);
}
if (_local1 == "true") {
return(true);
}
return(_local1);
}
_local1.init();
_local1.width = _local1._width;
_local1.height = _local1._height;
_local1._xscale = (_local1._yscale = 100);
_local1.contentWidth = (_local1.contentHeight = 0);
if (_local1.hScroll == undefined) {
_local1.hScroll = (_local1.vScroll = "auto");
_local1.dragContent = false;
}
_local1.offset = new Object();
_local1.vScroll = boolToString(_local1.vScroll);
_local1.hScroll = boolToString(_local1.hScroll);
_local1.attachMovie("FScrollBarSymbol", "hScrollBar_mc", 100, {hostStyle:_local1.styleTable});
_local1.hScrollBar_mc.setHorizontal(true);
_local1.hScrollBar_mc.setSmallScroll(5);
_local1.hScrollBar_mc.setChangeHandler("onScroll", _local1);
_local1.attachMovie("FScrollBarSymbol", "vScrollBar_mc", 99, {hostStyle:_local1.styleTable});
_local1.vScrollBar_mc.setSmallScroll(5);
_local1.vScrollBar_mc.setChangeHandler("onScroll", _local1);
_local1.setSize(_local1.width, _local1.height);
if (_local1.scrollContent != "") {
_local1.setScrollContent(_local1.scrollContent);
}
_local1.setDragContent(_local1.dragContent);
}
FScrollPaneClass.prototype = new FUIComponentClass();
Object.registerClass("FScrollPaneSymbol", FScrollPaneClass);
FScrollPaneClass.prototype.getScrollContent = function () {
return(this.content_mc);
};
FScrollPaneClass.prototype.getPaneWidth = function () {
return(this.width);
};
FScrollPaneClass.prototype.getPaneHeight = function () {
return(this.height);
};
FScrollPaneClass.prototype.getScrollPosition = function () {
var _local1 = this;
var _local3 = ((_local1.hScrollBar_mc == undefined) ? 0 : (_local1.hScrollBar_mc.getScrollPosition()));
var _local2 = ((_local1.vScrollBar_mc == undefined) ? 0 : (_local1.vScrollBar_mc.getScrollPosition()));
return({x:_local3, y:_local2});
};
FScrollPaneClass.prototype.setScrollContent = function (target) {
var _local1 = this;
var _local2 = target;
_local1.offset.x = 0;
_local1.offset.y = 0;
if (_local1.content_mc != undefined) {
if (_local2 != _local1.content_mc) {
_local1.content_mc._visible = false;
_local1.content_mc.removeMovieClip();
_local1.content_mc.unloadMovie();
}
}
if (typeof(_local2) == "string") {
_local1.attachMovie(_local2, "tmp_mc", 3);
_local1.content_mc = _local1.tmp_mc;
} else if (_local2 == undefined) {
_local1.content_mc.unloadMovie();
} else {
_local1.content_mc = _local2;
}
_local1.localToGlobal(_local1.offset);
_local1.content_mc._parent.globalToLocal(_local1.offset);
_local1.content_mc._x = _local1.offset.x;
_local1.content_mc._y = _local1.offset.y;
var _local3 = _local1.content_mc.getBounds(_local1);
_local1.offset.x = -_local3.xMin;
_local1.offset.y = -_local3.yMin;
_local1.localToGlobal(_local1.offset);
_local1.content_mc._parent.globalToLocal(_local1.offset);
_local1.content_mc._x = _local1.offset.x;
_local1.content_mc._y = _local1.offset.y;
_local1.contentWidth = _local1.content_mc._width;
_local1.contentHeight = _local1.content_mc._height;
_local1.content_mc.setMask(_local1.mask_mc);
_local1.setSize(_local1.width, _local1.height);
};
FScrollPaneClass.prototype.setSize = function (w, h) {
var _local1 = this;
var _local2 = h;
var _local3 = w;
if (((arguments.length < 2) || (isNaN(_local3))) || (isNaN(_local2))) {
} else {
super.setSize(_local3, _local2);
_local1.width = Math.max(_local3, 60);
_local1.height = Math.max(_local2, 60);
_local1.boundingBox_mc._xscale = 100;
_local1.boundingBox_mc._yscale = 100;
_local1.boundingBox_mc._width = _local1.width;
_local1.boundingBox_mc._height = _local1.height;
_local1.setHandV();
_local1.initScrollBars();
if (_local1.mask_mc == undefined) {
_local1.attachMovie("FBoundingBoxSymbol", "mask_mc", 3000);
}
_local1.mask_mc._xscale = 100;
_local1.mask_mc._yscale = 100;
_local1.mask_mc._width = _local1.hWidth;
_local1.mask_mc._height = _local1.vHeight;
_local1.mask_mc._alpha = 0;
}
};
FScrollPaneClass.prototype.setScrollPosition = function (x, y) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
_local3 = Math.max(_local1.hScrollBar_mc.minPos, _local3);
_local3 = Math.min(_local1.hScrollBar_mc.maxPos, _local3);
_local2 = Math.max(_local1.vScrollBar_mc.minPos, _local2);
_local2 = Math.min(_local1.vScrollBar_mc.maxPos, _local2);
_local1.hScrollBar_mc.setScrollPosition(_local3);
_local1.vScrollBar_mc.setScrollPosition(_local2);
};
FScrollPaneClass.prototype.refreshPane = function () {
this.setScrollContent(this.content_mc);
};
FScrollPaneClass.prototype.loadScrollContent = function (url, handler, location) {
var _local1 = this;
_local1.content_mc.removeMovieClip();
_local1.content_mc.unloadMovie();
_local1.content_mc._visible = 0;
_local1.loadContent.duplicateMovieClip("loadTemp", 3);
_local1.dupeFlag = true;
_local1.contentLoaded = function () {
var _local1 = this;
_local1.loadReady = false;
_local1.content_mc = _local1.loadTemp;
_local1.refreshPane();
_local1.executeCallBack();
};
_local1.setChangeHandler(handler, location);
_local1.loadTemp.loadMovie(url);
};
FScrollPaneClass.prototype.setHScroll = function (prop) {
var _local1 = this;
_local1.hScroll = prop;
_local1.setSize(_local1.width, _local1.height);
};
FScrollPaneClass.prototype.setVScroll = function (prop) {
var _local1 = this;
_local1.vScroll = prop;
_local1.setSize(_local1.width, _local1.height);
};
FScrollPaneClass.prototype.setDragContent = function (dragFlag) {
var _local1 = this;
if (dragFlag) {
_local1.boundingBox_mc.useHandCursor = true;
_local1.boundingBox_mc.onPress = function () {
this._parent.startDragLoop();
};
_local1.boundingBox_mc.tabEnabled = false;
_local1.boundingBox_mc.onRelease = (_local1.boundingBox_mc.onReleaseOutside = function () {
this._parent.pressFocus();
this._parent.onMouseMove = null;
});
} else {
delete _local1.boundingBox_mc.onPress;
_local1.boundingBox_mc.useHandCursor = false;
}
};
FScrollPaneClass.prototype.setSmallScroll = function (x, y) {
this.hScrollBar_mc.setSmallScroll(x);
this.vScrollBar_mc.setSmallScroll(y);
};
FScrollPaneClass.prototype.setHandV = function () {
var _local1 = this;
if ((((_local1.contentHeight - _local1.height) > 2) && (_local1.vScroll != false)) || (_local1.vScroll == true)) {
_local1.hWidth = _local1.width - _local1.vScrollBar_mc._width;
} else {
_local1.hWidth = _local1.width;
}
if ((((_local1.contentWidth - _local1.width) > 2) && (_local1.hScroll != false)) || (_local1.hScroll == true)) {
_local1.vHeight = _local1.height - _local1.hScrollBar_mc._height;
} else {
_local1.vHeight = _local1.height;
}
};
FScrollPaneClass.prototype.startDragLoop = function () {
var _local1 = this;
_local1.tabFocused = false;
_local1.myOnSetFocus();
_local1.lastX = _local1._xmouse;
_local1.lastY = _local1._ymouse;
_local1.onMouseMove = function () {
var _local1 = this;
_local1.scrollXMove = _local1.lastX - _local1._xmouse;
_local1.scrollYMove = _local1.lastY - _local1._ymouse;
_local1.scrollXMove = _local1.scrollXMove + _local1.hScrollBar_mc.getScrollPosition();
_local1.scrollYMove = _local1.scrollYMove + _local1.vScrollBar_mc.getScrollPosition();
_local1.setScrollPosition(_local1.scrollXMove, _local1.scrollYMove);
if ((_local1.scrollXMove < _local1.hScrollBar_mc.maxPos) && (_local1.scrollXMove > _local1.hScrollBar_mc.minPos)) {
_local1.lastX = _local1._xmouse;
}
if ((_local1.scrollYMove < _local1.vScrollBar_mc.maxPos) && (_local1.scrollYMove > _local1.vScrollBar_mc.minPos)) {
_local1.lastY = _local1._ymouse;
}
_local1.updateAfterEvent();
};
};
FScrollPaneClass.prototype.initScrollBars = function () {
var _local1 = this;
_local1.hScrollBar_mc._y = _local1.height - _local1.hScrollBar_mc._height;
_local1.hScrollBar_mc.setSize(_local1.hWidth);
_local1.hScrollBar_mc.setScrollProperties(_local1.hWidth, 0, _local1.contentWidth - _local1.hWidth);
_local1.vScrollBar_mc._visible = ((_local1.hWidth == _local1.width) ? false : true);
_local1.vScrollBar_mc._x = _local1.width - _local1.vScrollBar_mc._width;
_local1.vScrollBar_mc.setSize(_local1.vHeight);
_local1.vScrollBar_mc.setScrollProperties(_local1.vHeight, 0, _local1.contentHeight - _local1.vHeight);
_local1.hScrollBar_mc._visible = ((_local1.vHeight == _local1.height) ? false : true);
};
FScrollPaneClass.prototype.onScroll = function (component) {
var _local2 = this;
var _local3 = component;
var _local1 = _local3.getScrollPosition();
var XorY = ((_local3._name == "hScrollBar_mc") ? "x" : "y");
if (_local3._name == "hScrollBar_mc") {
_local2.content_mc._x = (-_local1) + _local2.offset.x;
} else {
_local2.content_mc._y = (-_local1) + _local2.offset.y;
}
};
FScrollPaneClass.prototype.myOnKeyDown = function () {
var _local1 = this;
var _local3 = _local1.hScrollBar_mc.getScrollPosition();
var _local2 = _local1.vScrollBar_mc.getScrollPosition();
if (_local1.hScrollBar_mc.maxPos > _local1.hScrollBar_mc.minPos) {
if (Key.isDown(37)) {
_local1.setScrollPosition(_local3 - 3, _local2);
} else if (Key.isDown(39)) {
_local1.setScrollPosition(_local3 + 3, _local2);
}
}
if (_local1.vScrollBar_mc.maxPos > _local1.vScrollBar_mc.minPos) {
if (Key.isDown(38)) {
_local1.setScrollPosition(_local3, _local2 - 3);
} else if (Key.isDown(40)) {
_local1.setScrollPosition(_local3, _local2 + 3);
} else if (Key.isDown(34)) {
_local1.setScrollPosition(_local3, _local2 + _local1.vScrollBar_mc.pageSize);
} else if (Key.isDown(33)) {
_local1.setScrollPosition(_local3, _local2 - _local1.vScrollBar_mc.pageSize);
}
}
};
#endinitclip
this.deadPreview._visible = false;
Instance of Symbol 501 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 509 MovieClip [FScrollPaneSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
Instance of Symbol 506 MovieClip "loadContent" in Symbol 509 MovieClip [FScrollPaneSymbol] Frame 1
onClipEvent (load) {
if (this._parent.loadReady) {
this._parent.contentLoaded();
delete this._parent.loadReady;
} else if (this._name != "loadContent") {
this._parent.loadReady = true;
}
}
Symbol 519 Button
on (release) {
playAgain();
}
Symbol 527 Button
on (release) {
exitGame();
}
Symbol 539 MovieClip Frame 1
this._visible = false;