Frame 1
stop();
Instance of Symbol 18 MovieClip "loader" in Frame 1
onClipEvent (enterFrame) {
if (_root.getBytesTotal() == _root.getBytesLoaded()) {
_root.play();
} else {
_root.stop();
}
this.bar._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
}
Frame 2
function setHidingPlaces() {
_root.scoobyPlacesMC = new Array();
_root.scoobyPlacesMC[0] = _root.shelf1.holeInWall;
_root.scoobyPlacesMC[1] = _root.trunkMC.trunk;
_root.scoobyPlacesMC[2] = _root.armorMC.armor.chestMC;
_root.scoobyPlacesMC[3] = _root.mask1.holeInWall;
_root.scoobyPlacesMC[4] = _root.tableMCMC;
_root.scoobyPlacesMC[5] = _root.doorMC;
_root.scoobyPlacesMC[6] = _root.fireplace;
_root.scoobyPlacesAnim = new Array();
_root.scoobyPlacesAnim[0] = _root.shelf1;
_root.scoobyPlacesAnim[1] = _root.trunkMC.trunk.trunkLid;
_root.scoobyPlacesAnim[2] = _root.armorMC.armor.chestMC.chest;
_root.scoobyPlacesAnim[3] = _root.mask1;
_root.scoobyPlacesAnim[4] = _root.tableMCMC.tableMC;
_root.scoobyPlacesAnim[5] = _root.doorMC.door;
_root.scoobyPlacesAnim[6] = _root.fireplace.scooby;
_root.hidingPlaces = new Array();
_root.hidingPlaces[0] = _root.fireplace.fire.flamesMC;
_root.hidingPlaces[1] = _root.fireplace.mirror.crack1;
_root.hidingPlaces[2] = _root.fireplace.mantel.stone;
_root.hidingPlaces[3] = _root.shelf1;
_root.hidingPlaces[4] = _root.shelf1.book1;
_root.hidingPlaces[5] = _root.shelf1.shelfBottom.book2;
_root.hidingPlaces[6] = _root.shelf2.book3;
_root.hidingPlaces[7] = _root.mask1;
_root.hidingPlaces[8] = _root.mask2;
_root.hidingPlaces[9] = _root.statue;
_root.hidingPlaces[10] = _root.totem;
_root.hidingPlaces[11] = _root.armorMC;
_root.hidingPlaces[12] = _root.armorMC.armor.chestMC.chest;
_root.hidingPlaces[13] = _root.armorMC.armor.helmetMC;
_root.hidingPlaces[14] = _root.chand1;
_root.hidingPlaces[15] = _root.chand2;
_root.hidingPlaces[16] = _root.doorMC.door;
_root.hidingPlaces[17] = _root.board2;
_root.hidingPlaces[18] = _root.trunkMC;
_root.hidingPlaces[19] = _root.trunkMC.trunk.trunkLid;
_root.hidingPlaces[20] = _root.board1;
_root.hidingPlaces[21] = _root.chair1;
_root.hidingPlaces[22] = _root.chair1.chair.cushion;
_root.hidingPlaces[23] = _root.chair2;
_root.hidingPlaces[24] = _root.chair2.chair.cushion;
_root.hidingPlaces[25] = _root.tableMCMC.tableMC;
_root.hidingPlaces[26] = _root.tableMCMC.tableMC.table.book;
_root.hidingPlaces[27] = _root.archway.stone;
_root.hidingPlaces[28] = _root.spiderWeb;
_root.hoverValues = [0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0];
_root.soundValues = [14, 4, -1, 16, 3, 3, 3, 17, 2, 18, -1, 1, 0, 1, -1, -1, 7, 11, 19, 8, 11, 19, 6, 19, 6, 8, 3, -1, -1];
i = 0;
while (i < _root.hidingPlaces.length) {
_root.hidingPlaces[i].doesHover = _root.hoverValues[i];
_root.hidingPlaces[i].letter = null;
_root.hidingPlaces[i].seq = i;
i++;
}
}
function hover() {
this._x = this.xOffSet + (Math.sin(this.rot) * 2);
this._y = this.yOffSet + (Math.cos(this.rot) * 2);
this.rot = this.rot + 0.196349540849362;
this.count++;
if (18 < this.count) {
this._x = this.oX;
this._y = this.oY;
this.count = 0;
this.onEnterFrame = _root.reversePlay;
}
}
function hold() {
this.count++;
if (18 < this.count) {
this._x = this.oX;
this._y = this.oY;
this.count = 0;
this.onEnterFrame = _root.reversePlay;
}
}
function reversePlay() {
this.gotoAndStop(this._currentFrame - 1);
if (this._currentFrame == 1) {
this.letter = null;
this.onEnterFrame = null;
MovieClip.removeFLEMListener(this);
}
}
function goElements() {
function follow(yPos, xPos) {
this.yVal = (yPos ? (yPos) : (_parent._ymouse)) - this._y;
this.xVal = (xPos ? (xPos) : (_parent._xmouse)) - this._x;
this.toRot = 57.2957795130823 * Math.atan(this.yVal / this.xVal);
if (this.xVal < 0) {
toRot = toRot + 180;
} else if (this.yVal < 0) {
toRot = toRot + 360;
}
this._rotation = this.toRot;
}
g = _root.fireplace.ghost;
g._visible = false;
g._alpha = 25;
g.oX = g._x;
g.oY = g._y;
g.rot = 0;
g.mult = 5;
g.inc = 0.196349540849362;
g.rotate = function () {
this._x = this.oX + (Math.sin(this.rot) * this.mult);
this._y = this.oY + (Math.cos(this.rot) * this.mult);
this.rot = this.rot + this.inc;
if (18.8495559215388 < this.rot) {
this.rot = 0;
this._visible = false;
this.onEnterFrame = this.hold;
}
};
g.hold = function () {
this.num = Math.round(Math.random() * 120);
if (this.num == 1) {
this._visible = true;
this.onEnterFrame = this.rotate;
}
};
g.onEnterFrame = g.hold;
MovieClip.addFLEMListener(g);
_root.spiderWeb.spider.w = _root.spiderWeb.webCenter;
_root.spiderWeb.spider.gotoX = _root.spiderWeb.webCenter._x;
_root.spiderWeb.spider.gotoY = _root.spiderWeb.webCenter._y;
_root.spiderWeb.spider.onEnterFrame = function () {
this._x = this._x + ((this.gotoX - this._x) * 0.1);
this._y = this._y + ((this.gotoY - this._y) * 0.1);
if (Math.abs(this.gotoX - this._x) < 5) {
this.gotoX = (this.w._x + Math.round(Math.random() * 61)) - 30;
this.gotoY = (this.w._y + Math.round(Math.random() * 61)) - 30;
this.follow = _root.follow;
this.follow(this.gotoY, this.gotoX);
}
this.num = Math.round(Math.random() * 200);
if (this.num == 1) {
_parent.droppingSpider.gotoAndPlay(2);
}
};
MovieClip.addFLEMListener(_root.spiderWeb.spider);
i = 1;
while (2 >= i) {
j = 1;
while (2 >= j) {
_root["mask" + i].mask["eye" + j].onEnterFrame = _root.follow;
MovieClip.addFLEMListener(_root["mask" + i].mask["eye" + j]);
j++;
}
i++;
}
_root.fireplace.fire.flamesMC.flames.num = 1;
_root.fireplace.fire.flamesMC.flames.onEnterFrame = function () {
while (num == this._currentFrame) {
num = Math.round(Math.random() * 3) + 1;
}
this.gotoAndStop(num);
};
MovieClip.addFLEMListener(_root.fireplace.fire.flamesMC.flames);
Flames = new Object();
Flames.onEnterFrame = function () {
i = 1;
while (2 >= i) {
j = 1;
while (4 >= j) {
_root["chand" + i].chandMC.chand["candle" + j].flame._xscale = _root["chand" + i].chandMC.chand["candle" + j].flame._xscale * -1;
j++;
}
_root.fireplace["candle" + i].flame._xscale = _root.fireplace["candle" + i].flame._xscale * -1;
i++;
}
};
MovieClip.addFLEMListener(Flames);
_root.arc = 10;
_root.swingSpeed = 0.174532925199433;
Object.prototype.Swinger = function (mc, startRot, sign) {
this.mc = mc;
this.rot = startRot;
this.inc = _root.swingSpeed * sign;
MovieClip.addFLEMListener(this);
};
Swinger.prototype.onEnterFrame = function () {
if (this.mc._currentFrame == 1) {
this.mc._rotation = _root.arc * Math.sin(this.rot);
this.rot = this.rot + this.inc;
} else {
this.rot = 0;
this.mc._rotation = 0;
}
};
_root.chand1._xscale = _root.chand1._xscale * -1;
swinger1 = new Swinger(_root.chand1, 0, 1);
swinger2 = new Swinger(_root.chand2, 2.0943951023932, -1);
}
function follow(yPos, xPos) {
this.yVal = (yPos ? (yPos) : (_parent._ymouse)) - this._y;
this.xVal = (xPos ? (xPos) : (_parent._xmouse)) - this._x;
this.toRot = 57.2957795130823 * Math.atan(this.yVal / this.xVal);
if (this.xVal < 0) {
toRot = toRot + 180;
} else if (this.yVal < 0) {
toRot = toRot + 360;
}
this._rotation = this.toRot;
}
Object.FLEM = function () {
this._listener_array = [];
};
Object.FLEM.prototype.addFLEMListener = function (obj) {
var a = this._listener_array;
var found = false;
var i = a.length;
while (i--) {
if (a[i] == obj) {
found = true;
break;
}
}
if (found) {
return(false);
}
a.unshift(obj);
if (this.sendFLEMEvent == undefined) {
this.sendFLEMEvent = this._sendFLEMEvent;
}
return(true);
};
Object.FLEM.prototype.removeFLEMListener = function (obj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] == obj) {
a.splice(i, 1);
break;
}
}
if (a.length == 0) {
this.sendFLEMEvent = undefined;
}
};
Object.FLEM.prototype._sendFLEMEvent = function (func_str, argObj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] != undefined) {
a[i][func_str](argObj);
} else {
a.splice(i, 1);
}
}
};
Object.addStaticFLEM = function (obj) {
if (obj._listener_array == undefined) {
obj._listener_array = [];
obj._sendFLEMEvent = Object.FLEM.prototype._sendFLEMEvent;
obj.addFLEMListener = Object.FLEM.prototype.addFLEMListener;
obj.removeFLEMListener = Object.FLEM.prototype.removeFLEMListener;
}
};
Object.removeStaticFLEM = function (obj) {
delete obj._listener_array;
delete obj._sendFLEMEvent;
delete obj.addFLEMListener;
delete obj.removeFLEMListener;
};
Object.prototype.registerFLEM = function (objects, reg) {
if (objects.__proto__ == Array.prototype) {
var n = objects.length;
var i = 0;
while (i < n) {
if (reg == false) {
objects[i].removeFLEMListener(this);
} else {
objects[i].addFLEMListener(this);
}
i++;
}
}
};
ASSetPropFlags(Object.prototype, ["registerFLEM"], 1);
Object.addStaticFLEM(MovieClip);
Object.addStaticFLEM(Mouse);
Object.addStaticFLEM(Key);
if (_level0.flemEngine == undefined) {
_level0.attachMovie("flemEngine", "flemEngine", 8888);
if (_level0.flemEngine == undefined) {
trace("Cannot attach flemEngine! Make sure it is in the library.");
}
}
String.exactNaughtyWords = new Array("anal", "anus", "ass", "asshole", "asswipe", "bastard", "bitch", "bitchy", "blowjob", "boob", "boobs", "buttfucker", "caca", "clit", "cock", "cocksucker", "cunt", "dickhead", "dipshit", "doody", "dyke", "dike", "fag", "faggot", "fuck", "fucked", "fucker", "fuckface", "fucks", "give head", "gives head", "gook", "kike", "motherfucker", "nigger", "penis", "piss", "poop", "sex", "shit", "shitface", "shithead", "shits", "slut", "spic", "suck", "slutty", "shity", "shitty", "sucks", "tit", "tits", "twat", "urine", "vagina", "whore", "wop", "ahole", "a-hole", "a hole");
String.searchNaughtyWords = new Array("asshole", "bitch", "blowjob", "buttfucker", "cocksucker", "dickhead", "motherfucker", "fuck", "fucked", "nigger", "shit", "suck");
String.prototype.isNaughty = function () {
var s = this.toString().toLowerCase().replace("-", " ").replace("_", " ");
if (s != "") {
var s_array = s.split(" ");
var q = 0;
var i = 0;
while (q < s_array.length) {
i = 0;
while (i < String.exactNaughtyWords.length) {
if (s_array[q] == String.exactNaughtyWords[i]) {
return(true);
}
i++;
}
i = 0;
while (i < String.searchNaughtyWords.length) {
if (s_array[q].indexOf(String.searchNaughtyWords[i]) != -1) {
return(true);
}
i++;
}
q++;
}
}
return(false);
};
String.prototype.lTrim = function () {
var s = this.toString();
var i = 0;
var sLength = s.length;
while ((i < sLength) && (32 >= s.charCodeAt(i))) {
i++;
}
return(s.substring(i, sLength));
};
String.prototype.rTrim = function () {
var s = this.toString();
var i = (s.length - 1);
while ((i >= 0) && (32 >= s.charCodeAt(i))) {
i--;
}
return(s.substring(0, i + 1));
};
String.prototype.trim = function () {
var s = this.toString();
s = s.lTrim();
s = s.rTrim();
return(s);
};
String.prototype.isEmpty = function () {
var s = this.toString().trim();
return((s == null) || (s.length == 0));
};
String.prototype.isEmail = function () {
if (this.length < 5) {
return(false);
}
var iChars = "*|,\":<>[]{}`';()&$#%";
var eLength = this.length;
var i = 0;
while (i < eLength) {
if (iChars.indexOf(this.charAt(i)) != -1) {
return(false);
}
i++;
}
var atIndex = this.lastIndexOf("@");
if ((atIndex < 1) || (atIndex == (eLength - 1))) {
return(false);
}
var pIndex = this.lastIndexOf(".");
if ((pIndex < 4) || (pIndex == (eLength - 1))) {
return(false);
}
if (pIndex < atIndex) {
return(false);
}
return(true);
};
String.prototype.replace = function (searchStr, replaceStr) {
var origStr = this.toString();
var tempStr = "";
var startIndex = 0;
var searchIndex;
if (searchStr == "") {
return(origStr);
}
if (origStr.indexOf(searchStr) != -1) {
while (((searchIndex = origStr.indexOf(searchStr, startIndex))) != -1) {
tempStr = tempStr + origStr.substring(startIndex, searchIndex);
tempStr = tempStr + replaceStr;
startIndex = searchIndex + searchStr.length;
}
return(tempStr + origStr.substring(startIndex));
}
return(origStr);
};
String.prototype.sprintf = function () {
var s = this.toString();
var sArray = s.splitMultiChar("%s");
s = "";
var i = 0;
while (i < sArray.length) {
s = s + (sArray[i] + arguments[i]);
i++;
}
return((q ? (s + "?") : (s)));
};
String.prototype.splitMultiChar = function (c) {
var s = this.toString();
s = s.replace(c, "¶");
var a = s.split("¶");
return(a);
};
ASSetPropFlags(String, ["exactNaughtyWords", "searchNaughtyWords"], 1);
ASSetPropFlags(String.prototype, ["isNaughty", "lTrim", "rTrim", "trim", "isEmpty", "isEmail", "replace", "sprintf", "splitMultiChar"], 1);
Object.version = getVersion().split(",");
Object.majorVersion = int(substring(Object.version[0], Object.version[0].length, 1));
Object.minorVersion = int(Object.version[2]);
if (Object.majorVersion == 5) {
String.prototype.charAt = function (index) {
return(substring(this, index + 1, 1));
};
String.prototype.concat = function () {
var r = this.toString();
var i = 0;
while (i < arguments.length) {
r = r + arguments[i];
i++;
}
return(r);
};
String.prototype.indexOf = function (sub, i) {
if (i == null) {
i = 0;
}
var size = sub.length;
var last = ((this.length - size) + 1);
while ((last >= i) && ((substring(this, 1 + (i++), size)) != sub)) {
}
return(((last >= i) ? (i - 1) : -1));
};
String.prototype.lastIndexOf = function (sub, i) {
size = sub.length;
((i == null) ? ((i = (this.length - size) + 1)) : (++i));
if (sub.length == 0) {
return(i - 1);
}
while ((i >= 0) && ((substring(this, i--, size)) != sub)) {
}
return(((i == -1) ? -1 : (i)));
};
String.prototype.slice = function (s, e) {
return(substring(this, s + 1, e - s));
};
String.prototype.split = function (d) {
if (d != null) {
var r = new Array();
var size = this.length;
var c = 0;
var n = 0;
if (d != "") {
var i = 0;
while (size >= i) {
if ((substring(this, i + 1, 1)) == d) {
r[n] = substring(this, c + 1, i - c);
c = i + 1;
n++;
}
i++;
}
if (c != i) {
r[n] = substring(this, c + 1, i - c);
}
} else {
var i = 0;
while (i < size) {
r[i] = substring(this, i + 1, 1);
i++;
}
}
} else {
r = new Array(this.toString());
}
return(r);
};
String.prototype.substr = function (s, l) {
if (l == null) {
l = this.length - s;
}
return(substring(this, s + 1, l));
};
}
Object.FLEM = function () {
this._listener_array = [];
};
Object.FLEM.prototype.addFLEMListener = function (obj) {
var a = this._listener_array;
var found = false;
var i = a.length;
while (i--) {
if (a[i] == obj) {
found = true;
break;
}
}
if (found) {
return(false);
}
a.unshift(obj);
if (this.sendFLEMEvent == undefined) {
this.sendFLEMEvent = this._sendFLEMEvent;
}
return(true);
};
Object.FLEM.prototype.removeFLEMListener = function (obj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] == obj) {
a.splice(i, 1);
break;
}
}
if (a.length == 0) {
this.sendFLEMEvent = undefined;
}
};
Object.FLEM.prototype._sendFLEMEvent = function (func_str, argObj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] != undefined) {
a[i][func_str](argObj);
} else {
a.splice(i, 1);
}
}
};
Object.addStaticFLEM = function (obj) {
if (obj._listener_array == undefined) {
obj._listener_array = [];
obj._sendFLEMEvent = Object.FLEM.prototype._sendFLEMEvent;
obj.addFLEMListener = Object.FLEM.prototype.addFLEMListener;
obj.removeFLEMListener = Object.FLEM.prototype.removeFLEMListener;
}
};
Object.removeStaticFLEM = function (obj) {
delete obj._listener_array;
delete obj._sendFLEMEvent;
delete obj.addFLEMListener;
delete obj.removeFLEMListener;
};
Object.prototype.registerFLEM = function (objects, reg) {
if (objects.__proto__ == Array.prototype) {
var n = objects.length;
var i = 0;
while (i < n) {
if (reg == false) {
objects[i].removeFLEMListener(this);
} else {
objects[i].addFLEMListener(this);
}
i++;
}
}
};
ASSetPropFlags(Object.prototype, ["registerFLEM"], 1);
Object.addStaticFLEM(MovieClip);
Object.addStaticFLEM(Mouse);
Object.addStaticFLEM(Key);
if (_level0.flemEngine == undefined) {
_level0.attachMovie("flemEngine", "flemEngine", 8888);
if (_level0.flemEngine == undefined) {
trace("Cannot attach flemEngine! Make sure it is in the library.");
}
}
Object.prototype.TimeLine = function (tLine, loop) {
trace("New TimeLine object created.");
this.keyframes = [];
this.tLine = tLine;
this.loop = ((loop == null) ? false : (loop));
this.startFrame = tLine._currentframe;
this.totalFrames = tLine._totalframes;
tLine.stop();
if (debugMode) {
trace((("TimeLine-> tLine:" + this.tLine) + ", loop:") + this.loop);
}
};
TimeLine.prototype.onEnterFrame = function () {
this.currentFrame = this.tLine._currentframe;
if (debugMode) {
trace("TimeLine-> currentFrame:" + this.currentFrame);
}
var i = 0;
while (i < this.keyframes.length) {
if ((this.currentFrame == this.keyframes[i].frameNumber) && (!this.keyframes[i].reached)) {
this.keyframes[i].reached = true;
this.keyframes[i].action(this);
}
i++;
}
if (this.currentFrame == this.totalFrames) {
MovieClip.removeFLEMListener(this);
this.resetKeyFramesReached();
if (!this.loop) {
this.tLine.stop();
} else {
this.tLine.gotoAndPlay(this.startFrame);
}
}
};
TimeLine.prototype.play = function () {
this.onEnterFrame();
MovieClip.addFLEMListener(this);
this.tLine.play();
};
TimeLine.prototype.start = function () {
trace("Timeline -> start -> starting.");
this.onEnterFrame();
MovieClip.addFLEMListener(this);
this.tLine.play();
};
TimeLine.prototype.gotoAndPlay = function (t) {
this.keyframes[this.findFrame(t)].action();
this.resetKeyFramesReached();
if (typeof(t) == "string") {
idx = this.findLabel(t);
if (idx != -1) {
t = this.keyframes[idx].frameNumber;
} else {
t = 1;
}
}
if (t == this.startFrame) {
MovieClip.removeFLEMListener(this);
}
MovieClip.addFLEMListener(this);
this.tLine.gotoAndPlay(t);
};
TimeLine.prototype.gotoAndStop = function (t) {
this.keyframes[this.findFrame(t)].action();
this.resetKeyFramesReached();
if (typeof(t) == "string") {
idx = this.findLabel(t);
if (idx != -1) {
t = this.keyframes[idx].frameNumber;
} else {
t = 1;
}
}
if (t == this.startFrame) {
MovieClip.removeFLEMListener(this);
}
MovieClip.removeFLEMListener(this);
this.tLine.gotoAndStop(t);
};
TimeLine.prototype.stop = function () {
MovieClip.removeFLEMListener(this);
this.tLine.stop();
};
TimeLine.prototype.resetKeyFramesReached = function () {
var i = 0;
while (i < this.keyframes.length) {
this.keyframes[i].reached = false;
i++;
}
};
TimeLine.prototype.findLabel = function (l) {
var j = 0;
while ((j < this.keyframes.length) && (this.keyframes[j].label != l)) {
j++;
}
if (j == this.keyframes.length) {
j = -1;
}
return(j);
};
TimeLine.prototype.findFrame = function (n) {
var j = 0;
while ((j < this.keyframes.length) && (this.keyframes[j].frameNumber != n)) {
j++;
}
if (j == this.keyframes.length) {
j = -1;
}
return(j);
};
TimeLine.prototype.addKeyFrames = function () {
var i = 0;
while (i < arguments.length) {
this.keyframes.push(arguments[i]);
if (debugMode) {
trace(("TimeLine-> adding KeyFrame(" + arguments[i].frameNumber) + ") to keyframes.");
}
i++;
}
};
Object.prototype.KeyFrame = function (frameNumber, label) {
this.frameNumber = frameNumber;
this.reached = false;
this.label = label;
};
KeyFrame.prototype.getLabel = function () {
return(this.frameNumber);
};
KeyFrame.prototype.getFrameNumber = function () {
return(this.label);
};
KeyFrame.prototype.action = function (t) {
};
ASSetPropFlags(Object.prototype, ["TimeLine", "KeyFrame"], 1);
String.prototype.charAt = function (index) {
return(substring(this, index + 1, 1));
};
String.prototype.concat = function () {
var r = this.toString();
var i = 0;
while (i < arguments.length) {
r = r + arguments[i];
i++;
}
return(r);
};
String.prototype.indexOf = function (sub, i) {
if (i == null) {
i = 0;
}
var size = sub.length;
var last = ((this.length - size) + 1);
while ((last >= i) && ((substring(this, 1 + (i++), size)) != sub)) {
}
return(((last >= i) ? (i - 1) : -1));
};
String.prototype.lastIndexOf = function (sub, i) {
size = sub.length;
((i == null) ? ((i = (this.length - size) + 1)) : (++i));
if (sub.length == 0) {
return(i - 1);
}
while ((i >= 0) && ((substring(this, i--, size)) != sub)) {
}
return(((i == -1) ? -1 : (i)));
};
String.prototype.slice = function (s, e) {
return(substring(this, s + 1, e - s));
};
String.prototype.split = function (d) {
if (d != null) {
var r = new Array();
var size = this.length;
var c = 0;
var n = 0;
if (d != "") {
var i = 0;
while (size >= i) {
if ((substring(this, i + 1, 1)) == d) {
r[n] = substring(this, c + 1, i - c);
c = i + 1;
n++;
}
i++;
}
if (c != i) {
r[n] = substring(this, c + 1, i - c);
}
} else {
var i = 0;
while (i < size) {
r[i] = substring(this, i + 1, 1);
i++;
}
}
} else {
r = new Array(this.toString());
}
return(r);
};
String.prototype.substr = function (s, l) {
if (l == null) {
l = this.length - s;
}
return(substring(this, s + 1, l));
};
String.exactNaughtyWords = new Array("anal", "anus", "ass", "asshole", "asswipe", "bastard", "bitch", "bitchy", "blowjob", "boob", "boobs", "buttfucker", "caca", "clit", "cock", "cocksucker", "cunt", "dickhead", "dipshit", "doody", "dyke", "dike", "fag", "faggot", "fuck", "fucked", "fucker", "fuckface", "fucks", "give head", "gives head", "gook", "kike", "motherfucker", "nigger", "penis", "piss", "poop", "sex", "shit", "shitface", "shithead", "shits", "slut", "spic", "suck", "slutty", "shity", "shitty", "sucks", "tit", "tits", "twat", "urine", "vagina", "whore", "wop", "ahole", "a-hole", "a hole");
String.searchNaughtyWords = new Array("asshole", "bitch", "blowjob", "buttfucker", "cocksucker", "dickhead", "motherfucker", "fuck", "fucked", "nigger", "shit", "suck");
String.prototype.isNaughty = function () {
var s = this.toString().toLowerCase();
if (s != "") {
for (i in String.exactNaughtyWords) {
if (s == String.exactNaughtyWords[i]) {
return(true);
}
}
for (i in String.searchNaughtyWords) {
if (s.indexOf(String.searchNaughtyWords[i]) != -1) {
return(true);
}
}
}
return(false);
};
String.prototype.lTrim = function () {
var s = this.toString();
var i = 0;
while ((i < s.length) && (32 >= s.charCodeAt(i))) {
i++;
}
return(s.substring(i, s.length));
};
String.prototype.rTrim = function () {
var s = this.toString();
var i = (s.length - 1);
while ((i >= 0) && (32 >= s.charCodeAt(i))) {
i--;
}
return(s.substring(0, i + 1));
};
String.prototype.trim = function () {
var s = this.toString();
s = s.lTrim();
s = s.rTrim();
return(s);
};
String.prototype.isEmpty = function () {
var s = this.toString().trim();
return((s == null) || (s.length == 0));
};
String.prototype.isEmail = function () {
var s = this.toString();
return((s.indexOf("@") != -1) && (s.indexOf(".") != -1));
};
String.prototype.replace = function (searchStr, replaceStr) {
var origStr = this.toString();
var tempStr = "";
var startIndex = 0;
if (searchStr == "") {
return(origStr);
}
if (origStr.indexOf(searchStr) != -1) {
while (((searchIndex = origStr.indexOf(searchStr, startIndex))) != -1) {
tempStr = tempStr + origStr.substring(startIndex, searchIndex);
tempStr = tempStr + replaceStr;
startIndex = searchIndex + searchStr.length;
}
return(tempStr + origStr.substring(startIndex));
}
return(origStr);
};
ASSetPropFlags(String, ["exactNaughtyWords", "searchNaughtyWords"], 1);
ASSetPropFlags(String.prototype, ["isNaughty", "lTrim", "rTrim", "trim", "isEmpty", "isEmail", "replace"], 1);
Object.FLEM = function () {
this._listener_array = [];
};
Object.FLEM.prototype.addFLEMListener = function (obj) {
var a = this._listener_array;
var found = false;
var i = a.length;
while (i--) {
if (a[i] == obj) {
found = true;
break;
}
}
if (found) {
return(false);
}
a.unshift(obj);
if (this.sendFLEMEvent == undefined) {
this.sendFLEMEvent = this._sendFLEMEvent;
}
return(true);
};
Object.FLEM.prototype.removeFLEMListener = function (obj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] == obj) {
a.splice(i, 1);
break;
}
}
if (a.length == 0) {
this.sendFLEMEvent = undefined;
}
};
Object.FLEM.prototype._sendFLEMEvent = function (func_str, argObj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] != undefined) {
a[i][func_str](argObj);
} else {
a.splice(i, 1);
}
}
};
Object.addStaticFLEM = function (obj) {
if (obj._listener_array == undefined) {
obj._listener_array = [];
obj._sendFLEMEvent = Object.FLEM.prototype._sendFLEMEvent;
obj.addFLEMListener = Object.FLEM.prototype.addFLEMListener;
obj.removeFLEMListener = Object.FLEM.prototype.removeFLEMListener;
}
};
Object.removeStaticFLEM = function (obj) {
delete obj._listener_array;
delete obj._sendFLEMEvent;
delete obj.addFLEMListener;
delete obj.removeFLEMListener;
};
Object.prototype.registerFLEM = function (objects, reg) {
if (objects.__proto__ == Array.prototype) {
var n = objects.length;
var i = 0;
while (i < n) {
if (reg == false) {
objects[i].removeFLEMListener(this);
} else {
objects[i].addFLEMListener(this);
}
i++;
}
}
};
ASSetPropFlags(Object.prototype, ["registerFLEM"], 1);
Object.addStaticFLEM(MovieClip);
Object.addStaticFLEM(Mouse);
Object.addStaticFLEM(Key);
if (_level0.flemEngine == undefined) {
_level0.attachMovie("flemEngine", "flemEngine", 8888);
if (_level0.flemEngine == undefined) {
trace("Cannot attach flemEngine! Make sure it is in the library.");
}
}
String.exactNaughtyWords = new Array("anal", "anus", "ass", "asshole", "asswipe", "bastard", "bitch", "bitchy", "blowjob", "boob", "boobs", "buttfucker", "caca", "clit", "cock", "cocksucker", "cunt", "dickhead", "dipshit", "doody", "dyke", "dike", "fag", "faggot", "fuck", "fucked", "fucker", "fuckface", "fucks", "give head", "gives head", "gook", "kike", "motherfucker", "nigger", "penis", "piss", "poop", "sex", "shit", "shitface", "shithead", "shits", "slut", "spic", "suck", "slutty", "shity", "shitty", "sucks", "tit", "tits", "twat", "urine", "vagina", "whore", "wop", "ahole", "a-hole", "a hole");
String.searchNaughtyWords = new Array("asshole", "bitch", "blowjob", "buttfucker", "cocksucker", "dickhead", "motherfucker", "fuck", "fucked", "nigger", "shit", "suck");
String.prototype.isNaughty = function () {
var s = this.toString().toLowerCase().replace("-", " ").replace("_", " ");
if (s != "") {
var s_array = s.split(" ");
var q = 0;
var i = 0;
while (q < s_array.length) {
i = 0;
while (i < String.exactNaughtyWords.length) {
if (s_array[q] == String.exactNaughtyWords[i]) {
return(true);
}
i++;
}
i = 0;
while (i < String.searchNaughtyWords.length) {
if (s_array[q].indexOf(String.searchNaughtyWords[i]) != -1) {
return(true);
}
i++;
}
q++;
}
}
return(false);
};
String.prototype.lTrim = function () {
var s = this.toString();
var i = 0;
var sLength = s.length;
while ((i < sLength) && (32 >= s.charCodeAt(i))) {
i++;
}
return(s.substring(i, sLength));
};
String.prototype.rTrim = function () {
var s = this.toString();
var i = (s.length - 1);
while ((i >= 0) && (32 >= s.charCodeAt(i))) {
i--;
}
return(s.substring(0, i + 1));
};
String.prototype.trim = function () {
var s = this.toString();
s = s.lTrim();
s = s.rTrim();
return(s);
};
String.prototype.isEmpty = function () {
var s = this.toString().trim();
return((s == null) || (s.length == 0));
};
String.prototype.isEmail = function () {
if (this.length < 5) {
return(false);
}
var iChars = "*|,\":<>[]{}`';()&$#%";
var eLength = this.length;
var i = 0;
while (i < eLength) {
if (iChars.indexOf(this.charAt(i)) != -1) {
return(false);
}
i++;
}
var atIndex = this.lastIndexOf("@");
if ((atIndex < 1) || (atIndex == (eLength - 1))) {
return(false);
}
var pIndex = this.lastIndexOf(".");
if ((pIndex < 4) || (pIndex == (eLength - 1))) {
return(false);
}
if (pIndex < atIndex) {
return(false);
}
return(true);
};
String.prototype.replace = function (searchStr, replaceStr) {
var origStr = this.toString();
var tempStr = "";
var startIndex = 0;
var searchIndex;
if (searchStr == "") {
return(origStr);
}
if (origStr.indexOf(searchStr) != -1) {
while (((searchIndex = origStr.indexOf(searchStr, startIndex))) != -1) {
tempStr = tempStr + origStr.substring(startIndex, searchIndex);
tempStr = tempStr + replaceStr;
startIndex = searchIndex + searchStr.length;
}
return(tempStr + origStr.substring(startIndex));
}
return(origStr);
};
String.prototype.sprintf = function () {
var s = this.toString();
var sArray = s.splitMultiChar("%s");
s = "";
var i = 0;
while (i < sArray.length) {
s = s + (sArray[i] + arguments[i]);
i++;
}
return((q ? (s + "?") : (s)));
};
String.prototype.splitMultiChar = function (c) {
var s = this.toString();
s = s.replace(c, "¶");
var a = s.split("¶");
return(a);
};
ASSetPropFlags(String, ["exactNaughtyWords", "searchNaughtyWords"], 1);
ASSetPropFlags(String.prototype, ["isNaughty", "lTrim", "rTrim", "trim", "isEmpty", "isEmail", "replace", "sprintf", "splitMultiChar"], 1);
Object.version = getVersion().split(",");
Object.majorVersion = int(substring(Object.version[0], Object.version[0].length, 1));
Object.minorVersion = int(Object.version[2]);
if (Object.majorVersion == 5) {
String.prototype.charAt = function (index) {
return(substring(this, index + 1, 1));
};
String.prototype.concat = function () {
var r = this.toString();
var i = 0;
while (i < arguments.length) {
r = r + arguments[i];
i++;
}
return(r);
};
String.prototype.indexOf = function (sub, i) {
if (i == null) {
i = 0;
}
var size = sub.length;
var last = ((this.length - size) + 1);
while ((last >= i) && ((substring(this, 1 + (i++), size)) != sub)) {
}
return(((last >= i) ? (i - 1) : -1));
};
String.prototype.lastIndexOf = function (sub, i) {
size = sub.length;
((i == null) ? ((i = (this.length - size) + 1)) : (++i));
if (sub.length == 0) {
return(i - 1);
}
while ((i >= 0) && ((substring(this, i--, size)) != sub)) {
}
return(((i == -1) ? -1 : (i)));
};
String.prototype.slice = function (s, e) {
return(substring(this, s + 1, e - s));
};
String.prototype.split = function (d) {
if (d != null) {
var r = new Array();
var size = this.length;
var c = 0;
var n = 0;
if (d != "") {
var i = 0;
while (size >= i) {
if ((substring(this, i + 1, 1)) == d) {
r[n] = substring(this, c + 1, i - c);
c = i + 1;
n++;
}
i++;
}
if (c != i) {
r[n] = substring(this, c + 1, i - c);
}
} else {
var i = 0;
while (i < size) {
r[i] = substring(this, i + 1, 1);
i++;
}
}
} else {
r = new Array(this.toString());
}
return(r);
};
String.prototype.substr = function (s, l) {
if (l == null) {
l = this.length - s;
}
return(substring(this, s + 1, l));
};
}
Object.FLEM = function () {
this._listener_array = [];
};
Object.FLEM.prototype.addFLEMListener = function (obj) {
var a = this._listener_array;
var found = false;
var i = a.length;
while (i--) {
if (a[i] == obj) {
found = true;
break;
}
}
if (found) {
return(false);
}
a.unshift(obj);
if (this.sendFLEMEvent == undefined) {
this.sendFLEMEvent = this._sendFLEMEvent;
}
return(true);
};
Object.FLEM.prototype.removeFLEMListener = function (obj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] == obj) {
a.splice(i, 1);
break;
}
}
if (a.length == 0) {
this.sendFLEMEvent = undefined;
}
};
Object.FLEM.prototype._sendFLEMEvent = function (func_str, argObj) {
var a = this._listener_array;
var i = a.length;
while (i--) {
if (a[i] != undefined) {
a[i][func_str](argObj);
} else {
a.splice(i, 1);
}
}
};
Object.addStaticFLEM = function (obj) {
if (obj._listener_array == undefined) {
obj._listener_array = [];
obj._sendFLEMEvent = Object.FLEM.prototype._sendFLEMEvent;
obj.addFLEMListener = Object.FLEM.prototype.addFLEMListener;
obj.removeFLEMListener = Object.FLEM.prototype.removeFLEMListener;
}
};
Object.removeStaticFLEM = function (obj) {
delete obj._listener_array;
delete obj._sendFLEMEvent;
delete obj.addFLEMListener;
delete obj.removeFLEMListener;
};
Object.prototype.registerFLEM = function (objects, reg) {
if (objects.__proto__ == Array.prototype) {
var n = objects.length;
var i = 0;
while (i < n) {
if (reg == false) {
objects[i].removeFLEMListener(this);
} else {
objects[i].addFLEMListener(this);
}
i++;
}
}
};
ASSetPropFlags(Object.prototype, ["registerFLEM"], 1);
Object.addStaticFLEM(MovieClip);
Object.addStaticFLEM(Mouse);
Object.addStaticFLEM(Key);
if (_level0.flemEngine == undefined) {
_level0.attachMovie("flemEngine", "flemEngine", 8888);
if (_level0.flemEngine == undefined) {
trace("Cannot attach flemEngine! Make sure it is in the library.");
}
}
Object.prototype.TimeLine = function (tLine, loop) {
trace("New TimeLine object created.");
this.keyframes = [];
this.tLine = tLine;
this.loop = ((loop == null) ? false : (loop));
this.startFrame = tLine._currentframe;
this.totalFrames = tLine._totalframes;
tLine.stop();
if (debugMode) {
trace((("TimeLine-> tLine:" + this.tLine) + ", loop:") + this.loop);
}
};
TimeLine.prototype.onEnterFrame = function () {
this.currentFrame = this.tLine._currentframe;
if (debugMode) {
trace("TimeLine-> currentFrame:" + this.currentFrame);
}
var i = 0;
while (i < this.keyframes.length) {
if ((this.currentFrame == this.keyframes[i].frameNumber) && (!this.keyframes[i].reached)) {
this.keyframes[i].reached = true;
this.keyframes[i].action(this);
}
i++;
}
if (this.currentFrame == this.totalFrames) {
MovieClip.removeFLEMListener(this);
this.resetKeyFramesReached();
if (!this.loop) {
this.tLine.stop();
} else {
this.tLine.gotoAndPlay(this.startFrame);
}
}
};
TimeLine.prototype.play = function () {
this.onEnterFrame();
MovieClip.addFLEMListener(this);
this.tLine.play();
};
TimeLine.prototype.start = function () {
trace("Timeline -> start -> starting.");
this.onEnterFrame();
MovieClip.addFLEMListener(this);
this.tLine.play();
};
TimeLine.prototype.gotoAndPlay = function (t) {
this.keyframes[this.findFrame(t)].action();
this.resetKeyFramesReached();
if (typeof(t) == "string") {
idx = this.findLabel(t);
if (idx != -1) {
t = this.keyframes[idx].frameNumber;
} else {
t = 1;
}
}
if (t == this.startFrame) {
MovieClip.removeFLEMListener(this);
}
MovieClip.addFLEMListener(this);
this.tLine.gotoAndPlay(t);
};
TimeLine.prototype.gotoAndStop = function (t) {
this.keyframes[this.findFrame(t)].action();
this.resetKeyFramesReached();
if (typeof(t) == "string") {
idx = this.findLabel(t);
if (idx != -1) {
t = this.keyframes[idx].frameNumber;
} else {
t = 1;
}
}
if (t == this.startFrame) {
MovieClip.removeFLEMListener(this);
}
MovieClip.removeFLEMListener(this);
this.tLine.gotoAndStop(t);
};
TimeLine.prototype.stop = function () {
MovieClip.removeFLEMListener(this);
this.tLine.stop();
};
TimeLine.prototype.resetKeyFramesReached = function () {
var i = 0;
while (i < this.keyframes.length) {
this.keyframes[i].reached = false;
i++;
}
};
TimeLine.prototype.findLabel = function (l) {
var j = 0;
while ((j < this.keyframes.length) && (this.keyframes[j].label != l)) {
j++;
}
if (j == this.keyframes.length) {
j = -1;
}
return(j);
};
TimeLine.prototype.findFrame = function (n) {
var j = 0;
while ((j < this.keyframes.length) && (this.keyframes[j].frameNumber != n)) {
j++;
}
if (j == this.keyframes.length) {
j = -1;
}
return(j);
};
TimeLine.prototype.addKeyFrames = function () {
var i = 0;
while (i < arguments.length) {
this.keyframes.push(arguments[i]);
if (debugMode) {
trace(("TimeLine-> adding KeyFrame(" + arguments[i].frameNumber) + ") to keyframes.");
}
i++;
}
};
Object.prototype.KeyFrame = function (frameNumber, label) {
this.frameNumber = frameNumber;
this.reached = false;
this.label = label;
};
KeyFrame.prototype.getLabel = function () {
return(this.frameNumber);
};
KeyFrame.prototype.getFrameNumber = function () {
return(this.label);
};
KeyFrame.prototype.action = function (t) {
};
ASSetPropFlags(Object.prototype, ["TimeLine", "KeyFrame"], 1);
var scoobyPlaces = new Array();
scoobyPlaces[0] = "BEHIND THE SHELF";
scoobyPlaces[1] = "IN THE TRUNK";
scoobyPlaces[2] = "IN THE ARMOR";
scoobyPlaces[3] = "BEHIND THE MASK";
scoobyPlaces[4] = "UNDER THE TABLE";
scoobyPlaces[5] = "BEHIND THE DOOR";
scoobyPlaces[6] = "IN THE FIREPLACE";
Object.prototype.StuffMover = function () {
_root.letterCount = 0;
_root.deep = 100;
_root.letterMax = 300;
_root.centerScreenX = 345;
_root.centerScreenY = 140;
this.stuffs = _root.hidingPlaces;
this.holdAnimations = false;
Mouse.addFLEMListener(this);
};
StuffMover.prototype.onMouseUp = function () {
i = this.stuffs.length;
while (i >= 0) {
if ((this.stuffs[i].checkMouseHit() && (this.stuffs[i]._currentFrame == 1)) && (!this.holdAnimations)) {
this.animate(i);
return;
}
i--;
}
};
StuffMover.prototype.animate = function (i) {
if (debugMode) {
trace((("StuffMover-> " + this.stuffs[i]) + " letter = ") + this.stuffs[i].letter);
}
this.stuffs[i].onEnterFrame = function () {
if (this._currentFrame == this._totalFrames) {
this.stop();
if (this.doesHover) {
this.oX = this._x;
this.oY = this._y;
this.xOffSet = this.oX - 2.25;
this.yOffSet = this.oY - 1.37768214805017E-16;
this.rot = (Math.PI/2);
this.mult = 1.1;
this.onEnterFrame = _root.hover;
} else {
this.onEnterFrame = _root.hold;
}
if (this.letter != null) {
point = new Object();
point.x = this.lTarg._x;
point.y = this.lTarg._y;
localToGlobal(point);
this.let = new HoverLetter(_root.letterMC, point.x, point.y, this.letter, this.id, this.seq);
}
}
};
MovieClip.addFLEMListener(this.stuffs[i]);
this.stuffs[i].play();
_root.sounds.gotoAndPlay("sound" + _root.soundValues[i]);
};
StuffMover.prototype.hint = function () {
q = 0;
while (q < this.stuffs.length) {
if (this.stuffs[q].letter != null) {
this.animate(q);
this.holdAnimations = false;
return;
}
q++;
}
};
Object.prototype.HoverLetter = function (mc, startX, startY, letter, id, turnOff) {
_root.sounds.gotoAndPlay("sound13");
_root.letterSpeed = 0.25;
_root.friction = 0.5;
this.mc = mc;
this.mc._x = startX;
this.mc._y = startY;
this.mc._xscale = (this.mc._yscale = 25);
this.mc.text = (this.mc.textBG = letter);
this.mc.glow._visible = true;
this.id = id;
this.turnOff = turnOff;
this.onEnterFrame = this.zoomToCenter;
this.onMouseDown = this.finishZoom;
MovieClip.addFLEMListener(this);
Mouse.addFLEMListener(this);
};
HoverLetter.prototype.makeFunkyBeams = function () {
q = 0;
while (9 >= q) {
this.mc.glow.beams["beam" + q]._xscale = (this.mc.glow.beams["beam" + q]._yscale = (Math.random() * 100) + 25);
this.mc.glow.beams["beam" + q]._rotation = Math.random() * 360;
q++;
}
};
HoverLetter.prototype.zoomToCenter = function () {
this.makeFunkyBeams();
this.xSpeed = ((_root.centerScreenX - this.mc._x) * _root.letterSpeed) + (this.xSpeed * _root.friction);
this.ySpeed = ((_root.centerScreenY - this.mc._y) * _root.letterSpeed) + (this.ySpeed * _root.friction);
this.sSpeed = ((_root.letterMax - this.mc._yscale) * _root.letterSpeed) + (this.sPeed * _root.friction);
this.mc._x = this.mc._x + this.xSpeed;
this.mc._y = this.mc._y + this.ySpeed;
this.mc._xscale = (this.mc._yscale = this.mc._yscale + this.sSpeed);
if ((Math.abs(this.xSpeed < 0.5) && (Math.abs(this.ySpeed < 0.5))) && (Math.abs(_root.centerScreenX - this.mc._x) < 0.5)) {
lH = _root.letterHolder;
lHTB = lH["textBoxMC" + this.id];
this.gotoX = ((lHTB._x + (lHTB._width / 2)) * (lH._xscale / 100)) + lH._x;
this.gotoY = ((lHTB._y * lH._yscale) / 100) + lH._y;
this.oS = this.mc._xscale;
this.gotoS = 100;
this.count = 0;
this.oX = this.mc._x;
this.oY = this.mc._y;
this.xOffSet = this.oX - 2.25;
this.yOffSet = this.oY - 1.37768214805017E-16;
this.onEnterFrame = this.hover;
if (debugMode) {
trace("HoverLetter -> gotoX = " + this.gotoX);
trace((((" -> = _root.letterHolder.textBoxMC" + this.id) + "._x + _root.letterHolder._x (") + _root.letterHolder._x) + ")");
}
}
};
HoverLetter.prototype.hover = function () {
this.makeFunkyBeams();
this.mc._x = this.xOffSet + (Math.sin(this.rot) * 2);
this.mc._y = this.yOffSet + (Math.cos(this.rot) * 2);
this.rot = this.rot + 0.196349540849362;
this.count++;
if (18 < this.count) {
this.mc._x = this.oX;
this.mc._y = this.oY;
this.onEnterFrame = this.zoomToHolder;
}
};
HoverLetter.prototype.zoomToHolder = function () {
this.makeFunkyBeams();
this.mc._x = this.mc._x + ((this.gotoX - this.mc._x) * (_root.letterSpeed / 1.25));
this.mc._y = this.mc._y + ((this.gotoY - this.mc._y) * (_root.letterSpeed / 1.25));
this.mc._xscale = (this.mc._yscale = (Math.abs(this.mc._x - this.gotoX) / (Math.abs(this.oX - this.gotoX) * Math.abs(this.oS - this.gotoS))) + this.gotoS);
if ((Math.abs(this.gotoX - this.mc._x) < 0.5) && (Math.abs(this.gotoY - this.mc._y) < 0.5)) {
this.finishZoom();
}
};
HoverLetter.prototype.finishZoom = function () {
this.mc.glow._visible = false;
this.mc._x = -200;
this.mc._xscale = (this.mc._yscale = 25);
_root.newStuffMover.stuffs[this.turnOff].letter = null;
_root.letterHolder["textBoxMC" + this.id].textBox._visible = true;
_root.letterCount++;
this.checkIfFinished();
this.onEnterFrame = null;
this.onMouseDown = null;
MovieClip.removeFLEMListener(this);
Mouse.removeFLEMListener(this);
delete this;
};
HoverLetter.prototype.checkIfFinished = function () {
if (debugMode) {
trace((("letterCount: " + _root.letterCount) + " of total: ") + _root.newGame.hideThese.length);
}
if (_root.letterCount == _root.newGame.hideThese.length) {
_root.newGame.finishMe();
}
};
MovieClip.prototype.checkMouseHit = function () {
return(this.hitTest(_root._xmouse, _root._ymouse, true));
};
KeyFrame.prototype.action = function (t) {
t.stop();
};
Object.prototype.Game = function () {
this.gameNum = 0;
this.scoobyAlreadyHid = [];
};
Game.prototype.initialize = function () {
this.difficulty = _root.difficulty;
_root.flashLight._visible = false;
_root.darkBG.gotoAndStop("off");
_root.newStuffMover.holdAnimations = false;
if (7 < (++this.gameNum)) {
this.gameNum = 1;
this.scoobyAlreadyHid = [];
}
do {
this.scoobyPlaceNum = Math.round(Math.random() * (_root.scoobyPlaces.length - 1));
} while (this.scoobyAlreadyHid.search(this.scoobyPlaceNum) != -1);
this.scoobyPlace = _root.scoobyPlaces[this.scoobyPlaceNum];
this.scoobyPlaceArray = this.scoobyPlace.split("");
this.scoobyAlreadyHid[this.gameNum] = this.scoobyPlaceNum;
q = 0;
while (q < _root.hidingPlaces.length) {
if (q < _root.scoobyPlaceArray.length) {
_root.scoobyPlacesMC[q].gotoAndStop("letters");
}
_root.hidingPlaces[q].gotoAndStop(1);
q++;
}
_root.letterHolder.textBox._visible = false;
this.stringStartPos = (-(this.scoobyPlaceArray.length * _root.letterHolder.textBoxMC.line._width)) / 2;
_root.letterHolder.bg._width = Math.abs(this.stringStartPos * 2) + 20;
q = 0;
while (q < this.scoobyPlaceArray.length) {
_root.letterHolder.textBoxMC.duplicateMovieClip("textBoxMC" + q, q + 10);
this.tB = _root.letterHolder["textBoxMC" + q];
this.tB.textBox.text = this.scoobyPlaceArray[q];
if (q == 0) {
this.tB._x = this.stringStartPos;
} else {
this.tB._x = _root.letterHolder["textBoxMC" + (q - 1)]._x + this.tB.line._width;
}
this.tB._visible = this.tB.textBox.text != " ";
this.tB.textBox.glow._visible = false;
this.tB.xPos = this.tB._x + _root.letterHolder._x;
if (debugMode) {
trace((("Game-> letterHolder.textBoxMC" + q) + ".textBox.text = ") + this.tb.textBox.text);
trace(" textBox visibility = " + this.tB._visible);
}
q++;
}
_root.letterHolder.textBoxMC._visible = false;
this.numToHide = Math.round(((this.scoobyPlace.length - 2) * this.difficulty) * 0.25);
this.hideThese = [];
this.hideHere = [];
q = 0;
while (this.numToHide >= q) {
do {
hideNum = Math.round(Math.random() * (this.scoobyPlace.length - 1));
} while ((this.hideThese.search(hideNum) != -1) || (this.scoobyPlaceArray[hideNum] == " "));
this.hideThese[q] = hideNum;
do {
hideNum = Math.round(Math.random() * (_root.hidingPlaces.length - 1));
} while (this.hideHere.search(hideNum) != -1);
this.hideHere[q] = hideNum;
q++;
}
q = 0;
while (q < this.hideThese.length) {
_root.letterHolder["textBoxMC" + this.hideThese[q]].textBox._visible = false;
q++;
}
q = 0;
while (this.numToHide >= q) {
_root.newStuffMover.stuffs[this.hideHere[q]].letter = this.scoobyPlaceArray[this.hideThese[q]];
_root.newStuffMover.stuffs[this.hideHere[q]].id = this.hideThese[q];
if (debugMode) {
trace((("Game-> _root.hidingPlaces[" + this.hideHere[q]) + "].letter = ") + this.scoobyPlaceArray[this.hideThese[q]]);
trace(((" _root.hidingPlaces[" + this.hideHere[q]) + "].id = ") + this.hideThese[q]);
trace(" q = " + q);
}
q++;
}
if (debugMode) {
i = 0;
while (28 >= i) {
trace((("_root.hidingPlaces[" + i) + "].letter = ") + _root.hidingPlaces[i].letter);
i++;
}
trace((((((("Game-> scoobyPlace: " + this.scoobyPlace) + newline) + " -> scoobyPlaceArray: ") + this.scoobyPlaceArray) + newline) + " -> hideThese: ") + this.hideThese);
trace(" -> hideHere: " + this.hideHere);
}
};
Game.prototype.finishMe = function () {
_root.newStuffMover.holdAnimations = true;
_root.scoobyPlacesMC[this.scoobyPlaceNum].gotoAndStop("scooby");
_root.scoobyPlacesAnim[this.scoobyPlaceNum].onEnterFrame = function () {
if (this._currentFrame == this._totalFrames) {
this.onEnterFrame = null;
MovieClip.removeFLEMListener(this);
this.stop();
} else {
this.play();
}
};
MovieClip.addFLEMListener(_root.scoobyPlacesAnim[this.scoobyPlaceNum]);
newPoint = new Object();
newPoint.x = _root.scoobyPlacesMC[this.scoobyPlaceNum].flashPoint._x;
newPoint.y = _root.scoobyPlacesMC[this.scoobyPlaceNum].flashPoint._y;
_root.scoobyPlacesMC[this.scoobyPlaceNum].localToGlobal(newPoint);
_root.flashLight._visible = true;
_root.flashLight._x = newPoint.x;
_root.flashLight._y = newPoint.y;
_root.flashLight.gotoAndPlay(1);
if (debugMode) {
trace("Game-> scoobyPlaceNum = " + this.scoobyPlaceNum);
trace(((" scoobyPlacesMC[" + this.scoobyPlaceNum) + "] = ") + _root.scoobyPlacesMC[this.scoobyPlaceNum]);
trace(((" scoobyPlacesAnim[" + this.scoobyPlaceNum) + "] = ") + _root.scoobyPlacesAnim[this.scoobyPlaceNum]);
}
};
Array.prototype.search = function (t) {
var z = 0;
while ((z < this.length) && (this[z] != t)) {
z++;
}
if (z == this.length) {
return(-1);
}
return(z);
};
mainTL = new TimeLine(_root, false);
m10 = new KeyFrame(5);
m10.action = function (z) {
trace("TimeLine -> KeyFrame: m10");
Stars = new Object();
Stars.onEnterFrame = function () {
q = 0;
while (11 >= q) {
_root.twinkleStars["star" + q]._alpha = (Math.random() * 60) + 40;
q++;
}
};
MovieClip.addFLEMListener(Stars);
_root.newGame = new Game();
_root.soundLoop = new Sound();
_root.soundLoop.attachSound("song");
_root.soundLoop.start(0, 99999);
};
m20 = new KeyFrame(67);
m20.action = function (z) {
trace("TimeLine -> KeyFrame: m20");
z.stop();
iT = _root.introText;
iT.gotoAndStop(1);
iT._xscale = (iT._yscale = 10);
iT.pos = [null, [iT.line1._x, iT.line1._y], [iT.line2._x, iT.line2._y]];
iT.gotoS = 100;
iT.onEnterFrame = function () {
rot = rot + 0.130899693899575;
q = 1;
while (q < 3) {
this["line" + q]._x = this.pos[q][0] + (Math.sin(rot + ((q * Math.PI) / 3)) * 1.2);
this["line" + q]._y = this.pos[q][1] + (Math.cos(rot + ((q * Math.PI) / 3)) * 1.2);
q++;
}
count++;
_xscale = (_xscale + ((gotoS - _xscale) * 0.08));
_yscale = (_xscale + ((gotoS - _xscale) * 0.08));
_alpha = (100 - Math.abs(_xscale - 100));
if (((80 < count) || (190 < _xscale)) && (_currentframe < 4)) {
if (gotoS == 100) {
gotoS = 200;
} else {
gotoS = 100;
_yscale = 10;
_xscale = 10;
if (_currentframe < 4) {
nextFrame();
}
}
count = 0;
}
};
MovieClip.addFLEMListener(iT);
};
m21 = new KeyFrame(69);
m21.action = function () {
_root.castleMC.castle.door.play();
};
m29 = new KeyFrame(76);
m29.action = function (z) {
z.stop();
_root.popup.gotoAndStop("intro");
_root.flashLight.stop();
_root.flashLight._visible = false;
};
m30 = new KeyFrame(78);
m30.action = function (z) {
z.stop();
_root.setHidingPlaces();
_root.newStuffMover = new StuffMover();
_root.goElements();
_root.newGame.initialize();
};
mainTL.addKeyFrames(m10, m20, m21, m29, m30);
mainTL.play();
Object.prototype.debugMode = true;
Instance of Symbol 30 MovieClip in Frame 15
onClipEvent (load) {
var gotoX = 100;
var gotoY = 100;
var done = false;
_xscale = 0;
_yscale = 0;
var friction1 = 0.6;
var friction2 = 0.4;
}
onClipEvent (enterFrame) {
if (!done) {
xSpeed = (xSpeed * friction1) + ((gotoX - _xscale) * friction2);
ySpeed = (ySpeed * friction1) + ((gotoY - _yscale) * friction2);
_xscale = (_xscale + xSpeed);
_yscale = (_yscale + ySpeed);
} else {
_parent.gotoAndStop("out");
}
}
Instance of Symbol 2 MovieClip [flemEngineClip] in Symbol 3 MovieClip [flemEngine] Frame 1
onClipEvent (load) {
MovieClip.sendFLEMEvent("onLoad");
}
onClipEvent (enterFrame) {
MovieClip.sendFLEMEvent("onEnterFrame");
}
onClipEvent (mouseDown) {
Mouse.sendFLEMEvent("onMouseDown");
}
onClipEvent (mouseUp) {
Mouse.sendFLEMEvent("onMouseUp");
}
onClipEvent (keyDown) {
Key.sendFLEMEvent("onKeyDown");
}
onClipEvent (keyUp) {
Key.sendFLEMEvent("onKeyUp");
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 5
stop();
Symbol 66 MovieClip Frame 9
stop();
Symbol 102 Button
on (rollOver) {
gotoAndPlay ("spread");
}
on (rollOut) {
gotoAndPlay ("return");
}
on (press) {
gotoAndPlay ("press");
}
on (release) {
_root.difficulty = 1;
_root.mainTL.start();
}
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 2
play();
Symbol 103 MovieClip Frame 4
stop();
Symbol 103 MovieClip Frame 7
play();
Symbol 103 MovieClip Frame 10
stop();
Symbol 103 MovieClip Frame 17
stop();
Symbol 103 MovieClip Frame 21
stop();
Symbol 108 Button
on (rollOver) {
gotoAndPlay ("spread");
}
on (rollOut) {
gotoAndPlay ("return");
}
on (press) {
gotoAndPlay ("press");
}
on (release) {
_root.difficulty = 2;
_root.mainTL.start();
}
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 2
play();
Symbol 109 MovieClip Frame 4
stop();
Symbol 109 MovieClip Frame 7
play();
Symbol 109 MovieClip Frame 10
stop();
Symbol 109 MovieClip Frame 17
stop();
Symbol 109 MovieClip Frame 21
stop();
Symbol 113 Button
on (rollOver) {
gotoAndPlay ("spread");
}
on (rollOut) {
gotoAndPlay ("return");
}
on (press) {
gotoAndPlay ("press");
}
on (release) {
_root.difficulty = 3;
_root.mainTL.start();
}
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 2
play();
Symbol 114 MovieClip Frame 4
stop();
Symbol 114 MovieClip Frame 7
play();
Symbol 114 MovieClip Frame 10
stop();
Symbol 114 MovieClip Frame 17
stop();
Symbol 114 MovieClip Frame 21
stop();
Symbol 124 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 1
stop();
Symbol 315 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 357 Button
on (release) {
_root.popup.gotoAndStop("congrats");
_root.darkBG.gotoAndStop("on");
}
Symbol 361 MovieClip Frame 7
this.clickScooby.gotoAndStop(_root.newGame.scoobyPlaceNum + 1);
stop();
Symbol 381 Button
on (release) {
_root.newStuffMover.holdAnimations = true;
_root.popup.gotoAndStop("help");
}
Symbol 388 Button
on (press) {
_root.newStuffMover.holdAnimations = true;
}
on (release, releaseOutside) {
_root.newStuffMover.hint();
}
Symbol 412 Button
on (release) {
gotoAndStop ("off");
_root.mainTL.start();
}
Symbol 427 Button
on (release) {
gotoAndStop ("off");
_root.newStuffMover.holdAnimations = false;
}
Symbol 438 Button
on (release) {
gotoAndStop ("name");
}
Symbol 444 Button
on (release) {
_root.firstName = String(_root.firstName);
if ((_root.firstName.isNaughty() || (_root.firstName == "")) || (_root.firstName == null)) {
this.backTo = "name";
gotoAndStop ("error2");
} else {
gotoAndStop ("Certificate");
}
}
Symbol 469 Button
on (release) {
gotoAndStop ("off");
_root.mainTL.gotoAndPlay(63);
}
Symbol 476 Button
on (release) {
print ("printMC", "bmovie");
}
Symbol 484 Button
on (release) {
gotoAndStop ("email");
}
Symbol 489 Button
on (release) {
_root.friendEmail = String(_root.friendEmail);
Validate_Email(_root.friendemail);
_root.firstName = String(_root.firstName);
if ((((_root.friendName == "") || (_root.friendEmail == "")) || (_root.friendName == null)) || (_root.friendEmail == null)) {
this.backTo = "email";
gotoAndStop ("error2");
} else if (_root.friendName.isNaughty() || (_root.friendEmail.isNaughty())) {
this.backTo = "email";
gotoAndStop ("error2");
} else if (_root.valid_email == false) {
this.backTo = "email";
gotoAndStop ("error2");
} else {
loadVariables ((((("sendemail.aspx?friendEmail=" + _root.friendEmail) + "&friendName=") + _root.friendName) + "&firstName=") + _root.firstName, this.loadTarg, "GET");
}
}
Symbol 491 Button
on (keyPress "<Tab>") {
Selection.setFocus(null);
}
Symbol 493 Button
on (release) {
gotoAndStop ("off");
_root.mainTL.gotoAndPlay(63);
}
Symbol 501 Button
on (release) {
gotoAndStop(this.backTo);
}
Symbol 502 MovieClip Frame 1
stop();
Symbol 502 MovieClip Frame 5
stop();
Symbol 502 MovieClip Frame 14
stop();
Symbol 502 MovieClip Frame 23
stop();
Symbol 502 MovieClip Frame 30
stop();
Symbol 502 MovieClip Frame 36
_root.firstName = _root.firstName.toUpperCase();
stop();
Symbol 502 MovieClip Frame 44
function Validate_email(email) {
_root.valid_email = true;
count = 0;
Err = 0;
invChars = new Array(" ", "#", "$", "%", "!", "^", "~", "'", "*", "(", ")", ",", "<", ">", "/", "\\");
i = 0;
while (i < invChars.length) {
if (email.indexOf(invChars[i]) >= 0) {
_root.valid_email = false;
}
i++;
}
if (Err == 0) {
i = 0;
while (i < email.length) {
if (email.charAt(i) == "@") {
count = count + 1;
}
i++;
}
if (count != 1) {
_root.valid_email = false;
}
}
if (Err == 0) {
splitEmail = email.split("@");
emailName = splitEmail[0];
emailDom = splitEmail[1];
if (emailName.length < 1) {
_root.valid_email = false;
}
if (emailDom.indexOf(".") < 0) {
_root.valid_email = false;
} else {
splitDom = emailDom.split(".");
if (splitDom[0].length < 2) {
_root.valid_email = false;
}
if (splitDom[1].length < 2) {
_root.valid_email = false;
}
}
}
}
stop();
Instance of Symbol 120 MovieClip "loadTarg" in Symbol 502 MovieClip Frame 44
onClipEvent (data) {
if (mail_sent == "y") {
_parent.gotoAndStop("sent");
} else {
_parent.gotoAndStop("error");
}
}
Symbol 502 MovieClip Frame 53
stop();
Symbol 502 MovieClip Frame 60
stop();
Symbol 502 MovieClip Frame 66
stop();
Symbol 523 MovieClip Frame 1
stop();
Symbol 523 MovieClip Frame 6
stop();
Symbol 523 MovieClip Frame 12
stop();
Symbol 523 MovieClip Frame 18
stop();
Symbol 523 MovieClip Frame 24
stop();
Symbol 523 MovieClip Frame 30
stop();
Symbol 523 MovieClip Frame 36
stop();
Symbol 523 MovieClip Frame 42
stop();
Symbol 523 MovieClip Frame 48
stop();
Symbol 523 MovieClip Frame 54
stop();
Symbol 523 MovieClip Frame 60
stop();
Symbol 523 MovieClip Frame 66
stop();
Symbol 523 MovieClip Frame 73
stop();
Symbol 523 MovieClip Frame 80
stop();
Symbol 523 MovieClip Frame 87
stop();
Symbol 523 MovieClip Frame 94
stop();
Symbol 523 MovieClip Frame 101
stop();
Symbol 523 MovieClip Frame 108
stop();
Symbol 523 MovieClip Frame 115
stop();
Symbol 523 MovieClip Frame 122
stop();
Symbol 523 MovieClip Frame 129
stop();
Symbol 523 MovieClip Frame 136
stop();