Frame 1
this.onEnterFrame = function () {
if (getBytesLoaded() >= getBytesTotal()) {
gameisloaded = true;
} else {
var tempnum = Math.round((getBytesLoaded() / getBytesTotal()) * 100);
_root.loadedstring = tempnum + "%";
}
};
_global.myloadvars = new LoadVars();
_global.mysavevars = new LoadVars();
_global.mlisten = new Object();
_global.klisten = new Object();
_global.soundon = true;
_root.namestring = "Kamek";
var gameisloaded = false;
Frame 5
if (!gameisloaded) {
gotoAndPlay (2);
}
Frame 6
function gobutton() {
if (_global.soundon) {
koopa1.gotoAndPlay(2);
}
gotoAndPlay (88);
}
function topscorebutton() {
if (_global.soundon) {
koopa1.gotoAndPlay(2);
}
gotoAndPlay (293);
}
function mousebuttonclick() {
if (spugbox.hitTest(_root._xmouse, _root._ymouse, false)) {
if (_global.soundon) {
quack1.gotoAndPlay(2);
}
}
if (bowserbox.hitTest(_root._xmouse, _root._ymouse, false)) {
if (_global.soundon) {
roar1.gotoAndPlay(2);
}
}
}
_root.Instructions.play();
infobutton.onPress = function () {
gotoAndPlay (313);
};
soundbutton.onPress = function () {
if (_global.soundon) {
_global.soundon = false;
} else {
_global.soundon = true;
}
if (_global.soundon) {
koopa1.gotoAndPlay(2);
}
};
raar1.gotoAndPlay(2);
mylisten = new Object();
mylisten.onMouseDown = mousebuttonclick;
Mouse.addListener(mylisten);
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 41 MovieClip [FPushButtonSymbol] in Frame 6
//component parameters
onClipEvent (initialize) {
label = "Play";
clickHandler = "gobutton";
}
Instance of Symbol 41 MovieClip [FPushButtonSymbol] in Frame 6
//component parameters
onClipEvent (initialize) {
label = "Top Scores";
clickHandler = "topscorebutton";
}
Frame 69
gotoAndPlay (7);
Frame 88
function keyboardkeyup() {
var keypressed = Key.getAscii();
if ((keypressed == 80) || (keypressed == 112)) {
pausesound.gotoAndPlay(2);
if (gamepaused) {
gamepaused = false;
} else {
gamepaused = true;
}
}
}
function mousebuttondown() {
if (gamepaused) {
return(undefined);
}
if (gameover != 0) {
return(undefined);
}
if ((clickx == -1) && (clicky == -1)) {
clickx = _root._xmouse;
clicky = _root._ymouse;
if ((((clickx < 2) || (clickx > (maxwidth - 3))) || (clicky < 2)) || (clicky > (maxheight - 3))) {
clickx = -1;
clicky = -1;
return(undefined);
}
xlen = Math.abs(magic1._x - clickx);
ylen = Math.abs(magic1._y - clicky);
zlen = Math.sqrt((xlen * xlen) + (ylen * ylen));
if (zlen < 5) {
clickx = -1;
clicky = -1;
return(undefined);
}
if (_global.soundon) {
sound1.gotoAndPlay(2);
}
magic1._alpha = 100;
newangle = Math.atan2(ylen, xlen) / (Math.PI/180);
if ((magic1._x < clickx) && (magic1._y > clicky)) {
} else if ((magic1._x > clickx) && (magic1._y > clicky)) {
newangle = 90 + Math.abs(newangle - 90);
} else if ((magic1._x > clickx) && (magic1._y < clicky)) {
newangle = 180 + newangle;
} else if ((magic1._x < clickx) && (magic1._y < clicky)) {
newangle = 270 + Math.abs(newangle - 90);
}
magic1.m_traj = newangle - 90;
if (magic1.m_traj < 0) {
magic1.m_traj = magic1.m_traj + 360;
}
magic1.xSpeed = -(10 * Math.sin(magic1.m_traj * (Math.PI/180)));
magic1.ySpeed = 10 * Math.cos(magic1.m_traj * (Math.PI/180));
mk1.gotoAndStop(3);
}
}
function scoreup(upamount) {
currentscore = currentscore + upamount;
scorestring = "Score: " + currentscore;
bonusscorecount = bonusscorecount + upamount;
if (bonusscorecount >= 10000) {
bonusscorecount = 0;
livesleft = livesleft + 1;
if (livesleft > 5) {
livesleft = 5;
} else {
if (_global.soundon) {
extralife.gotoAndPlay(2);
}
this["shell" + livesleft]._alpha = 100;
}
}
}
function SackHit() {
floatingscore._x = spug1._x;
floatingscore._y = spug1._y;
if (bonuscan == 1) {
_root.floatingscore_string = "-o-;;";
} else {
bonuscount++;
sackhits = sackhits + 1;
scoreup(currentscoreinc);
_root.floatingscore_string = currentscoreinc;
currentscoreinc = currentscoreinc + 10;
}
floatingscore.gotoAndPlay(2);
if (sackhits >= 10) {
currentlevel++;
sack_currentspeed = sack_currentspeed + (sack_currentspeed * 0.2);
levelstring = "Level: " + currentlevel;
if (_global.soundon) {
koopahappy.gotoAndPlay(2);
}
sackhits = 0;
} else if (bonuscan == 0) {
if (_global.soundon) {
popsound.gotoAndPlay(2);
}
} else if (_global.soundon) {
koopasob.gotoAndPlay(2);
}
sackhits_string = ("Sack: " + sackhits) + "/10";
}
function SackMiss() {
if (bonuscan == 1) {
livesleft = livesleft + 1;
if (livesleft > 5) {
livesleft = 5;
scoreup(10000);
} else {
if (_global.soundon) {
extralife.gotoAndPlay(2);
}
this["shell" + livesleft]._alpha = 100;
}
} else {
currentscoreinc = 10;
sackhits = sackhits + 1;
this["shell" + livesleft]._alpha = 0;
livesleft = livesleft - 1;
if (livesleft <= 0) {
gameover = 1;
}
if (_global.soundon) {
bootshell.gotoAndPlay(2);
}
}
sackhits_string = ("Sack: " + sackhits) + "/10";
}
function ResetSack() {
if (bonuscan == 1) {
bonuscan = 0;
}
if (bonuscount >= 15) {
bonuscount = 0;
if ((Math.random() * 100) <= 33) {
bonuscan = 1;
}
}
if (bonuscan == 1) {
spug1.gotoAndStop(2);
} else {
spug1.gotoAndStop(1);
}
spug1._x = 320;
spug1._y = (Math.random() * 130) + 10;
}
function setstrings() {
sackhits_string = ("Sack: " + sackhits) + "/10";
sackmisses_string = "Misses: " + sackmisses;
scorestring = "Score: " + currentscore;
levelstring = "Level: " + currentlevel;
}
function ReverseSpin() {
if (rotinc == 30) {
rotinc = -30;
} else {
rotinc = 30;
}
}
gamepaused = false;
bonusscorecount = 0;
bonuscount = 0;
shell5._alpha = 0;
shell4._alpha = 0;
bonuscan = 0;
gameover = 0;
sackhits = 0;
sackmisses = 0;
ResetSack();
floatingscore._alpha = 0;
currentlevel = 1;
sack_currentspeed = 3;
currentscoreinc = 10;
currentscore = 0;
livesleft = 3;
magrot = 0;
x_org = magic1._x;
y_org = magic1._y;
magic1._alpha = 0;
maxwidth = _root._width;
maxheight = _root._height;
moveinc = 10;
rotinc = 40;
clickx = -1;
clicky = -1;
puff1._alpha = 0;
_global.mlisten.onMouseDown = mousebuttondown;
Mouse.addListener(_global.mlisten);
_global.klisten.onKeyUp = keyboardkeyup;
Key.addListener(_global.klisten);
mk1.gotoAndStop(2);
setstrings();
this.onEnterFrame = function () {
if (gamepaused) {
return(undefined);
}
if (gameover == 0) {
if ((clickx != -1) && (clicky != -1)) {
xlen = Math.abs(magic1._x - clickx);
ylen = Math.abs(magic1._y - clicky);
zlen = Math.sqrt((xlen * xlen) + (ylen * ylen));
if (zlen < 10) {
magic1.xSpeed = 0;
magic1.ySpeed = 0;
clickx = -1;
clicky = -1;
magic1._alpha = 0;
puff1._x = magic1._x;
puff1._y = magic1._y;
magic1._x = x_org;
magic1._y = y_org;
puff1._alpha = 100;
puff1.gotoAndPlay(1);
mk1.gotoAndStop(2);
}
}
magic1._rotation = magrot;
magrot = magrot + rotinc;
spug1._rotation = spug1._rotation - 10;
spug1._x = spug1._x - sack_currentspeed;
if (spug1._x < 0) {
SackMiss();
ResetSack();
}
}
};
Instance of Symbol 102 MovieClip "magic1" in Frame 88
onClipEvent (load) {
thrust = 1;
decay = 0.97;
maxSpeed = 15;
m_traj = 45;
_root.Sparkle1._x = 100;
_root.Sparkle1._y = 100;
_root.Sparkle1._visible = true;
_root.Sparkle1.duplicateMovieClip("Sparkle2", 10);
_root.Sparkle1.duplicateMovieClip("Sparkle3", 11);
_root.Sparkle1.duplicateMovieClip("Sparkle4", 12);
_root.Sparkle1.duplicateMovieClip("Sparkle5", 13);
_root.Sparkle1.duplicateMovieClip("Sparkle6", 14);
_root.Sparkle1.duplicateMovieClip("Sparkle7", 15);
_root.Sparkle1.duplicateMovieClip("Sparkle8", 16);
_root.Sparkle1.duplicateMovieClip("Sparkle9", 17);
_root.Sparkle1.duplicateMovieClip("Sparkle10", 18);
flashspark = true;
}
onClipEvent (enterFrame) {
if (_parent.gamepaused) {
return(undefined);
}
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_y < 0) {
_y = _root.maxheight;
}
if (_y > _root.maxheight) {
_y = 0;
}
if (_x < 0) {
_x = _root.maxwidth;
}
if (_x > _root.maxwidth) {
_x = 0;
}
if (_root.Sparkle1.isplaying == false) {
_root.Sparkle1.play();
} else if (_root.Sparkle2.isplaying == false) {
_root.Sparkle2.play();
} else if (_root.Sparkle3.isplaying == false) {
_root.Sparkle3.play();
} else if (_root.Sparkle4.isplaying == false) {
_root.Sparkle4.play();
} else if (_root.Sparkle5.isplaying == false) {
_root.Sparkle5.play();
} else if (_root.Sparkle6.isplaying == false) {
_root.Sparkle6.play();
} else if (_root.Sparkle7.isplaying == false) {
_root.Sparkle7.play();
} else if (_root.Sparkle8.isplaying == false) {
_root.Sparkle8.play();
} else if (_root.Sparkle9.isplaying == false) {
_root.Sparkle9.play();
} else if (_root.Sparkle10.isplaying == false) {
_root.Sparkle10.play();
}
flashspark = false;
}
Frame 92
if (gameover != 0) {
_global.finalscore = currentscore;
_root.titlescore_string = "Last Score: " + currentscore;
} else {
gotoAndPlay (89);
}
Frame 93
mk1.gotoAndStop(1);
_global.mysavevars.name = _root.namestring;
_global.mysavevars.score = _global.finalscore;
_global.mysavevars.sendAndLoad("http://www.hazardlabs.com/cgi-bin/spugshock/shockscore.cgi", _global.myloadvars, "POST");
Frame 137
mk1.gotoAndStop(3);
Frame 140
mk1.gotoAndStop(2);
Frame 144
mk1.gotoAndStop(3);
Frame 155
mk1.gotoAndStop(3);
Frame 158
mk1.gotoAndStop(2);
Frame 162
mk1.gotoAndStop(3);
Frame 172
mk1.gotoAndStop(2);
Frame 184
mk1.gotoAndStop(3);
Frame 185
mk1.gotoAndStop(1);
Instance of Symbol 41 MovieClip [FPushButtonSymbol] in Frame 282
//component parameters
onClipEvent (initialize) {
label = "Top Scores";
clickHandler = "mybutton";
}
Frame 292
function mybutton() {
gotoAndPlay (293);
}
stop();
Frame 293
function setloadedscores() {
var n = 1;
while (n <= 10) {
_root["scoretext" + n] = (((n + ". ") + _global.myloadvars["name" + n]) + " - ") + _global.myloadvars["score" + n];
n++;
}
loadingtext._alpha = 0;
}
function tempbutton() {
mysavevars = new LoadVars();
mysavevars.name = "PROF2";
mysavevars.score = Math.round(Math.random() * 100) + 10000;
mysavevars.sendAndLoad("http://www.hazardlabs.com/cgi-bin/spugshock/shockscore.cgi", myloadvars, "POST");
}
function returnbutton() {
gotoAndPlay (6);
}
loadingtext._alpha = 100;
_global.myloadvars.onLoad = setloadedscores;
_global.myloadvars.load("http://www.hazardlabs.com/cgi-bin/spugshock/shockscore.cgi");
Instance of Symbol 41 MovieClip [FPushButtonSymbol] in Frame 293
//component parameters
onClipEvent (initialize) {
label = "Back";
clickHandler = "returnbutton";
}
Frame 312
gotoAndPlay (294);
Frame 313
nextbutton.onPress = function () {
koopa1.gotoAndPlay(2);
play();
};
Frame 355
stop();
Frame 413
stop();
Frame 505
stop();
Frame 584
stop();
Frame 618
stop();
Frame 649
stop();
Frame 674
stop();
Frame 679
gotoAndPlay (6);
Symbol 5 MovieClip [FLabelSymbol] Frame 1
#initclip 2
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 14 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 20 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 26 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 32 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 33 MovieClip [fpb_states] Frame 1
stop();
Symbol 33 MovieClip [fpb_states] Frame 2
stop();
Symbol 33 MovieClip [fpb_states] Frame 3
stop();
Symbol 33 MovieClip [fpb_states] Frame 4
stop();
Symbol 34 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 38 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 38 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 41 MovieClip [FPushButtonSymbol] Frame 1
#initclip 3
function FPushButtonClass() {
this.init();
}
FPushButtonClass.prototype = new FUIComponentClass();
Object.registerClass("FPushButtonSymbol", FPushButtonClass);
FPushButtonClass.prototype.init = function () {
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("fpb_states", "fpbState_mc", 1);
this.attachMovie("FLabelSymbol", "fLabel_mc", 2);
this.attachMovie("fpb_hitArea", "fpb_hitArea_mc", 3);
super.init();
this.btnState = false;
this.setClickHandler(this.clickHandler);
this._xscale = 100;
this._yscale = 100;
this.setSize(this.width, this.height);
if (this.label != undefined) {
this.setLabel(this.label);
}
this.ROLE_SYSTEM_PUSHBUTTON = 43;
this.STATE_SYSTEM_PRESSED = 8;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
};
FPushButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.fpb_hitArea_mc;
this.hitArea = hit;
hit._visible = false;
hit._width = w;
hit._height = ((arguments.length > 1) ? (h) : (hit._height));
};
FPushButtonClass.prototype.setSize = function (w, h) {
w = ((w < 6) ? 6 : (w));
if (arguments.length > 1) {
if (h < 6) {
h = 6;
}
}
super.setSize(w, h);
this.setLabel(this.getLabel());
this.arrangeLabel();
this.setHitArea(w, h);
this.boundingBox_mc._width = w;
this.boundingBox_mc._height = h;
this.drawFrame();
if (this.focused) {
super.myOnSetFocus();
}
this.initContentPos("fLabel_mc");
};
FPushButtonClass.prototype.arrangeLabel = function () {
var label = this.fLabel_mc;
var h = this.height;
var w = (this.width - 2);
var b = 1;
this.fLabel_mc.setSize(w - (b * 4));
label._x = b * 3;
label._y = (h / 2) - (label._height / 2);
};
FPushButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FPushButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
this.arrangeLabel();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FPushButtonClass.prototype.getEnabled = function () {
return(this.enabled);
};
FPushButtonClass.prototype.setEnabled = function (enable) {
if (enable || (enable == undefined)) {
this.gotoFrame(1);
this.drawFrame();
this.flabel_mc.setEnabled(true);
this.enabled = true;
super.setEnabled(true);
} else {
this.gotoFrame(4);
this.drawFrame();
this.flabel_mc.setEnabled(false);
this.enabled = false;
super.setEnabled(false);
}
};
FPushButtonClass.prototype.txtFormat = function () {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = "center")) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 1)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 1)) : undefined);
if (this.fLabel_mc._height > this.height) {
super.setSize(this.width, this.fLabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.fLabel_mc.labelField.setTextFormat(this.textStyle);
this.setEnabled(this.enable);
};
FPushButtonClass.prototype.drawFrame = function () {
var b = 1;
var x1 = 0;
var y1 = 0;
var x2 = this.width;
var y2 = this.height;
var mc_array = ["up_mc", "over_mc", "down_mc", "disabled_mc"];
var frame = mc_array[this.fpbState_mc._currentframe - 1];
var mc = "frame";
var i = 0;
while (i < 6) {
x1 = x1 + ((i % 2) * b);
y1 = y1 + ((i % 2) * b);
x2 = x2 - (((i + 1) % 2) * b);
y2 = y2 - (((i + 1) % 2) * b);
var w = (Math.abs(x1 - x2) + (2 * b));
var h = (Math.abs(y1 - y2) + (2 * b));
this.fpbState_mc[frame][mc + i]._width = w;
this.fpbState_mc[frame][mc + i]._height = h;
this.fpbState_mc[frame][mc + i]._x = x1 - b;
this.fpbState_mc[frame][mc + i]._y = y1 - b;
i++;
}
};
FPushButtonClass.prototype.setClickHandler = function (chng, obj) {
this.handlerObj = ((arguments.length < 2) ? (this._parent) : (obj));
this.clickHandler = chng;
};
FPushButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.clickHandler](this);
};
FPushButtonClass.prototype.initContentPos = function (mc) {
this.incrVal = 1;
this.initx = this[mc]._x - (this.getBtnState() * this.incrVal);
this.inity = this[mc]._y - (this.getBtnState() * this.incrVal);
this.togx = this.initx + this.incrVal;
this.togy = this.inity + this.incrVal;
};
FPushButtonClass.prototype.setBtnState = function (state) {
this.btnState = state;
if (state) {
this.fLabel_mc._x = this.togx;
this.fLabel_mc._y = this.togy;
} else {
this.fLabel_mc._x = this.initx;
this.fLabel_mc._y = this.inity;
}
};
FPushButtonClass.prototype.getBtnState = function () {
return(this.btnState);
};
FPushButtonClass.prototype.myOnSetFocus = function () {
this.focused = true;
super.myOnSetFocus();
};
FPushButtonClass.prototype.onPress = function () {
this.pressFocus();
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
this.setBtnState(true);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRelease = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
this.executeCallBack();
this.setBtnState(false);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRollOver = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
};
FPushButtonClass.prototype.onRollOut = function () {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onReleaseOutside = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOut = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOver = function () {
this.setBtnState(true);
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
};
FPushButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this.pressOnce == undefined)) {
this.onPress();
this.pressOnce = 1;
}
};
FPushButtonClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.onRelease();
this.pressOnce = undefined;
}
};
FPushButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_PUSHBUTTON);
};
FPushButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FPushButtonClass.prototype.get_accState = function (childId) {
if (this.pressOnce) {
return(this.master.STATE_SYSTEM_PRESSED);
}
return(this.master.STATE_SYSTEM_DEFAULT);
};
FPushButtonClass.prototype.get_accDefaultAction = function (childId) {
return("Press");
};
FPushButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.onPress();
this.master.onRelease();
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 1
this.onEnterFrame = function () {
if (_global.soundon) {
sb1.gotoAndStop(1);
} else {
sb1.gotoAndStop(2);
}
};
Symbol 82 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 1
isplaying = true;
tempnum = (Math.random() * _parent.Magic1._width) / 4;
if (Math.random() > 0.5) {
_x = (_parent.Magic1._x + tempnum);
} else {
_x = (_root.Magic1._x - tempnum);
}
tempnum = (Math.random() * _parent.Magic1._height) / 4;
if (Math.random() > 0.5) {
_y = (_parent.Magic1._y + tempnum);
} else {
_y = (_parent.Magic1._y - tempnum);
}
Symbol 109 MovieClip Frame 10
_x = (_parent.Magic1._x + (Math.random() * _parent.Magic1._width));
_y = (_parent.Magic1._y + (Math.random() * _parent.Magic1._height));
isplaying = false;
stop();
Symbol 115 MovieClip Frame 1
this.onEnterFrame = function () {
if (this.hitTest(_parent.spug1)) {
_parent.SackHit();
_parent.ResetSack();
}
};
Symbol 115 MovieClip Frame 7
this._x = -50;
this._y = -50;
stop();
Symbol 118 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 2
gotoAndPlay (9);
Symbol 127 MovieClip Frame 8
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
this._alpha = 100;
Symbol 141 MovieClip Frame 11
this._alpha = 0;