Frame 1
nextFrame();
Frame 2
var MochiAd = {showPreloaderAd:function (options) {
var _local29 = {clip:_root, ad_msec:11000, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812};
options = MochiAd._parseOptions(options, _local29);
var _local15 = options.clip;
var _local25 = options.ad_msec;
delete options.ad_msec;
var _local28 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
return(null);
}
_local15.stop();
var mc = _local15._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local16 = MochiAd._getRes(options);
var _local5 = _local16[0];
var _local14 = _local16[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local24 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local26 = options.outline;
delete options.outline;
var _local6 = _local8.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local8.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local24);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local26, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local5 - 20, 0);
_local7.lineTo(_local5 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local25;
chk.ad_timeout = _local28;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}, showTimedAd:function (options) {
var _local15 = {clip:_root, ad_msec:11000, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd"};
options = MochiAd._parseOptions(options, _local15);
var _local6 = options.clip;
var _local12 = options.ad_msec;
delete options.ad_msec;
var _local14 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
return(null);
}
_local6.stop();
var mc = _local6._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local7 = MochiAd._getRes(options);
var _local16 = _local7[0];
var _local13 = _local7[1];
mc._x = _local16 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local12;
chk.ad_timeout = _local14;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}, load:function (options) {
var _local14 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local14);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.3";
var _local7 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(false);
}
if (_local7._mochiad_loaded) {
return(false);
}
var _local13 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local13);
var _local12 = MochiAd._getRes(options);
options.res = (_local12[0] + "x") + _local12[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local11 = _local4.server;
delete _local4.server;
var _local10 = _local11.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local10);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local10);
}
}
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local10;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local11 + ".swf", "POST");
return(_local6);
}, unload:function (clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}, _parseOptions:function (options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}};
MochiAd.showPreloaderAd({id:"360911e8a0b74e78", res:"600x600"});
Frame 3
function showPopup(txt, disableClick) {
_root.createEmptyMovieClip("myCheck", -10);
_root.myCheck.onEnterFrame = function () {
if (_root.displayPopup(txt, disableClick)) {
delete this.onEnterFrame;
removeMovieClip(this);
}
};
}
function displayPopup(txt, disableClick) {
_root.directions.removeMovieClip();
_root.attachMovie("directions", "directions", _root.getNextHighestDepth());
directions._alpha = 0;
directions.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 3;
} else {
delete this.onEnterFrame;
}
};
directions._x = 450;
directions._y = 170;
directions.txt = txt;
if (!disableClick) {
directions.bg.onRelease = function () {
removeMovieClip(directions);
};
} else {
directions.bg.onRelease = function () {
};
}
return(true);
}
_root.gameVersion = ".995";
_root.vesionDisplay = ("Psychopath Version " + _root.gameVersion) + "\tCopyright (c) K2xL.com";
loadVariablesNum ("http://www.k2xl.com/games/psychopath/newsFile.php", 0, "POST");
loadVariablesNum ("http://k2xl.com/games/psychopath/newsFile.php", 0, "POST");
loadVariablesNum ("http://k2xl.com/games/psychopath/Psycho_gameVersion.php", 0, "POST");
loadVariablesNum ("http://www.k2xl.com/games/psychopath/Psycho_gameVersion.php", 0, "POST");
var versionDisplay = (("Version " + _root.gameVersion) + " Copyright K2xL.com 2005-2007");
onEnterFrame = function () {
if (RETURNEDGAMEVERSION != undefined) {
if (RETURNEDGAMEVERSION != gameVersion) {
errorMsg = "Error: Version Mismatch";
if (("" + RETURNEDGAMEVERSION) == "0") {
showPopup("\n\n\nPsychopath is currently being edited. Please refresh the page in a few minutes and the game should be upgraded.\n\nThanks,\nK2xL", true);
} else {
showPopup((("This game version isn't the latest version available and your browser loaded an older version from its cache instead. Please clear you cache by the following:\n\nIE Users:\n1) Tools > Internet Options\n2) Click Delete Files\n3) Refresh this page.\n\nFireFox Users:\n1) Tools > Options\n2) Click CLEAR on the Cache section\n3) Refresh this page.\n\nYou are currently playing on\t\t" + gameVersion) + "\nNewest Version:\t\t\t\t") + RETURNEDGAMEVERSION, true);
}
delete this.onEnterFrame;
} else {
errorMsg = "Version Check Complete: VERIFIED";
guestButton.enabled = true;
loginButton.enabled = true;
delete this.onEnterFrame;
}
}
};
Stage.showMenu = false;
local_data = SharedObject.getLocal("Psycho_Data");
var savedUser = local_data.data.SENTusername;
var musicPreference = local_data.data.musicPreference;
var charImageURL = local_data.data.charImageURL;
var BackgroundImageURL = local_data.data.BackgroundImageURL;
if (savedUser != undefined) {
_root.SENTusername = local_data.data.SENTusername;
}
stop();
Instance of Symbol 41 MovieClip in Frame 3
onClipEvent (load) {
_x = 300;
_y = 200;
var loading = true;
}
Instance of Symbol 86 MovieClip in Frame 3
onClipEvent (load) {
var done = false;
txt = "";
var speed = 2;
var speedTran = 0;
var subtractSpeed = 2;
z = 0;
var g = 0;
_parent.locationAdd = 0;
subtract = false;
transition = false;
_alpha = 0;
}
on (release) {
var currentLoc = (_parent.locationAdd - (subtract || (txtNeeded == txt)));
var urlL;
var loc = currentLoc;
if (loc <= 0) {
urlL = _parent.urlNeeded[currentLoc];
} else {
urlL = _parent.urlNeeded[currentLoc];
}
if (urlL == undefined) {
urlL = _parent.urlNeeded[0];
}
getURL (urlL, "_blank");
}
onClipEvent (enterFrame) {
_alpha = (_alpha + int(_alpha < 100));
if (done) {
if (hitTest(_parent._xmouse, _parent._ymouse, true)) {
var red = {rb:0, gb:50, bb:0};
new Color(this).setTransform(red);
} else {
new Color(this).setTransform({rb:0, gb:0, bb:0});
}
z++;
if (!transition) {
speedTran = z * 1.4;
var txtNeeded = _parent.txtNeeded[_parent.locationAdd];
if (txtNeeded != txtSub) {
subtract = true;
}
if (txt != txtNeeded) {
txt = txtSub.substring(0, g);
tempA = txtSub.charAt(g - 1);
if (((((tempA == ",") or (tempA == "!")) or (tempA == "?")) or (tempA == ".")) and (!subtract)) {
if (tempA == ".") {
speedTran = 30;
} else {
speedTran = 50;
}
transition = true;
}
}
if (subtract) {
if (g > 0) {
if ((z % speed) == 0) {
g = g - subtractSpeed;
}
} else {
subtract = false;
txtSub = txtNeeded;
}
} else if (g < txtNeeded.length) {
if ((z % speed) == 0) {
g++;
}
} else {
transition = true;
z = 0;
if (_parent.locationAdd < (_parent.txtNeeded.length - 1)) {
_parent.locationAdd++;
} else {
_parent.locationAdd = 0;
}
}
} else if (z > speedTran) {
transition = false;
speedTran = 0;
z = 0;
}
} else if (_parent.newsTextArray == undefined) {
} else {
_parent.txtNeeded = new Array();
_parent.urlNeeded = new Array();
_parent.txtNeeded = _parent.LnewsTextArray.split("|");
_parent.urlNeeded = _parent.LurlNeeded.split("|");
_parent.locationAdd = 0;
txtNeeded = _parent.txtNeeded[_parent.locationAdd];
txtSub = txtNeeded;
done = true;
}
}
Instance of Symbol 89 MovieClip "banner" in Frame 3
on (release) {
getURL (_parent.txtImageURLlink, "_blank");
}
Frame 4
function processRequest(submit) {
_root.loggedinOkay = "Processing...";
_root.loggedIn = undefined;
_root.submit = submit;
_root.messageA = null;
loadVariablesNum ("http://www.k2xl.com/games/psychopath/login.php", 0, "POST");
loadVariablesNum ("http://k2xl.com/games/psychopath/login.php", 0, "POST");
_root.createEmptyMovieClip("z", _root.getNextHighestDepth());
z.onEnterFrame = function () {
if (((_root.loggedinOkay != undefined) && (_root.loggedIn != undefined)) && (_root.messageA != null)) {
if (_root.loggedIn == "true") {
if (submit == 0) {
_root.nextFrame();
}
}
removeMovieClip(this);
}
};
}
Selection.setFocus("SENTusername");
stop();
Instance of Symbol 41 MovieClip in Frame 4
onClipEvent (load) {
_x = 300;
_y = 200;
var a = 0;
var loading = false;
}
onClipEvent (enterFrame) {
a++;
_y = (_y - a);
if (_y < 140) {
while (_y < 140) {
_y = 140;
}
}
}
Instance of Symbol 77 MovieClip "loginButton" in Frame 4
onClipEvent (load) {
txt = "Login";
this.enabled = false;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (this.enabled) {
_alpha = (_alpha + int(_alpha < 100));
} else {
_alpha = (_alpha + int(_alpha < 50));
}
}
on (release) {
_root.processRequest(0);
}
on (keyPress "<Enter>") {
if (this.enabled) {
_root.processRequest(0);
}
}
Instance of Symbol 77 MovieClip in Frame 4
onClipEvent (load) {
txt = "Register";
_alpha = 0;
}
onClipEvent (enterFrame) {
_alpha = (_alpha + int(_alpha < 100));
}
on (release) {
getURL ("http://k2xl.com/phpBB2/profile.php?mode=register&agreed=true", "_blank");
}
Instance of Symbol 77 MovieClip "guestButton" in Frame 4
onClipEvent (load) {
txt = "Play as Guest";
this.enabled = false;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (this.enabled) {
_alpha = (_alpha + int(_alpha < 100));
} else {
_alpha = (_alpha + int(_alpha < 50));
}
}
on (release) {
if (this.enabled) {
_root.guest = true;
_root.nextFrame();
}
}
Frame 5
local_data = SharedObject.getLocal("Psycho_Data");
local_data.data.SENTusername = _root.SENTusername;
local_data.flush();
_root.nextFrame();
Frame 6
function playGame() {
keyPressed = false;
delete this.onEnterFrame;
this.onEnterFrame = function () {
var _local2 = Key.isDown(39);
var _local3 = Key.isDown(37);
var _local4 = Key.isDown(38);
var _local1 = Key.isDown(40);
var _local5 = ((_local2 || (_local3)) || (_local4)) || (_local1);
if ((!keyPressed) && ((((_local2 + _local3) + _local4) + _local1) == 1)) {
if (_local5) {
moveCharacter((Character.POSITIONX + int(_local2)) - int(_local3), (Character.POSITIONY - int(_local4)) + int(_local1));
keyPressed = true;
}
} else if (!_local5) {
keyPressed = false;
}
};
}
function setWinningBlock(h, k) {
_root[(("GridSquare" + h) + "V") + k].goldBlock = true;
_root[(("GridSquare" + h) + "V") + k].gotoAndStop("winningBlock");
}
function placeCharacter(startingX, startingY) {
if (!_root.Character) {
_root.attachMovie("Character", "Character", _root.getNextHighestDepth());
}
_root.moveCharacter(startingX, startingY);
}
function moveCharacter(startingX, startingY) {
var _local5 = true;
var _local2 = _root[(("GridSquare" + startingX) + "V") + startingY];
var _local4 = startingX - int(_root.Character.POSITIONX);
var _local3 = startingY - int(_root.Character.POSITIONY);
_local4 = startingX + _local4;
_local3 = startingY + _local3;
var _local6 = _root[(("GridSquare" + _local4) + "V") + _local3].blocked;
_root[(("GridSquare" + _root.Character.POSITIONX) + "V") + _root.Character.POSITIONY].blocked = "free";
if (_local2.blocked == "Movable") {
if (_local6 == "free") {
_root[(("GridSquare" + _root.Character.POSITIONX) + "V") + _root.Character.POSITIONY].gotoAndStop("free");
_root[(("GridSquare" + _local4) + "V") + _local3].gotoAndStop(_local2.blocked);
_root[(("GridSquare" + _local4) + "V") + _local3].blocked = _local2.blocked;
} else {
_local5 = false;
}
}
if (((_local5 and (_local2 != undefined)) and (_local2.blocked != "blocked")) and _root.mobile) {
_root.totalSteps++;
TotalStepsHackConvert(_root.totalSteps);
_local2.stepNum = _root.totalSteps;
if (_root.totalSteps != 0) {
_root[(("GridSquare" + _root.Character.POSITIONX) + "V") + _root.Character.POSITIONY].gotoAndPlay("trail");
} else {
_root[(("GridSquare" + startingX) + "V") + startingY].gotoAndPlay("trail");
}
_root.Character.POSITIONX = startingX;
_root.Character.POSITIONY = startingY;
_root.Character.onEnterFrame = function () {
if (_root.Character._y == 0) {
_root.Character._x = _root[(("GridSquare" + startingX) + "V") + startingY]._x + (_root.SquareWidth / 2);
_root.Character._y = _root[(("GridSquare" + startingX) + "V") + startingY]._y + (_root.SquareHeight / 2);
}
var _local5 = _root[(("GridSquare" + startingX) + "V") + startingY]._x + (_root.SquareWidth / 2);
var _local4 = _root[(("GridSquare" + startingX) + "V") + startingY]._y + (_root.SquareHeight / 2);
var _local3 = _root.Character._x;
var _local2 = _root.Character._y;
_root.Character._x = _root.Character._x + ((_local5 - _local3) / 5);
_root.Character._y = _root.Character._y + ((_local4 - _local2) / 5);
};
_root[(("GridSquare" + startingX) + "V") + startingY].gotoAndPlay("active");
if (_root[(("GridSquare" + _root.Character.POSITIONX) + "V") + _root.Character.POSITIONY].goldBlock) {
if (_root.levelsComplete == _root.gameLevel) {
_root.levelsComplete = int(_root.levelsComplete) + (!_root.customGame);
if (!_root.customGame) {
SENTwon = "1";
SENTlevel = levelsComplete - 1;
loadVariablesNum ("http://www.k2xl.com/games/psychopath/gameEnd.php", 0, "POST");
_root.processRequest(1);
}
}
_root.gameLevel = int(_root.gameLevel) + (!_root.customGame);
_root.temp = _root.gameLevel * 2;
if (!_root.customGame) {
_root.leftLevelButton._visible = true;
_root.leftleftLevelButton._visible = true;
}
clearObjects(customGame);
} else if (_root.totalSteps >= _root.allowedSteps) {
if ((!_root.customGame) and (_root.levelsComplete == _root.gameLevel)) {
SENTwon = "0";
SENTlevel = levelsComplete;
loadVariablesNum ("http://www.k2xl.com/games/psychopath/gameEnd.php", 0, "POST");
}
clearObjects(customGame);
}
}
}
function getTitle(str) {
if (str.indexOf("Title") < 0) {
return("Untitled");
}
var _local6 = str.split("<>");
var _local7 = _local6.length;
var _local1 = 0;
while (_local1 < _local7) {
currentLine = _local6[_local1];
if (currentLine.indexOf("Title(") >= 0) {
var _local5 = str.indexOf("(");
var _local4 = str.indexOf(")");
var _local3 = str.substring(_local5 + 1, _local4);
return(_local3.split(","));
}
_local1++;
}
}
function disableButtons() {
_root.levelEditorButton.enabled = false;
_root.levelEditorButton._alpha = 50;
_root.reloadLevelButton.enabled = false;
_root.reloadLevelButton._alpha = 50;
_root.playCustomButton.enabled = false;
_root.playCustomButton._alpha = 50;
_root.playCustomButton.enabled = false;
_root.playCustomButton._alpha = 50;
}
function enableButtons() {
_root.levelEditorButton.enabled = true;
_root.levelEditorButton._alpha = 100;
_root.reloadLevelButton.enabled = true;
_root.reloadLevelButton._alpha = 100;
_root.playCustomButton.enabled = true;
_root.playCustomButton._alpha = 100;
_root.playCustomButton.enabled = true;
_root.playCustomButton._alpha = 100;
}
function clearObjects(Custom, faster) {
_root.disableButtons();
_root.gameCleared = false;
_root.mobile = false;
_root.tempS = objects.length;
createEmptyMovieClip("x", _root.getNextHighestDepth());
x.a = 0;
x.onEnterFrame = function () {
var _local4 = this.a + 8;
while (this.a < _local4) {
var _local3 = new Color(_root[_root.objects[int(this.a)]]);
_local3.setRGB(16777215);
_root[_root.objects[int(this.a)]].randomAngle = (random(360) * Math.PI) / 180;
_root[_root.objects[int(this.a)]].g = random(10);
_root[_root.objects[int(this.a)]].onEnterFrame = function () {
this._x = this._x + Math.cos(this.randomAngle);
this._y = this._y + Math.sin(this.randomAngle);
this.g++;
if (faster) {
removeMovieClip(this);
}
if (this.g >= 10) {
_root.destroyed++;
removeMovieClip(this);
}
};
this.a++;
}
if (_root.destroyed >= (_root.tempS - 1)) {
_root.objects = null;
_root.destroyed = 0;
_root.skinChangeStatus = "DONE";
_root.objects = new Array("");
_root.gameCleared = true;
if (!Custom) {
_root.playLevel(_root.gameLevel);
} else {
_root.playLevel(_root.level, _root.vared);
}
_root.levelAuthor = ":::";
_root.levelAuthorURL = "http://www.k2xl.com";
delete this.onEnterFrame;
}
};
}
function playLevel(level, param) {
_root.mobile = true;
_root.totalSteps = -1;
_root.TotalStepsHackConvert(_root.totalSteps);
getLevel("" + level, param);
playGame();
}
function getLevel(levelNum, custom) {
function popup(param) {
_root.backgroundMessage = param;
}
function work(str) {
_root.enableButtons();
var _local8 = new Array();
var _local11 = str.split(newline);
var _local7 = _local11.length;
if (_local7 > 1) {
str = "";
var _local5 = 0;
while (_local5 < _local7) {
str = str + (_local11[_local5] + "<>");
_local5++;
}
}
_local11 = str.split("<>");
var _local12 = _local11.length;
if (_local12 > 2) {
var _local3 = 0;
while (_local3 < _local12) {
var _local2 = trimChar(_local11[_local3], "\\");
if (_local2.indexOf("_root.a") >= 0) {
var _local9 = _local2.indexOf("_root.a");
index1 = _local2.indexOf("=");
index2 = _local2.indexOf(";");
_local7 = int(_local2.substring(index1 + 1, index2));
_root.allowedSteps = _local7;
} else if (_local2.indexOf("_root.d") >= 0) {
var _local4 = getParameters(_local2);
_root.drawGrid(int(_local4[0]), int(_local4[1]), int(_local4[2]), int(_local4[3]));
} else if (_local2.indexOf("bl") >= 0) {
var _local4 = getParameters(_local2, 1);
if (_local4.length < 3) {
_local8.push(new Point(int(_local4[0]), int(_local4[1])));
} else {
var _local6 = _local4[2].indexOf("M");
_local8.push(new Point(int(_local4[0]), int(_local4[1]), _local4[2].substring(_local6, _local4[2].length - 1)));
}
} else if (_local2.indexOf("_root.setW") >= 0) {
var _local4 = getParameters(_local2, 0);
_root.setWinningBlock(int(_local4[0]), int(_local4[1]));
} else if (_local2.indexOf("_root.p") >= 0) {
var _local4 = getParameters(_local2, 0);
_root.placeCharacter(int(_local4[0]), int(_local4[1]));
} else if (_local2.indexOf("setA") >= 0) {
var _local4 = getParameters(_local2, 0);
if (_local4[0] != undefined) {
_root.levelAuthor = _local4[0];
_root.levelAuthorURL = _local4[1];
_root.levelAuthorMessage = "You are playing: ";
}
} else if (_local2.indexOf("T") >= 0) {
_root.levelTitle = getParameters(_local2);
}
_local3++;
}
blockObjects(_local8);
return(true);
}
return(false);
}
function trimChar(str, char) {
var _local4 = str.indexOf(char);
if (_local4 < 0) {
}
var _local5 = str.length;
var _local3 = "";
var _local1 = _local4;
while (_local1 <= _local5) {
if (str.charAt(_local1) != char) {
_local3 = _local3 + str.charAt(_local1);
}
_local1++;
}
return(_local3);
}
function getParameters(str, type) {
if (int(type) == 0) {
var _local4 = str.indexOf("(");
var _local3 = str.indexOf(")");
var _local2 = str.substring(_local4 + 1, _local3);
return(_local2.split(","));
}
if (type == 1) {
var _local4 = str.indexOf("(");
var _local3 = str.indexOf(")");
var _local2 = str.substring(_local4 + 1, _local3);
pns2 = _local2.split("new Point");
if (pns2[1] != undefined) {
return(pns2[1].substring(2, pns2[1].length).split(","));
}
}
}
_root.levelTitle = "Untitled";
if (custom.length <= 10) {
vared = null;
var _local9 = new Array();
_root.allowedSteps = ":::";
popup("Loading level from server. Please wait...\n\nIf too much times goes by you can press R or click on the reload level button on the bottom left.");
loadVariablesNum (("http://www.k2xl.com/games/psychopath/levelFiles/LEVEL" + int(levelNum)) + ".php", 0, "POST");
loadVariablesNum (("http://k2xl.com/games/psychopath/levelFiles/LEVEL" + int(levelNum)) + ".php", 0, "POST");
loadVariablesNum (("levelFiles/LEVEL" + int(levelNum)) + ".php", 0, "POST");
} else {
vared = custom;
}
removeMovieClip(z);
createEmptyMovieClip("z", _root.getNextHighestDepth());
z.onEnterFrame = function () {
if (vared != null) {
if (!work(vared)) {
if (customGame) {
popup("Error, invalid custom level. Please check the text format of the level.");
} else {
popup("No new levels at this time, please check back in the future as more levels are added...");
}
} else {
popup("");
}
delete this.onEnterFrame;
removeMovieClip(this);
}
};
}
function nextTrack(nextT) {
if (nextT > 0) {
if (_root.musicChoice >= _root.musicChoiceMax) {
_root.musicChoice = 0;
}
_root.musicChoice++;
_root.musicPlayer.gotoAndPlay("work");
}
if (nextT < 0) {
_root.musicChoice--;
if (_root.musicChoice < 1) {
_root.musicChoice = _root.musicChoiceMax;
}
_root.musicPlayer.gotoAndPlay("work");
}
}
function changeSkin() {
var tempS = _root.objects.length;
_root.skinChangeStatus = "WAIT.";
var a = 0;
createEmptyMovieClip("z", "z", _root.getNextHighestDepth());
z.onEnterFrame = function () {
var _local3 = a + 8;
while (a < _local3) {
_root[_root.objects[a]].sub.gotoAndStop(1);
a++;
if (a > tempS) {
_root.skinChangeStatus = "DONE";
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
function drawGrid(sX, sY, nC, nR) {
var _local8 = sX;
var _local7 = sY;
var _local6 = nC;
var _local9 = nR;
var _local4 = 0;
while (_local4 < _local9) {
var _local2 = 0;
while (_local2 < _local6) {
var _local5 = _root.getNextHighestDepth();
var _local3 = (("GridSquare" + _local4) + "V") + _local2;
_root[_local3].removeMovieClip();
_root.attachMovie("GridSquare", _local3, _local5);
_root.objects.push(_local3);
tellTarget (_local3) {
IDNum = _local2 * _local4;
_depth = _local5;
_width = _root.SquareWidth;
_height = _root.SquareHeight;
_x = (_local8 + (_width * _local4));
_y = (_local7 + (_height * _local2));
blocked = "free";
};
_local2++;
}
_local4++;
}
if (!_root.customGame) {
if (_root.gameLevel == 1) {
showDirections();
} else if ((_root.gameLevel == 7) and (!_root.loggedIn)) {
showPopup("\n\nHey, looks like you're getting pretty far... but you have yet to register on the K2xL database!\n\nYou might want to consider registering before you contine.\n\nRegistering allows for level location saving. This means you're current level will be saved.\nRegistering also gives you the option to save your created levels to your database and share them with friends.\n\nTo register, head on over to www.k2xl.com/board and click register at the top.\n\nYou'll also be able to post on the boards about K2xL.\n\nClick here to close.");
} else if (_root.gameLevel == 10) {
showPopup("MOVABLE BLOCK DIRECTIONS:::\n\nMovable blocks can be moved in any direction.\n\nRemember, you can't stack them with other blocks.\n\nClick here to close.");
} else {
removeMovieClip(_root.directions);
}
}
}
function blockObjects(blocks) {
var _local4 = blocks.length;
var _local2 = 0;
while (_local2 < _local4) {
_root[(("GridSquare" + blocks[_local2].x) + "V") + blocks[_local2].y].blocked = blocks[_local2].d;
_root[(("GridSquare" + blocks[_local2].x) + "V") + blocks[_local2].y].gotoAndStop(blocks[_local2].d);
_local2++;
}
}
function showDirections() {
showPopup("DIRECTIONS:\nThe objective of this game is to get to the winning block (the one flashing by default) in the shortest amount of steps.\n\nBLOCKS:\nBlack block: you can't move through it, only around it.\ncolored blocks: movable. you can't stack two at a time, and you can't push it on a winning block or you'll lose.\n\nThe amount of steps you have total is listed on the bottom of the screen. if you go over the amount of moves you lose and the level restarts.\n\nIf you think you already lost just press R for a quick reload.\n\nYou can view the level editor and create your own levels easily too. Just click the level editor button on the bottom to launch the level editor.\n\nView Stats opens up the stats page of global user ranks and level statistics.\n\nClick to close.");
}
function TotalStepsHackConvert(steps) {
_root.TotalStepHack = steps * 3;
}
System.security.allowDomain("http://www.k2xl.com");
System.security.allowDomain("http://www.uploads.ungrounded.net");
stop();
if (_root.charImageURL == undefined) {
_root.charImageURL = "";
}
if (_root.BackgroundImageURL == undefined) {
_root.BackgroundImageURL = "";
}
var customGame = false;
if (guest) {
var levelsComplete = 1;
} else {
var levelsComplete = (int(CURRENTlevel) + 1);
}
var gameLevel = _root.levelsComplete;
_root.temp = gameLevel * 2;
var musicChoice = (random(musicChoiceMax) + 1);
var skinChosen = 4;
var totalSkin = 5;
var objects = new Array();
var SquareWidth = 25;
var SquareHeight = 25;
musicPlayer.gotoAndStop("work");
_root.destroyed = 0;
playLevel(gameLevel);
Instance of Symbol 77 MovieClip "reloadLevelButton" in Frame 6
onClipEvent (load) {
txt = "Reload Level 'R'";
}
on (release) {
_root.popup.removeMovieClip();
_root.clearObjects(_root.customGame);
}
onClipEvent (keyDown) {
if (Key.isDown(82) and this.enabled) {
_root.popup.removeMovieClip();
if ((!_root.customGame) and (_root.levelsComplete == _root.gameLevel)) {
var SENTwon = "0";
var SENTlevel = _root.levelsComplete;
SENTusername = _root.SENTusername;
SENTpassword = _root.SENTpassword;
loadVariablesNum ("http://www.k2xl.com/games/psychopath/gameEnd.php", 0, "POST");
}
_root.clearObjects(_root.customGame);
}
}
Instance of Symbol 77 MovieClip "playCustomButton" in Frame 6
onClipEvent (load) {
txt = "Play Custom";
}
on (release) {
if (!_root.popup) {
_root.attachMovie("popup", "popup", _root.getNextHighestDepth());
}
_root.popup._x = 300;
_root.popup._y = 300;
}
Instance of Symbol 77 MovieClip "levelModeButton" in Frame 6
onClipEvent (load) {
txt = "Back to Level";
_visible = false;
}
on (release) {
_root.rightLevelButton.enabled = true;
_root.leftLevelButton.enabled = true;
_root.rightLevelButton._alpha = 100;
_root.leftLevelButton._alpha = 100;
_root.rightrightLevelButton.enabled = true;
_root.leftleftLevelButton.enabled = true;
_root.rightrightLevelButton._alpha = 100;
_root.leftleftLevelButton._alpha = 100;
_root.customGame = false;
_root.clearObjects(customGame);
_visible = false;
}
Instance of Symbol 117 MovieClip in Frame 6
on (release) {
if (_root.skinChosen > _root.totalSkin) {
_root.skinChosen = 0;
}
_root.skinChosen++;
_root.changeSkin();
}
Instance of Symbol 117 MovieClip in Frame 6
on (release) {
_root.skinChosen--;
if (_root.skinChosen < 1) {
_root.skinChosen = _root.totalSkin + 1;
}
_root.changeSkin();
}
Instance of Symbol 117 MovieClip "rightLevelButton" in Frame 6
onClipEvent (load) {
if (_root.gameLevel == _root.levelsComplete) {
_visible = false;
}
}
on (release) {
if (_root.gameLevel < _root.levelsComplete) {
if (!_root.z) {
_root.gameLevel++;
_root.temp = _root.gameLevel * 2;
_parent.leftLevelButton._visible = true;
_parent.leftleftLevelButton._visible = true;
if (_root.gameLevel == _root.levelsComplete) {
_parent.rightrightLevelButton._visible = false;
_visible = false;
}
_root.clearObjects(false);
}
} else {
_parent.rightrightLevelButton._visible = false;
_visible = false;
}
}
Instance of Symbol 117 MovieClip "leftLevelButton" in Frame 6
onClipEvent (load) {
if (_root.gameLevel == 1) {
_visible = false;
}
}
on (release) {
if (_root.gameLevel > 1) {
if (!_root.z) {
_root.gameLevel--;
_root.temp = _root.gameLevel * 2;
_parent.rightrightLevelButton._visible = true;
_parent.rightLevelButton._visible = true;
if (_root.gameLevel == 1) {
_parent.leftleftLevelButton._visible = false;
_visible = false;
}
_root.clearObjects(false);
}
} else {
_parent.leftleftLevelButton._visible = false;
_visible = false;
}
}
Instance of Symbol 123 MovieClip in Frame 6
on (release) {
_root.getURL("http://www.k2xl.com/phpBB2/profile.php?mode=viewprofile&u=" + _root.levelAuthor, "_blank");
}
on (rollOver) {
_alpha = 50;
}
on (rollOut) {
_alpha = 100;
}
Instance of Symbol 117 MovieClip "musicNextButton" in Frame 6
on (release) {
if (_parent.musicOff._currentframe == 2) {
_parent.musicOff.nextFrame();
}
_root.nextTrack(1);
}
Instance of Symbol 117 MovieClip in Frame 6
on (release) {
if (_parent.musicOff._currentframe == 2) {
_parent.musicOff.nextFrame();
}
_root.nextTrack(-1);
}
Instance of Symbol 127 MovieClip "musicOff" in Frame 6
onClipEvent (load) {
if (_root.musicPreference == 0) {
_root.musicPlayer.nextFrame();
nextFrame();
}
}
on (release) {
nextFrame();
}
Instance of Symbol 77 MovieClip "levelEditorButton" in Frame 6
onClipEvent (load) {
txt = "Open Level Editor";
}
on (release) {
_root.disableButtons();
_root.attachMovie("Rectangle", "Contain", _root.getNextHighestDepth());
_root.Contain._x = 250;
_root.Contain._y = 300;
_root.Contain._width = 800;
_root.Contain._height = 700;
loadMovieNum ("http://www.k2xl.com/games/psychopath/LEVELEDITOR2.swf", 1);
_level0.mobile = false;
}
Instance of Symbol 117 MovieClip "leftleftLevelButton" in Frame 6
onClipEvent (load) {
if (_root.gameLevel == 1) {
_visible = false;
}
}
on (release) {
if (_root.gameLevel != 1) {
if (!_root.z) {
_root.gameLevel = 1;
_root.temp = 2;
_parent.rightLevelButton._visible = true;
_parent.rightrightLevelButton._visible = true;
_parent.leftLevelButton._visible = false;
_visible = false;
_root.clearObjects(false);
}
} else {
_visible = false;
}
}
Instance of Symbol 117 MovieClip "rightrightLevelButton" in Frame 6
onClipEvent (load) {
if (_root.gameLevel == _root.levelsComplete) {
_visible = false;
}
}
on (release) {
if (_root.gameLevel < _root.levelsComplete) {
if (!_root.z) {
_root.gameLevel = _root.levelsComplete;
_root.temp = _root.levelsComplete * 2;
_parent.leftLevelButton._visible = true;
_parent.leftleftLevelButton._visible = true;
_parent.rightLevelButton._visible = false;
_visible = false;
_root.clearObjects(false);
}
} else {
_visible = false;
}
}
Instance of Symbol 77 MovieClip in Frame 6
onClipEvent (load) {
txt = "View Stats";
}
on (release) {
getURL ("http://www.k2xl.com/games/psychopath/viewstats.php?showuser=" + _root.SENTusername, "_blank");
}
Instance of Symbol 136 MovieClip in Frame 6
on (release) {
_root.showDirections();
}
Instance of Symbol 77 MovieClip in Frame 6
onClipEvent (load) {
txt = "Change Skin Settings";
}
on (release) {
_root.settings.removeMovieClip();
_root.attachMovie("settings", "settings", _root.getNextHighestDepth());
_root.settings._alpha = 0;
_root.settings.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 3;
} else {
delete this.onEnterFrame;
}
};
_root.settings._x = 250;
_root.settings._y = 352;
}
Instance of Symbol 143 MovieClip in Frame 6
onClipEvent (load) {
_visible = false;
var onceBool = false;
_root.temp = _root.gameLevel * 2;
}
onClipEvent (enterFrame) {
if ((_root.TotalStepHack != (_root.totalSteps * 3)) || (((_root.gameLevel * 2) != _root.temp) && (!onceBool))) {
onceBool = true;
_root.showPopup("You have tried to change the level or steps through your RAM... if you were logged in your username has been reported and will most likely be deleted. If not, your IP has been reported and will most likely be banned.\nPlease email K2xL@K2xL.com if you have any questions.\n\nYeah, it took me a while but I figured a way to stop that ;).");
_root.mobile = false;
SENTusername = _root.SENTusername;
loadVariablesNum ("http://www.k2xl.com/games/psychopath/hackattempt.php", 0, "POST");
}
_root.temp = _root.gameLevel * 2;
}
Symbol 5 MovieClip Frame 1
stop();
Symbol 8 MovieClip Frame 1
gotoAndStop(_root.skinChosen + 1);
Instance of Symbol 3 MovieClip in Symbol 8 MovieClip Frame 1
onClipEvent (load) {
}
Instance of Symbol 5 MovieClip in Symbol 8 MovieClip Frame 4
onClipEvent (load) {
n = _parent._parent.IDNum;
}
Instance of Symbol 3 MovieClip in Symbol 8 MovieClip Frame 5
onClipEvent (load) {
n = _parent._parent.IDNum;
_alpha = (80 + int(_parent._name.substring(_parent._name.length - 3, _parent._name.length - 1)));
}
Instance of Symbol 7 MovieClip in Symbol 8 MovieClip Frame 7
onClipEvent (load) {
n = _parent._parent.IDNum;
_alpha = (20 + int(_parent._name.substring(_parent._name.length - 3, _parent._name.length - 1)));
_alpha = ((n / 2) + 10);
}
Instance of Symbol 7 MovieClip in Symbol 8 MovieClip Frame 7
onClipEvent (load) {
n = _parent._parent.IDNum;
_alpha = (20 + int(_parent._name.substring(_parent._name.length - 3, _parent._name.length - 1)));
_alpha = ((n / 2) + 10);
}
Symbol 10 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 1
gotoAndStop(_root.skinChosen + 1);
Symbol 24 MovieClip Frame 1
gotoAndPlay(random(20));
Symbol 24 MovieClip Frame 140
gotoAndPlay (20);
Symbol 30 MovieClip Frame 1
gotoAndStop(_root.skinChosen + 1);
Instance of Symbol 29 MovieClip in Symbol 30 MovieClip Frame 6
onClipEvent (load) {
_rotation = random(360);
}
onClipEvent (enterFrame) {
_rotation = (_rotation+1);
}
Instance of Symbol 3 MovieClip in Symbol 33 MovieClip Frame 1
onClipEvent (load) {
_alpha = (random(50) + 25);
}
Symbol 34 MovieClip Frame 1
gotoAndStop(_root.skinChosen + 1);
Symbol 35 MovieClip [GridSquare] Frame 1
stop();
Symbol 35 MovieClip [GridSquare] Frame 2
prevFrame();
Symbol 35 MovieClip [GridSquare] Frame 3
stop();
Symbol 35 MovieClip [GridSquare] Frame 4
prevFrame();
Symbol 35 MovieClip [GridSquare] Frame 5
stop();
Symbol 35 MovieClip [GridSquare] Frame 6
prevFrame();
Symbol 35 MovieClip [GridSquare] Frame 7
stop();
Symbol 35 MovieClip [GridSquare] Frame 8
prevFrame();
Symbol 35 MovieClip [GridSquare] Frame 9
stop();
Symbol 35 MovieClip [GridSquare] Frame 10
prevFrame();
Symbol 35 MovieClip [GridSquare] Frame 11
stop();
Symbol 35 MovieClip [GridSquare] Frame 12
prevFrame();
Symbol 41 MovieClip Frame 1
var speed = 0;
var percent = 0;
var totalPercent = 0;
onEnterFrame = function () {
percent = 100 * (_root.getBytesLoaded() / _root.getBytesTotal());
if ((percent >= 100) and loading) {
_root.nextFrame();
delete this.onEnterFrame;
}
_parent.loadedPercent = ("LOADING PSYCHO DATA: " + percent) + "%";
_rotation = (_rotation + (percent / 4));
};
Symbol 43 MovieClip [Character] Frame 1
var tempURL = _level0.charImageURL;
if (((tempURL != undefined) && (tempURL != null)) && (tempURL.length > 5)) {
nextFrame();
}
stop();
Symbol 43 MovieClip [Character] Frame 2
txtImage = tempURL;
orgWidth = banner._width;
orgHeight = banner._height;
orgX = banner._x;
orgY = banner._y;
loadMovie (txtImage, banner);
banner._alpha = 0;
createEmptyMovieClip("q", getNextHighestDepth());
q.onEnterFrame = function () {
if (banner.getBytesLoaded() > 1) {
if (banner.getBytesLoaded() >= banner.getBytesTotal()) {
banner._x = orgX - (orgWidth / 2);
banner._y = orgY - (orgHeight / 2);
banner._height = orgHeight;
banner._width = orgWidth;
if (banner._alpha < 100) {
banner._alpha++;
}
}
}
};
Symbol 43 MovieClip [Character] Frame 3
gotoAndStop (1);
Symbol 52 MovieClip [popup] Frame 1
varedTemp = "Enter code from custom game level...";
Instance of Symbol 51 MovieClip in Symbol 52 MovieClip [popup] Frame 1
onClipEvent (load) {
txt = "LOAD";
}
on (release) {
_root.clearObjects(true);
onEnterFrame = function () {
if (_root.gameCleared) {
_root.rightLevelButton.enabled = false;
_root.leftLevelButton.enabled = false;
_root.rightLevelButton._alpha = 50;
_root.leftLevelButton._alpha = 50;
_root.customGame = true;
_root.levelModeButton._visible = true;
_root.levelModeButton.txt = "Back to Level " + _root.gameLevel;
_root.vared = _parent.varedTemp;
_root.playLevel(_root.level, _root.vared);
_parent.removeMovieClip();
delete this.onEnterFrame;
}
};
}
Instance of Symbol 51 MovieClip in Symbol 52 MovieClip [popup] Frame 1
onClipEvent (load) {
txt = "CANCEL";
}
on (release) {
_parent.removeMovieClip();
}
Symbol 56 MovieClip Frame 37
stop();
Instance of Symbol 75 MovieClip in Symbol 77 MovieClip Frame 1
onClipEvent (load) {
var red = {rb:0, gb:0, bb:0};
var depth = 0;
var totalColors = 4;
var myColor = (random(totalColors) + 1);
}
onClipEvent (enterFrame) {
if (myColor == 1) {
red = {rb:0, gb:0, bb:depth};
} else if (myColor == 2) {
red = {rb:0, gb:depth, bb:0};
} else if (myColor == 3) {
red = {rb:depth / 2, gb:depth / 2, bb:depth / 2};
} else if (myColor == 4) {
red = {rb:depth, gb:0, bb:0};
}
new Color(this).setTransform(red);
if (hitTest(_root._xmouse, _root._ymouse, true)) {
if (depth < 255) {
depth = depth + 20;
}
} else if (depth > 0) {
depth = depth - 15;
if (depth <= 0) {
myColor++;
myColor = myColor % (totalColors + 1);
if (myColor == 0) {
myColor++;
}
}
}
}
Instance of Symbol 77 MovieClip "playCustomButton" in Symbol 78 MovieClip [settings] Frame 1
onClipEvent (load) {
txt = "Apply";
}
on (release) {
local_data = SharedObject.getLocal("Psycho_Data");
local_data.data.charImageURL = _root.charImageURL;
local_data.data.BackgroundImageURL = _root.BackgroundImageURL;
local_data.flush();
_root.Character.gotoAndStop(3);
_root.Background.gotoAndPlay(3);
removeMovieClip(_parent);
}
Symbol 149 MovieClip [__Packages.Point] Frame 0
class Point
{
var x, y, d;
function Point (h, k, D) {
x = h;
y = k;
d = D;
if (d == undefined) {
d = "blocked";
}
}
function setDirection(D) {
d = D;
}
function getDistance(OtherPoint) {
return(Math.sqrt((OtherPoint.x * x) + (OtherPoint.y * y)));
}
function toString() {
return(((((("x=" + x) + "|y=") + y) + "|d=") + d) + newline);
}
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 1
stop();
Instance of Symbol 88 MovieClip in Symbol 89 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent.txtImageURL != undefined) {
_parent.nextFrame();
}
}
Symbol 89 MovieClip Frame 2
txtImage = _parent.txtImageURL;
orgWidth = banner._width;
orgHeight = banner._height;
orgX = banner._x;
orgY = banner._y;
loadMovie (txtImage, banner);
Instance of Symbol 42 MovieClip "banner" in Symbol 89 MovieClip Frame 2
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha+1);
}
_x = (_parent.orgX - (_parent.orgWidth / 2));
_y = (_parent.orgY - (_parent.orgHeight / 2));
while (_width > _parent.orgWidth) {
_width = (_width-1);
}
while (_height > _parent.orgHeight) {
_height = (_height-1);
}
}
Symbol 104 MovieClip Frame 1
var tempURL = _level0.BackgroundImageURL;
if (((tempURL != undefined) && (tempURL != null)) && (tempURL.length > 5)) {
nextFrame();
}
stop();
Symbol 104 MovieClip Frame 2
txtImage = tempURL;
orgWidth = banner._width;
orgHeight = banner._height;
orgX = banner._x;
orgY = banner._y;
loadMovie (txtImage, banner);
banner._alpha = 0;
createEmptyMovieClip("q", getNextHighestDepth());
q.onEnterFrame = function () {
if (banner.getBytesLoaded() > 1) {
if (banner.getBytesLoaded() >= banner.getBytesTotal()) {
banner._x = orgX - (orgWidth / 2);
banner._y = orgY - (orgHeight / 2);
banner._height = orgHeight;
banner._width = orgWidth;
if (banner._alpha < 10) {
banner._alpha++;
}
}
}
};
Symbol 104 MovieClip Frame 3
gotoAndStop (1);
Symbol 127 MovieClip Frame 1
if (!_root.musicPlayer.mySound) {
_root.musicPlayer.gotoAndPlay("work");
} else {
_root.musicPlayer.mySound.start(tempV / 1000);
}
local_data = SharedObject.getLocal("Psycho_Data");
local_data.data.musicPreference = 1;
local_data.flush();
stop();
Symbol 127 MovieClip Frame 2
var tempV = _root.musicPlayer.mySound.position;
local_data = SharedObject.getLocal("Psycho_Data");
local_data.data.musicPreference = 0;
local_data.flush();
_root.musicPlayer.mySound.stop();
Symbol 127 MovieClip Frame 3
gotoAndStop (1);
Instance of Symbol 140 MovieClip "slider" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
var maxY = _y;
var minY = (_y + _parent.volumeBar._height);
var isDragged = false;
var newVolume = ((100 * (_parent.volumeBar._height - _y)) / (maxY + _parent.volumeBar._height));
}
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
isDragged = true;
}
}
onClipEvent (mouseUp) {
isDragged = false;
}
onClipEvent (mouseMove) {
if (isDragged) {
var newVolume = ((100 * (_parent.volumeBar._height - _y)) / (maxY + _parent.volumeBar._height));
_root.musicPlayer.mySound.setVolume(newVolume);
_y = _parent._ymouse;
if (_y < maxY) {
_y = maxY;
}
if (_y > minY) {
_y = minY;
}
}
}
Symbol 147 MovieClip Frame 1
stop();
Instance of Symbol 146 MovieClip in Symbol 147 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 147 MovieClip Frame 18
stop();
var tempTime = getTimer();
onEnterFrame = function () {
if ((getTimer() - tempTime) > 3000) {
play();
delete this.onEnterFrame;
}
};
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stopAllSounds();
if (_root.musicOff._currentframe == 1) {
mySound = new Sound(this);
mySound.loadSound(("music/music" + _root.musicChoice) + ".mp3", true);
mySound.setVolume(_root.vBar.slider.newVolume);
soundInfo.gotoAndPlay(2);
soundInfo.txt = ":Buffering:";
onEnterFrame = function () {
if (mySound.position >= 1) {
var _local2 = "";
_local2 = _local2 + (("Title: " + mySound.id3.songname) + newline);
_local2 = _local2 + (("Artist: " + mySound.id3.artist) + newline);
_local2 = _local2 + (("Year: " + mySound.id3.year) + newline);
var _local3 = "None.";
if ((mySound.id3.comment != undefined) || (mySound.id3.comment.length < 2)) {
_local3 = mySound.id3.comment;
}
_local2 = _local2 + ("Comments: " + _local3);
soundInfo.txt = _local2;
soundInfo.gotoAndPlay(2);
delete this.onEnterFrame;
} else {
soundInfo.txt = ":Buffering:";
}
};
mySound.onSoundComplete = function () {
_root.nextTrack(1);
};
}
prevFrame();