Frame 1
stop();
loadMovieNum ("http://www.gimpster.net/insurance/hammerins.swf", 99);
Instance of Symbol 14 MovieClip "loader" in Frame 1
onClipEvent (load) {
this._visible = 0;
loadBar._xScale = 0;
var total = _root.getBytesTotal();
var soFar = _root.getBytesLoaded();
perc = (soFar / total) * 100;
if (((!perc) > 0) && ((!perc) <= 100)) {
perc = 1;
}
var dl = (perc - loadBar._xScale);
loadBar._xScale = loadBar._xScale + (dl / 10);
if (perc >= 100) {
_parent.play();
}
}
onClipEvent (enterFrame) {
this._visible = 1;
var total = _root.getBytesTotal();
var soFar = _root.getBytesLoaded();
perc = (soFar / total) * 100;
if (((!perc) > 0) && ((!perc) <= 100)) {
perc = 1;
}
var dl = (perc - loadBar._xScale);
loadBar._xScale = loadBar._xScale + (dl / 10);
if (perc >= 100) {
_parent.play();
}
}
Frame 2
stop();
Frame 3
drinkTea = function (targ) {
if (_root.timesUp != true) {
targ.gotoAndStop("empty");
_root.teaSlurp.start();
_root.glideSpeed = _root.glideSpeed + 50;
_root.clock.hand._rotation = _root.clock.hand._rotation + 3;
if (_root.gaffersTalkin == false) {
_root.gaffer.gotoAndPlay("TEA_0" + (random(4) + 1));
}
}
};
stop();
woody = new Sound();
woody.attachSound("hitWood");
ahwooga = new Sound();
ahwooga.attachSound("horn");
nailIt = new Sound();
nailIt.attachSound("nailHit");
nailSkf = new Sound();
nailSkf.attachSound("nailSkiff");
teaSlurp = new Sound();
teaSlurp.attachSound("slurp");
fscommand ("allowscale", 0);
fscommand ("fullscreen", 1);
glideSpeed = 250;
Mouse.hide();
hitActive = false;
_root.timesUp = false;
nail.nail._visible = false;
hitCount = 1;
numOfHits = 1;
_root.score = 0;
_root.scoreDisplay = "\u00A30.00";
hammer.onEnterFrame = function () {
if (_root.timesUp == false) {
control = glideSpeed;
hammer._x = hammer._x + (((cycle.dot._x - ((_root._xmouse - 210) * 2)) - hammer._x) / _root.glideSpeed);
hammer._y = hammer._y + (((cycle.dot._y - ((_root._ymouse - 210) * 2)) - hammer._y) / _root.glideSpeed);
if (hammer._y < 20) {
hammer._y = 20;
}
if (hammer._y > 400) {
hammer._y = 400;
}
if (hammer._x < 20) {
hammer._x = 20;
}
if (hammer._x > 400) {
hammer._x = 400;
}
}
};
hammer.onMouseDown = function () {
if ((_root.hitActive == true) && (_root.timesUp == false)) {
this.play();
}
};
hitMe = function () {
if (_root.nailHeed.hitTest(hammer._x, hammer._y, true)) {
howClose = Math.round(Math.sqrt(((_root.hammer._x - 210) * (_root.hammer._x - 210)) + ((_root.hammer._y - 210) * (_root.hammer._y - 210))) * 100) / 100;
tempScore = 50 - howClose;
_root.score = _root.score + tempScore;
_root.scoreDisplay = "\u00A3" + (Math.round(_root.score * 10) / 100);
_root.totUp = Math.round(_root.score * 10) / 100;
scoreArray = _root.scoreDisplay.split(".");
if (scoreArray[1] == null) {
_root.scoreDisplay = _root.scoreDisplay + ".00";
}
theLength = scoreArray[1].length;
if (theLength == 1) {
_root.scoreDisplay = _root.scoreDisplay + "0";
}
if (hitCount < 2) {
if (hitCount == 1) {
_root.nail.hand.gotoAndPlay("off");
}
_root.nail.gotoAndStop("hit2");
hitCount = hitCount + 2;
} else if (hitCount >= 2) {
_root.nail.gotoAndPlay("hit4");
}
_root.nailIt.start();
} else if (_root.nailHeedOuter.hitTest(hammer._x, hammer._y, true)) {
howClose = Math.round(Math.sqrt(((_root.hammer._x - 210) * (_root.hammer._x - 210)) + ((_root.hammer._y - 210) * (_root.hammer._y - 210))) * 100) / 100;
tempScore = (50 - howClose) / 2;
_root.score = _root.score + tempScore;
_root.scoreDisplay = "\u00A3" + (Math.round(_root.score * 10) / 100);
_root.totUp = Math.round(_root.score * 10) / 100;
scoreArray = _root.scoreDisplay.split(".");
if (scoreArray[1] == null) {
_root.scoreDisplay = _root.scoreDisplay + ".00";
}
theLength = scoreArray[1].length;
if (theLength == 1) {
_root.scoreDisplay = _root.scoreDisplay + "0";
}
if (hitCount == 4) {
_root.nail.gotoAndPlay("hit4");
} else {
_root.nail.gotoAndStop("hit" + hitCount);
hitCount++;
}
_root.nailSkf.start();
} else if (_root.nail.hand.hand.handHit.hitTest(hammer._x, hammer._y, true)) {
_root.nail.hand.hand.bruiseHolder.attachMovie("bruiseClip", "bruiseClip" + _root.numOfHits, _root.numOfHits);
_root.nail.hand.hand.bruiseHolder["bruiseClip" + _root.numOfHits]._x = _root.hammer._x;
_root.nail.hand.hand.bruiseHolder["bruiseClip" + _root.numOfHits]._y = _root.hammer._y;
_root.numOfHits++;
_root.glideSpeed = _root.glideSpeed - 20;
if (_root.glideSpeed < 50) {
_root.glideSpeed = 50;
}
_root.ouchSounds.gotoAndPlay("OUCH_0" + (random(5) + 1));
} else {
_root.nail.wood.attachMovie("wallHit", "wallHit" + _root.numOfHits, _root.numOfHits);
_root.nail.wood["wallHit" + _root.numOfHits]._x = _root.hammer._x;
_root.nail.wood["wallHit" + _root.numOfHits]._y = _root.hammer._y;
_root.numOfHits++;
_root.glideSpeed = _root.glideSpeed - 10;
if (_root.glideSpeed < 50) {
_root.glideSpeed = 50;
}
_root.score = _root.score - 30;
_root.scoreDisplay = "\u00A3" + (Math.round(_root.score * 10) / 100);
_root.totUp = Math.round(_root.score * 10) / 100;
scoreArray = _root.scoreDisplay.split(".");
if (scoreArray[1] == null) {
_root.scoreDisplay = _root.scoreDisplay + ".00";
}
theLength = scoreArray[1].length;
if (theLength == 1) {
_root.scoreDisplay = _root.scoreDisplay + "0";
}
_root.woody.start();
if (_root.gaffersTalkin == false) {
_root.gaffer.gotoAndPlay("MISS_0" + (random(4) + 1));
}
}
};
Instance of Symbol 86 MovieClip "nailHeed" in Frame 3
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 88 MovieClip "nailHeedOuter" in Frame 3
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 90 MovieClip "cycle" in Frame 3
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 29 MovieClip "clock" in Frame 3
onClipEvent (load) {
startTime = getTimer();
timeToGo = 60000;
pauseTime = 100;
goNow = true;
tenToGo = true;
fiveToGo = true;
}
onClipEvent (enterFrame) {
timeNow = getTimer();
elapsed = timeNow - startTime;
if ((elapsed >= pauseTime) && (goNow == true)) {
hand._rotation = hand._rotation + (90 / (timeToGo / pauseTime));
minuteHand._rotation = hand._rotation - 180;
startTime = getTimer();
}
if ((hand._rotation >= 30) && (tenToGo == true)) {
_root.timeUp.tex.gotoAndStop("ten");
_root.timeUp.play();
_root.glideSpeed = _root.glideSpeed - 70;
tenToGo = false;
if (_root.gaffersTalkin == false) {
_root.gaffer.gotoAndPlay("TIME_0" + (random(4) + 1));
}
}
if ((hand._rotation >= 60) && (fiveToGo == true)) {
_root.timeUp.tex.gotoAndStop("five");
_root.timeUp.play();
_root.glideSpeed = _root.glideSpeed - 70;
fiveToGo = false;
if (_root.gaffersTalkin == false) {
_root.gaffer.gotoAndPlay("TIME_0" + (random(4) + 1));
}
}
if ((hand._rotation >= 90) && (goNow == true)) {
hand._rotation = 90;
goNow = false;
_root.timesUp = true;
Mouse.show();
_root.hammer._visible = 0;
_root.timeUp.tex.gotoAndStop("up");
_root.timeUp.play();
_root.ahwooga.start();
}
}
Symbol 41 Button
on (release) {
play();
}
Symbol 51 MovieClip Frame 1
i = 0;
while (i < 100) {
removeMovieClip(bruiseHolder["bruiseClip" + i]);
i++;
}
Symbol 52 MovieClip Frame 1
hand.nail._visible = true;
Symbol 52 MovieClip Frame 12
stop();
_root.nail.nail._visible = true;
hand.nail._visible = false;
_root.hitActive = true;
Symbol 52 MovieClip Frame 17
stop();
Symbol 64 MovieClip Frame 1
stop();
_root.hitCount = 1;
Instance of Symbol 52 MovieClip "hand" in Symbol 64 MovieClip Frame 1
onClipEvent (load) {
play();
}
Instance of Symbol 50 MovieClip "nail" in Symbol 64 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Symbol 64 MovieClip Frame 10
hand.gotoAndPlay("off");
Symbol 64 MovieClip Frame 50
_root.hitActive = false;
Symbol 64 MovieClip Frame 68
i = 0;
while (i < 100) {
removeMovieClip(wood["wallHit" + i]);
i++;
}
hand.gotoAndPlay("on");
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 6
_root.hitMe();
Symbol 84 MovieClip Frame 15
gotoAndStop (1);
Symbol 92 Button
on (keyPress "<Space>") {
_root.drinkTea(this);
}
Symbol 95 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 58
if (_root.timesUp == false) {
play();
} else {
gotoAndPlay (66);
}
Symbol 107 MovieClip Frame 65
gotoAndStop (1);
Symbol 107 MovieClip Frame 140
_root.gotoAndStop("scores");
Symbol 121 Button
on (release) {
gotoAndStop (35);
}
Symbol 124 Button
on (release) {
gotoAndStop (25);
}
Symbol 125 Button
on (release) {
gotoAndStop (45);
}
Symbol 126 Button
on (release) {
gotoAndStop (55);
}
Symbol 127 Button
on (release) {
gotoAndStop (65);
}
Symbol 128 MovieClip Frame 1
function isXMLsafe() {
var testVersion = $version.substring(4, 5);
var testBuild = $version.substring(8, 10);
if (testversion > 5) {
return(true);
}
if ((testVersion == 5) && (testbuild > 40)) {
return(true);
}
return(false);
}
function stripWhitespace(XMLnode) {
var i = 0;
while (i < XMLnode.childNodes.length) {
if (XMLnode.childNodes[i].nodeType == 3) {
var j = 0;
var emptyNode = true;
j = 0;
while (j < XMLnode.childNodes[i].nodeValue.length) {
if (XMLnode.childNodes[i].nodeValue.charCodeAt(j) > 32) {
emptyNode = false;
break;
}
j++;
}
if (emptyNode) {
XMLnode.childNodes[i].removeNode();
}
}
i++;
}
var k = 0;
while (k < XMLnode.childNodes.length) {
stripWhitespace(XMLnode.childNodes[k]);
k++;
}
}
highscore_XML = new XML();
highscore_XML.load("read_database.asp");
XML.prototype.ignoreWhite = true;
Symbol 128 MovieClip Frame 14
if (highscore_XML.loaded == true) {
if (isXMLsafe() == false) {
stripWhitespace(highscore_XML);
}
gotoAndStop (25);
} else {
gotoAndPlay (8);
}
Symbol 128 MovieClip Frame 25
i = 1;
while (i < 11) {
name = "score_" + i;
this[name].output_counter = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.counter;
this[name].output_name = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_name;
this[name].output_town = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_town;
this[name].output_score = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_score;
i++;
}
stop();
minScore = this.highscore_XML.high_score_table.childnodes[29].attributes.user_score;
Symbol 128 MovieClip Frame 35
i = 11;
while (i < 21) {
name = "score_" + i;
this[name].output_counter = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.counter;
this[name].output_name = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_name;
this[name].output_town = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_town;
this[name].output_score = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_score;
i++;
}
stop();
Symbol 128 MovieClip Frame 45
i = 21;
while (i < 31) {
name = "score_" + i;
this[name].output_counter = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.counter;
this[name].output_name = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_name;
this[name].output_town = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_town;
this[name].output_score = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_score;
i++;
}
stop();
Symbol 128 MovieClip Frame 55
i = 31;
while (i < 41) {
name = "score_" + i;
this[name].output_counter = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.counter;
this[name].output_name = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_name;
this[name].output_town = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_town;
this[name].output_score = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_score;
i++;
}
stop();
Symbol 128 MovieClip Frame 65
i = 41;
while (i < 51) {
name = "score_" + i;
this[name].output_counter = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.counter;
this[name].output_name = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_name;
this[name].output_town = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_town;
this[name].output_score = this.highscore_XML.high_score_table.childnodes[i - 1].attributes.user_score;
i++;
}
stop();
Symbol 130 MovieClip Frame 1
stop();
_root.gaffersTalkin = false;
Symbol 130 MovieClip Frame 10
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 94
gotoAndStop (1);
Symbol 130 MovieClip Frame 106
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 193
gotoAndStop (1);
Symbol 130 MovieClip Frame 206
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 303
gotoAndStop (1);
Symbol 130 MovieClip Frame 320
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 400
gotoAndStop (1);
Symbol 130 MovieClip Frame 415
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 490
gotoAndStop (1);
Symbol 130 MovieClip Frame 504
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 564
gotoAndStop (1);
Symbol 130 MovieClip Frame 578
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 685
gotoAndStop (1);
Symbol 130 MovieClip Frame 698
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 817
gotoAndStop (1);
Symbol 130 MovieClip Frame 833
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 944
gotoAndStop (1);
Symbol 130 MovieClip Frame 963
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 1051
gotoAndStop (1);
Symbol 130 MovieClip Frame 1065
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 1155
gotoAndStop (1);
Symbol 130 MovieClip Frame 1171
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 1276
gotoAndStop (1);
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 19
gotoAndStop (1);
Symbol 137 MovieClip Frame 29
gotoAndStop (1);
Symbol 137 MovieClip Frame 39
gotoAndStop (1);
Symbol 137 MovieClip Frame 49
gotoAndStop (1);
Symbol 137 MovieClip Frame 59
gotoAndStop (1);
Symbol 140 Button
on (release) {
play();
_root.nextFrame();
}
Symbol 148 Button
on (keyPress "<Tab>") {
trace(Selection.getFocus());
switch (Selection.getFocus()) {
case "_level0.scores.test_input.user_name" :
Selection.setFocus("_level0.scores.test_input.user_email");
break;
case "_level0.scores.test_input.user_email" :
Selection.setFocus("_level0.scores.test_input.user_town");
break;
case "_level0.scores.test_input.user_town" :
Selection.setFocus("_level0.scores.test_input.user_name");
}
}
on (release) {
gotoAndPlay (8);
}
Symbol 156 Button
on (release) {
gotoAndPlay (1);
}
Symbol 158 MovieClip Frame 1
user_name = "";
user_town = "";
user_email = "";
user_score = _root.totUp;
if (Selection.getFocus() == null) {
Selection.setFocus("_level0.scores.test_input.user_name");
}
stop();
Symbol 158 MovieClip Frame 8
loadVariables ("hiscore_submit.asp", this, "POST");
timeout_starttimer = getTimer();
Symbol 158 MovieClip Frame 10
switch (scoreSubmitted) {
case "true" :
gotoAndPlay (18);
break;
case "false" :
gotoAndPlay (44);
break;
default :
timeout_timeNow = getTimer();
timeout_elapsedTime = timeout_timeNow - timeout_starttimer;
if (timeout_elapsedTime >= 8000) {
gotoAndPlay (31);
} else {
gotoAndPlay (9);
}
}
Symbol 158 MovieClip Frame 30
stop();
_parent.gotoAndStop("TABLE");
Symbol 158 MovieClip Frame 43
stop();
Symbol 158 MovieClip Frame 56
stop();
Symbol 160 MovieClip Frame 1
if (_root.totUp > _root.output.minScore) {
gotoAndStop (10);
} else {
gotoAndStop (20);
}
Symbol 160 MovieClip Frame 10
stop();
Symbol 160 MovieClip Frame 15
stop();
Symbol 160 MovieClip Frame 25
stop();
output.gotoAndPlay("LOADXML");
Symbol 163 Button
on (release) {
_root.gotoAndStop("instruct");
}
Symbol 169 MovieClip Frame 30
stop();