Frame 1 (79 B)
stop();
loadMovieNum ("http://www.gimpster.net/insurance/hammerins.swf", 99);
Instance of Symbol 14 MovieClip "loader" in Frame 1 (719 B)
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 (8 B)
stop();
Frame 3 (4.73 KiB) ●
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 (40 B)
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 88 MovieClip "nailHeedOuter" in Frame 3 (40 B)
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 90 MovieClip "cycle" in Frame 3 (40 B)
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 29 MovieClip "clock" in Frame 3 (1.23 KiB) ●
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 (25 B)
on (release) {
play();
}
Symbol 51 MovieClip Frame 1 (90 B)
i = 0;
while (i < 100) {
removeMovieClip(bruiseHolder["bruiseClip" + i]);
i++;
}
Symbol 52 MovieClip Frame 1 (27 B)
hand.nail._visible = true;
Symbol 52 MovieClip Frame 12 (96 B)
stop();
_root.nail.nail._visible = true;
hand.nail._visible = false;
_root.hitActive = true;
Symbol 52 MovieClip Frame 17 (8 B)
stop();
Symbol 64 MovieClip Frame 1 (29 B)
stop();
_root.hitCount = 1;
Instance of Symbol 52 MovieClip "hand" in Symbol 64 MovieClip Frame 1 (31 B)
onClipEvent (load) {
play();
}
Instance of Symbol 50 MovieClip "nail" in Symbol 64 MovieClip Frame 1 (42 B)
onClipEvent (load) {
this._visible = 0;
}
Symbol 64 MovieClip Frame 10 (25 B)
hand.gotoAndPlay("off");
Symbol 64 MovieClip Frame 50 (25 B)
_root.hitActive = false;
Symbol 64 MovieClip Frame 68 (104 B)
i = 0;
while (i < 100) {
removeMovieClip(wood["wallHit" + i]);
i++;
}
hand.gotoAndPlay("on");
Symbol 84 MovieClip Frame 1 (8 B)
stop();
Symbol 84 MovieClip Frame 6 (15 B)
_root.hitMe();
Symbol 84 MovieClip Frame 15 (17 B)
gotoAndStop (1);
Symbol 92 Button (56 B)
on (keyPress "<Space>") {
_root.drinkTea(this);
}
Symbol 95 MovieClip Frame 1 (8 B)
stop();
Symbol 106 MovieClip Frame 1 (8 B)
stop();
Symbol 107 MovieClip Frame 1 (8 B)
stop();
Symbol 107 MovieClip Frame 58 (73 B)
if (_root.timesUp == false) {
play();
} else {
gotoAndPlay (66);
}
Symbol 107 MovieClip Frame 65 (17 B)
gotoAndStop (1);
Symbol 107 MovieClip Frame 140 (29 B)
_root.gotoAndStop("scores");
Symbol 121 Button (35 B)
on (release) {
gotoAndStop (35);
}
Symbol 124 Button (35 B)
on (release) {
gotoAndStop (25);
}
Symbol 125 Button (35 B)
on (release) {
gotoAndStop (45);
}
Symbol 126 Button (35 B)
on (release) {
gotoAndStop (55);
}
Symbol 127 Button (35 B)
on (release) {
gotoAndStop (65);
}
Symbol 128 MovieClip Frame 1 (949 B)
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 (157 B)
if (highscore_XML.loaded == true) {
if (isXMLsafe() == false) {
stripWhitespace(highscore_XML);
}
gotoAndStop (25);
} else {
gotoAndPlay (8);
}
Symbol 128 MovieClip Frame 25 (571 B)
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 (486 B)
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 (486 B)
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 (486 B)
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 (486 B)
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 (39 B)
stop();
_root.gaffersTalkin = false;
Symbol 130 MovieClip Frame 10 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 94 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 106 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 193 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 206 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 303 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 320 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 400 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 415 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 490 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 504 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 564 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 578 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 685 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 698 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 817 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 833 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 944 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 963 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 1051 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 1065 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 1155 (17 B)
gotoAndStop (1);
Symbol 130 MovieClip Frame 1171 (28 B)
_root.gaffersTalkin = true;
Symbol 130 MovieClip Frame 1276 (17 B)
gotoAndStop (1);
Symbol 137 MovieClip Frame 1 (8 B)
stop();
Symbol 137 MovieClip Frame 19 (17 B)
gotoAndStop (1);
Symbol 137 MovieClip Frame 29 (17 B)
gotoAndStop (1);
Symbol 137 MovieClip Frame 39 (17 B)
gotoAndStop (1);
Symbol 137 MovieClip Frame 49 (17 B)
gotoAndStop (1);
Symbol 137 MovieClip Frame 59 (17 B)
gotoAndStop (1);
Symbol 140 Button (45 B)
on (release) {
play();
_root.nextFrame();
}
Symbol 148 Button (484 B)
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 (34 B)
on (release) {
gotoAndPlay (1);
}
Symbol 158 MovieClip Frame 1 (188 B)
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 (86 B)
loadVariables ("hiscore_submit.asp", this, "POST");
timeout_starttimer = getTimer();
Symbol 158 MovieClip Frame 10 (336 B)
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 (39 B)
stop();
_parent.gotoAndStop("TABLE");
Symbol 158 MovieClip Frame 43 (8 B)
stop();
Symbol 158 MovieClip Frame 56 (8 B)
stop();
Symbol 160 MovieClip Frame 1 (99 B)
if (_root.totUp > _root.output.minScore) {
gotoAndStop (10);
} else {
gotoAndStop (20);
}
Symbol 160 MovieClip Frame 10 (8 B)
stop();
Symbol 160 MovieClip Frame 15 (8 B)
stop();
Symbol 160 MovieClip Frame 25 (40 B)
stop();
output.gotoAndPlay("LOADXML");
Symbol 163 Button (48 B)
on (release) {
_root.gotoAndStop("instruct");
}
Symbol 169 MovieClip Frame 30 (8 B)
stop();