Frame 1
function onBuildNumber(obj, menuItem) {
}
Stage.scaleMode = "noScale";
var my_cm = new ContextMenu();
var menuItem_cmi = new ContextMenuItem("Games: Build-080707.1", onBuildNumber);
my_cm.customItems.push(menuItem_cmi);
my_cm.hideBuiltInItems();
this.menu = my_cm;
Instance of Symbol 21 MovieClip [NPBTracker] "nbpTracker" in Frame 1
//component parameters
onClipEvent (construct) {
autohide = true;
clientID = 25;
instance = "City and Guild";
passkey = "fr335ty13";
productID = 57;
}
Frame 2
function checkPlayerStatus() {
skipIntro = 0;
if (_global.selectedWindow != undefined) {
skipIntro = 1;
}
this.gotoAndPlay("loadXML");
}
stop();
playMode = 0;
System.security.allowDomain("http://media.cityandguilds.com/", "http://www.cityandguilds.com/", "http://www.dotcrawl.com/extranet/fsnm/motor/");
System.security.allowInsecureDomain("http://media.cityandguilds.com/", "http://www.cityandguilds.com/", "http://www.dotcrawl.com/extranet/fsnm/motor/");
XMLNode.prototype._mxr = function (f) {
return(this[0][f]);
};
XMLNode.prototype._mxp = function (xObj, obj) {
var c;
var nName;
var nType;
var cNode;
var cId;
obj.attributes = {};
var oa = obj.attributes;
var xa = xObj.attributes;
for (c in xa) {
oa[c] = xa[c];
}
for (c in xObj.childNodes) {
cNode = xObj.childNodes[c];
nName = cNode.nodeName;
nType = cNode.nodeType;
if (nType == 3) {
obj._value = cNode.nodeValue;
} else if ((nType == 1) && (nName != null)) {
if (!(obj[nName] instanceof Array)) {
obj[nName] = new Array();
obj[nName].__resolve = this._mxr;
ASSetPropFlags(obj[nName], null, 1, 1);
}
var sObj = this._mxp(cNode, {});
obj[nName].unshift(sObj);
}
}
return(obj);
};
XMLNode.prototype.makeXMLSA = function (noRoot) {
return(((noRoot == true) ? (this._mxp(this.firstChild, {})) : (this._mxp(this, {}))));
};
ASSetPropFlags(XMLNode.prototype, ["makeXMLSA", "_mxp", "_mxr"], 1, 1);
XML.prototype.loadInfo = function (page, xmlObject) {
this.ignoreWhite = true;
this.onLoad = function () {
_root[xmlObject] = this.makeXMLSA(true);
gotoAndPlay ("startLoading");
};
this.load(page);
};
XML.prototype.loadSwear = function (page, xmlObject) {
this.ignoreWhite = true;
this.onLoad = function () {
_root[xmlObject] = this.makeXMLSA(true);
gotoAndPlay ("checkIntro");
};
this.load(page);
};
XML.prototype.loadScore = function (page, xmlObject) {
this.ignoreWhite = true;
this.onLoad = function () {
_root[xmlObject] = this.makeXMLSA(true);
setScoreList();
};
this.load(page);
};
XML.prototype.loadName = function (page, xmlObject) {
this.ignoreWhite = true;
this.onLoad = function () {
_root[xmlObject] = this.makeXMLSA(true);
gotoAndPlay ("fadeScores");
};
this.load(page);
};
XML.prototype.loadGuid = function (page, xmlObject) {
this.ignoreWhite = true;
this.onLoad = function () {
_root[xmlObject] = this.makeXMLSA(true);
gotoAndPlay ("buildForm");
};
this.load(page);
};
XML.prototype.loadCode = function (page, xmlObject) {
this.ignoreWhite = true;
this.onLoad = function () {
_root[xmlObject] = this.makeXMLSA(true);
gotoAndPlay ("fadeForm");
};
this.load(page);
};
XML.prototype.loadPage = function (page, xmlObject) {
_root[xmlObject] = this.makeXMLSA(true);
loadImages();
};
MovieClip.prototype.setPos = function (xpos, ypos) {
this._x = xpos;
this._y = ypos;
};
Array.prototype.find_attribute = function (att, vValue) {
var l = this.length;
var z = 0;
while (z < l) {
if (this[z].attributes[att] == vValue) {
return(z);
}
z++;
}
return(false);
};
MovieClip.prototype.fadeAndRemoveDown = function (remove) {
this.onEnterFrame = function () {
if ((this._alpha - 15) < 0) {
this._alpha = 0;
this.delay = getTimer() + 100;
this.onEnterFrame = function () {
if (getTimer() > this.delay) {
gotoAndPlay ("fullyloaded");
this.removeMovieClip();
}
};
} else {
this._alpha = this._alpha - 15;
}
};
};
MovieClip.prototype.setLoader = function (load_array) {
this._alpha = 0;
this.delaytime = getTimer() + 200;
this.onEnterFrame = function () {
this.spin = this.spin + 0.1;
if (this.spin >= 200) {
this.spin = 200;
}
if (getTimer() > this.delaytime) {
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
}
}
this.spinner_mc._rotation = this.spinner_mc._rotation + Math.round(this.spin / 2);
var loaded = 0;
var total = 0;
var x = 0;
while (x < load_array.length) {
var item = load_array[x];
loaded = loaded + eval (item).getBytesLoaded();
total = total + eval (item).getBytesTotal();
if (eval (item).getBytesLoaded() == 0) {
loaded = 0;
}
x++;
}
var dif = Math.abs(this.loadbar_mc._x - this.endbar_mc._x);
var perc = Math.round((loaded / total) * 100);
var wth = Math.round((dif / 100) * perc);
this.loadbar_mc._width = wth;
if ((loaded > 0) && (loaded == total)) {
this.onEnterFrame = function () {
this.spin = this.spin - 4;
this.spinner_mc._rotation = this.spinner_mc._rotation - this.spin;
if (this.spin <= 50) {
this.fadeAndRemoveDown("remove");
}
};
}
};
};
checkPlayerStatus();
Frame 3
stop();
xmlInfo = new XML();
xmlInfo.loadInfo("http://www.cityandguilds.com/lovecars/order.xml", "xmlInfo");
Frame 4
stop();
stage_width = 618;
stage_height = 443;
var xpos = Math.round((stage_width - 129) / 2);
var ypos = Math.round((stage_height - 20) / 2);
this.attachMovie("loadclip_mc", "loadclip_mc", 1001, {_x:xpos, _y:ypos});
var load_array = new Array(this);
loadclip_mc.loadbar_mc._width = 0;
loadclip_mc.endbar_mc._x = 118;
loadclip_mc.setLoader(load_array);
Frame 7
MovieClip.prototype.setWidth = function (width) {
this.mid_mc._width = Math.round(width + 4);
this.end_mc._x = Math.round(width + 8);
};
MovieClip.prototype.setYesNo = function (setItem) {
this.itemlist = new Array("fYes", "fNo");
this.value = 0;
if (setItem == 1) {
this.gotoAndStop(2);
this.value = 1;
}
this.onPress = function () {
var x = 0;
while (x < this.itemlist.length) {
this._parent[this.itemlist[x]].gotoAndStop(1);
this._parent[this.itemlist[x]].value = 0;
x++;
}
this.gotoAndStop(2);
this.value = 1;
};
};
MovieClip.prototype.setTick = function (item) {
this.item = item;
this.value = "N";
this.onPress = function () {
if (this._currentframe == 1) {
this.gotoAndStop(2);
this.value = "Y";
} else {
this.gotoAndStop(1);
this.value = "N";
}
};
};
Frame 8
MovieClip.prototype.setScrollBar = function (itemHeight, setHeight, item, reset) {
if (item == "botinfo_mc") {
}
var adj = 26;
if ((itemHeight > setHeight) && (setHeight >= 50)) {
if (this.barbg_mc == undefined) {
this.attachMovie("barbg_mc", "barbg_mc", this.getNextHighestDepth(), {_height:setHeight - 8});
this.attachMovie("up_mc", "up_mc", this.getNextHighestDepth());
this.attachMovie("bar_mc", "bar_mc", this.getNextHighestDepth(), {_y:this.up_mc._height});
this.attachMovie("down_mc", "down_mc", this.getNextHighestDepth(), {_y:setHeight - this.up_mc._height});
this.bar_mc.item = eval (item);
} else {
this._visible = true;
this.barbg_mc._height = setHeight - 8;
this.down_mc._y = setHeight - this.up_mc._height;
if (reset == true) {
this.bar_mc._y = this.bar_mc.calcInfo.startPos;
}
}
this.bar_mc.itemPos = adj;
this.bar_mc.calcInfo = new Object();
this.bar_mc.calcInfo.scrollArea = Math.round(this.down_mc._y - this.down_mc._height);
this.bar_mc.calcInfo.diff = itemHeight - setHeight;
this.bar_mc.calcInfo.percent = Math.floor((this.bar_mc.calcInfo.diff / itemHeight) * 100);
this.bar_mc.calcInfo.barDiff = Math.floor((this.bar_mc.calcInfo.scrollArea / 100) * this.bar_mc.calcInfo.percent);
this.bar_mc.calcInfo.barSize = Math.round(this.bar_mc.calcInfo.scrollArea - this.bar_mc.calcInfo.barDiff);
this.bar_mc.barmid_mc._height = Math.round((this.bar_mc.calcInfo.barSize - this.bar_mc.bartop_mc._height) - this.bar_mc.barbot_mc._height) + 2;
this.bar_mc.barbot_mc._y = Math.round(this.bar_mc.calcInfo.barSize - this.bar_mc.barbot_mc._height);
this.bar_mc.calcInfo.startPos = this.up_mc._height;
this.bar_mc.calcInfo.jump = this.bar_mc.calcInfo.diff / this.bar_mc.calcInfo.barDiff;
this.bar_mc.calcInfo.step = 5;
this.bar_mc.calcInfo.onFindPos = function (ypos) {
return((this.startPos - ypos) * this.jump);
};
this.bar_mc.onPress = function () {
this.offset = this._y - _ymouse;
this.onEnterFrame = function () {
this.ymouse = _ymouse + this.offset;
if (this.ymouse < this.calcInfo.startPos) {
this._y = this.calcInfo.startPos;
} else if (this.ymouse > ((this.calcInfo.startPos + this.calcInfo.scrollArea) - this._height)) {
this._y = (this.calcInfo.startPos + this.calcInfo.scrollArea) - this._height;
} else {
this._y = _ymouse + this.offset;
}
var calc = Math.ceil(this.calcInfo.onFindPos(this._y));
this.item._y = calc + this.itemPos;
};
};
this.bar_mc.pressfunc = function () {
this.adj = 150;
this.offset = this._y - this.adj;
this.ymouse = this.adj + this.offset;
if (this.ymouse < this.calcInfo.startPos) {
this._y = this.calcInfo.startPos;
} else if (this.ymouse > ((this.calcInfo.startPos + this.calcInfo.scrollArea) - this._height)) {
this._y = (this.calcInfo.startPos + this.calcInfo.scrollArea) - this._height;
} else {
this._y = this.adj + this.offset;
}
var calc = Math.ceil(this.calcInfo.onFindPos(this._y));
this.item._y = calc + this.itemPos;
};
this.bar_mc.onRelease = function () {
delete this.onEnterFrame;
};
this.bar_mc.onReleaseOutside = this.bar_mc.onRelease;
this.up_mc.onPress = function () {
this._parent.bar_mc.onEnterFrame = function () {
if ((this._y - this.calcInfo.step) > this.calcInfo.startPos) {
this._y = this._y - this.calcInfo.step;
} else {
this._y = this.calcInfo.startPos;
}
this.item._y = this.calcInfo.onFindPos(this._y) + this._parent.bar_mc.itemPos;
};
};
this.up_mc.onRelease = function () {
delete this._parent.bar_mc.onEnterFrame;
};
this.up_mc.onReleaseOutside = this.up_mc.onRelease;
this.down_mc.onPress = function () {
this._parent.bar_mc.onEnterFrame = function () {
if ((this._y + this.calcInfo.step) < ((this.calcInfo.startPos + this.calcInfo.scrollArea) - this._height)) {
this._y = this._y + this.calcInfo.step;
} else {
this._y = (this.calcInfo.startPos + this.calcInfo.scrollArea) - this._height;
}
this.item._y = this.calcInfo.onFindPos(this._y) + this._parent.bar_mc.itemPos;
};
};
this.down_mc.onRelease = function () {
delete this._parent.bar_mc.onEnterFrame;
};
this.down_mc.onReleaseOutside = this.down_mc.onRelease;
this._visible = true;
} else if (setHeight < 42) {
this._visible = false;
} else {
var tempList = new Array("barbg_mc", "up_mc", "down_mc", "bar_mc");
var x = 0;
while (x < tempList.length) {
this[tempList[x]].removeMovieClip();
x++;
}
}
};
Frame 9
MovieClip.prototype.loadForm = function (url) {
if (playMode == 1) {
submitInfo = new XML();
submitInfo.loadGuid(url, "submitInfo");
} else {
this.error_string = "";
form_location = this;
result_lv = new LoadVars();
result_lv.onLoad = function (success) {
result_string = String(result_lv);
result_string = unescape(result_string);
_root.result_info_txt.text = result_string;
submitInfo = new XML();
submitInfo.ignoreWhite = true;
submitInfo.parseXML(result_string);
submitInfo = submitInfo.makeXMLSA(true);
if (submitInfo.status._value == "error") {
eval (form_location).error_string = my_xml.item[0].display._value;
} else if (submitInfo.status._value == "valid") {
gGuid = submitInfo.guid._value;
gotoAndPlay ("buildForm");
eval (form_location).error_string = "";
} else {
eval (form_location).error_string = "We are unable to submit the form. Please try again later.";
}
};
send_lv = new LoadVars();
send_lv.fSubmitted = "true";
send_lv.sendAndLoad(url, result_lv, "POST");
}
};
MovieClip.prototype.submitListener = function (evt) {
if (playMode == 1) {
var found = xmlInfo.link.find_attribute("name", "submitForm");
var url = xmlInfo.link[found]._value;
submitInfo = new XML();
submitInfo.loadCode(url, "submitInfo");
} else {
this.error_string = "";
form_location = this;
for (item in this) {
if (typeof(this[item]) == "movieclip") {
this[item].enabled = false;
}
}
result_lv = new LoadVars();
result_lv.onLoad = function (success) {
result_string = String(result_lv);
result_string = unescape(result_string);
_root.result_info_txt.text = result_string;
submitInfo = new XML();
submitInfo.ignoreWhite = true;
submitInfo.parseXML(result_string);
submitInfo = submitInfo.makeXMLSA(true);
if ((submitInfo.status._value == "error") && (submitInfo.item[0].detail._value != undefined)) {
for (item in eval (form_location)) {
if (typeof(eval (form_location)[item]) == "movieclip") {
eval (form_location)[item].enabled = true;
}
}
eval (form_location).error_string = submitInfo.item[0].display._value;
} else if (submitInfo.status._value == "valid") {
gotoAndPlay ("fadeForm");
eval (form_location).error_string = "";
} else {
for (item in eval (form_location)) {
if (typeof(eval (form_location)[item]) == "movieclip") {
eval (form_location)[item].enabled = true;
}
}
eval (form_location).error_string = "We are unable to submit the form. Please try again later.";
}
};
send_lv = new LoadVars();
var temp_array = new Array("fFullName", "fEmail", "fEmailConfirm");
var x = 0;
while (x < temp_array.length) {
if (this[temp_array[x]] != undefined) {
send_lv[temp_array[x]] = this[temp_array[x] + "_txt"].text;
}
x++;
}
var fAge = String(this.fAge.inputField_mc.input_txt.text).substr(0, 2);
send_lv.fAge = fAge;
if (this.fYes.value == 1) {
send_lv.fMotorShow = "Y";
} else {
send_lv.fMotorShow = "N";
}
send_lv.fSendInfo = this.fSendInfo.value;
send_lv.fTerms = this.fAgreeTerms.value;
send_lv.fGuid = gGuid;
send_lv.fSubmitted = "true";
send_lv.sendAndLoad(this.sendUrl, result_lv, "POST");
}
};
Frame 10
MovieClip.prototype.makeInput = function (boxtype, width, xPos, yPos, max, active, fieldId, txt, dropList, action, itemId) {
var depthNum = this.getNextHighestDepth();
var clipName = itemId;
this.attachMovie("inputWindow_mc", clipName, depthNum).setPos(xPos, yPos);
this.window_height = this[clipName]._height;
this[clipName].clip_name = clipName;
this[clipName].clip_num = depthNum;
this[clipName].attachMovie("inputField_mc", "inputField_mc", 1).setPos(4, 2);
this[clipName].inputField_mc.input_txt._width = width;
this[clipName].inputField_mc.input_txt._height = this[clipName]._height;
this[clipName].inputField_mc.input_txt.tabIndex = depthNum;
this[clipName].inputField_mc.input_txt.maxChars = max;
this[clipName].inputField_mc.input_txt.password = active;
this[clipName].mid_mc._width = Math.round(width + 4);
this[clipName].end_mc._x = Math.round(width + 8);
if (fieldId != null) {
this[clipName].inputField_mc.fieldId = fieldId.toLowerCase();
}
if (itemId != null) {
this[clipName].inputField_mc.itemId = itemId;
}
if (txt != null) {
this[clipName].inputField_mc.input_txt.text = txt;
}
if (boxtype == "number") {
this[clipName].inputField_mc.input_txt.restrict = "+() 0-9";
}
if (this[clipName]._height > 25) {
this[clipName].mid_mc.onRelease = function () {
var tempLength = String(this._parent.inputField_mc.input_txt).length;
Selection.setFocus(this._parent.inputField_mc.input_txt);
Selection.setSelection(tempLength, tempLength);
};
this[clipName].boxHeight = this[clipName]._height;
this[clipName].inputField_mc.input_txt.wordWrap = true;
this[clipName].inputField_mc.input_txt.multiline = true;
this[clipName].inputField_mc.input_txt.autoSize = true;
this[clipName].attachMovie("mask_mc", "mask_mc", this[clipName].getNextHighestDepth(), {_width:Math.round(this[clipName]._width), _height:Math.round(this.window_height), _alpha:60}).setPos(0, 0);
this[clipName].createEmptyMovieClip("dropBar_mc", this[clipName].getNextHighestDepth()).setPos(Math.round(this[clipName]._width), 0);
this[clipName].inputField_mc.setMask(this[clipName].mask_mc);
this[clipName].dropBar_mc.setScrollBar(Math.round(this[clipName].inputField_mc._height), this[clipName].mask_mc._height, this[clipName].inputField_mc);
this[clipName].dropBar_mc.tempHeight = this[clipName].inputField_mc._height;
this[clipName].dropBar_mc.widthSize = width;
this[clipName].dropBar_mc.onEnterFrame = function () {
if (this._parent.inputField_mc._height != this.tempHeight) {
if (this._parent.inputField_mc._height > this._parent.boxHeight) {
this._parent.inputField_mc.input_txt._width = this.widthSize - 10;
var tempPos = Math.ceil(this._parent.inputField_mc._height - this.tempHeight);
this.setScrollBar(Math.round(this._parent.inputField_mc._height), this._parent.mask_mc._height, this._parent.inputField_mc, false);
} else {
this._parent.inputField_mc._y = 0;
this.setScrollBar(Math.round(this._parent.inputField_mc._height), this._parent.mask_mc._height, this._parent.inputField_mc, true);
}
this.tempHeight = this._parent.inputField_mc._height;
}
};
}
if (dropList != undefined) {
this[clipName].inputField_mc.input_txt.sortfield(this[clipName].inputField_mc.input_txt.text, fontFormat("fmtDropBar"), true, false, false);
this[clipName].makeDropDown(dropList, action);
}
};
MovieClip.prototype.makeDropDown = function (itemArray, action, heading) {
var wPos = Math.round(this._width);
var hPos = 75;
if (itemArray.length > 36) {
hPos = 182;
}
this.attachMovie("dropbutton_mc", "dropbutton_mc", this.getNextHighestDepth()).setPos(this._width - 2, 0);
this.clearfnt = function () {
this.mask_mc.removeMovieClip();
this.dropMenu_mc.removeMovieClip();
this.dropBar_mc.removeMovieClip();
this.dropBg_mc.removeMovieClip();
};
this.dropfnt = function () {
this.swapDepths(999);
var ypos = 0;
for (var c in this._parent) {
if (typeof(this._parent[c]) == "movieclip") {
this._parent[c].clearfnt();
}
}
this.attachMovie("mask_mc", "mask_mc", this.getNextHighestDepth(), {_width:wPos + 26, _height:hPos, _alpha:30}).setPos(0, 26);
this.createEmptyMovieClip("dropBg_mc", this.getNextHighestDepth()).setPos(0, 26);
this.createEmptyMovieClip("dropMenu_mc", this.getNextHighestDepth()).setPos(0, 26);
this.createEmptyMovieClip("dropBar_mc", this.getNextHighestDepth()).setPos(0, 26);
this.dropMenu_mc.setMask(this.mask_mc);
var x = 0;
while (x < itemArray.length) {
var depthNum = this.dropMenu_mc.getNextHighestDepth();
var clipName = (("item" + depthNum) + "_mc");
this.dropMenu_mc.createEmptyMovieClip(clipName, depthNum).setPos(2, ypos);
this.dropMenu_mc[clipName].path = this;
this.dropMenu_mc[clipName].createTextField("text_txt", 1, 3, 3, wPos, 10);
this.dropMenu_mc[clipName].text_txt.sortfield(itemArray[x].nametag, fontFormat("fmtDropBar"), true, true, true);
this.dropMenu_mc[clipName].action = action;
this.dropMenu_mc[clipName].itemId = itemArray[x].id;
this.dropMenu_mc[clipName].itemName = itemArray[x].nametag;
this.dropMenu_mc[clipName].onPress = function () {
var fieldName = (("field_" + Number(eval (this.path).clip_num + 1)) + "_mc");
var populateField = eval (this.path)._parent[fieldName].inputField_mc.input_txt;
tempAction = eval (this.action);
tempAction(this.itemId, populateField);
eval (this.path).inputField_mc.input_txt.sortfield(this.itemName, fontFormat("fmtDropBar"), true, true, true);
eval (this.path).inputField_mc.itemId = this.itemId;
eval (this.path).clearfnt();
};
ypos = ypos + 18;
x++;
}
if (ypos < hPos) {
this.mask_mc._height = ypos + 5;
}
this.dropMenu_mc.onEnterFrame = function () {
var xpos = this._parent._xmouse;
var ypos = this._parent._ymouse;
var maskW = this._parent.mask_mc._width;
var maskH = this._parent.mask_mc._height;
if ((((xpos > maskW) || (xpos < 0)) || (ypos > (maskH + 26))) || (ypos < 0)) {
this._parent.clearfnt();
}
};
this.dropBar_mc._x = this._width - 21;
this.dropBar_mc.setScrollBar(this.dropMenu_mc._height + 6, hPos, this.dropMenu_mc);
this.dropBg_mc.attachMovie("drop_bg_mc", "bg_mc", 1, {_width:this.mask_mc._width - 3, _height:this.mask_mc._height - 1, _y:1});
};
this.dropbutton_mc.onPress = function () {
this._parent.dropfnt();
};
};
Frame 11
function buildForm() {
var found = xmlInfo.link.find_attribute("name", "submitForm");
var tempList = new Array("13 or under", "14 - 16", "17 - 50", "51 or over");
var tempYear = new Array();
var u = 0;
while (u < tempList.length) {
var temp = new Object();
temp.id = u + 1;
temp.nametag = tempList[u];
if (tempInput[1] == (u + 1)) {
tempInput[1] = tempList[u];
idList[1] = temp.id;
}
tempYear[u] = temp;
u++;
}
form_mc.makeInput("number", 110, 286, 202, 50, false, "dob", tempList[0], tempYear, "", "fAge");
form_mc.fYes.setYesNo();
form_mc.fNo.setYesNo();
form_mc.fSendInfo.setTick("fReceiveMkt");
form_mc.fAgreeTerms.setTick("fReceiveMkt");
form_mc.sendUrl = xmlInfo.link[found]._value;
form_mc.submit_mc.onRelease = function () {
_level0.nbpTracker.recordEvent("click through: Submit Form");
this.error_check = "";
var fTerm = this._parent.fAgreeTerms.value;
if (fTerm == "N") {
this.error_check = "You must agree to the terms and conditions to enter the competition.";
}
var fAge = String(this._parent.fAge.inputField_mc.input_txt.text).substr(0, 2);
if (fAge < 14) {
this.error_check = "Sorry, you must be 14 or over to enter the City & Guilds competition.";
}
if (this.error_check == "") {
this._parent.submitListener();
} else {
this._parent.error_string = this.error_check;
}
};
var found = xmlInfo.link.find_attribute("name", "terms");
form_mc.read_mc.link = xmlInfo.link[found]._value;
form_mc.read_mc.onRelease = function () {
_level0.nbpTracker.recordEvent("click through: Terms and Conditions");
getURL (this.link, "_blank");
};
}
function buildCode() {
var code_number = submitInfo.CODE._value;
submitInfo.guid._value;
thankyou_mc.code_txt.text = code_number;
var found = xmlInfo.link.find_attribute("name", "find_at_show");
thankyou_mc.show_mc.link = xmlInfo.link[found]._value;
thankyou_mc.show_mc.onRelease = function () {
_level0.nbpTracker.recordEvent("click through: Find Us at Motor Show");
getURL (this.link, "_blank");
};
var found = xmlInfo.link.find_attribute("name", "find_more");
thankyou_mc.more_mc.link = xmlInfo.link[found]._value;
thankyou_mc.more_mc.onRelease = function () {
_level0.nbpTracker.recordEvent("click through: Find out More");
getURL (this.link, "_blank");
};
thankyou_mc.print_mc.onRelease = function () {
_level0.nbpTracker.recordEvent("click through: Print Form");
this._parent.printPage();
};
}
Frame 12
function submitName(userName) {
var isSwear = xmlSwear.item.find_value(userName);
if (userName == "") {
userName = "Mechanic";
}
if (typeof(isSwear) == "number") {
userName = "Mechanic";
}
submitInfo_mc.removeMovieClip();
var found = xmlInfo.link.find_attribute("name", "submitScoreName");
this.createEmptyMovieClip("submitInfo_mc", this.getNextHighestDepth());
submitInfo_mc.finalscore = totalscore_mc.score_txt.text;
submitInfo_mc.submitScoreName(xmlInfo.link[found]._value, userName);
}
function setScoreList() {
var xpos = 167;
var ypos = 113;
var scorepos = 0;
var lastScore = Math.round(scoreInfo.result[scoreInfo.result.length - 1].attributes.score);
if (_root.finalscore < lastScore) {
scoreboard_mc.boardSize_mc.gotoAndStop(2);
}
var x = 0;
while (x < scoreInfo.result.length) {
var clipName = (("score_" + scorepos) + "_mc");
var temp_score = scoreInfo.result[x].attributes.score;
debug = debug + (temp_score + " -");
var scoreString = "000000";
var scorestamp = String(Math.round(temp_score));
scoreString = scoreString.slice(0, scoreString.length - String(scorestamp).length);
scoreString = scoreString + scorestamp;
if (scorepos == 0) {
var posInfo = "1ST";
} else if (scorepos == 1) {
var posInfo = "2ND";
} else if (scorepos == 2) {
var posInfo = "3RD";
} else {
var posInfo = (Number(scorepos + 1) + "TH");
}
if ((_root.finalscore > temp_score) && (_root.finalscore != 0)) {
this.scoreboard_mc.attachMovie("scoreEditFade_mc", clipName, this.scoreboard_mc.getNextHighestDepth(), {_x:xpos, _y:ypos, timer:getTimer() + (Number(x + 1) * 100)});
this.scoreboard_mc[clipName].scoreitem_mc.nameInfo = "";
this.scoreboard_mc[clipName].scoreitem_mc.time_mc.timeInfo = _root.finalscore;
this.scoreboard_mc[clipName].scoreitem_mc.pos_mc.posInfo = posInfo;
this.scoreboard_mc[clipName].scoreitem_mc.submit_mc.onRelease = function () {
this.gotoAndStop(2);
this.enabled = false;
submitName(this._parent.nameInfo);
};
timevar = _root.finalscore;
_root.finalscore = 0;
x--;
} else {
this.scoreboard_mc.attachMovie("scoreFade_mc", clipName, this.scoreboard_mc.getNextHighestDepth(), {_x:xpos, _y:ypos, timer:getTimer() + (Number(x + 1) * 100)});
this.scoreboard_mc[clipName].scoreitem_mc.nameInfo = scoreInfo.result[x].attributes.name;
this.scoreboard_mc[clipName].scoreitem_mc.timeInfo = scoreString;
this.scoreboard_mc[clipName].scoreitem_mc.posInfo = posInfo;
}
scorepos++;
this.scoreboard_mc[clipName].onEnterFrame = function () {
if (getTimer() > this.timer) {
this.gotoAndPlay(2);
delete this.onEnterFrame;
}
};
if (scorepos > (scoreInfo.result.length - 1)) {
break;
}
ypos = ypos + (this.scoreboard_mc[clipName]._height + 4);
x++;
}
if ((_root.finalscore < lastScore) && (_root.finalscore != 0)) {
scorepos++;
var clipName = (("score_" + scorepos) + "_mc");
this.scoreboard_mc.attachMovie("scoreEditFade_mc", clipName, this.scoreboard_mc.getNextHighestDepth(), {_x:xpos, _y:365, timer:getTimer() + (Number(x + 1) * 100)});
this.scoreboard_mc[clipName].scoreitem_mc.nameInfo = "";
this.scoreboard_mc[clipName].scoreitem_mc.time_mc.timeInfo = _root.finalscore;
this.scoreboard_mc[clipName].scoreitem_mc.pos_mc.posInfo = posInfo;
timevar = _root.finalscore;
_root.finalscore = 0;
this.scoreboard_mc[clipName].onEnterFrame = function () {
if (getTimer() > this.timer) {
this.gotoAndPlay(2);
delete this.onEnterFrame;
}
};
this.scoreboard_mc[clipName].scoreitem_mc.submit_mc.onPress = function () {
this.gotoAndStop(2);
this.enabled = false;
submitName(this._parent.nameInfo);
};
}
gotoAndPlay ("fadeUp");
}
MovieClip.prototype.submitScore = function (url) {
if (playMode == 1) {
scoreInfo = new XML();
scoreInfo.loadScore(url, "scoreInfo");
} else {
this.error_string = "";
form_location = this;
result_lv = new LoadVars();
result_lv.onLoad = function (success) {
result_string = String(result_lv);
result_string = unescape(result_string);
_root.result_info_txt.text = result_string;
scoreInfo = new XML();
scoreInfo.ignoreWhite = true;
scoreInfo.parseXML(result_string);
scoreInfo = scoreInfo.makeXMLSA(true);
if (scoreInfo.status._value == "error") {
eval (form_location).error_string = scoreInfo.item[0].display._value;
} else if (scoreInfo.status._value == "valid") {
sGuid = scoreInfo.guid._value;
setScoreList();
eval (form_location).error_string = "";
} else {
eval (form_location).error_string = "We are unable to submit the form. Please try again later.";
}
};
send_lv = new LoadVars();
send_lv.fScore = Math.round(this.finalscore);
send_lv.fSubmitted = "true";
var rnNum = String("?num=" + random(999999999));
send_lv.sendAndLoad(url + rnNum, result_lv, "POST");
}
};
MovieClip.prototype.submitScoreName = function (url, userName) {
if (playMode == 1) {
scoreInfo = new XML();
scoreInfo.loadName(url, "scoreInfo");
} else {
this.error_string = "";
form_location = this;
result_lv = new LoadVars();
result_lv.onLoad = function (success) {
result_string = String(result_lv);
result_string = unescape(result_string);
_root.result_info_txt.text = result_string;
scoreInfo = new XML();
scoreInfo.ignoreWhite = true;
scoreInfo.parseXML(result_string);
scoreInfo = scoreInfo.makeXMLSA(true);
if (scoreInfo.status._value == "error") {
eval (form_location).error_string = scoreInfo.item[0].display._value;
} else if (scoreInfo.status._value == "valid") {
gotoAndPlay ("fadeScores");
eval (form_location).error_string = "";
} else {
eval (form_location).error_string = "We are unable to submit the form. Please try again later.";
}
};
send_lv = new LoadVars();
send_lv.fName = userName;
send_lv.fGuid = sGuid;
send_lv.fSubmitted = "true";
send_lv.sendAndLoad(url, result_lv, "POST");
}
};
Frame 13
function fontFormat(itemName, itemList) {
if (itemList == undefined) {
return(fontFormat.prototype.getFormat(itemName));
}
fontFormat.prototype.setFormat(itemName, itemList);
}
TextField.prototype.sortfield = function (info, format, embed, auto, wrap, aatype) {
var setting = aatype.split(":");
if (setting.length > 0) {
this.antiAliasType = setting[0];
this.sharpness = setting[1];
this.thickness = setting[2];
}
this.selectable = false;
this.html = true;
this.embedFonts = embed;
this.autoSize = auto;
this.wordWrap = wrap;
this.multiline = wrap;
this.htmlText = info;
this.setTextFormat(format);
var temp = this._height;
};
fontFormat.prototype.setFormat = function (itemName, itemList) {
this[itemName] = new Object();
var format = new TextFormat();
var x = 0;
while (x < itemList.length) {
format[itemList[x][0]] = itemList[x][1];
x++;
}
this[itemName] = format;
};
fontFormat.prototype.getFormat = function (itemName) {
return(this[itemName]);
};
fontFormat("fmtDropBar", [["color", 0], ["font", "CongressSans"], ["size", 14]]);
fontFormat("fmtHeader", [["color", 0], ["font", "Univers55Roman"], ["size", 10], ["kerning", true], ["letterSpacing", 0.5]]);
fontFormat("fmtBody", [["color", 0], ["font", "Univers55Roman"], ["size", 8], ["letterSpacing", 0]]);
Frame 14
function loadeGames() {
timer_mc.startTimer = function (sec) {
this.clock_mc.timer = getTimer();
this.clock_mc.degree = 0;
this.clock_mc.score = 0;
start_time = this.clock_mc.timer;
if (sec < 10) {
this.clock_mc.deg = 4;
} else {
this.clock_mc.deg = 2;
}
this.playSound("clock_sound", 99999);
this.clock_mc.onEnterFrame = function () {
if (getTimer() > this.timer) {
var clipName = (("deg" + this.degree) + "_mc");
this.attachMovie(("degree" + this.deg) + "_mc", clipName, this.getNextHighestDepth(), {_rotation:this.degree});
this.degree = this.degree - this.deg;
var temp = Math.round(start_time + (sec * 1000));
var dif = Math.ceil(temp - getTimer());
var degdif = Math.floor(Math.abs(360 + this.degree));
if (deg > 2) {
var t = (Math.ceil(dif / degdif) * this.deg);
} else {
var t = (Math.ceil(dif / degdif) * this.deg);
}
this.score = Math.round((sec * 1000) - Math.abs(start_time - getTimer()));
debug = "TIME:" + this.score;
this.timer = getTimer() + t;
if (this.degree <= -360) {
stopTimer("wrong");
}
}
};
};
timer_mc.stopTimer = function (answer) {
this.stopSound("clock_sound");
delete this.clock_mc.onEnterFrame;
if (answer != "wrong") {
var temp_score = Math.abs(this.clock_mc.score);
var cur_score = Math.round(totalscore_mc.score);
if (this.clock_mc.score < 0) {
if (Math.abs(this.clock_mc.degree) == 360) {
temp_score = 0;
} else {
this.playSound("correct_sound", 0);
this.clock_mc.setColour("0x00CC00");
}
} else {
this.playSound("correct_sound", 0);
this.clock_mc.setColour("0x00CC00");
}
var add_score = Math.round(cur_score + temp_score);
totalscore_mc.score = add_score;
var scoreString = "000000";
var scorestamp = String(Math.round(add_score));
scoreString = scoreString.slice(0, scoreString.length - String(scorestamp).length);
scoreString = scoreString + scorestamp;
totalscore_mc.score_txt.text = scoreString;
_root.finalscore = add_score;
} else {
this.playSound("wrong_sound", 0);
}
resetTimer();
};
timer_mc.game_number = 1;
var clipName = xmlInfo.file[timer_mc.game_number - 1].attributes.name;
var link = xmlInfo.file[timer_mc.game_number - 1].attributes.url;
currentGame = clipName + "_mc";
totalscore_mc.score = 0;
games_mc.createEmptyMovieClip(currentGame, games_mc.getNextHighestDepth());
games_mc[currentGame]._lockroot = true;
games_mc[currentGame].loadMovie(link);
gamepos_mc[("num" + timer_mc.game_number) + "_mc"].gotoAndStop(2);
gamepos_mc.fadeUp();
}
function nextGame() {
gamepos_mc[("num" + timer_mc.game_number) + "_mc"].gotoAndStop(1);
timer_mc.game_number++;
if (timer_mc.game_number > xmlInfo.file.length) {
this.gotoAndPlay("showScores");
} else {
var clipName = xmlInfo.file[timer_mc.game_number - 1].attributes.name;
var link = xmlInfo.file[timer_mc.game_number - 1].attributes.url;
currentGame = clipName + "_mc";
if (games_mc[currentGame] == undefined) {
games_mc.createEmptyMovieClip(currentGame, games_mc.getNextHighestDepth());
games_mc[currentGame]._lockroot = true;
games_mc[currentGame].loadMovie(link);
} else {
eval (games_mc[currentGame].resetGame());
eval (games_mc[currentGame])._visible = true;
}
gamepos_mc[("num" + timer_mc.game_number) + "_mc"].gotoAndStop(2);
gamepos_mc.gotoAndStop(timer_mc.game_number);
}
}
function resetTimer() {
timer_mc.clock_mc.counter = 0;
timer_mc.clock_mc.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha - 15;
} else {
this.counter++;
this._alpha = 100;
}
if (this.counter >= 7) {
var x = -360;
while (x <= 0) {
var clipName = (("deg" + x) + "_mc");
this[clipName].removeMovieClip();
x++;
}
this.degree = 0;
eval (games_mc[currentGame])._visible = false;
this.removeColour();
nextGame();
delete this.onEnterFrame;
}
};
}
MovieClip.prototype.playSound = function (sound_name, loop) {
this[sound_name] = new Sound(this);
this[sound_name].attachSound(sound_name);
this[sound_name].start(0, loop);
};
MovieClip.prototype.stopSound = function (sound_name) {
this[sound_name].stop();
};
MovieClip.prototype.stopAllSound = function () {
stopAllSounds();
};
_global.startTimer = function (sec) {
timer_mc.clock_mc.timer = getTimer();
timer_mc.clock_mc.degree = 0;
timer_mc.clock_mc.score = 0;
start_time = timer_mc.clock_mc.timer;
if (sec < 10) {
timer_mc.clock_mc.deg = 4;
} else {
timer_mc.clock_mc.deg = 2;
}
timer_mc.playSound("clock_sound", 99999);
timer_mc.clock_mc.onEnterFrame = function () {
if (getTimer() > this.timer) {
var clipName = (("deg" + this.degree) + "_mc");
this.attachMovie(("degree" + this.deg) + "_mc", clipName, this.getNextHighestDepth(), {_rotation:this.degree});
this.degree = this.degree - this.deg;
var temp = Math.round(start_time + (sec * 1000));
var dif = Math.ceil(temp - getTimer());
var degdif = Math.floor(Math.abs(360 + this.degree));
if (deg > 2) {
var t = (Math.ceil(dif / degdif) * this.deg);
} else {
var t = (Math.ceil(dif / degdif) * this.deg);
}
this.score = Math.round((sec * 1000) - Math.abs(start_time - getTimer()));
debug = "TIME:" + this.score;
this.timer = getTimer() + t;
if (this.degree <= -360) {
stopTimer("wrong");
}
}
};
};
_global.stopTimer = function (answer) {
timer_mc.stopSound("clock_sound");
delete timer_mc.clock_mc.onEnterFrame;
if (answer != "wrong") {
var temp_score = Math.abs(timer_mc.clock_mc.score);
var cur_score = Math.round(totalscore_mc.score);
if (timer_mc.clock_mc.score < 0) {
if (Math.abs(timer_mc.clock_mc.degree) == 360) {
temp_score = 0;
} else {
timer_mc.playSound("correct_sound", 0);
timer_mc.clock_mc.setColour("0x00CC00");
}
} else {
timer_mc.playSound("correct_sound", 0);
timer_mc.clock_mc.setColour("0x00CC00");
}
var add_score = Math.round(cur_score + temp_score);
totalscore_mc.score = add_score;
var scoreString = "000000";
var scorestamp = String(Math.round(add_score));
scoreString = scoreString.slice(0, scoreString.length - String(scorestamp).length);
scoreString = scoreString + scorestamp;
totalscore_mc.score_txt.text = scoreString;
_root.finalscore = add_score;
} else {
timer_mc.playSound("wrong_sound", 0);
}
resetTimer();
};
Frame 15
MovieClip.prototype.setColour = function (colour) {
var new_color = new Color(this);
new_color.setRGB(colour);
};
MovieClip.prototype.removeColour = function () {
var new_color = new Color(this);
new_color.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
};
MovieClip.prototype.fadeUp = function () {
this.jump = 15;
this._alpha = 0;
this._visible = true;
this.onEnterFrame = function () {
if ((this._alpha + this.jump) >= 100) {
this._alpha = 100;
delete this.onEnterFrame;
} else {
this._alpha = this._alpha + this.jump;
}
};
};
MovieClip.prototype.fadeDown = function () {
if (this._visible == true) {
this.jump = 15;
this.onEnterFrame = function () {
if ((this._alpha + this.jump) <= 0) {
this._visible = false;
delete this.onEnterFrame;
} else {
this._alpha = this._alpha - this.jump;
}
};
}
};
MovieClip.prototype.removeClips = function (itemList) {
var z = 0;
while (z < itemList.length) {
this.tempitem = itemList[z];
this[itemList[z]].removeMovieClip();
z++;
}
};
MovieClip.prototype.setPos = function (xpos, ypos) {
this._x = xpos;
this._y = ypos;
};
String.prototype.searchReplace = function (vFind, vReplace) {
var result = this.split(vFind);
return(result.join(vReplace));
};
Array.prototype.find_in_array = function (vValue) {
var l = this.length;
var z = 0;
while (z < l) {
if (this[z] == vValue) {
return(z);
}
z++;
}
return(false);
};
Array.prototype.find_attribute = function (att, vValue) {
var l = this.length;
var z = 0;
while (z < l) {
if (this[z].attributes[att] == vValue) {
return(z);
}
z++;
}
return(false);
};
Array.prototype.find_value = function (vValue) {
var vValueStrip = vValue.searchReplace(" ", "");
vValueStrip = vValueStrip.toLowerCase();
var l = this.length;
var z = 0;
while (z < l) {
if (this[z]._value.toLowerCase() == vValueStrip) {
return(z);
}
z++;
}
return(false);
};
MovieClip.prototype.printPage = function () {
var pageCount = 0;
var my_pj = new PrintJob();
if (my_pj.start()) {
my_pj.orientation = "landscape";
if (my_pj.addPage(this, {xMin:0, xMax:618, yMin:0, yMax:443}, {printAsBitmap:true}, 1)) {
}
}
if (pageCount > 0) {
my_pj.send();
}
delete my_pj;
};
MovieClip.prototype.moveClip = function (targetx, targety) {
this.speedx = 0;
this.speedy = 0;
this.onEnterFrame = function () {
var difx = (targetx - this._x);
var dify = (targety - this._y);
this.speedx = this.speedx + (difx / 10);
this.speedy = this.speedy + (dify / 10);
this.speedx = this.speedx * 0.8;
this.speedy = this.speedy * 0.8;
this._x = this._x + this.speedx;
this._y = this._y + this.speedy;
if ((Math.abs(difx) < 0.2) && (Math.abs(dify) < 0.2)) {
this._x = targetx;
this._y = targety;
delete this.onEnterFrame;
}
};
};
Frame 16
var found = xmlInfo.link.find_attribute("name", "swear");
xmlSwear = new XML();
xmlSwear.loadSwear(xmlInfo.link[found]._value, "xmlSwear");
stop();
Frame 18
if (skipIntro == 1) {
this.gotoAndPlay("startGames");
}
if (xmlInfo.end._value == "end") {
intro_mc.gotoAndStop(2);
}
Frame 29
stop();
intro_mc.play_mc.onPress = function () {
_level0.nbpTracker.recordEvent("click through: GO! button (Start game)");
this._parent._parent.gotoAndPlay("startGames");
};
intro_mc.skip_mc.onPress = function () {
_level0.nbpTracker.recordEvent("click through: Click here to enter (Form)");
this._parent._parent.gotoAndPlay("skipscores");
};
Frame 32
if (_global.playGames == 0) {
this.gotoAndPlay("skipscores");
}
Frame 66
stop();
loadeGames();
Frame 82
stop();
var found = xmlInfo.link.find_attribute("name", "submitScore");
this.createEmptyMovieClip("submitInfo_mc", this.getNextHighestDepth());
if (_root.finalscore <= 0) {
_root.finalscore = 1;
}
submitInfo_mc.finalscore = _root.finalscore;
submitInfo_mc.submitScore(xmlInfo.link[found]._value);
Frame 92
stop();
_level0.nbpTracker.recordEvent("Event: Display Score");
Frame 99
stop();
if (xmlInfo.end._value == "end") {
gotoAndPlay ("fullyloaded");
} else {
submitInfo_mc.removeMovieClip();
var found = xmlInfo.link.find_attribute("name", "loadForm");
this.createEmptyMovieClip("submitInfo_mc", this.getNextHighestDepth());
submitInfo_mc.loadForm(xmlInfo.link[found]._value);
}
Frame 101
buildForm();
Frame 108
stop();
Frame 117
buildCode();
Frame 125
stop();
Symbol 21 MovieClip [NPBTracker] Frame 1
#initclip 2
Object.registerClass("NPBTracker", npb.NPBTracker);
#endinitclip
Symbol 10 MovieClip [__Packages.npb.NPBTracker] Frame 0
class npb.NPBTracker extends MovieClip
{
var trackerVersion, trackerVersiontxt, eventCount, npbso, watch, autohide, _visible, productID, clientID, passkey, createEmptyMovieClip, instance, status, display, machineID, _url;
function NPBTracker () {
super();
trackerVersion = "1.2";
trackerVersiontxt.text = trackerVersion;
setStatus("NPB Tracker", true);
eventCount = 0;
AsBroadcaster.initialize(this);
npbso = getSharedObject();
System.security.allowDomain(SCRIPT_DOMAIN);
_global.npbTracker = this;
}
function onLoad() {
if (!init()) {
watch("productID", init);
watch("clientID", init);
watch("passkey", init);
} else {
if (autohide) {
_visible = false;
}
recordEvent("load");
}
}
function getSharedObject() {
return(SharedObject.getLocal("NPBTracker" + productID, "/"));
}
function init() {
if (productID < 0) {
setStatus("Error: Product ID not specified", true);
return(false);
}
if (clientID == -1) {
setStatus("Error: ClientID not specified", true);
return(false);
}
if (passkey == "") {
setStatus("Error: Passkey not specified", true);
return(false);
}
setStatus("Initialised", true);
return(true);
}
function onRelease() {
if (isDebug) {
recordEvent("Test Event");
}
}
function recordEvent(eventName) {
if (isDisabled()) {
setStatus("Error: This Tracker has been remotely disabled");
return(undefined);
}
if (!isValid) {
setStatus("Error: Invalid clientid / password combination");
return(undefined);
}
if (!isValidConnection) {
setStatus("Error: Connection unavailable");
return(undefined);
}
var me = this;
var sendEvent = createEmptyMovieClip("sendEvent" + eventCount, eventCount);
var e = sendEvent.createEmptyMovieClip("e", 0);
eventCount++;
e.eventName = eventName;
e.instance = instance;
e.productID = productID;
e.domain = domain;
e.clientID = clientID;
e.trackerversion = trackerVersion;
e.passkey = passkey;
e.machineid = getMachineID();
sendEvent.onData = function () {
var interval;
var timeout = 0;
trace("sendEvent.onData");
interval = setInterval(function () {
if ((timeout++) < 100) {
if (e.eventid || ((timeout++) > 100)) {
clearInterval(interval);
trace("SendEvent::onData");
me.setStatus((("recieve:'" + eventName) + "':") + e.eventid);
me.setStatus("recieve:'isvalid':" + e.isvalid);
me.setStatus("recieve:'machineid':" + e.machineid);
if (me.machineID != Number(e.machineid)) {
me.setMachineID(e.machineid);
}
if (e.disableDate != undefined) {
var dd = e.disableDate.split("|");
var checkBack = new Date(dd[0], dd[1] - 1, dd[2], 12, 0, 0);
me.disable(checkBack);
}
me.isValid = e.isvalid;
me.broadcastMessage("onData", sendEvent);
}
} else {
this.isValidConnection = false;
}
}, 100);
};
if (isDev) {
SCRIPT_URL = TEST_SCRIPT_URL;
}
trace("NPBTracker::recordEvent" + SCRIPT_URL);
e.loadMovie(SCRIPT_URL, "POST");
setStatus((("send:'" + eventName) + "':") + eventCount);
}
function setStatus(str, reset) {
if (reset) {
status = str + newline;
} else {
status = status + (str + newline);
}
display.scroll = display.maxscroll;
}
function getMachineID() {
machineID = npbso.data.machineID;
if (machineID == "") {
trace("no machine id set");
machineID = -1;
}
return(Number(machineID));
}
function setMachineID(id) {
npbso.data.machineID = id;
npbso.flush();
}
function isDisabled() {
trace("Checking Enable");
if (npbso.data.disabled != undefined) {
var now = new Date();
if (now.getTime() < npbso.data.disabled.getTime()) {
trace(npbso.data.disabled);
return(true);
}
trace("time elaspsed: " + npbso.data.disabled);
enable();
}
return(false);
}
function disable(d) {
npbso.data.disabled = d;
npbso.flush();
trace("disabled");
}
function enable() {
npbso.data.disabled = null;
delete npbso.data.disabled;
npbso.flush();
delete npbso;
npbso = getSharedObject();
trace("enabled");
}
var domain = _url;
var SCRIPT_PROTOCOL = "http://";
var SCRIPT_DOMAIN = "www.npbmedia.com";
var TEST_SCRIPT_DOMAIN = "devserver2";
var SCRIPT_URL = (npb.NPBTracker.prototype.SCRIPT_PROTOCOL + npb.NPBTracker.prototype.SCRIPT_DOMAIN) + "/tracker/tracker_recorder.php";
var TEST_SCRIPT_URL = (npb.NPBTracker.prototype.SCRIPT_PROTOCOL + npb.NPBTracker.prototype.TEST_SCRIPT_DOMAIN) + "/tracker_1_1/tracker_recorder.php";
var isDev = false;
var isDebug = true;
var isValid = true;
var isValidConnection = true;
}
Symbol 49 MovieClip [down_mc] Frame 1
stop();
Symbol 52 MovieClip [up_mc] Frame 1
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 75 MovieClip [scoreEditFade_mc] Frame 1
stop();
Symbol 75 MovieClip [scoreEditFade_mc] Frame 13
stop();
Symbol 82 MovieClip [scoreFade_mc] Frame 1
stop();
Symbol 82 MovieClip [scoreFade_mc] Frame 13
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 1
play_mc._accProps = new Object();
play_mc._accProps.name = "Play Game";
play_mc._accProps.description = "Click here to start playing tha games.";
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 1
stop();
Symbol 183 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 1
fFullName_txt._accProps = new Object();
fFullName_txt._accProps.name = "Full name field";
fFullName_txt._accProps.description = "Type in your full name into this field.";
fEmail_txt._accProps = new Object();
fEmail_txt._accProps.name = "Email address field";
fEmail_txt._accProps.description = "Type in you email address in this field";
fEmailConfirm_txt._accProps = new Object();
fEmailConfirm_txt._accProps.name = "Confirm email address field";
fEmailConfirm_txt._accProps.description = "Confirm your email address again before you submit.";
fYes._accProps = new Object();
fYes._accProps.name = "Yes, going to the motor show";
fYes._accProps.description = "A radio button to say yes, that you will be going to the motor show.";
fNo._accProps = new Object();
fNo._accProps.name = "No, not going to the motor show";
fNo._accProps.description = "A radio button to say no, that you will not be going to the motor show.";
fSendInfo._accProps = new Object();
fSendInfo._accProps.name = "Send information tick box";
fSendInfo._accProps.description = "A tick box to allow City & Guilds to send information on qualifications";
read_mc._accProps = new Object();
read_mc._accProps.name = "The terms and conditions for the competition";
read_mc._accProps.description = "Click here to view the terms and conditions for entering the competition";
fAgreeTerms._accProps = new Object();
fAgreeTerms._accProps.name = "Agree to terms tick box";
fAgreeTerms._accProps.description = "A tick box to agree to the terms and conditions for the competition";
submit_mc._accProps = new Object();
submit_mc._accProps.name = "Submit your information to City & Guilds";
submit_mc._accProps.description = "Click here to send your information to City & Guilds";
fFullName_txt.tabIndex = 1;
fEmail_txt.tabIndex = 2;
fEmailConfirm_txt.tabIndex = 3;
fYes.tabIndex = 4;
fNo.tabIndex = 5;
fSendInfo.tabIndex = 6;
fAgreeTerms.tabIndex = 7;
fFullName_txt.tabIndex = 1;
fEmail_txt.tabIndex = 2;
fEmailConfirm_txt.tabIndex = 3;
fYes.tabIndex = 4;
fNo.tabIndex = 5;
fSendQual.tabIndex = 6;
fAgreeTerms.tabIndex = 7;
submit_mc.tabIndex = 8;
fFullName_txt.restrict = "a-z A-Z \\-'";
fEmail_txt.restrict = "a-z A-Z 0-9 @ \\- ._~";
fEmailConfirm_txt.restrict = "a-z A-Z 0-9 @ \\- ._~";
Symbol 215 MovieClip Frame 1
code_txt._accProps = new Object();
code_txt._accProps.description = "Code to take to motor show";
show_mc._accProps = new Object();
show_mc._accProps.name = "Find us at the motor show";
show_mc._accProps.description = "Click here to open a window to the motor show website";
more_mc._accProps = new Object();
more_mc._accProps.name = "Find out more about City & Guilds";
more_mc._accProps.description = "Click here to open the City & Guilds website and find more information about qualifications";
print_mc._accProps = new Object();
print_mc._accProps.name = "Print the page";
print_mc._accProps.description = "Click here to print out the page and the code to take to the motor show.";
fFullName_txt.tabIndex = 1;
fEmail_txt.tabIndex = 2;
fEmailConfirm_txt.tabIndex = 3;
fYes.tabIndex = 4;
fNo.tabIndex = 5;
fSendQual.tabIndex = 6;
fAgreeTerms.tabIndex = 7;
submit_mc.tabIndex = 8;
fFullName_txt.restrict = "a-z A-Z \\-'";
fEmail_txt.restrict = "a-z A-Z 0-9 @ \\- ._~";
fEmailConfirm_txt.restrict = "a-z A-Z 0-9 @ \\- ._~";