Frame 1
function databuilder() {
varslist = [];
valueslist = [];
var _local1 = doc.firstChild.firstChild;
while (_local1 != null) {
varslist.push(_local1.nodeName);
valueslist.push(_local1.firstChild.nodeValue);
_local1 = _local1.nextSibling;
}
i = 0;
while (i < varslist.length) {
Set(varslist[i], valueslist[i]);
i++;
}
nextFrame();
}
stop();
doc = new XML();
doc.ignoreWhite = true;
doc.load("hannahbox.xml?" + random(1000000));
doc.onLoad = function (success) {
databuilder();
};
id = 1;
Frame 2
function tracer() {
getPasswordHash = ("function getPasswordHash(){var hash = hex_hmac_md5('" + inputtxt.text) + "', 'nbccom');for (var i = 0; i < 103; i++){hash = hex_md5(hash);}return hash;}";
dd = flash.external.ExternalInterface.call(getPasswordHash);
if (dd.toString() == password) {
nextFrame();
} else {
gotoAndStop ("wrong");
}
}
stop();
password = "d1d52d83e4582fd001b3d17688263e43";
submit_btn.onRollOver = function () {
this.gotoAndStop(2);
};
submit_btn.onRollOut = (submit_btn.onDragOut = function () {
this.gotoAndStop(1);
});
submit_btn.onPress = function () {
this.gotoAndStop(1);
};
submit_btn.onRelease = function () {
thepassword = inputtxt.text;
tracer();
};
titletxt.autoSize = true;
titletxt.text = eval ("title" + id);
txt2.text = introcopy;
Instance of Symbol 9 MovieClip "submit_btn" in Frame 2
/* no clip actions */
Frame 3
function checkform() {
i = 0;
while (i <= email_txt.text.length) {
if (email_txt.text.substr(i, 1) == "@") {
sendercheck = 1;
}
if (sendercheck == 1) {
if (email_txt.text.substr(i, 1) == ".") {
sendercheck = true;
}
}
i++;
}
if ((sendercheck && (username_txt.text != undefined)) && (username_txt.text != "")) {
submit();
} else if (!sendercheck) {
getURL ("javascript:alert('That is not a valid email address')");
} else {
getURL ("javascript:alert('Please fill out all fields')");
}
}
function submit() {
ss = new LoadVars();
ss.username = username_txt.text;
ss.email = email_txt.text;
ss.password = thepassword;
ss.sendAndLoad("http://app.nbc.com/heroes/puzzles13532.submission.php", ss, "POST");
gotoAndStop ("submitted");
}
stop();
submit2_btn.onRollOver = function () {
this.gotoAndStop(2);
};
submit2_btn.onRollOut = (submit_btn.onDragOut = function () {
this.gotoAndStop(1);
});
submit2_btn.onPress = function () {
this.gotoAndStop(1);
};
submit2_btn.onRelease = function () {
checkform();
};
txt.htmlText = ("<i>" + righttext) + "</i>";
txt2.text = rightcopy;
Frame 4
stop();
tryAgain_btn.onRollOver = function () {
this.gotoAndStop(2);
};
tryAgain_btn.onRollOut = (submit_btn.onDragOut = function () {
this.gotoAndStop(1);
});
tryAgain_btn.onPress = function () {
this.gotoAndStop(1);
};
tryAgain_btn.onRelease = function () {
gotoAndStop ("start");
};
txt.htmlText = ("<i>" + wrongtext) + "</i>";
txt2.text = wrongcopy;
Frame 5
txt2.text = confirmationtext;
Symbol 9 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 1
this.onRollOver = function () {
this.gotoAndPlay("over");
};
this.onRollOut = function () {
this.gotoAndPlay("out");
};
stop();
Symbol 21 MovieClip Frame 3
stop();
Symbol 21 MovieClip Frame 4
stop();