Frame 1
completeRam = function () {
if (!_global.RAM) {
_global.RAM = {};
}
var _local2 = function (newName, defaultData) {
if (RAM[newName] == undefined) {
RAM[newName] = defaultData;
}
};
_local2("trainers", {});
_local2("timeOfDay", "none");
_local2("photos", {});
_local2("pokedex", {});
_local2("items", {});
_local2("equipment", {});
_local2("money", 0);
_local2("pokemon", []);
_local2("storage", []);
_local2("shops", {});
_local2("winBorder", 0);
_local2("ask", {});
_local2("party", {});
_local2("gameId", "humbird0_pokemon_2014");
_local2("keys", {ok:32, cancel:27, menu:27, talk:32, ask:65});
_local2("playerSprite", {charset:"charset/default.png", direction:0, directions:1, frame:0, frames:3, pose:0, columns:1, rows:1, animType:"yoyo", animDirection:1, delay:4, isAnimating:true});
if (ROOT.editorRam) {
var _local3 = {};
ROOT.copyObject(ROOT.editorRam, _local3);
for (var _local4 in _local3) {
RAM[_local4] = _local3[_local4];
}
}
};
newRam = function () {
var _local1 = {};
_local1.trainers = {};
_local1.timeOfDay = "none";
_local1.photos = {};
_local1.pokedex = {};
_local1.items = {};
_local1.equipment = {};
_local1.money = 0;
_local1.pokemon = [];
_local1.storage = [];
_local1.shops = {};
_local1.winBorder = 0;
_local1.ask = {};
_local1.party = {};
_local1.gameId = "humbird0_pokemon_2014";
_local1.keys = {ok:32, cancel:27, menu:27, talk:32, ask:65};
_local1.playerSprite = {charset:"charset/default.png", direction:0, directions:1, frame:0, frames:3, pose:0, columns:1, rows:1, animType:"yoyo", animDirection:1, delay:4, isAnimating:true};
_local1.ash = "nameAsh";
_local1.misty = "nameMisty";
_local1.oak = "nameOak";
_local1.brock = "nameBrock";
_local1.gary = "nameGary";
_local1.jessie = "nameJessie";
_local1.james = "nameJames";
if (ROOT.editorRam) {
var _local2 = {};
ROOT.copyObject(ROOT.editorRam, _local2);
for (var _local3 in _local2) {
_local1[_local3] = _local2[_local3];
}
}
return(_local1);
};
resetRam = function () {
_global.RAM = newRam();
};
completeRom = function () {
var _local3 = function (newName, defaultData) {
if (ROM[newName] == undefined) {
ROM[newName] = defaultData;
}
};
_local3("playerSprite", newPlayerSprite);
_local3("pokemon", {});
_local3("moves", newMoves());
_local3("items", newItems());
_local3("equipment", newEquipment());
_local3("battle", newBattle());
_local3("shops", {initStock:10});
makeItem = function (newName) {
if (ROM.items[newName] == undefined) {
ROM.items[newName] = {price:0, description:"description"};
}
};
makeItem("air_horn");
makeItem("antidote");
makeItem("boulder_badge");
makeItem("bull_horn");
makeItem("camera");
makeItem("cascade_badge");
makeItem("earth_badge");
makeItem("fan_art");
makeItem("fire_stone");
makeItem("gold_nugget");
makeItem("marsh_badge");
makeItem("mega_potion");
makeItem("parlz");
makeItem("parlz_heal");
makeItem("pokeball");
makeItem("pokeboll");
makeItem("pokedax");
makeItem("potion");
makeItem("rainbow_badge");
makeItem("revive");
makeItem("rocketball");
makeItem("soul_badge");
makeItem("super_potion");
makeItem("thunder_badge");
makeItem("thunder_stone");
makeItem("tm_cut");
makeItem("tm_strength");
makeItem("tm_swim");
makeItem("volcano_badge");
makeItem("water_stone");
makeEquipment = function (newName) {
if (ROM.equipment[newName] == undefined) {
ROM.equipment[newName] = {price:0, description:"description"};
}
};
makeEquipment("angel_berry");
makeEquipment("anger_berry");
makeEquipment("anger_shield");
makeEquipment("armor");
makeEquipment("blood_money");
makeEquipment("exp_boost");
makeEquipment("first_strike");
makeEquipment("flame_lens");
makeEquipment("franklin_badge");
makeEquipment("guts");
makeEquipment("horn_berry");
makeEquipment("hp_berry");
makeEquipment("leech");
makeEquipment("parlz_berry");
makeEquipment("parlz_shield");
makeEquipment("pheramones");
makeEquipment("poison_berry");
makeEquipment("poison_shield");
makeEquipment("poison_touch");
makeEquipment("power_lens");
makeEquipment("psycho_lens");
makeEquipment("reflect");
makeEquipment("regen");
makeEquipment("retry");
makeEquipment("root_lens");
makeEquipment("scare_berry");
makeEquipment("scare_shield");
makeEquipment("sleep_berry");
makeEquipment("sleep_shield");
makeEquipment("sprinter");
makeEquipment("starter");
makeEquipment("stone_lens");
makeEquipment("switcheroo");
makeEquipment("trainer_lure");
makeEquipment("trigger_happy");
makeEquipment("volt_lens");
makeEquipment("volt_touch");
makeEquipment("water_lens");
makeEquipment("white_cape");
var _local1 = function (newName) {
if (ROM.moves[newName] == undefined) {
ROM.moves[newName] = {description:"description"};
}
};
_local1("barrier");
_local1("bolt");
_local1("brainshock");
_local1("charm");
_local1("cut");
_local1("drain");
_local1("ember");
_local1("flail");
_local1("fury_swipes");
_local1("gust");
_local1("harden");
_local1("hypnosis");
_local1("lick");
_local1("metranome");
_local1("napalm");
_local1("nightmare");
_local1("pebble");
_local1("pk_beam");
_local1("poison");
_local1("recuperate");
_local1("refresh");
_local1("roar");
_local1("sand_attack");
_local1("scratch");
_local1("slam");
_local1("spark");
_local1("sting");
_local1("strength");
_local1("swim");
_local1("tackle");
_local1("taunt");
_local1("teleport");
_local1("thunder");
_local1("transform");
_local1("whip");
var _local2 = function (newName, defaultValue) {
if (ROM.battle[newName] == undefined) {
ROM.battle[newName] = {description:"description"};
}
};
_local2("maxLevel", 10);
_local2("evolveAt", 6);
_local2("move0At", 1);
_local2("move1At", 3);
_local2("move2At", 6);
_local2("move3At", 10);
_local2("expToLevelUp", 10);
_local2("sameLevelExp", 2);
_local2("expMultiplier", 2);
_local2("initHp", 10);
_local2("initPower", 2.5);
_local2("hpGrowth", 1.5);
_local2("powerGrowth", 1.5);
_local2("weaknessMultiplier", 2);
_local2("poisonRatio", 0.2);
_local2("sleepRecoverChance", 0.5);
_local2("paralyzeRecoverChance", 0.5);
_local2("poisonRecoverChance", 0);
_local2("touchEffectChance", 0.5);
_local2("runChance", 0.5);
_local2("criticalHpPerc", 30);
if (!ROM.ram) {
ROM.ram = {};
}
if (!ROM.textbox) {
ROM.textbox = "textbox_mc";
}
};
setLevel = function (newLevel, newStart_point) {
levelData = newLevel;
start_point = newStart_point;
levelFromEditor = true;
};
stop();
var randInterface = ("loadInterface" + Math.floor(Math.random() * 2));
this.attachMovie(randInterface, "loadInterface", 0, {filename:"data"});
var total = this.getBytesTotal();
this.onEnterFrame = function () {
var _local2 = this.getBytesLoaded();
this.loadInterface.fill_mc._xscale = (_local2 * 100) / total;
if (_framesloaded == _totalframes) {
this.loadInterface.removeMovieClip();
this.play();
delete randInterface;
delete total;
this.onEnterFrame = function () {
};
}
};
onUnload = function () {
mdm.Exception.DebugWindow.trace("game.swf unload()");
};
Frame 3
function getGameId() {
return(RAM.gameId || "humbird0_pokemon_2014");
}
function getSram(gameId) {
gameId = gameId || (ROOT.getGameId());
var _local2 = SharedObject.getLocal(gameId);
return(_local2);
}
stop();
_global.TRACE_SCRIPT = false;
_quality = "low";
XML.prototype.ignoreWhite = true;
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
findXmlTag = function (findThis, this_xml) {
var _local1 = 0;
while (_local1 < this_xml.childNodes.length) {
var _local2 = this_xml.childNodes[_local1].nodeName;
if (_local2 == findThis) {
var _local4 = this_xml.childNodes[_local1];
}
_local1++;
}
return(_local4);
};
readXml_getValue = function (newValue) {
var _local2 = null;
var _local3 = newValue.substr(0, 4);
if (_local3 == "bol_") {
var _local4 = newValue.substr(4);
newValue = _local4 == "true";
_local2 = newValue;
} else if (_local3 == "num_") {
var _local4 = newValue.substr(4);
newValue = Number(_local4);
_local2 = newValue;
} else if (_local3 == "str_") {
var _local4 = newValue.substr(4);
newValue = String(_local4);
_local2 = newValue;
} else if (isNaN(Number(newValue))) {
if (newValue == "true") {
_local2 = true;
} else if (newValue == "false") {
_local2 = false;
} else if (newValue == "undefined") {
_local2 = undefined;
} else {
var _local6 = "";
var _local5 = String.fromCharCode(10);
newValue = newValue.split(_local5).join("");
_local2 = newValue;
}
} else {
_local2 = Number(newValue);
}
return(_local2);
};
readXml = function (parentPath, targetData) {
for (var _local1 in parentPath.attributes) {
if (_local1 != "xmlType") {
var _local6 = parentPath.attributes[_local1];
targetData[_local1] = readXml_getValue(_local6);
}
}
for (var _local8 in parentPath.childNodes) {
var _local2 = parentPath.childNodes[_local8];
var _local1 = _local2.nodeName;
var _local4 = _local2.attributes.xmlType;
if (_local4 == "array") {
targetData[_local1] = new Array();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
} else if (_local4 == "variable") {
var _local6 = _local2.attributes.value;
targetData[_local1] = readXml_getValue(_local6);
} else if (_local4 == "object") {
targetData[_local1] = new Object();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
}
}
delete stringSlice;
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
saveSettings = function () {
RAM.saveSettings = {};
RAM.saveSettings.level = ROOT.level_xml.filePath;
if (SPRITES.player) {
var _local1 = SPRITES.player.image.getParams();
if (_local1) {
RAM.playerSprite = _local1;
}
RAM.saveSettings.playerPosition = {x:SPRITES.player._x, y:SPRITES.player._y};
}
RAM.saveSettings.music = {songName:MUSIC.songName, isPlaying:MUSIC.isPlaying, volume:MUSIC.volume, songVolume:MUSIC.songVolume};
RAM.saveSettings.sound = {volume:SOUND.volume};
};
saveGame = function (inputData, gameId) {
var _local2 = {};
copyObject(inputData, _local2);
gameId = gameId || "humbird0_rpg";
if (_local2) {
var _local1 = SharedObject.getLocal(gameId);
_local1.clear();
_local1.data.ram = {};
copyObject(_local2, _local1.data.ram);
var _local3 = _local1.flush();
if (_local3) {
trace("Save Successful");
return(true);
}
trace("Save Failed");
return(false);
}
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
callUnload = function (parent) {
for (var nam in parent) {
var thisChild = parent[nam];
if (thisChild instanceof MovieClip) {
reportedPath = String(eval (thisChild._target));
actualPath = (String(eval (parent._target)) + ".") + nam;
if (reportedPath.indexOf(actualPath) != -1) {
callUnload(thisChild);
}
}
}
parent.onKillFocus(null);
parent.dispatchEvent({type:"unload"});
parent.broadcastMessage("unload");
parent.unload();
parent.onUnload();
parent.removeEventListener("keyDown", parent);
parent.removeEventListener("keyUp", parent);
Key.removeListener(parent);
Mouse.removeListener(parent);
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
makeStringObject = function (input_str, defaultContainer_str, thisName) {
var _local9 = null;
var _local8 = input_str.indexOf("{");
if ((_local8 == -1) || (_local8 == undefined)) {
_local9 = input_str;
} else {
var _local7 = {};
var _local12 = input_str.indexOf("}", _local8 + 1);
var _local10 = input_str.substring(_local8 + 1, _local12);
_local10 = nestedEval(_local10, defaultContainer_str, thisName);
var _local6 = _local10.split(",");
var _local2 = 0;
while (_local2 < _local6.length) {
var _local3 = _local6[_local2];
var _local4 = _local3.indexOf(":");
var _local5 = _local3.substr(0, _local4);
var _local1 = _local3.substr(_local4 + 1);
_local1 = getImpliedValue(_local1);
_local7[_local5] = _local1;
_local2++;
}
_local9 = _local7;
}
return(_local9);
};
define_swf = function (command_obj) {
if (command_obj.data.linkage) {
command_obj.run = function (thisCommand_obj, skipSwfloader) {
command_obj.copyObject = copyObject;
command_obj.makeStringObject = makeStringObject;
command_obj.nestedEval = nestedEval;
command_obj.evalPath = evalPath;
command_obj.getImpliedValue = getImpliedValue;
command_obj.resolveContainer = resolveContainer;
var _local12 = nestedEval(thisCommand_obj.data.target, "RAM", "_this");
var _local5 = evalPath(_local12, "RAM", "_this");
var _local4 = nestedEval(thisCommand_obj.data.name, "RAM", "_this");
var _local6 = 0;
if ((_local4 == "") || (_local4 == undefined)) {
do {
_local4 = "swf_" + _local6;
_local6++;
} while (_local5[_local4]);
}
if (TRACE_SCRIPT) {
trace((((("Place swf: " + thisCommand_obj.data.linkage) + " named: ") + _local4) + " waitForEnd: ") + thisCommand_obj.data.waitForEnd);
}
var _local8 = ((thisCommand_obj.data.depth == -1) ? (nextDepth(_local5)) : (nestedEval(thisCommand_obj.data.depth, "RAM", "_this")));
var storedObj = {};
copyObject(thisCommand_obj.data, storedObj);
storedObj.name = _local4;
storedObj.depth = _local8;
if (!skipSwfloader) {
ROOT.swfLoader.add(storedObj);
}
var swfLoader = new MovieClipLoader();
swfLoader.root = ROOT;
swfLoader.commandData = thisCommand_obj.data.data;
swfLoader.nextEvent = thisCommand_obj.nextEvent;
swfLoader.waitForEnd = thisCommand_obj.data.waitForEnd;
swfLoader.levelId = ROOT.game_mc.uid;
callUnload(_local5[_local4]);
_local5[_local4].removeMovieClip();
var _local10 = _local5.getInstanceAtDepth(_local8);
callUnload(_local10);
_local10.removeMovieClip();
var _local7 = thisCommand_obj.data.linkage;
_local7 = nestedEval(_local7, "RAM", "_this");
var _local13 = false;
_local5.attachMovie(_local7, _local4, _local8);
if ((_local5[_local4] == _local5) || (_local5[_local4] == undefined)) {
_local5.createEmptyMovieClip(_local4, _local8);
var _local14 = flash.display.BitmapData.loadBitmap(_local7);
_local5[_local4].attachBitmap(_local14, 0);
if ((_local5[_local4]._width == undefined) || (_local5[_local4]._width == 0)) {
_local13 = true;
} else {
thisCommand_obj.data.waitForEnd = false;
}
}
swfLoader.passData = function (newClip, commandData) {
newClip.parentSprite = _this;
for (var _local3 in commandData) {
var _local1 = command_obj.nestedEval(commandData[_local3], "RAM", "_this");
_local1 = command_obj.makeStringObject(_local1, "RAM", "_this");
newClip[_local3] = _local1;
}
newClip.onClose = function () {
ROOT.swfLoader.remove(storedObj);
};
setTimeout(function () {
newClip.start();
}, 33);
};
swfLoader.detectLastFrame = function (newClip, nextEvent) {
newClip.detectLastFrame = {parent:newClip, nextEvent:nextEvent, swfData:thisCommand_obj.data, loop:function (thisObj) {
if ((thisObj.parent._currentframe == thisObj.parent._totalframes) || (thisObj.parent._currentframe == undefined)) {
ROOT.swfLoader.remove(thisObj.swfData);
clearInterval(thisObj.intervalId);
_global.ROOT = swfLoader.root;
var _local3 = swfLoader.levelId == ROOT.game_mc.uid;
if (_local3) {
thisObj.nextEvent();
}
}
}, intervalId:null, start:function () {
if (this.intervalId != null) {
clearInterval(this.intervalId);
}
this.intervalId = setInterval(this.loop, 34, this);
this.loop();
}};
newClip.detectLastFrame.start();
};
if (_local13) {
swfLoader.onLoadInit = function (newClip) {
swfLoader.passData(newClip, this.commandData);
if (swfLoader.waitForEnd) {
swfLoader.detectLastFrame(newClip, this.nextEvent);
}
delete swfLoader;
};
swfLoader.onLoadError = function (newClip) {
this.unloadClip(newClip);
newClip.removeMovieClip();
delete swfLoader;
};
swfLoader.loadClip(_local7, _local5[_local4]);
} else {
swfLoader.passData(_local5[_local4], swfLoader.commandData);
if (swfLoader.waitForEnd) {
swfLoader.detectLastFrame(_local5[_local4], thisCommand_obj.nextEvent);
}
delete swfLoader;
}
if (thisCommand_obj.data.waitForEnd == false) {
thisCommand_obj.nextEvent();
}
};
} else {
command_obj.run = function (thisCommand_obj, preserveSwfloader) {
if (!preserveSwfloader) {
ROOT.swfLoader.remove(thisCommand_obj.data);
}
if (TRACE_SCRIPT) {
trace((("removeSwf named: " + thisCommand_obj.data.name) + " from: ") + thisCommand_obj.data.target);
}
var targetName = nestedEval(thisCommand_obj.data.name, "RAM", "_this");
if ((targetName == "") || (targetName == undefined)) {
thisCommand_obj.nextEvent();
} else {
var autoDelay = 1;
var endTime = getTimer();
var elapsedTime = (endTime - startTime);
if (TRACE_SCRIPT) {
trace("\t elapsedTime: " + elapsedTime);
}
if (isNaN(elapsedTime) || (elapsedTime > autoDelay)) {
var defaultContainer = "OVERLAY";
target_str = nestedEval(thisCommand_obj.data.target, "RAM", "_this");
var startAt = target_str.indexOf(".");
if (startAt == -1) {
var container = defaultContainer;
var containerIsGlobal = false;
for (var nam in _global) {
if (nam == target_str) {
containerIsGlobal = true;
break;
}
}
var theRest = target_str;
var target = (containerIsGlobal ? (eval (theRest)) : (eval ((container + ".") + theRest)));
if (target_str == "this") {
var target = _this;
}
} else {
var containerName = target_str.substr(0, startAt);
var container = nestedEval(containerName, "RAM", "_this");
var theRest = target_str.substr(startAt + 1);
var target = eval ((container + ".") + theRest);
}
if ((target == SPRITES) && (target[targetName].remove)) {
target[targetName].remove();
} else {
callUnload(target[targetName]);
target[targetName].removeMovieClip();
}
thisCommand_obj.nextEvent();
} else {
if (TRACE_SCRIPT) {
trace("\t too early, wait for 1 millisecond");
}
setTimeout(thisCommand_obj.run, autoDelay, thisCommand_obj);
}
}
};
}
};
restoreData = function (loadedData) {
var _local4 = false;
if (loadedData) {
ROOT.game_mc.removeMovieClip();
var deleteAllData = function (thisObject) {
for (var _local2 in thisObject) {
if (typeof(thisObject[_local2]) == "object") {
deleteAllData(thisObject[_local2]);
thisObject[_local2] = null;
delete thisObject[_local2];
} else {
thisObject[_local2] = null;
delete thisObject[_local2];
}
}
};
deleteAllData(RAM);
_global.RAM = {};
copyObject(loadedData, _global.RAM);
ROOT.completeRam();
for (var _local7 in _global.RAM) {
_local4 = true;
break;
}
if (RAM.saveSettings.music.isPlaying) {
MUSIC.play(RAM.saveSettings.music.songName);
} else {
MUSIC.songName = RAM.saveSettings.music.songName;
MUSIC.stop();
}
MUSIC.volume = RAM.saveSettings.music.volume;
MUSIC.songVolume = RAM.saveSettings.music.songVolume;
SOUND.stopAll();
SOUND.volume = RAM.saveSettings.sound.volume;
for (var _local8 in SPRITES) {
SPRITES[_local8].onUnload();
}
ROOT.loadLevel(RAM.saveSettings.level, RAM.saveSettings.playerPosition);
var _local5 = function (swfCommand) {
var _local1 = {};
_local1.data = {};
copyObject(swfCommand, _local1.data);
_local1.data.linkage = null;
var _local2 = 0;
define_swf(_local1);
_local1.run(_local1, true);
};
if (RAM.swfLoader.permSwf == undefined) {
trace("WARNING: RAM.swfLoader.permSwf is missing!");
}
if (RAM.swfLoader.permSwf) {
var _local2 = RAM.swfLoader.permSwf.length - 1;
while (_local2 >= 0) {
_local5(RAM.swfLoader.permSwf[_local2]);
_local2--;
}
}
var _local3 = function (swfCommand) {
var _local1 = {};
_local1.data = {};
copyObject(swfCommand, _local1.data);
define_swf(_local1);
_local1.run(_local1, true);
};
var _local2 = 0;
while (_local2 < RAM.swfLoader.permSwf.length) {
_local3(RAM.swfLoader.permSwf[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < RAM.swfLoader.tempSwf.length) {
_local3(RAM.swfLoader.tempSwf[_local2]);
_local2++;
}
}
return(_local4);
};
loadGame = function (gameId) {
gameId = gameId || "humbird0_rpg";
var _local2 = SharedObject.getLocal(gameId);
var _local1 = Boolean(_local2.data.ram);
if (_local1) {
restoreData(_local2.data.ram);
}
return(_local1);
};
_this = this;
_global.ROOT = this;
var vow_scope = function () {
function forEach(array, callback) {
var _local1 = 0;
while (_local1 < array.length) {
callback(array[_local1], _local1);
_local1++;
}
}
function enlighten(queue, fate) {
forEach(queue, function (func) {
setTimeout(function () {
func(fate);
}, 0);
});
}
return({make:function () {
function enqueue(resolution, func, vow) {
var _local2 = ((resolution === "kept") ? (keepers) : (breakers));
_local2[_local2.length] = ((!(typeof(func) === "function")) ? (vow[resolution]) : (function (value) {
try {
_local1 = func(value)_local1if (_local1 && (_local1.is_promise === true)) {
_local1.then(vow.keep, vow.doBreak)} else {
vow.keep(_local1)}
} catch(e) {
vow.doBreak(e)}
}));
}
function herald(state, value, queue) {
if (!(status === "pending")) {
throw "overpromise";
}
fate = value;
status = state;
enlighten(queue, fate);
keepers = [];
breakers = [];
}
var breakers = [];
var fate;
var keepers = [];
var status = "pending";
return({doBreak:function (value) {
herald("broken", value, breakers);
return(this.promise);
}, keep:function (value) {
herald("kept", value, keepers);
return(this.promise);
}, promise:{is_promise:true, then:function (kept, broken) {
var _local1 = VOW.make();
switch (status) {
case "pending" :
enqueue("kept", kept, _local1);
enqueue("break", broken, _local1);
break;
case "kept" :
enqueue("kept", kept, _local1);
enlighten(keepers, fate);
break;
case "broken" :
enqueue("break", broken, _local1);
enlighten(breakers, fate);
}
return(_local1.promise);
}}});
}, every:function (array) {
var remaining = array.length;
var results = [];
var vow = VOW.make();
if (!remaining) {
vow.doBreak(array);
} else {
forEach(array, function (promise, i) {
promise.then(function (value) {
results[i] = value;
remaining--;
if (remaining === 0) {
vow.keep(results);
}
}, function (reason) {
remaining = null;
vow.doBreak(reason);
});
});
}
return(vow.promise);
}, first:function (array) {
function check() {
remaining--;
if ((remaining === 0) && (!found)) {
vow.doBreak();
}
}
var found = false;
var remaining = array.length;
var vow = VOW.make();
if (remaining === 0) {
vow.doBreak(array);
} else {
forEach(array, function (promise) {
promise.then(function (value) {
if (!found) {
found = true;
vow.keep(value);
}
check();
}, check);
});
}
return(vow.promise);
}, any:function (array) {
function check() {
remaining--;
if (remaining === 0) {
vow.keep(results);
}
}
var remaining = array.length;
var results = [];
var vow = VOW.make();
if (!remaining) {
vow.keep(results);
} else {
forEach(array, function (promise, i) {
promise.then(function (value) {
results[i] = value;
check();
}, check);
});
}
return(vow.promise);
}, kept:function (value) {
var _local1 = VOW.make();
_local1.keep(value);
return(_local1.promise);
}, broken:function (reason) {
var _local1 = VOW.make();
_local1.doBreak(reason);
return(_local1.promise);
}, wait:function () {
var _local2 = function (milliseconds) {
var vow = VOW.make();
milliseconds = milliseconds || 1000;
setTimeout(function () {
vow.keep({});
}, milliseconds);
return(vow.promise);
};
return(_local2);
}, firstWait:function (milliseconds) {
var vow = VOW.make();
milliseconds = milliseconds || 1000;
setTimeout(function () {
vow.keep({});
}, milliseconds);
return(vow.promise);
}});
};
var VOW = vow_scope();
delete vow_scope;
_global.VOW = VOW;
if (!_global.RAM) {
_global.RAM = {};
}
_global.RAM_F = {};
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
RAM_F.trainers = {addTrainer:function (trainerId) {
if (trainerId) {
if (RAM.trainers[trainerId] == undefined) {
RAM.trainers[trainerId] = {caught:false, wasCaught:false, defeated:false};
}
return(RAM.trainers[trainerId]);
}
}};
RAM_F.pokedex = {addPokemon:function (pokemonName) {
if (pokemonName) {
if (RAM.pokedex[pokemonName] == undefined) {
RAM.pokedex[pokemonName] = {caught:false, lastPhoto:""};
}
return(RAM.pokedex[pokemonName]);
}
}, removePokemon:function (pokemonName) {
RAM.pokedex[pokemonName] = undefined;
delete RAM.pokedex[pokemonName];
}, hasPokemon:function (pokeId) {
return(RAM.pokedex[pokeId] != undefined);
}, addPicture:function () {
var _local3 = arguments;
var _local2 = _local3[0];
var _local4 = _local3[1] || "";
if (_local2) {
RAM.pokedex[_local2].lastPhoto = _local4;
}
}};
RAM_F.items = {addItem:function (itemId) {
if (RAM.items[itemId] == undefined) {
RAM.items[itemId] = 0;
}
RAM.items[itemId]++;
return(RAM.items[itemId]);
}, removeItem:function (itemId) {
RAM.items[itemId]--;
if (RAM.items[itemId] <= 0) {
delete RAM.items[itemId];
return(0);
}
return(RAM.items[itemId]);
}, removeAll:function (itemId) {
delete RAM.items[itemId];
return(0);
}};
RAM_F.equipment = {addItem:function (itemId) {
if (RAM.equipment[itemId] == undefined) {
RAM.equipment[itemId] = 0;
}
RAM.equipment[itemId]++;
return(RAM.equipment[itemId]);
}, removeItem:function (itemId) {
RAM.equipment[itemId]--;
if (RAM.equipment[itemId] <= 0) {
delete RAM.equipment[itemId];
return(0);
}
return(RAM.equipment[itemId]);
}, removeAll:function (itemId) {
delete RAM.equipment[itemId];
return(0);
}};
RAM_F.pokemon = {addPokemon:function () {
var _local4 = arguments;
if (_local4[0]) {
var pokemonName = _local4[0];
var _local3 = ((_local4[1] != undefined) ? (Number(_local4[1])) : 1);
var _local6 = (isNaN(Number(_local4[2])) ? undefined : (Number(_local4[2])));
var newPokemon = {id:pokemonName, trainerId:"", level:_local3, hp:ROM.battle.initHp, power:ROM.battle.initPower, exp:0, heldItem:"", moves:[]};
var _local2 = 1;
while (_local2 < _local3) {
newPokemon.hp = newPokemon.hp * ROM.battle.hpGrowth;
newPokemon.power = newPokemon.power * ROM.battle.powerGrowth;
_local2++;
}
newPokemon.maxHp = newPokemon.hp;
var _local5 = function (ind) {
if (ROM.pokemon[pokemonName].moves[ind].id != undefined) {
var _local1 = ROM.pokemon[pokemonName].moves[ind].id;
} else {
var _local1 = ROM.pokemon[pokemonName].moves[ind];
}
if (_local1) {
newPokemon.moves.push(_local1);
}
};
if (_local3 >= ROM.battle.move0At) {
_local5(0);
}
if (_local3 >= ROM.battle.move1At) {
_local5(1);
}
if (_local3 >= ROM.battle.move2At) {
_local5(2);
}
if (_local3 >= ROM.battle.move3At) {
_local5(3);
}
if (RAM.pokemon.length >= 6) {
RAM.storage.push(newPokemon);
} else if (_local6 == undefined) {
RAM.pokemon.push(newPokemon);
} else {
RAM.pokemon.splice(_local6, 0, newPokemon);
}
return(newPokemon);
}
}, removePokemon:function (input) {
var _local1;
var _local5;
var _local3 = isNaN(Number(input));
if (_local3) {
_local1 = input;
} else {
_local5 = Number(input);
}
if (_local1) {
for (var _local2 in RAM.pokemon) {
if (RAM.pokemon[_local2].id == _local1) {
RAM.pokemon.splice(_local2, 1);
}
}
} else {
RAM.pokemon.splice(_local5, 1);
}
}, hasTM:function (moveName) {
var _local1 = RAM.pokemon[0].moves;
var _local2 = false;
if (moveName) {
for (var _local4 in _local1) {
if (_local1[_local4] == moveName) {
_local2 = true;
}
}
}
return(_local2);
}, addTM:function (moveName) {
if (moveName) {
var _local1 = RAM_F.pokemon.hasTM(moveName);
if (!_local1) {
var _local3 = RAM.pokemon[0].moves.push(moveName);
}
return(_local3 - 1);
}
}, hasPokemon:function (pokeId) {
var _local1 = 0;
while (_local1 < RAM.pokemon.length) {
if (RAM.pokemon[_local1].id == pokeId) {
return(true);
}
_local1++;
}
return(false);
}};
RAM_F.shops = {restockRandom:function (itemName) {
var _local1 = [];
for (var _local3 in RAM.shops) {
if (RAM.shops[_local3][itemName] != undefined) {
_local1.push(_local3);
}
}
if (_local1.length > 0) {
var _local6 = Math.floor(Math.random() * 2);
var _local5 = ((_local1.length > 1) ? (_local6) : 0);
var _local4 = _local1[_local5];
if (!RAM.shops[_local4][itemName]) {
RAM.shops[_local4][itemName] = 0;
}
RAM.shops[_local4][itemName]++;
}
}};
RAM_F.storage = {addPokemon:function () {
var _local5 = arguments;
if (_local5[0]) {
var pokemonName = _local5[0];
var _local3 = ((_local5[1] != undefined) ? (Number(_local5[1])) : 1);
var newPokemon = {id:pokemonName, trainerId:"", level:_local3, hp:ROM.battle.initHp, power:ROM.battle.initPower, exp:0, heldItem:"", moves:[]};
var _local2 = 1;
while (_local2 < _local3) {
newPokemon.hp = newPokemon.hp * ROM.battle.hpGrowth;
newPokemon.power = newPokemon.power * ROM.battle.powerGrowth;
_local2++;
}
newPokemon.maxHp = newPokemon.hp;
var _local4 = function (ind) {
if (ROM.pokemon[pokemonName].moves[ind].id != undefined) {
if (ROM.pokemon[pokemonName].moves[ind].id) {
newPokemon.moves.push(ROM.pokemon[pokemonName].moves[ind].id);
}
} else if (typeof(ROM.pokemon[pokemonName].moves[ind]) == "string") {
if (ROM.pokemon[pokemonName].moves[ind]) {
newPokemon.moves.push(ROM.pokemon[pokemonName].moves[ind]);
}
}
};
if (_local3 >= ROM.battle.move0At) {
_local4(0);
}
if (_local3 >= ROM.battle.move1At) {
_local4(1);
}
if (_local3 >= ROM.battle.move2At) {
_local4(2);
}
if (_local3 >= ROM.battle.move3At) {
_local4(3);
}
RAM.storage.push(newPokemon);
return(newPokemon);
}
}, removePokemon:function (pokeName) {
for (var _local2 in RAM.storage) {
if (RAM.storage[_local2].id == pokeName) {
RAM.storage.splice(_local2, 1);
}
}
}, hasPokemon:function (pokeId) {
var _local1 = 0;
while (_local1 < RAM.storage.length) {
if (RAM.storage[_local1].id == pokeId) {
return(true);
}
_local1++;
}
return(false);
}};
RAM_F.getNickname = function (originalName) {
lowerName = originalName.toLowerCase();
var _local1 = (RAM[lowerName] ? (RAM[lowerName]) : (originalName));
_local1 = _local1.split("_").join(" ");
return(_local1);
};
RAM_F.party = {placeMember:function () {
var _local3 = arguments[0];
var _local6 = arguments[1];
if (!_local6) {
for (var _local4 in RAM.party) {
if (secondCycle) {
var _local2 = _local4;
break;
}
var secondCycle = true;
}
delete secondCycle;
_local6 = _local2 || "player";
}
if (SPRITES[_local3] == undefined) {
var _local5 = nextDepth(SPRITES);
var _local11 = RAM.party[_local3];
var _local7 = SPRITES.attachMovie("partyMember", _local3, _local5, {isFollowing:_local6, appearance:_local11, _x:SPRITES.player._x, _y:SPRITES.player._y});
LOOP.addObject(_local7, "sprites");
}
return(SPRITES[_local3]);
}};
RAM_F.copySprite = function () {
var _local7 = arguments[0];
var _local2 = arguments[1];
var _local4 = SPRITES[_local7].image.getParams();
if (_local4) {
var _local3 = _local2.lastIndexOf(".");
var _local6 = ((_local3 == -1) ? "RAM" : (_local2.substr(0, _local3)));
var _local8 = _local2.substr(_local3 + 1);
var _local9 = evalPath(_local6, "RAM");
var _local5 = (_local9[_local8] = {});
copyObject(_local4, _local5);
}
};
RAM_F.copyObject = function () {
var _local4 = arguments[0];
var _local5 = arguments[1];
var _local2 = evalPath(_local4, "RAM");
var _local3 = evalPath(_local5, "RAM");
if (_local2 && (_local3)) {
copyObject(_local2, _local3);
}
};
RAM_F.removeText = function () {
var _local2 = arguments[0];
var _local3 = arguments[1];
return(_local3.split(_local2).join(""));
};
RAM_F.hasText = function () {
var _local2 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local4.indexOf(_local2);
return(_local3 > -1);
};
getKeyName = function () {
var _local2 = Number(arguments[0]);
switch (_local2) {
case 8 :
var _local3 = "Backspace";
break;
case 9 :
_local3 = "Tab";
break;
case 13 :
_local3 = "Enter";
break;
case 16 :
_local3 = "Shift";
break;
case 17 :
_local3 = "Ctrl";
break;
case 19 :
_local3 = "Pause / Break";
break;
case 20 :
_local3 = "CAPS Lock";
break;
case 27 :
_local3 = "Esc";
break;
case 32 :
_local3 = "Space";
break;
case 33 :
_local3 = "Page Up";
break;
case 34 :
_local3 = "Page Down";
break;
case 35 :
_local3 = "End";
break;
case 36 :
_local3 = "Home";
break;
case 37 :
_local3 = "arrow: LEFT";
break;
case 38 :
_local3 = "arrow: UP";
break;
case 39 :
_local3 = "arrow: RIGHT";
break;
case 40 :
_local3 = "arrow: DOWN";
break;
case 45 :
_local3 = "Insert";
break;
case 46 :
_local3 = "Delete";
break;
case 91 :
_local3 = "Win";
break;
case 93 :
_local3 = "Contextual";
break;
case 96 :
_local3 = "num pad 0";
break;
case 97 :
_local3 = "num pad 1";
break;
case 98 :
_local3 = "num pad 2";
break;
case 99 :
_local3 = "num pad 3";
break;
case 100 :
_local3 = "num pad 4";
break;
case 101 :
_local3 = "num pad 5";
break;
case 102 :
_local3 = "num pad 6";
break;
case 103 :
_local3 = "num pad 7";
break;
case 104 :
_local3 = "num pad 8";
break;
case 105 :
_local3 = "num pad 9";
break;
case 106 :
_local3 = "num pad *";
break;
case 107 :
_local3 = "num pad +";
break;
case 109 :
_local3 = "num pad -";
break;
case 110 :
_local3 = "num pad .";
break;
case 111 :
_local3 = "num pad /";
break;
case 112 :
_local3 = "F1";
break;
case 113 :
_local3 = "";
break;
case 114 :
_local3 = "";
break;
case 115 :
_local3 = "F4";
break;
case 116 :
_local3 = "F5";
break;
case 117 :
_local3 = "F6";
break;
case 118 :
_local3 = "F7";
break;
case 119 :
_local3 = "F8";
break;
case 120 :
_local3 = "F9";
break;
case 121 :
_local3 = "F10";
break;
case 122 :
_local3 = "F11";
break;
case 123 :
_local3 = "F12";
break;
case 124 :
_local3 = "F13";
break;
case 125 :
_local3 = "F14";
break;
case 126 :
_local3 = "F15";
break;
case 144 :
_local3 = "Num Lock";
break;
case 145 :
_local3 = "Scroll Lock";
break;
case 186 :
_local3 = ";";
break;
case 187 :
_local3 = "=";
break;
case 188 :
_local3 = "<";
break;
case 189 :
_local3 = "-";
break;
case 190 :
_local3 = ">";
break;
case 191 :
_local3 = "/";
break;
case 192 :
_local3 = "Tilde";
break;
case 219 :
_local3 = "[";
break;
case 220 :
_local3 = "\\";
break;
case 221 :
_local3 = "]";
break;
case 222 :
_local3 = "Quote";
break;
default :
_local3 = String.fromCharCode(_local2);
}
return(_local3);
};
RAM_F.getKeyName = getKeyName;
_global.ROM = {};
makeLoopManager = function (parent_mc, instanceName, depth) {
var _this = parent_mc.createEmptyMovieClip(instanceName, depth);
_this.loopSets = new Object();
_this.loop_array = new Array();
_this.loop = function () {
for (var _local4 in _this.loopSets) {
var _local2 = _this.loopSets[_local4];
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = String(_local2[_local1]).length;
if (_local3 == 0) {
_local2.splice(_local1, 1);
_local1--;
} else {
_local2[_local1].hasLooped = false;
}
_local1++;
}
}
for (var _local4 in _this.loopSets) {
var _local2 = _this.loopSets[_local4];
var _local1 = 0;
while (_local1 < _local2.length) {
if ((!_local2[_local1].isPaused) && (!_local2[_local1].hasLooped)) {
_local2[_local1].loop();
_local2[_local1].hasLooped = true;
}
_local1++;
}
}
};
_this.onEnterFrame = function () {
_this.loop();
};
_this.addObject = function (newObject, setName) {
if (_this.loopSets[setName] == undefined) {
_this.loopSets[setName] = new Array();
}
var _local2 = _this.loopSets[setName];
var _local3 = false;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == newObject) {
_local3 = true;
}
_local1++;
}
if (!_local3) {
_local2.push(newObject);
newObject.isPaused = false;
}
};
_this.removeObject = function (findObject, setName) {
var _local2 = _this.loopSets[setName];
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == findObject) {
_local2.splice(_local1, 1);
}
_local1++;
}
};
_this.removeSet = function (setName) {
delete _this.loopSets[setName];
};
_this.pauseSet = function (setName, pauseValue) {
var _local1 = _this.loopSets[setName];
for (var _local2 in _local1) {
_local1[_local2].isPaused = pauseValue;
}
};
_this.pauseObject = function (myObject, pauseValue) {
myObject.isPaused = pauseValue;
};
return(_this);
};
if (!_global.LOOP) {
_global.LOOP = makeLoopManager(_this, "loop_mc", 11);
}
_global.HUD.removeMovieClip();
_global.HUD = _this.attachMovie("hud", "HUD", 8);
HUD.removeAll = function () {
for (var _local1 in HUD) {
HUD[_local1].removeMovieClip();
}
};
HUD.clear = HUD.removeAll;
LOOP.addObject(HUD, "fieldMenu");
LOOP.pauseSet("fieldMenu", true);
_global.TRANSITION = _this.attachMovie("transition", "transition", 9);
makeStreamingMusic = function (target_mc, newName, newDepth) {
target_mc = ((target_mc != undefined) ? (target_mc) : this);
newName = ((newName != undefined) ? (newName) : "musicSystem_mc");
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = (newDepth ? (newDepth) : (nextDepth(target_mc)));
var _this = target_mc.createEmptyMovieClip(newName, newDepth);
_this.music = new Sound();
_this._volume = 1;
_this._songVolume = 1;
_this.isPlaying = false;
_this.songName = "";
_this.onID3 = function () {
};
_this.onLoad = function () {
};
_this.onSoundComplete = function () {
};
_this.onFadeComplete = function () {
};
_this.playSong = function (songName, skipIntro) {
if (_this.songName != songName) {
_this.fade.fforward();
_this.fade.onMotionFinished();
delete _this.fade;
_this.music.onSoundComplete = function () {
var _local1 = _this.songName;
_this.songName = "";
setTimeout(_this.playLoop, 1, _local1);
_this.broadcastMessage("onSoundComplete");
_this.onSoundComplete();
};
_this.music.onLoad = function (success) {
if (!success) {
_this.music.onSoundComplete();
}
if (success) {
_this.broadcastMessage("onLoad");
}
_this.onLoad(success);
};
_this.music.stop();
_this.songName = songName;
_this.isPlaying = false;
if (_this._songVolume == 0) {
_this.songVolume = 100;
}
if (skipIntro) {
_this.playLoop(songName);
} else {
var _local2 = songName.lastIndexOf(".");
var _local3 = (songName.substr(0, _local2) + "_intro") + ".mp3";
_this.music.loadSound(_local3, true);
}
}
if (_this.isPlaying == false) {
_this.music.start();
_this.applyVolume();
_this.isPlaying = true;
}
};
_this.play = _this.playSong;
_this.playLoop = function (songName) {
if (_this.songName != songName) {
_this.music.onSoundComplete = function () {
_this.music.start();
_this.broadcastMessage("onSoundComplete");
_this.onSoundComplete();
};
_this.music.onLoad = function () {
};
_this.music.loadSound(songName, true);
_this.songName = songName;
_this.isPlaying = false;
if (success) {
_this.broadcastMessage("onLoad");
}
_this.onLoad(success);
}
if (_this.isPlaying == false) {
_this.music.start();
_this.applyVolume();
_this.isPlaying = true;
}
};
_this.stopMusic = function () {
_this.fade.stop();
delete _this.fade;
delete _this.fadeVol;
_this.music.stop();
_this.isPlaying = false;
_this.songName = "";
_this.broadcastMessage("onStop");
};
_this.stop = _this.stopMusic;
_this.getVolume = function () {
return(_this._volume * 100);
};
_this.setVolume = function (newVolume) {
_this._volume = newVolume / 100;
_this.applyVolume();
};
_this.addProperty("volume", _this.getVolume, _this.setVolume);
_this.getSongVolume = function () {
return(_this._songVolume * 100);
};
_this.setSongVolume = function (newVolume) {
_this._songVolume = newVolume / 100;
_this.applyVolume();
};
_this.addProperty("songVolume", _this.getSongVolume, _this.setSongVolume);
_this.fadeTo = function (endVolume, seconds) {
var _local2 = _this._songVolume * 100;
delete _this.fade;
_this.fadeVol = _local2;
_this.fade = new mx.transitions.Tween(_this, "fadeVol", null, _local2, endVolume, seconds, true);
_this.fade.onMotionChanged = function () {
_this.setSongVolume(this.position);
};
_this.fade.onMotionFinished = function () {
_this.fade.stop();
delete _this.fade;
delete _this.fadeVol;
if (_this._songVolume == 0) {
_this.stopMusic();
}
_this.broadcastMessage("onFadeComplete");
_this.onFadeComplete();
};
if (!_this.isPlaying) {
_this.fade.onMotionFinished();
}
};
_this.applyVolume = function () {
_this.music.setVolume((100 * _this._volume) * _this._songVolume);
};
_this.passSoundEvents = function () {
_this.music.onID3 = function () {
_this.broadcastMessage("onID3");
_this.onID3();
};
};
AsBroadcaster.initialize(_this);
_this.passSoundEvents();
return(_this);
};
_global.MUSIC = makeStreamingMusic(_this, "music_mc", 12);
makeStreamingSoundSystem = function (target_mc, name, depth) {
target_mc = ((target_mc != undefined) ? (target_mc) : this);
name = ((target_mc != undefined) ? (name) : "soundSystem_mc");
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
depth = ((depth != undefined) ? (depth) : (nextDepth(target_mc)));
var _this = target_mc.createEmptyMovieClip(name, depth);
_this.sound_array = new Array();
_this.soundVolume = 100;
_this.play = function (soundName, volume, loop) {
if (soundName.length > 0) {
volume = ((volume != undefined) ? (volume) : 100);
loop = ((loop != undefined) ? (loop) : false);
var _local6 = "transformClip_" + Math.floor(Math.random() * 999);
var _local4 = _this.createEmptyMovieClip(_local6, nextDepth(_this));
var new_sound = new Sound(_local4);
AsBroadcaster.initialize(new_sound);
_this.sound_array.push(new_sound);
new_sound.transformClip = _local4;
new_sound.loadSound(soundName, true);
new_sound.volume = volume;
new_sound.setVolume(new_sound.volume * (_this.soundVolume / 100));
new_sound.remove = function () {
var _local2 = 0;
while (_local2 < _this.sound_array.length) {
if (this == _this.sound_array[_local2]) {
_this.sound_array[_local2].stop();
_this.sound_array[_local2].onSoundDone();
_this.sound_array[_local2].broadcastMessage("onSoundComplete");
for (var _local3 in _this.sound_array[_local2]._listeners) {
_this.sound_array[_local2].removeListener(_this.sound_array[_local2]._listeners[_local3]);
}
_this.sound_array[_local2].transformClip.removeMovieClip();
_this.sound_array.splice(_local2, 1);
break;
}
_local2++;
}
};
if (loop) {
new_sound.onSoundComplete = function () {
new_sound.start();
};
} else {
new_sound.onSoundComplete = function () {
new_sound.remove();
};
}
new_sound.timeout = function (this_sound) {
if (this_sound.duration == 0) {
this_sound.onSoundDone();
this_sound.remove();
}
};
setTimeout(new_sound.timeout, 100, new_sound);
return(new_sound);
}
};
_this.stopAll = function () {
for (var _local1 in _this.sound_array) {
_this.sound_array[_local1].stop();
_this.sound_array.pop();
}
};
_this.setVolume = function (newVolume) {
_this.soundVolume = newVolume;
var _local1 = 0;
while (_local1 < _this.sound_array.length) {
_this.sound_array[_local1].setVolume(_this.sound_array[_local1].volume * (_this.soundVolume / 100));
_local1++;
}
};
_this.getVolume = function () {
return(_this.soundVolume);
};
_this.addProperty("volume", _this.getVolume, _this.setVolume);
return(_this);
};
_global.SOUND = makeStreamingSoundSystem(_this, "sound_mc", 13);
soundLoop = {};
soundLoop.addSound = function (loopName, soundObj, looping) {
if ((loopName != "addSound") && (loopName != "remove")) {
looping = looping || false;
soundLoop.remove(loopName);
this[loopName] = {sound:soundObj, loop:looping};
}
var _local3 = {onSoundComplete:function () {
ROOT.soundLoop[loopName] = null;
delete ROOT.soundLoop[loopName];
}};
soundObj.addListener(_local3);
};
soundLoop.remove = function (loopName) {
if ((loopName != "addSound") && (loopName != "remove")) {
this[loopName].sound.remove();
this[loopName] = null;
delete this[loopName];
}
};
if (!levelFromEditor) {
levelData = {};
}
common_xml = new XML();
loadCommonLevel = function (filePath) {
callUnload(common);
common.removeMovieClip();
common_xml.filePath = filePath;
var _local2 = function (internal_xml) {
ROOT.internalCommon.removeMovieClip();
ROOT.internalCommon._name = null;
var _local1 = {};
readXml(internal_xml.firstChild, _local1);
ROOT.common = ROOT.attachMovie("commonLevel", "common", 901, {levelData:_local1.level, _visible:false});
};
ROOT.internalCommon.removeMovieClip();
ROOT.internalCommon._name = null;
ROOT.attachMovie(filePath, "internalCommon", 3, {onLoad:_local2});
if (!ROOT.internalCommon) {
common_xml.onLoad = function (success) {
if (success) {
var _local1 = findXmlTag("data", common_xml);
var _local2 = findXmlTag("level", _local1);
readXml(_local2, levelData);
_this.attachMovie("commonLevel", "common", 901, {levelData:levelData, _visible:false});
}
};
common_xml.load(filePath);
}
};
resetRam = function () {
_global.RAM = {};
ROOT.copyObject(ROM.ram, _global.RAM);
if (!RAM.swfLoader) {
RAM.swfLoader = {tempSwf:[], permSwf:[]};
}
RAM.playerSprite = {};
copyObject(ROM.playerSprite, RAM.playerSprite);
};
getDatabaseXml = function (internal_xml) {
ROOT.readXml(internal_xml.firstChild, ROM);
ROOT.completeRom();
ROOT.resetRam();
ROOT.completeRam();
if (ROM.commonLevel.indexOf(".lvl") > -1) {
ROOT.loadCommonLevel(ROM.commonLevel);
}
ROOT.startGame();
};
useAuxillaryRom = function () {
ROOT.completeRom();
ROOT.copyObject(ROM.ram, _global.RAM);
ROOT.completeRam();
RAM.playerSprite = {};
ROOT.copyObject(ROM.playerSprite, RAM.playerSprite);
if (ROM.commonLevel.indexOf(".lvl") > -1) {
ROOT.loadCommonLevel(ROM.commonLevel);
}
ROOT.startGame();
};
ROOT.internalDatabase.removeMovieClip();
ROOT.internalDatabase._name = null;
ROOT.attachMovie("database.xml", "internalDatabase", 5, {onLoad:getDatabaseXml});
if (internalDatabase == undefined) {
database_xml = new XML();
database_xml.onLoad = function (success) {
if (success) {
delete database_xml.onLoad;
getDatabaseXml(database_xml);
} else {
useAuxillaryRom();
}
};
database_xml.load("database.xml");
}
startGame = function () {
if (levelFromEditor) {
_global.LEVEL = (ROOT.game_mc = _this.attachMovie("game_mc", "game_mc", 0, {start_point:start_point, levelData:levelData}));
} else {
_this.attachMovie("intro_mc", "intro_mc", 0);
}
};
callUnload = function (parent) {
for (var nam in parent) {
var thisChild = parent[nam];
if (thisChild instanceof MovieClip) {
reportedPath = String(eval (thisChild._target));
actualPath = (String(eval (parent._target)) + ".") + nam;
if (reportedPath.indexOf(actualPath) != -1) {
callUnload(thisChild);
}
}
}
parent.onKillFocus(null);
parent.dispatchEvent({type:"unload"});
parent.broadcastMessage("unload");
parent.unload();
parent.onUnload();
parent.removeEventListener("keyDown", parent);
parent.removeEventListener("keyUp", parent);
Key.removeListener(parent);
Mouse.removeListener(parent);
};
level_xml = new XML();
loadLevel = function (filePath, start_point) {
var vow = VOW.make();
RAM.swfLoader.tempSwf = [];
callUnload(game_mc);
game_mc.removeMovieClip();
level_xml.filePath = filePath;
level_xml.start_point = start_point;
var _local3 = function (internal_xml) {
ROOT.internalLevel.removeMovieClip();
ROOT.internalLevel._name = null;
var _local2 = {};
readXml(internal_xml.firstChild, _local2);
_global.LEVEL = (ROOT.game_mc = ROOT.attachMovie("game_mc", "game_mc", 0, {start_point:level_xml.start_point, levelData:_local2.level}));
vow.keep();
};
ROOT.internalLevel.removeMovieClip();
ROOT.internalLevel._name = null;
ROOT.attachMovie(filePath, "internalLevel", 6, {onLoad:_local3});
if (!ROOT.internalLevel) {
level_xml.onLoad = function (success) {
if (success) {
var _local2 = findXmlTag("data", level_xml);
var _local3 = findXmlTag("level", _local2);
readXml(_local3, levelData);
_global.LEVEL = (ROOT.game_mc = _this.attachMovie("game_mc", "game_mc", 0, {start_point:level_xml.start_point, levelData:levelData}));
vow.keep();
} else {
trace("ERROR Failed to load level: " + filePath);
vow.doBreak();
}
};
level_xml.load(filePath);
}
return(vow.promise);
};
RAM.swfLoader = {tempSwf:[], permSwf:[]};
ROOT.swfLoader = {tempContainers:["MAP", "PANORAMA", "UNDERLAY", "OVERLAY", "SPRITES", "this"], getStorage:function (target) {
var _local3 = RAM.swfLoader.permSwf;
for (var _local5 in this.tempContainers) {
var _local2 = this.tempContainers[_local5];
if (target.indexOf(_local2) > -1) {
_local3 = RAM.swfLoader.tempSwf;
break;
}
}
return(_local3);
}, findCommand:function (array, command) {
for (var _local4 in array) {
var _local1 = array[_local4];
if ((_local1.target == command.target) && (_local1.name == command.name)) {
return(_local4);
}
}
}, add:function (swfData) {
var _local2 = this.getStorage(swfData.target);
var _local3 = this.findCommand(_local2, swfData);
if (_local3 == undefined) {
_local2.push(swfData);
} else {
_local2[_local3] = swfData;
}
}, remove:function (swfData) {
var _local3 = this.getStorage(swfData.target);
var _local2 = this.findCommand(_local3, swfData);
if (_local2 != undefined) {
_local3.splice(_local2, 1);
}
}};
globals = {};
saveGlobals = function () {
for (var _local2 in _global) {
globals[_local2] = _global[_local2];
}
};
clearGlobals = function () {
for (var _local2 in _global) {
if ((((((((_local2 != "getStyleCounter") && (_local2 != "origHeight")) && (_local2 != "origWidth")) && (_local2 != "skinRegistry")) && (_local2 != "styles")) && (_local2 != "cascadingStyles")) && (_local2 != "style")) && (_local2 != "mx")) {
delete _global[_local2];
}
}
};
restoreGlobals = function () {
for (var _local2 in globals) {
_global[_local2] = globals[_local2];
}
};
gameOver = function () {
HUD.ask.close();
callUnload(game_mc);
game_mc.removeMovieClip();
resetRam();
completeRam();
var _local1 = function (_this) {
LOOP.pauseSet("fieldMenu", true);
_this.attachMovie("intro_mc", "intro_mc", 0);
};
setTimeout(_local1, 34, _this);
};
_global.style.setStyle("themeColor", "haloBlue");
_global.style.setStyle("embedFonts", true);
_global.style.setStyle("fontSize", 10);
_global.style.setStyle("fontFamily", "_Pokemon GB");
_global.style.setStyle("color", 6316128);
textShadow = [new flash.filters.DropShadowFilter(1, 45, 0, 0.25, 1, 1)];
forceEmbedded = function (textField_txt, fmtProps) {
textField_txt.embedFonts = true;
textField_txt.filters = textShadow;
var _local2 = textField_txt.getTextFormat();
_local2.font = "Pokemon GB_10pt_st";
for (var _local3 in fmtProps) {
_local2[_local3] = fmtProps[_local3];
}
textField_txt.setTextFormat(_local2);
textField_txt.setNewTextFormat(_local2);
};
updateText = function (textParent, textField_txt, textPropName, fmtProps) {
textPropName = textPropName || "text";
textParent["set_" + textPropName] = function (newValue) {
newValue = newValue.split("_").join(" ");
textField_txt.text = ((newValue != undefined) ? (newValue) : "");
forceEmbedded(textField_txt, fmtProps);
};
textParent["get_" + textPropName] = function () {
return(textField_txt.text);
};
var _local3 = textParent[textPropName];
textParent.addProperty(textPropName, textParent["get_" + textPropName], textParent["set_" + textPropName]);
textParent[textPropName] = _local3;
};
onUnload = function () {
mdm.Exception.DebugWindow.trace("game unload()");
_this.broadcastMessage("onUnloadGame");
for (var _local3 in _this._listeners) {
_this.removeListener(_this._listeners[_local3]);
}
_this.addListener = null;
delete _this.addListener;
_this.game_mc.removeMovieClip();
var _local2 = function (varName) {
_global[varName] = null;
delete _global[varname];
};
_local2("ROOT");
_local2("RAM");
_local2("RAM_F");
_local2("ROM");
_local2("MAP");
_local2("COMMON");
_local2("SPRITES");
_local2("PANORAMA");
_local2("UNDERLAY");
_local2("OVERLAY");
_local2("HUD");
_local2("TRANSITION");
_local2("LOOP");
MUSIC.stopMusic();
SOUND.stopAll();
_local2("MUSIC");
_local2("SOUND");
_local2("TRACE_SCRIPT");
_local2("DATA");
_local2("MOOD_MC");
_global.style.setStyle("themeColor", "halo");
_global.style.setStyle("embedFonts", false);
_global.style.setStyle("fontSize", 12);
_global.style.setStyle("fontFamily", "_sans");
_global.style.setStyle("color", 0);
};
Symbol 4 MovieClip [KeySetter] Frame 1
#initclip 85
Object.registerClass("KeySetter", KeySetter);
#endinitclip
Symbol 20 MovieClip [DataProvider] Frame 1
#initclip 56
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 21 MovieClip [DataSelector] Frame 1
#initclip 57
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 22 MovieClip [Defaults] Frame 1
#initclip 58
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 23 MovieClip [UIObjectExtensions] Frame 1
#initclip 59
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 24 MovieClip [UIObject] Frame 1
#initclip 60
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 27 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 28 MovieClip Frame 1
#initclip 61
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 29 MovieClip [FocusRect] Frame 1
#initclip 62
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 30 MovieClip [FocusManager] Frame 1
#initclip 63
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 31 MovieClip [UIComponentExtensions] Frame 1
#initclip 64
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 32 MovieClip [UIComponent] Frame 1
#initclip 65
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 33 MovieClip [SelectableRow] Frame 1
#initclip 66
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 35 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 37 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 40 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 42 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 45 MovieClip [SimpleButton] Frame 1
#initclip 67
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 46 MovieClip [Border] Frame 1
#initclip 68
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 47 MovieClip [RectBorder] Frame 1
#initclip 69
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 48 MovieClip [ButtonSkin] Frame 1
#initclip 70
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 49 MovieClip [Button] Frame 1
#initclip 71
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 45 MovieClip [SimpleButton] in Symbol 49 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 50 MovieClip [CustomBorder] Frame 1
#initclip 72
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 62 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 64 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 75 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 77 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 84 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 105 MovieClip [BtnDownArrow] Frame 1
#initclip 73
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 106 MovieClip [BtnUpArrow] Frame 1
#initclip 74
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 108 MovieClip [HScrollBar] Frame 1
#initclip 75
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 49 MovieClip [Button] in Symbol 108 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 45 MovieClip [SimpleButton] in Symbol 108 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 109 MovieClip [VScrollBar] Frame 1
#initclip 76
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 49 MovieClip [Button] in Symbol 109 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 45 MovieClip [SimpleButton] in Symbol 109 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 110 MovieClip [View] Frame 1
#initclip 77
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 111 MovieClip [ScrollView] Frame 1
#initclip 78
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 108 MovieClip [HScrollBar] in Symbol 111 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 109 MovieClip [VScrollBar] in Symbol 111 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 112 MovieClip [ScrollSelectList] Frame 1
#initclip 79
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 113 MovieClip [List] Frame 1
#initclip 80
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 143 MovieClip [key_setup2] Frame 1
function onUnload() {
list_mc.removeEventListener("changeKey", this);
list_mc.removeEventListener("onEsc", this);
}
stop();
list_mc.cellRenderer = "KeySetter";
init_keys = RAM.keys;
get_keys = function () {
return(_keys);
};
set_keys = function (newValue) {
_keys = newValue;
list_mc.removeAll();
if (_keys != undefined) {
key_ary = [];
for (var _local3 in _keys) {
key_ary.push({keyName:_local3, keyCode:_keys[_local3]});
}
list_mc.dataProvider = key_ary;
list_mc.enabled = true;
list_mc.selectedIndex = 0;
list_mc.setFocus();
} else {
list_mc.enabled = false;
}
};
this.addProperty("keys", get_keys, set_keys);
keys = init_keys;
changeKey = function (evt) {
_keys[evt.keyName] = evt.keyCode;
};
list_mc.addEventListener("changeKey", this);
onEsc = function () {
close();
};
list_mc.addEventListener("onEsc", this);
Instance of Symbol 113 MovieClip [List] "list_mc" in Symbol 143 MovieClip [key_setup2] Frame 1
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 147 MovieClip [commonLevel] Frame 1
_this = this;
_global.COMMON = (sprites = _this.createEmptyMovieClip("sprites", 1));
uid = Math.random();
_this.sprites.is_common = true;
_this.sprites.spritesRemaining = [];
var s = 0;
while (s < levelData.sprites.length) {
_this.sprites.spritesRemaining.push(levelData.sprites[s]);
s++;
}
_this.sprites.spritesRemaining.remove = function (thisName) {
var _local1 = _this.sprites.spritesRemaining.length - 1;
while (_local1 >= 0) {
if (_this.sprites.spritesRemaining[_local1].name == thisName) {
_this.sprites.spritesRemaining.splice(_local1, 1);
break;
}
_local1--;
}
};
updateFlaggedSprites = function (sprites, flagRoot, addSprite, removeSprite) {
var getFlagParts = function (flag) {
var _local2 = [];
var _local4 = flag.charAt(0);
while (_local4 == " ") {
flag = flag.substr(1);
_local4 = flag.charAt(0);
}
var _local3 = flag.charAt(flag.length - 1);
while (_local3 == " ") {
flag = flag.substr(0, flag.length - 1);
_local3 = flag.charAt(flag.length - 1);
}
if (flag.charAt(0) == "!") {
flag = flag.substr(1) + "!";
var _local5 = flag.indexOf("!");
var _local6 = _local5 + 1;
} else if (flag.indexOf("!=") != -1) {
var _local5 = flag.indexOf("!=");
var _local6 = _local5 + 2;
} else if (flag.indexOf("<=") != -1) {
var _local5 = flag.indexOf("<=");
var _local6 = _local5 + 2;
} else if (flag.indexOf(">=") != -1) {
var _local5 = flag.indexOf(">=");
var _local6 = _local5 + 2;
} else if (flag.indexOf("<") != -1) {
var _local5 = flag.indexOf("<");
var _local6 = _local5 + 1;
} else if (flag.indexOf(">") != -1) {
var _local5 = flag.indexOf(">");
var _local6 = _local5 + 1;
} else if (flag.indexOf("=") != -1) {
var _local5 = flag.indexOf("=");
var _local6 = _local5 + 1;
} else {
var _local5 = flag.length;
flag = flag + "!=undefined";
var _local6 = _local5 + 2;
}
_local2.push(flag.substr(0, _local5));
_local2.push(flag.substring(_local5, _local6));
_local2.push(flag.substr(_local6));
_local3 = _local2[0].charAt(_local2[0].length - 1);
while (_local3 == " ") {
_local2[0] = _local2[0].substr(0, _local2[0].length - 1);
_local3 = _local2[0].charAt(_local2[0].length - 1);
}
_local4 = _local2[2].charAt(0);
while (_local4 == " ") {
_local2[2] = _local2[2].substr(1);
_local4 = _local2[2].charAt(0);
}
return(_local2);
};
var checkFlag = function (spriteFlag, flagRoot) {
var output = true;
var flagParts_array = getFlagParts(spriteFlag);
var variable = flagParts_array[0];
var operation = flagParts_array[1];
var value = flagParts_array[2];
if (isNaN(value) == false) {
value = Number(value);
}
if (value == "true") {
value = true;
}
if (value == "false") {
value = false;
}
if (value == "undefined") {
value = undefined;
}
var endAt = variable.lastIndexOf(".");
if (endAt != -1) {
var flagPath = variable.substr(0, endAt);
var flagName = variable.substr(endAt + 1);
var flagPath = ("flagRoot." + flagPath);
} else {
var flagName = variable;
var flagPath = "flagRoot";
}
var displayValue = eval ((flagPath + ".") + flagName);
switch (operation) {
case "!" :
output = (displayValue == undefined) || (displayValue == false);
break;
case "=" :
output = displayValue == value;
break;
case "!=" :
if ((!Boolean(displayValue)) && (!Boolean(value))) {
displayValue = false;
value = false;
}
output = displayValue != value;
break;
case "<" :
output = displayValue < value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) == "string") {
output = false;
}
break;
case ">" :
output = displayValue > value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) == "string") {
output = false;
}
break;
case "<=" :
output = displayValue <= value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) == "string") {
output = false;
}
break;
case ">=" :
output = displayValue >= value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) != "string") {
break;
}
output = false;
}
return(output);
};
var s = 0;
while (s < sprites.length) {
var thisSprite = sprites[s];
var testResult = true;
var sf = 0;
while (sf < thisSprite.flags.length) {
var thisSpriteFlag = thisSprite.flags[sf];
testResult = checkFlag(thisSpriteFlag, flagRoot);
if (testResult == false) {
break;
}
sf++;
}
if (testResult == true) {
addSprite(thisSprite);
} else if (testResult == false) {
removeSprite(thisSprite);
}
s++;
}
};
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
_this.sprites.updateSprites = function () {
var _local7 = function (thisSprite) {
var _local3 = _this.sprites[thisSprite.name];
if (_local3 == undefined) {
var _local10 = thisSprite.type;
var _local5 = thisSprite.name;
var _local6 = nextDepth(_this.sprites);
var _local9 = thisSprite.position.x;
var _local8 = thisSprite.position.y;
var _local7 = thisSprite.data;
var _local4 = _this.sprites.attachMovie(_local10, _local5, _local6, {_x:_local9, _y:_local8, data:_local7});
_local4.remove = function () {
LOOP.removeObject(this, "sprites");
_this.sprites.spritesRemaining.remove(this._name);
this.removeMovieClip();
};
}
};
var _local10 = function (thisSprite) {
var _local1 = _this.sprites[thisSprite.name];
if (_local1) {
LOOP.removeObject(_local1, "sprites");
_local1.removeMovieClip();
}
};
updateFlaggedSprites(_this.sprites.spritesRemaining, RAM, _local7, _local10);
};
_this.sprites.updateSprites();
onUnload = function () {
_global.COMMON = null;
delete _global.COMMON;
};
Symbol 151 MovieClip [snowFall] Frame 1
var rnd = (Math.floor(Math.random() * _totalframes) + 1);
gotoAndPlay(rnd);
Symbol 151 MovieClip [snowFall] Frame 121
this.gotoAndPlay(2);
Symbol 154 MovieClip [transition_blackMap] Frame 1
function doFadeOut() {
var vow = VOW.make();
_this.fadeOutDone = function () {
delete _this.fadeOutDone;
delete _this.remove;
vow.keep();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeOut");
return(vow.promise);
}
function doFadeIn() {
var vow = VOW.make();
_this.fadeInDone = function () {
delete _this.fadeInDone;
_this.remove();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeIn");
return(vow.promise);
}
stop();
stop();
_this = this;
stop();
_this = this;
target_mc = ROOT.game_mc;
mask_vow = VOW.make();
mask_loaded = mask_vow.promise;
if (!setupMask) {
setupMask = true;
snapshot_mc = _this.createEmptyMovieClip("snapshot_mc", 0);
snapshot_mc._visible = false;
snapshot_pic = new flash.display.BitmapData(320, 240, false, 0);
snapshot_mc.attachBitmap(snapshot_pic, 0);
snapshot_mc.cacheAsBitmap = true;
mask_mc = _this.createEmptyMovieClip("mask_mc", 1);
mask_pic = new flash.display.BitmapData(320, 240, true, 4294967295);
mask_mc.attachBitmap(mask_pic, 0);
mask_mc.cacheAsBitmap = true;
snapshot_mc.setMask(mask_mc);
source_pic = new flash.display.BitmapData(320, 240, false, 0);
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
fileName = TRANSITION.map;
if (!fileName) {
mask_vow.doBreak();
}
loader = loadImage(fileName, _this, "load_mc", 2);
success = function () {
source_pic.draw(_this.load_mc);
_this.load_mc._visible = false;
mask_vow.keep();
};
loader.onLoadInit = success;
if (!loader) {
success();
}
loader.onLoadError = function () {
mask_vow.doBreak();
};
settings = {op:">", thresh:16777215, passColor:0, mask:16777215, copySrc:false};
}
copy = new flash.geom.Rectangle(0, 0, 320, 240);
paste = new flash.geom.Point(0, 0);
updateMask = function () {
var _local2 = settings.op;
var _local5 = settings.thresh;
var _local6 = settings.passColor;
var _local3 = settings.mask;
var _local4 = settings.copySrc;
_this.mask_pic.fillRect(copy, 0);
var _local1 = new flash.display.BitmapData(320, 240, false, 16711680);
_local1.threshold(_this.source_pic, copy, paste, _local2, _local5, _local6, _local3, _local4);
_this.mask_pic.copyChannel(_local1, copy, paste, 1, 8);
};
Symbol 154 MovieClip [transition_blackMap] Frame 2
black_mc._visible = true;
Symbol 154 MovieClip [transition_blackMap] Frame 16
stop();
_this.fadeOutDone();
Symbol 154 MovieClip [transition_blackMap] Frame 17
function startReveal() {
_this.reveal_vow = VOW.make();
settings.thresh = 16777215 /* 0xFFFFFF */;
frames = 15;
dec = Math.round(settings.thresh / frames);
_this.onEnterFrame = revealLoop;
_this.onEnterFrame();
black_mc._visible = false;
return(_this.reveal_vow.promise);
}
function revealLoop() {
if (settings.thresh > 0) {
settings.thresh = settings.thresh - dec;
if (settings.thresh <= 0) {
settings.thresh = 0;
mask_pic.fillRect(copy, 0);
} else {
updateMask();
}
} else {
_this.onEnterFrame = null;
_this.reveal_vow.keep();
}
}
stop();
_this = this;
snapshot_mc._visible = true;
mask_loaded.then(startReveal, _this.fadeInDone).then(_this.fadeInDone, _this.fadeInDone);
Symbol 155 MovieClip [transition_greyMap] Frame 1
function doFadeOut() {
var vow = VOW.make();
_this.fadeOutDone = function () {
delete _this.fadeOutDone;
delete _this.remove;
vow.keep();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeOut");
return(vow.promise);
}
function doFadeIn() {
var vow = VOW.make();
_this.fadeInDone = function () {
delete _this.fadeInDone;
_this.remove();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeIn");
return(vow.promise);
}
stop();
stop();
_this = this;
stop();
_this = this;
target_mc = ROOT.game_mc;
mask_vow = VOW.make();
mask_loaded = mask_vow.promise;
if (!setupMask) {
setupMask = true;
snapshot_mc = _this.createEmptyMovieClip("snapshot_mc", 0);
snapshot_pic = new flash.display.BitmapData(320, 240, false, 0);
snapshot_pic.draw(target_mc);
snapshot_mc.attachBitmap(snapshot_pic, 0);
snapshot_mc.cacheAsBitmap = true;
mask_mc = _this.createEmptyMovieClip("mask_mc", 1);
mask_pic = new flash.display.BitmapData(320, 240, true, 4294967295);
mask_mc.attachBitmap(mask_pic, 0);
mask_mc.cacheAsBitmap = true;
snapshot_mc.setMask(mask_mc);
source_pic = new flash.display.BitmapData(320, 240, false, 0);
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
fileName = TRANSITION.map;
if (!fileName) {
mask_vow.doBreak();
}
loader = loadImage(fileName, _this, "load_mc", 2);
success = function () {
source_pic.draw(_this.load_mc);
_this.load_mc._visible = false;
mask_vow.keep();
};
loader.onLoadInit = success;
if (!loader) {
success();
}
loader.onLoadError = function () {
mask_vow.doBreak();
};
settings = {op:">", thresh:16777215, passColor:0, mask:16777215, copySrc:false};
}
copy = new flash.geom.Rectangle(0, 0, 320, 240);
paste = new flash.geom.Point(0, 0);
updateMask = function () {
var _local2 = settings.op;
var _local5 = settings.thresh;
var _local6 = settings.passColor;
var _local3 = settings.mask;
var _local4 = settings.copySrc;
_this.mask_pic.fillRect(copy, 0);
var _local1 = new flash.display.BitmapData(320, 240, false, 16711680);
_local1.threshold(_this.source_pic, copy, paste, _local2, _local5, _local6, _local3, _local4);
_this.mask_pic.copyChannel(_local1, copy, paste, 1, 8);
};
Symbol 155 MovieClip [transition_greyMap] Frame 2
stop();
_this = this;
_this.fadeOutDone();
Symbol 155 MovieClip [transition_greyMap] Frame 9
function startReveal() {
_this.reveal_vow = VOW.make();
settings.thresh = 16777215 /* 0xFFFFFF */;
frames = 15;
dec = Math.round(settings.thresh / frames);
_this.onEnterFrame = revealLoop;
_this.onEnterFrame();
return(_this.reveal_vow.promise);
}
function revealLoop() {
if (settings.thresh > 0) {
settings.thresh = settings.thresh - dec;
if (settings.thresh <= 0) {
settings.thresh = 0;
mask_pic.fillRect(copy, 0);
} else {
updateMask();
}
} else {
_this.onEnterFrame = null;
_this.reveal_vow.keep();
}
}
stop();
_this = this;
snapshot_mc._visible = true;
mask_loaded.then(startReveal, _this.fadeInDone).then(_this.fadeInDone, _this.fadeInDone);
Symbol 155 MovieClip [transition_greyMap] Frame 15
stop();
_this = this;
maskLoaded = false;
target_mc = ROOT.game_mc;
done = function () {
_parent.fadeOutDone();
_this.removeMovieClip();
};
if (!setup) {
snapshot_mc = _this.createEmptyMovieClip("snapshot_mc", 0);
snapshot_pic = new flash.display.BitmapData(320, 240, false, 0);
snapshot_pic.draw(target_mc);
snapshot_mc.attachBitmap(snapshot_pic, 0);
mask_mc = _this.createEmptyMovieClip("mask_mc", 1);
mask_pic = new flash.display.BitmapData(320, 240, true, 4294967295);
mask_mc.attachBitmap(mask_pic, 0);
mask_mc.cacheAsBitmap = true;
snapshot_mc.cacheAsBitmap = true;
snapshot_mc.setMask(mask_mc);
source_pic = new flash.display.BitmapData(320, 240, false, 0);
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
fileName = TRANSITION.map;
if (!fileName) {
done();
}
loader = loadImage(fileName, _this, "load_mc", 2);
success = function () {
source_pic.draw(_this.load_mc);
_this.load_mc._visible = false;
maskLoaded = true;
start();
};
loader.onLoadInit = success;
if (!loader) {
success();
}
loader.onLoadError = function () {
done();
};
settings = {op:">", thresh:16777215, passColor:0, mask:16777215, copySrc:false};
setup = true;
}
copy = new flash.geom.Rectangle(0, 0, 320, 240);
paste = new flash.geom.Point(0, 0);
update = function () {
var _local2 = settings.op;
var _local5 = settings.thresh;
var _local6 = settings.passColor;
var _local3 = settings.mask;
var _local4 = settings.copySrc;
mask_pic.fillRect(copy, 0);
var _local1 = new flash.display.BitmapData(320, 240, false, 16711680);
_local1.threshold(source_pic, copy, paste, _local2, _local5, _local6, _local3, _local4);
mask_pic.copyChannel(_local1, copy, paste, 1, 8);
};
Symbol 157 MovieClip [imageLoader] Frame 1
#initclip 81
Object.registerClass("imageLoader", mx.core.UIComponent);
#endinitclip
_this = this;
stop();
fullWidth = __width;
fullHeight = __height;
fullRatio = fullWidth / fullHeight;
imageScale = 100;
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function () {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit();
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
callUnload = function (parent) {
for (var nam in parent) {
var thisChild = parent[nam];
if (thisChild instanceof MovieClip) {
reportedPath = String(eval (thisChild._target));
actualPath = (String(eval (parent._target)) + ".") + nam;
if (reportedPath.indexOf(actualPath) != -1) {
callUnload(thisChild);
}
}
}
parent.onKillFocus(null);
parent.dispatchEvent({type:"unload"});
parent.broadcastMessage("unload");
parent.unload();
parent.onUnload();
parent.removeEventListener("keyDown", parent);
parent.removeEventListener("keyUp", parent);
Key.removeListener(parent);
Mouse.removeListener(parent);
};
resizeImage = function () {
if (scaleContent) {
var _local2 = content._width / content._height;
if (_local2 >= fullRatio) {
var _local1 = (fullWidth * 100) / content._width;
} else {
var _local1 = (fullHeight * 100) / content._height;
}
imageScale = _local1;
content._xscale = (content._yscale = _local1);
}
};
initFile = file;
_file = "";
_this.getFile = function () {
return(_file);
};
_this.setFile = function (newValue, doEvent) {
_file = newValue;
callUnload(_this.content);
loader = loadImage(newValue, _this, "image_mc", 0, false);
success = function () {
_this.content = _this.image_mc;
_this.resizeImage();
_this.image_mc._visible = true;
_this.dispatchEvent({type:"complete"});
_this.complete();
};
loader.onLoadInit = success;
if (!loader) {
success();
}
loader.onLoadError = function () {
_this.content = null;
_this.dispatchEvent({type:"error"});
_this.error();
};
};
_this.addProperty("file", _this.getFile, _this.setFile);
file = initFile;
Symbol 158 MovieClip [loadSwf] Frame 1
_this = this;
if (brightness) {
init_brightness = brightness;
} else if ((this.transform.colorTransform.redMultiplier == this.transform.colorTransform.greenMultiplier) && (this.transform.colorTransform.redMultiplier == this.transform.colorTransform.blueMultiplier)) {
init_brightness = (this.transform.colorTransform.redOffset * 100) / 255;
} else {
init_brightness = 0;
}
get_brightness = function () {
return(this.transform.colorTransform.redOffset);
};
set_brightness = function (newValue) {
var _local3 = _alpha / 100;
var _local2 = (newValue * 255) / 100;
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, _local3, _local2, _local2, _local2, 0);
};
this.addProperty("brightness", get_brightness, set_brightness);
brightness = init_brightness;
delete init_brightness;
delete get_brightness;
delete set_brightness;
init_file = data.file || null;
get_file = function () {
return(image.file);
};
set_file = function (newValue) {
image.file = newValue;
};
this.addProperty("file", get_file, set_file);
file = init_file;
Instance of Symbol 157 MovieClip [imageLoader] "image" in Symbol 158 MovieClip [loadSwf] Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = false;
enabled = true;
visible = true;
}
Symbol 167 MovieClip Frame 1
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
this.onEnterFrame = function () {
var _local3 = 0;
while (_local3 < 2) {
var _local4 = nextDepth(this);
var _local5 = "particle_" + _local4;
var _local2 = this.attachMovie("evolve_particle", _local5, _local4);
_local2._x = particleCenter._x;
_local2._y = particleCenter._y;
_local2._rotation = Math.random() * 360;
_local3++;
}
};
SOUND.play("sound/levelUp1.mp3");
Symbol 167 MovieClip Frame 5
SOUND.play("sound/evolve.mp3");
Symbol 167 MovieClip Frame 22
this.onEnterFrame = function () {
};
Symbol 168 MovieClip [evolve_fx] Frame 41
nextStep();
Symbol 168 MovieClip [evolve_fx] Frame 75
this.removeMovieClip();
Symbol 171 MovieClip [cameraShutter_fx] Frame 11
this.removeMovieClip();
Symbol 174 MovieClip [effectivePlayer_fx] Frame 1
SOUND.play("sound/nervous.mp3");
Symbol 174 MovieClip [effectivePlayer_fx] Frame 28
stop();
this.removeMovieClip();
Symbol 177 MovieClip Frame 5
gotoAndPlay (1);
Symbol 178 MovieClip [evolve_particle] Frame 1
this.onEnterFrame = function () {
_rotation = (_rotation - 4);
};
Symbol 178 MovieClip [evolve_particle] Frame 25
this.removeMovieClip();
Symbol 179 MovieClip [genericAttackEnemy_fx] Frame 1
SOUND.play("sound/normalAttack.mp3");
_this.player.image_mc._visible = false;
Symbol 179 MovieClip [genericAttackEnemy_fx] Frame 3
_this.player.image_mc._visible = true;
Symbol 179 MovieClip [genericAttackEnemy_fx] Frame 5
_this.player.image_mc._visible = false;
Symbol 179 MovieClip [genericAttackEnemy_fx] Frame 7
_this.player.image_mc._visible = true;
Symbol 179 MovieClip [genericAttackEnemy_fx] Frame 8
stop();
nextStep();
this.removeMovieClip();
Symbol 180 MovieClip [genericAttackPlayer_fx] Frame 1
SOUND.play("sound/normalAttack.mp3");
_this.enemy.image_mc._visible = false;
Symbol 180 MovieClip [genericAttackPlayer_fx] Frame 3
_this.enemy.image_mc._visible = true;
Symbol 180 MovieClip [genericAttackPlayer_fx] Frame 5
_this.enemy.image_mc._visible = false;
Symbol 180 MovieClip [genericAttackPlayer_fx] Frame 7
_this.enemy.image_mc._visible = true;
Symbol 180 MovieClip [genericAttackPlayer_fx] Frame 8
stop();
nextStep();
this.removeMovieClip();
Symbol 185 MovieClip [swf\screenFlash.swf] Frame 15
this.removeMovieClip();
Symbol 188 MovieClip Frame 7
gotoAndPlay (1);
Symbol 189 MovieClip [pokeLevel_particle] Frame 12
stop();
Symbol 208 MovieClip [loadInterface1] Frame 1
Symbol 219 MovieClip [loadInterface0] Frame 1
this.onEnterFrame = function () {
glow_mc._x = fill_mc._x + fill_mc._width;
};
Symbol 220 MovieClip Frame 1
var mat = [0.6, 0.11, 0.11, 0, 0, 0.11, 0.7, 0.11, 0, 0, 0.11, 0.11, 0.8, 0, 0, 0, 0, 0, 1, 0];
grayish = new flash.filters.ColorMatrixFilter(mat);
var mat = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
normal = new flash.filters.ColorMatrixFilter(mat);
loopRender = function (effect_rect, paste_p) {
if (MAP.hasOvercastTone) {
delete MAP.hasOvercastTone;
MAP.filters = [normal];
MAP.filters = [];
}
MAP_RENDER.pic.applyFilter(MAP_RENDER.pic, effect_rect, paste_p, grayish);
};
loopNoRender = function () {
if (!MAP.hasOvercastTone) {
MAP.filters = [grayish];
MAP.hasOvercastTone = true;
}
};
onUnload = function () {
delete MAP.hasOvercastTone;
MAP.filters = [normal];
MAP.filters = [];
};
Symbol 223 MovieClip Frame 1
var min = 2;
var range = (_totalframes - min);
var randFrame = (Math.floor(Math.random() * range) + min);
gotoAndPlay(randFrame);
Symbol 223 MovieClip Frame 2
_x = (Math.random() * 320);
_y = ((Math.random() * 120) + 120);
Symbol 223 MovieClip Frame 10
gotoAndPlay ("loop");
Symbol 224 MovieClip Frame 1
var mat = [0.6, 0.11, 0.11, 0, 0, 0.11, 0.7, 0.11, 0, 0, 0.11, 0.11, 0.8, 0, 0, 0, 0, 0, 1, 0];
grayish = new flash.filters.ColorMatrixFilter(mat);
var mat = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
normal = new flash.filters.ColorMatrixFilter(mat);
loopRender = function (effect_rect, paste_p) {
if (MAP.hasOvercastTone) {
delete MAP.hasOvercastTone;
MAP.filters = [normal];
MAP.filters = [];
}
MAP_RENDER.pic.applyFilter(MAP_RENDER.pic, effect_rect, paste_p, grayish);
};
loopNoRender = function () {
if (!MAP.hasOvercastTone) {
MAP.filters = [grayish];
MAP.hasOvercastTone = true;
}
};
onUnload = function () {
delete MAP.hasOvercastTone;
MAP.filters = [normal];
MAP.filters = [];
};
Symbol 232 MovieClip Frame 1
yOffset = -8;
setPosition = function () {
var _local3 = SPRITES.player;
var _local2 = new flash.geom.Point(_local3._x, _local3._y + yOffset);
SPRITES.localToGlobal(_local2);
_parent.globalToLocal(_local2);
_x = _local2.x;
_y = _local2.y;
};
setPosition();
onEnterFrame = function () {
setPosition();
};
Symbol 237 MovieClip Frame 1
rotRange = 45;
halfWidth = 160;
addFlake = function () {
var _local3 = Math.random() * 320;
var _local6 = Math.random() * 320;
var _local5 = ((_local3 - 160) / halfWidth) * rotRange;
var _local2 = Math.floor(Math.random() * 99999);
var _local4 = "flake_" + _local2;
this.attachMovie("snowFall", _local4, _local2, {_x:_local3, _y:_local6, _rotation:_local5});
};
var i = 0;
while (i < 100) {
addFlake();
i++;
}
Symbol 238 MovieClip [MOOD_MC] Frame 1
stop();
_this = this;
level = LEVEL;
removeExtraClips = function () {
for (var _local2 in this) {
if ((_local2 != "level") && (_local2 != "_this")) {
this[_local2].onUnload();
}
}
};
_darkAlpha = darkAlpha || 85;
get_darkAlpha = function () {
return(_darkAlpha);
};
set_darkAlpha = function (newValue) {
if (_darkAlpha != newValue) {
_darkAlpha = newValue;
if (_mood == "dark") {
image._alpha = newValue;
}
loop();
}
};
this.addProperty("darkAlpha", get_darkAlpha, set_darkAlpha);
darkAlpha = _darkAlpha;
_lightScale = lightScale || 100;
get_lightScale = function () {
return(_lightScale);
};
set_lightScale = function (newValue) {
if ((_mood == "dark") && (_lightScale != newValue)) {
_lightScale = newValue;
image.light._xscale = newValue;
image.light._yscale = newValue;
loop();
}
};
this.addProperty("lightScale", get_lightScale, set_lightScale);
init_mood = (mood || (_mood)) || "none";
get_mood = function () {
return(_mood);
};
set_mood = function (newValue) {
if (newValue == "day") {
newValue = "none";
}
if (_mood != newValue) {
_mood = newValue;
removeExtraClips();
gotoAndStop(newValue);
if (_mood == "dark") {
image._alpha = _darkAlpha;
}
loop();
}
};
this.addProperty("mood", get_mood, set_mood);
mood = init_mood;
var paste_p = (new flash.geom.Point(0, 0));
var this_pic = (new flash.display.BitmapData(320, 240, true, 0));
var this_rect = (new flash.geom.Rectangle(0, 0, 320, 240));
var alpha_trans = (new flash.geom.ColorTransform());
loopRender = function () {
this_pic.fillRect(this_rect, 0);
this_pic.draw(_this);
var _local1 = MAP_RENDER.pic.width / 320;
var _local2 = new flash.geom.Matrix();
if (_local1 != 1) {
_local2.scale(_local1, _local1);
}
var _local3 = new flash.geom.Rectangle(0, 0, MAP_RENDER.pic.width, MAP_RENDER.pic.height);
alpha_trans.alphaMultiplier = (image._alpha / 100) || 0;
if (alpha_trans.alphaMultiplier != 0) {
MAP_RENDER.pic.draw(this_pic, _local2, alpha_trans, image.blendMode, _local3);
}
image.loopRender(_local3, paste_p);
};
loopNoRender = function () {
image.loopNoRender();
};
onRenderToggle = function () {
image.onRenderToggle();
if (level.render) {
LOOP.removeObject(_this, "renderMap");
loop = loopRender;
LOOP.addObject(_this, "renderMap");
_visible = false;
} else {
LOOP.removeObject(_this, "renderMap");
loop = loopNoRender;
LOOP.addObject(_this, "renderMap");
_visible = true;
}
loop();
};
onRenderToggle();
level.addListener(this);
loop();
onUnload = function () {
level.removeListener(this);
};
Symbol 241 MovieClip [camp] Frame 1
data_str = "<data xmlType=\"object\"><scripts xmlType=\"object\"><auto xmlType=\"array\"><2 type=\"str_if\" xmlType=\"array\"><2 name=\"str_campLight\" target=\"str_OVERLAY\" type=\"str_removeSwf\" xmlType=\"object\" /><1 name=\"str_fire\" target=\"str_this\" type=\"str_removeSwf\" xmlType=\"object\" /><0 type=\"str_move\" sprite=\"str_this\" xmlType=\"array\"><0 type=\"str_appearance\" xmlType=\"object\"><value isAnimating=\"bol_false\" delay=\"num_5\" animType=\"str_yoyo\" pose=\"num_0\" rows=\"num_1\" columns=\"num_1\" frame=\"num_0\" frames=\"num_1\" direction=\"num_0\" directions=\"num_1\" charset=\"str_charset\\objects\\campFire_out.png\" xmlType=\"object\" /></0></0><condition xmlType=\"array\"><2 value=\"str_true\" xmlType=\"variable\" /><1 value=\"str_!=\" xmlType=\"variable\" /><0 value=\"str_isCamping\" xmlType=\"variable\" /></condition></2><1 type=\"str_if\" xmlType=\"array\"><2 target=\"str_OVERLAY\" waitForEnd=\"bol_false\" depth=\"num_-1\" name=\"str_campLight\" linkage=\"str_swf\\light.swf\" type=\"str_swf\" xmlType=\"object\"><data _yscale=\"str_200\" _xscale=\"str_200\" sprite=\"str_[this._name]\" xmlType=\"object\" /></2><1 target=\"str_this\" waitForEnd=\"bol_false\" depth=\"num_-1\" name=\"str_fire\" linkage=\"str_swf\\fire.swf\" type=\"str_swf\" xmlType=\"object\"><data xmlType=\"object\" /></1><0 type=\"str_move\" sprite=\"str_this\" xmlType=\"array\"><0 type=\"str_appearance\" xmlType=\"object\"><value isAnimating=\"bol_false\" delay=\"num_5\" animType=\"str_yoyo\" pose=\"num_0\" rows=\"num_1\" columns=\"num_1\" frame=\"num_0\" frames=\"num_1\" direction=\"num_0\" directions=\"num_1\" charset=\"str_charset\\objects\\campFire_light.png\" xmlType=\"object\" /></0></0><condition xmlType=\"array\"><2 value=\"str_true\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_isCamping\" xmlType=\"variable\" /></condition></1><0 value=\"num_0.1\" mode=\"str_time\" type=\"str_wait\" xmlType=\"object\" /></auto><talk xmlType=\"array\"><2 type=\"str_if\" xmlType=\"array\"><1 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_\\delete\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_this.setIsCamping\" xmlType=\"variable\" /></condition></1><0 update=\"bol_true\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[this.setIsCamping]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_isCamping\" xmlType=\"variable\" /></condition></0><condition xmlType=\"array\"><2 value=\"str_undefined\" xmlType=\"variable\" /><1 value=\"str_!=\" xmlType=\"variable\" /><0 value=\"str_this.setIsCamping\" xmlType=\"variable\" /></condition></2><1 type=\"str_if\" xmlType=\"array\"><3 type=\"str_if\" xmlType=\"array\"><12 value=\"num_0.5\" mode=\"str_time\" type=\"str_wait\" xmlType=\"object\" /><11 waitForEnd=\"bol_false\" fadeDir=\"str_in\" type=\"str_fadeScreen\" xmlType=\"object\" /><10 volume=\"num_100\" file=\"str_[lastSong]\" type=\"str_music\" xmlType=\"object\" /><9 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_false\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_this.setIsCamping\" xmlType=\"variable\" /></condition></9><8 update=\"bol_true\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_day\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_timeOfDay\" xmlType=\"variable\" /></condition></8><7 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[camp_lastMood]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_MOOD_MC.mood\" xmlType=\"variable\" /></condition></7><6 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[pokemon.0.maxHp]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_pokemon.0.hp\" xmlType=\"variable\" /></condition></6><5 name=\"str_campLight\" target=\"str_OVERLAY\" type=\"str_removeSwf\" xmlType=\"object\" /><4 name=\"str_fire\" target=\"str_this\" type=\"str_removeSwf\" xmlType=\"object\" /><3 type=\"str_move\" sprite=\"str_this\" xmlType=\"array\"><0 type=\"str_appearance\" xmlType=\"object\"><value isAnimating=\"bol_false\" delay=\"num_5\" animType=\"str_yoyo\" pose=\"num_0\" rows=\"num_1\" columns=\"num_1\" frame=\"num_0\" frames=\"num_1\" direction=\"num_0\" directions=\"num_1\" charset=\"str_charset\\objects\\campFire_out.png\" xmlType=\"object\" /></0></3><2 value=\"num_1.1\" mode=\"str_time\" type=\"str_wait\" xmlType=\"object\" /><1 waitForEnd=\"bol_false\" fadeDir=\"str_out\" type=\"str_fadeScreen\" xmlType=\"object\" /><0 duration=\"num_1\" volume=\"num_0\" type=\"str_fadeMusic\" xmlType=\"object\" /><condition xmlType=\"array\"><2 value=\"str_yes\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_reply\" xmlType=\"variable\" /></condition></3><2 target=\"str_HUD\" waitForEnd=\"bol_true\" depth=\"num_-1\" name=\"str_yesNo\" linkage=\"str_showMenu\" type=\"str_swf\" xmlType=\"object\"><data no=\"str_myVar\" yes=\"str_myVar\" target=\"str_reply\" menuName=\"str_battleChoices_menu\" xmlType=\"object\" /></2><1 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_no\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_reply\" xmlType=\"variable\" /></condition></1><0 target=\"str_HUD\" waitForEnd=\"bol_true\" depth=\"num_-1\" name=\"str_\" linkage=\"str_textbox_mc\" type=\"str_swf\" xmlType=\"object\"><data typeDelay=\"num_1\" skipKey=\"num_16\" closeOnSpace=\"bol_true\" closeOnClick=\"bol_true\" background=\"str_swf\\win_default.png\" face=\"str_\" typingSound=\"str_\" _y=\"num_0\" text=\"str_Rest until morning?\" type=\"str_textbox\" xmlType=\"object\" /></0><condition xmlType=\"array\"><2 value=\"str_true\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_isCamping\" xmlType=\"variable\" /></condition></1><0 type=\"str_if\" xmlType=\"array\"><4 type=\"str_if\" xmlType=\"array\"><20 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_true\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_this.setIsCamping\" xmlType=\"variable\" /></condition></20><19 message=\"str_camping scene\" type=\"str_comment\" xmlType=\"object\" /><18 waitForEnd=\"bol_false\" fadeDir=\"str_in\" type=\"str_fadeScreen\" xmlType=\"object\" /><17 volume=\"num_100\" file=\"str_music\\nightSearch.mp3\" type=\"str_music\" xmlType=\"object\" /><16 message=\"str_fade-in\" type=\"str_comment\" xmlType=\"object\" /><15 target=\"str_OVERLAY\" waitForEnd=\"bol_false\" depth=\"num_-1\" name=\"str_campLight\" linkage=\"str_swf\\light.swf\" type=\"str_swf\" xmlType=\"object\"><data _yscale=\"str_200\" _xscale=\"str_200\" sprite=\"str_[this._name]\" xmlType=\"object\" /></15><14 target=\"str_this\" waitForEnd=\"bol_false\" depth=\"num_-1\" name=\"str_fire\" linkage=\"str_swf\\fire.swf\" type=\"str_swf\" xmlType=\"object\"><data xmlType=\"object\" /></14><13 type=\"str_move\" sprite=\"str_this\" xmlType=\"array\"><0 type=\"str_appearance\" xmlType=\"object\"><value isAnimating=\"bol_false\" delay=\"num_5\" animType=\"str_yoyo\" pose=\"num_0\" rows=\"num_1\" columns=\"num_1\" frame=\"num_0\" frames=\"num_1\" direction=\"num_0\" directions=\"num_1\" charset=\"str_charset\\objects\\campFire_light.png\" xmlType=\"object\" /></0></13><12 message=\"str_change camp image\" type=\"str_comment\" xmlType=\"object\" /><11 update=\"bol_true\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_night\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_timeOfDay\" xmlType=\"variable\" /></condition></11><10 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_night\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_MOOD_MC.mood\" xmlType=\"variable\" /></condition></10><9 type=\"str_if\" xmlType=\"array\"><0 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_none\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_camp_lastMood\" xmlType=\"variable\" /></condition></0><condition xmlType=\"array\"><2 value=\"str_night\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_camp_lastMood\" xmlType=\"variable\" /></condition></9><8 type=\"str_if\" xmlType=\"array\"><0 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_none\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_camp_lastMood\" xmlType=\"variable\" /></condition></0><condition xmlType=\"array\"><2 value=\"str_evening\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_camp_lastMood\" xmlType=\"variable\" /></condition></8><7 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[MOOD_MC.mood]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_camp_lastMood\" xmlType=\"variable\" /></condition></7><6 message=\"str_night\" type=\"str_comment\" xmlType=\"object\" /><5 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[pokemon.0.maxHp]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_pokemon.0.hp\" xmlType=\"variable\" /></condition></5><4 value=\"num_1.1\" mode=\"str_time\" type=\"str_wait\" xmlType=\"object\" /><3 waitForEnd=\"bol_false\" fadeDir=\"str_out\" type=\"str_fadeScreen\" xmlType=\"object\" /><2 message=\"str_fade-out\" type=\"str_comment\" xmlType=\"object\" /><1 duration=\"num_1\" volume=\"num_0\" type=\"str_fadeMusic\" xmlType=\"object\" /><0 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[MUSIC.songName]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_lastSong\" xmlType=\"variable\" /></condition></0><condition xmlType=\"array\"><2 value=\"str_yes\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_reply\" xmlType=\"variable\" /></condition></4><3 target=\"str_HUD\" waitForEnd=\"bol_true\" depth=\"num_-1\" name=\"str_yesNo\" linkage=\"str_showMenu\" type=\"str_swf\" xmlType=\"object\"><data no=\"str_myVar\" yes=\"str_myVar\" target=\"str_reply\" menuName=\"str_battleChoices_menu\" xmlType=\"object\" /></3><2 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_no\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_reply\" xmlType=\"variable\" /></condition></2><1 target=\"str_HUD\" waitForEnd=\"bol_true\" depth=\"num_-1\" name=\"str_\" linkage=\"str_textbox_mc\" type=\"str_swf\" xmlType=\"object\"><data typeDelay=\"num_1\" skipKey=\"num_16\" closeOnSpace=\"bol_true\" closeOnClick=\"bol_true\" background=\"str_swf\\win_default.png\" face=\"str_\" typingSound=\"str_\" _y=\"num_0\" text=\"str_Set up camp for the night?\\.\rOnly [this.playerName]'s HP will be restored.\" type=\"str_textbox\" xmlType=\"object\" /></1><0 update=\"bol_false\" type=\"str_setVariable\" xmlType=\"object\"><condition xmlType=\"array\"><2 value=\"str_[RAM_F.getNickname([pokemon.0.id])]\" xmlType=\"variable\" /><1 value=\"str_=\" xmlType=\"variable\" /><0 value=\"str_this.playerName\" xmlType=\"variable\" /></condition></0><condition xmlType=\"array\"><2 value=\"str_true\" xmlType=\"variable\" /><1 value=\"str_!=\" xmlType=\"variable\" /><0 value=\"str_isCamping\" xmlType=\"variable\" /></condition></0></talk></scripts><initialAppearance isAnimating=\"bol_false\" delay=\"num_5\" animDirection=\"num_1\" animType=\"str_yoyo\" rows=\"num_1\" columns=\"num_1\" pose=\"num_0\" frames=\"num_1\" frame=\"num_0\" directions=\"num_1\" direction=\"num_0\" charset=\"str_charset\\objects\\campFire_out.png\" xmlType=\"object\" /></data>";
var data_xml = new XML(data_str);
readXml_getValue = function (newValue) {
var _local2 = null;
var _local3 = newValue.substr(0, 4);
if (_local3 == "bol_") {
var _local4 = newValue.substr(4);
newValue = _local4 == "true";
_local2 = newValue;
} else if (_local3 == "num_") {
var _local4 = newValue.substr(4);
newValue = Number(_local4);
_local2 = newValue;
} else if (_local3 == "str_") {
var _local4 = newValue.substr(4);
newValue = String(_local4);
_local2 = newValue;
} else if (isNaN(Number(newValue))) {
if (newValue == "true") {
_local2 = true;
} else if (newValue == "false") {
_local2 = false;
} else if (newValue == "undefined") {
_local2 = undefined;
} else {
var _local6 = "";
var _local5 = String.fromCharCode(10);
newValue = newValue.split(_local5).join("");
_local2 = newValue;
}
} else {
_local2 = Number(newValue);
}
return(_local2);
};
readXml = function (parentPath, targetData) {
for (var _local1 in parentPath.attributes) {
if (_local1 != "xmlType") {
var _local6 = parentPath.attributes[_local1];
targetData[_local1] = readXml_getValue(_local6);
}
}
for (var _local8 in parentPath.childNodes) {
var _local2 = parentPath.childNodes[_local8];
var _local1 = _local2.nodeName;
var _local4 = _local2.attributes.xmlType;
if (_local4 == "array") {
targetData[_local1] = new Array();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
} else if (_local4 == "variable") {
var _local6 = _local2.attributes.value;
targetData[_local1] = readXml_getValue(_local6);
} else if (_local4 == "object") {
targetData[_local1] = new Object();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
}
}
delete stringSlice;
};
var data = {};
readXml(data_xml.firstChild, data);
var parent = this._parent;
var newDepth = nextDepth(parent);
var newName = ((this._name + "_") + newDepth);
parent.attachMovie("rpgSprite", newName, newDepth, {data:data, _x:_x, _y:_y});
this.remove();
Symbol 242 MovieClip [conveyerBelt] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
_this = this;
_visible = false;
tile = tile || ({});
tile.tileSize = 16;
tile.offset = tile.offset || ({});
tile.offset.x = 0;
tile.offset.y = 0;
get_xTile = function () {
return(Math.floor(_x / tile.tileSize));
};
set_xTile = function (newValue) {
_x = ((newValue * tile.tileSize) + tile.offset.x);
};
tile.addProperty("x", get_xTile, set_xTile);
get_yTile = function () {
return(Math.floor((_y - (tile.offset.y / 2)) / tile.tileSize));
};
set_yTile = function (newValue) {
_y = ((newValue * tile.tileSize) + tile.offset.y);
};
tile.addProperty("y", get_yTile, set_yTile);
noCollide = true;
var settings = {charset:"charset\\objects\\conveyerBelt.png", directions:4, direction:data.dir, frames:2, delay:3, isAnimating:true};
image = newSprite(settings, UNDERLAY, _name, nextDepth(UNDERLAY));
image._x = _this._x;
image._y = _this._y + 8;
image.opaqueBackground = 0;
SPRITE_GRID.add(tile.x, tile.y, _this);
xTile = Math.floor(_this._x / 16);
yTile = Math.floor(_this._y / 16);
detectPlayer = function () {
px = Math.floor(SPRITES.player._x / 16);
py = Math.floor(SPRITES.player._y / 16);
return((px == xTile) && (py == yTile));
};
movePlayer = function () {
switch (data.dir) {
case "up" :
SPRITES.player._y = SPRITES.player._y - data.speed;
return;
case "down" :
SPRITES.player._y = SPRITES.player._y + data.speed;
return;
case "left" :
SPRITES.player._x = SPRITES.player._x - data.speed;
return;
case "right" :
SPRITES.player._x = SPRITES.player._x + data.speed;
}
};
loop_on = function () {
if (detectPlayer()) {
movePlayer();
} else {
loop = loop_off;
}
};
loop_off = null;
loop = loop_off;
LOOP.addObject(_this, "sprites");
gridCollide = function () {
loop = loop_on;
loop();
};
init_speed = data.speed || 2;
get_speed = function () {
return(data.speed);
};
set_speed = function (newValue) {
newValue = Number(newValue);
data.speed = newValue;
var _local1 = 5 - newValue;
if (_local1 < 1) {
_local1 = 1;
}
image.setParams({delay:_local1});
};
this.addProperty("speed", get_speed, set_speed);
speed = init_speed;
init_dir = data.dir || "up";
get_dir = function () {
return(data.dir);
};
set_dir = function (newValue) {
data.dir = newValue;
image.setParams({direction:newValue});
};
this.addProperty("dir", get_dir, set_dir);
dir = init_dir;
onUnload = function () {
LOOP.removeObject(_this, "sprites");
SPRITE_GRID.remove(tile.x, tile.y, _this);
image.removeMovieClip();
};
Symbol 243 MovieClip [partyMember] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
function getPos(followSprite) {
if (followSprite) {
var _local2 = new flash.geom.Point(followSprite._x, followSprite._y);
}
return(_local2);
}
_this = this;
if (brightness) {
init_brightness = brightness;
} else if ((this.transform.colorTransform.redMultiplier == this.transform.colorTransform.greenMultiplier) && (this.transform.colorTransform.redMultiplier == this.transform.colorTransform.blueMultiplier)) {
init_brightness = (this.transform.colorTransform.redOffset * 100) / 255;
} else {
init_brightness = 0;
}
get_brightness = function () {
return(this.transform.colorTransform.redOffset);
};
set_brightness = function (newValue) {
var _local3 = _alpha / 100;
var _local2 = (newValue * 255) / 100;
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, _local3, _local2, _local2, _local2, 0);
};
this.addProperty("brightness", get_brightness, set_brightness);
brightness = init_brightness;
delete init_brightness;
delete get_brightness;
delete set_brightness;
image = newSprite(appearance, this, "image", 0);
image._y = 8;
noCollide = true;
moveTimeout = [];
moveTimeout.addTimeout = function (timeoutID) {
var _local2 = {timeoutID:timeoutID};
this.push(_local2);
};
moveTimeout.remove = function (timeoutID) {
var _local2 = this.length - 1;
while (_local2 >= 0) {
if (this[_local2].timeoutID == timeoutID) {
clearTimeout(this[_local2].timeoutID);
this.splice(_local2, 1);
}
_local2--;
}
};
moveTimeout.exists = function (timeoutID) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 >= 0) {
if (this[_local2].timeoutID == timeoutID) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
moveTimeout.removeAll = function () {
var _local1 = moveTimeout.length - 1;
while (_local1 >= 0) {
clearTimeout(moveTimeout[_local1].timeoutID);
moveTimeout.splice(_local1, 1);
_local1--;
}
};
wasPaused = false;
oldTargetPos_p = new flash.geom.Point(0, 0);
lastPos = new flash.geom.Point(SPRITES.player._x, SPRITES.player._y);
onEnterFrame = function () {
if (isPaused && (!wasPaused)) {
image.setParams({isAnimating:false});
wasPaused = true;
oldTargetPos_p = getPos(SPRITES[isFollowing]);
lastPos.x = _this._x;
lastPos.y = _this._y + 8;
} else if ((!isPaused) && (wasPaused)) {
var _local7 = getPos(SPRITES[isFollowing]);
var _local6 = _local7.subtract(oldTargetPos_p);
var _local5 = _local6.clone();
_local5.normalize(_local6.length / pos_array.length);
var _local2 = oldTargetPos_p.clone();
if (_local6.length > 16) {
var _local1 = 0;
while (_local1 < pos_array.length) {
pos_array[_local1] = {x:_local2.x, y:_local2.y};
_local2 = _local2.add(_local5);
_local1++;
}
}
wasPaused = false;
}
};
followSprite = null;
init_isFollowing = isFollowing || "";
get_isFollowing = function () {
return(_isFollowing);
};
set_isFollowing = function (newValue) {
_isFollowing = newValue;
};
this.addProperty("isFollowing", get_isFollowing, set_isFollowing);
isFollowing = init_isFollowing;
reset = function () {
var _local3 = 7;
pos_array = [];
var _local2 = getPos(SPRITES[isFollowing]);
_x = _local2.x;
_y = _local2.y;
var _local1 = 0;
while (_local1 < _local3) {
pos_array.push(_local2);
_local1++;
}
};
reset();
isAnimating = false;
updatePose = function (oldPos, newPos) {
image.setParams({isAnimating:true});
var _local2 = newPos.x - oldPos.x;
var _local1 = newPos.y - oldPos.y;
image.lookAtCoords(_x + _local2, _y + _local1);
};
doFollow = function () {
var _local3 = SPRITES[isFollowing];
var _local1 = getPos(_local3);
if (_local1 && ((_local1.x != pos_array[pos_array.length - 1].x) || (_local1.y != pos_array[pos_array.length - 1].y))) {
pos_array.push(_local1);
var _local2 = pos_array.splice(0, 1)[0];
if (_local2.x != null) {
updatePose(_local2, _local1);
isAnimating = true;
_this._x = _local2.x;
_this._y = _local2.y;
}
} else if (isAnimating) {
image.setParams({isAnimating:false});
isAnimating = false;
}
};
loop = function () {
doFollow();
};
onUnload = function () {
for (var _local2 in this) {
if (this[_local2].timeoutID) {
clearTimeout(this[_local2].timeoutID);
this[_local2].timeoutID = null;
}
}
LOOP.removeObject(_this, "sprites");
image.onUnload();
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
Symbol 256 MovieClip [blood] Frame 7
this.removeMovieClip();
Symbol 265 MovieClip [grassCut] Frame 5
this.removeMovieClip();
Symbol 269 MovieClip [set_mapCoords] Frame 1
RAM.mapCoords = {x:data.x, y:data.y};
LOOP.removeObject(this, "sprites");
this.removeMovieClip();
Symbol 277 MovieClip Frame 5
gotoAndPlay (1);
Symbol 278 MovieClip Frame 21
stop();
this.unloadMovie();
Symbol 285 MovieClip Frame 1
_this = this;
_x = Math.floor(_x);
_y = Math.floor(_y);
__width = Math.floor(_width);
__height = Math.floor(_height);
_yscale = 100;
_xscale = 100;
fade_mc._visible = false;
fade_mc._width = __width;
fade_mc._height = __height;
marker._visible = false;
_this.createEmptyMovieClip("background_mc", 1);
background_pic = new flash.display.BitmapData(__width, __height, true, 0);
background_mc.attachBitmap(background_pic, 0, true, false);
background_mc.cacheAsBitmap = true;
background_mc.setMask(fade_mc);
background_mc.swapDepths(fade_mc);
drawRect = function (pic, x, y, w, h) {
background_mc.beginBitmapFill(pic);
background_mc.moveTo(x, y);
background_mc.lineTo(x + w, y);
background_mc.lineTo(x + w, y + h);
background_mc.lineTo(x, y + h);
background_mc.lineTo(x, y);
background_mc.endFill();
};
displayBackground = function () {
var _local3 = new flash.display.BitmapData(32, 32, true, 0);
_local3.draw(image_mc);
var _local4 = new flash.geom.Rectangle(8, 8, 16, 16);
var _local15 = new flash.geom.Rectangle(0, 8, 8, 16);
var _local14 = new flash.geom.Rectangle(24, 8, 8, 16);
var _local9 = new flash.geom.Rectangle(8, 0, 16, 8);
var _local8 = new flash.geom.Rectangle(8, 24, 16, 8);
var _local10 = Math.ceil((__height - 16) / 16);
var _local13 = Math.ceil((__width - 16) / 16);
var _local2 = 0;
while (_local2 < _local10) {
var _local1 = 0;
while (_local1 < _local13) {
var _local6 = new flash.geom.Point(8 + (_local1 * _local4.width), 8 + (_local2 * _local4.height));
background_pic.copyPixels(_local3, _local4, _local6);
if (_local2 == (_local10 - 1)) {
var _local7 = new flash.geom.Point(8 + (_local1 * _local9.width), 0);
var _local5 = new flash.geom.Point(8 + (_local1 * _local8.width), __height - 8);
background_pic.copyPixels(_local3, _local9, _local7);
background_pic.copyPixels(_local3, _local8, _local5);
}
_local1++;
}
var _local11 = new flash.geom.Point(0, 8 + (_local2 * _local15.height));
var _local12 = new flash.geom.Point(__width - 8, 8 + (_local2 * _local14.height));
background_pic.copyPixels(_local3, _local15, _local11);
background_pic.copyPixels(_local3, _local14, _local12);
_local2++;
}
var _local16 = new flash.geom.Rectangle(0, 0, 8, 8);
var _local17 = new flash.geom.Point(0, 0);
background_pic.copyPixels(_local3, _local16, _local17);
_local16 = new flash.geom.Rectangle(0, 24, 8, 8);
_local17 = new flash.geom.Point(0, __height - 8);
background_pic.copyPixels(_local3, _local16, _local17);
_local16 = new flash.geom.Rectangle(24, 0, 8, 8);
_local17 = new flash.geom.Point(__width - 8, 0);
background_pic.copyPixels(_local3, _local16, _local17);
_local16 = new flash.geom.Rectangle(24, 24, 8, 8);
_local17 = new flash.geom.Point(__width - 8, __height - 8);
background_pic.copyPixels(_local3, _local16, _local17);
_this.image_mc.unloadMovie();
};
imageLoader = new MovieClipLoader();
initImage = image;
_image = "";
_this.getImage = function () {
return(_image);
};
_this.setImage = function (newValue, doEvent) {
if (newValue != _this._image) {
_this._image = newValue;
_this.image_mc.unloadMovie();
var _local3 = new flash.geom.Rectangle(0, 0, __width, __height);
background_pic.fillRect(_local3, 0);
_this.createEmptyMovieClip("image_mc", 0);
_this.image_mc._alpha = 0;
_this.image_mc.attachMovie(newValue, "image", 0);
if ((_this.image_mc._width == undefined) || (_this.image_mc._width == 0)) {
var _local2 = flash.display.BitmapData.loadBitmap(newValue);
_this.image_mc.attachBitmap(_local2, 0);
if (_this.image_mc._width == 0) {
imageLoader.onLoadInit = function () {
displayBackground();
};
imageLoader.loadClip(newValue, image_mc);
} else {
displayBackground();
}
} else {
displayBackground();
}
}
};
_this.addProperty("image", _this.getImage, _this.setImage);
image = initImage;
Symbol 286 MovieClip [menu_bg] Frame 1
bg_mc._width = _width;
bg_mc._height = _height;
_xscale = 100;
_yscale = 100;
update = function () {
var _local2 = ((winBorder != undefined) ? (winBorder) : (RAM.winBorder));
var _local1 = ("swf\\win_" + _local2) + ".png";
bg_mc.image = _local1;
};
update();
this.onEnterFrame = function () {
if (RAM.winBorder != winBorder) {
update();
}
};
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
}
openAnim = function (_this) {
var _local2 = _this.bg_mc._width;
var _local3 = _this.bg_mc._height;
_this.bg_mc._x = _local2 / 2;
_this.bg_mc._y = _local3 / 2;
com.mosesSupposes.fuse.ZigoEngine.doTween(_this.bg_mc, ["_x", "_y"], [0, 0], 0.2);
_this.bg_mc._scale = 1;
com.mosesSupposes.fuse.ZigoEngine.doTween(_this.bg_mc, "_scale", 100, 0.2);
};
setTimeout(openAnim, 1, this);
Instance of Symbol 285 MovieClip "bg_mc" in Symbol 286 MovieClip [menu_bg] Frame 1
//component parameters
onClipEvent (construct) {
image = "";
}
Symbol 295 MovieClip [ScrollPane] Frame 1
#initclip 82
Object.registerClass("ScrollPane", mx.containers.ScrollPane);
#endinitclip
stop();
Symbol 299 MovieClip [TextArea] Frame 1
#initclip 83
Object.registerClass("TextArea", mx.controls.TextArea);
#endinitclip
stop();
Symbol 300 MovieClip [website_menu] Frame 1
function close() {
SOUND.play("sound\\cursor_cancel.mp3");
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.gotoAndStop("close");
}
_this = this;
callUnload = function (parent) {
for (var nam in parent) {
var thisChild = parent[nam];
if (thisChild instanceof MovieClip) {
reportedPath = String(eval (thisChild._target));
actualPath = (String(eval (parent._target)) + ".") + nam;
if (reportedPath.indexOf(actualPath) != -1) {
callUnload(thisChild);
}
}
}
parent.onKillFocus(null);
parent.dispatchEvent({type:"unload"});
parent.broadcastMessage("unload");
parent.unload();
parent.onUnload();
parent.removeEventListener("keyDown", parent);
parent.removeEventListener("keyUp", parent);
Key.removeListener(parent);
Mouse.removeListener(parent);
};
Key.removeListener(parentMenu);
parentMenu.active = false;
bg_mc.winBorder = winBorder || "winXp";
Key.removeListener(this);
Key.addListener(this);
active = true;
onKeyDown = function () {
if (Key.isDown(RAM.keys.ok)) {
}
if (Key.isDown(RAM.keys.cancel)) {
cancel();
close();
}
};
Instance of Symbol 293 MovieClip "close_btn" in Symbol 300 MovieClip [website_menu] Frame 1
on (release) {
if (_parent.active) {
_parent.cancel();
_parent.close();
}
}
Symbol 300 MovieClip [website_menu] Frame 2
stop();
Instance of Symbol 295 MovieClip [ScrollPane] "html_pane" in Symbol 300 MovieClip [website_menu] Frame 2
//component parameters
onClipEvent (construct) {
contentPath = "imageLoader";
hLineScrollSize = 32;
hPageScrollSize = 268;
hScrollPolicy = "off";
scrollDrag = false;
vLineScrollSize = 32;
vPageScrollSize = 158;
vScrollPolicy = "on";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
if (_parent.swf) {
content.file = _parent.swf;
} else {
_parent.callUnload(this);
unloadMovie (this);
}
}
this.addEventListener("load", __f_load);
}
Instance of Symbol 299 MovieClip [TextArea] "html_txt" in Symbol 300 MovieClip [website_menu] Frame 2
//component parameters
onClipEvent (construct) {
editable = false;
html = true;
text = "default text";
wordWrap = true;
maxChars = null;
restrict = "";
enabled = true;
password = false;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
if (_parent.text) {
var _local3 = new TextField.StyleSheet();
var _local4 = "a{color:#0000ff;}a:hover{color:#ff00ff;text-decoration:underline;}";
_local3.parseCSS(_local4);
styleSheet = _local3;
embedFonts = false;
text = _parent.text;
} else {
_parent.callUnload(this);
unloadMovie (this);
}
}
this.addEventListener("load", __f_load);
}
Symbol 300 MovieClip [website_menu] Frame 3
stop();
_name = "";
_this.onClose();
removeThis = function (_this) {
_this.onUnload();
_this.removeMovieClip();
};
setTimeout(removeThis, 34, this);
Symbol 303 MovieClip [map_menu] Frame 1
bg_mc.winBorder = winBorder;
active = true;
init_active = active || null;
get_active = function () {
return(_active);
};
set_active = function (newValue) {
_active = newValue;
if (_active) {
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
} else {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
}
};
this.addProperty("active", get_active, set_active);
active = init_active;
_this = this;
close = function () {
active = false;
_this.removeMovieClip();
};
onKeyDown = function () {
if (active) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
};
onMouseUp = onKeyDown;
init_pokemon = pokemon || null;
get_pokemon = function () {
return(_pokemon);
};
set_pokemon = function (newValue) {
_pokemon = newValue;
map_mc.update();
};
this.addProperty("pokemon", get_pokemon, set_pokemon);
pokemon = init_pokemon;
Instance of Symbol 157 MovieClip [imageLoader] "map_mc" in Symbol 303 MovieClip [map_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "swf\\map.png";
scaleContent = true;
enabled = true;
visible = true;
}
onClipEvent (load) {
function __f_load(eventObj) {
depthToggle = 0;
locations = this.createEmptyMovieClip("locations" + depthToggle, depthToggle + 20);
update = function () {
locations.removeMovieClip();
depthToggle = Number(!depthToggle);
locations = this.createEmptyMovieClip("locations" + depthToggle, depthToggle + 20);
if (_parent.pokemon) {
var _local5 = ROM.pokemon[_parent.pokemon].areas;
if (_local5) {
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = new flash.geom.Point(_local5[_local3].x * 16, _local5[_local3].y * 16);
image_mc.localToGlobal(_local4);
locations.globalToLocal(_local4);
var _local6 = locations.attachMovie("mapPokeMarker", "mark" + _local3, _local3, {_x:_local4.x, _y:_local4.y, _xscale:image_mc._xscale, _yscale:image_mc._yscale});
_local3++;
}
}
if ((_parent.pokemon == "porygon") || (_parent.pokemon == "missingno")) {
_parent.easterEgg.show();
} else {
_parent.easterEgg.hide();
}
}
};
}
this.addEventListener("load", __f_load);
}
onClipEvent (load) {
function __f_complete(eventObj) {
update();
if ((!playerPos) && (RAM.mapCoords)) {
var _local2 = new flash.geom.Point(RAM.mapCoords.x * 16, RAM.mapCoords.y * 16);
image_mc.localToGlobal(_local2);
locations.globalToLocal(_local2);
this.attachMovie("currentMapLocation", "playerPos", 10, {_x:_local2.x, _y:_local2.y, _xscale:image_mc._xscale, _yscale:image_mc._yscale});
}
}
this.addEventListener("complete", __f_complete);
}
Instance of Symbol 157 MovieClip [imageLoader] "easterEgg" in Symbol 303 MovieClip [map_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = true;
enabled = true;
visible = true;
}
onClipEvent (load) {
function __f_load(eventObj) {
show = function () {
image_mc.onUnload();
file = "swf\\spaceInvaders.swf";
};
hide = function () {
image_mc.onUnload();
file = "";
};
}
this.addEventListener("load", __f_load);
}
Symbol 312 MovieClip [Tooltip] Frame 1
useHandCursor = false;
__width = _width;
__height = _height;
_yscale = 100;
_xscale = 100;
hit._width = __width;
hit._height = __height;
hitArea = hit;
hit._alpha = 0;
Symbol 312 MovieClip [Tooltip] Frame 2
stop();
_this = this;
messege._visible = false;
messege.wordWrap = false;
var fmt = messege.getTextFormat(0);
var measure = fmt.getTextExtent(text);
messege._width = measure.textFieldWidth;
pos = new flash.geom.Point(0, 0);
this.localToGlobal(pos);
if (pos.y < messege._height) {
messege._y = 0;
} else {
messege._y = -messege._height;
}
messege._x = __width;
show = function (messege) {
messege._visible = Boolean(messege);
};
hide = function () {
messege._visible = false;
};
setSize = function (ww, hh) {
hit._width = ww;
hit._height = hh;
};
show_interval = null;
onMouseMove = function () {
clearTimeout(show_interval);
if (hit.hitTest(_root._xmouse, _root._ymouse, false)) {
show_interval = setTimeout(show, delay * 1000, messege);
} else {
hide();
}
};
Symbol 315 MovieClip [Label] Frame 1
#initclip 84
Object.registerClass("Label", mx.controls.Label);
#endinitclip
stop();
Symbol 573 MovieClip [__Packages.com.mosesSupposes.fuse.Shortcuts] Frame 0
class com.mosesSupposes.fuse.Shortcuts
{
function Shortcuts () {
}
static function initialize() {
if (shortcuts == null) {
initShortcuts();
}
}
static function doShortcut(obj, methodName) {
initialize();
var _local5 = shortcuts[methodName];
if (_local5 == undefined) {
if (typeof(obj) == "movieclip") {
_local5 = mcshortcuts[methodName];
}
}
if (_local5 == undefined) {
return(null);
}
obj = arguments.shift();
methodName = String(arguments.shift());
if (!(obj instanceof Array)) {
obj = [obj];
}
var _local3 = "";
for (var _local6 in obj) {
var _local2 = String(_local5.apply(obj[_local6], arguments));
if ((_local2 != null) && (_local2.length > 0)) {
if (_local3.length > 0) {
_local3 = (_local2 + "|") + _local3;
} else {
_local3 = _local2;
}
}
}
return(((_local3 == "") ? null : (_local3)));
}
static function addShortcutsTo() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, _local2.getter, _local2.setter);
_global.ASSetPropFlags(o, _local5, 3, 1);
} else {
o[_local5] = _local2;
_global.ASSetPropFlags(o, _local5, 7, 1);
}
}
};
for (var _local7 in arguments) {
var _local4 = arguments[_local7];
if ((_local4 == MovieClip.prototype) || (typeof(_local4) == "movieclip")) {
_local5(_local4, mcshortcuts);
}
_local5(_local4, shortcuts);
}
}
static function removeShortcutsFrom() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
_global.ASSetPropFlags(o, _local5, 0, 2);
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, null, null);
}
delete o[_local5];
}
};
for (var _local7 in arguments) {
var _local3 = arguments[_local7];
if ((_local3 == MovieClip.prototype) || (typeof(_local3) == "movieclip")) {
_local5(_local3, mcshortcuts);
}
_local5(_local3, shortcuts);
}
}
static function parseStringTypeCallback(callbackStr) {
var evaluate = function (val) {
var first = val.charAt(0);
if ((first == val.slice(-1)) && ((first == "\"") || (first == "'"))) {
return(val.slice(1, -1));
}
if (val == "true") {
return(Object(true));
}
if (val == "false") {
return(Object(false));
}
if (val == "null") {
return(Object(null));
}
if (_global.isNaN(Number(val)) == false) {
return(Object(Number(val)));
}
return(Object(eval (val)));
};
var trimWhite = function (str) {
while (str.charAt(0) == " ") {
str = str.slice(1);
}
while (str.slice(-1) == " ") {
str = str.slice(0, -1);
}
return(str);
};
var evaluateList = function (list) {
var _local11 = [];
var _local4 = 0;
while (_local4 < list.length) {
var _local3 = list[_local4];
_local3 = trimWhite(_local3);
var _local5 = (_local3.charAt(0) == "{") && ((_local3.indexOf("}") > -1) || (_local3.indexOf(":") > -1));
var _local10 = _local3.charAt(0) == "[";
if ((_local5 || (_local10)) == true) {
var _local6 = ((_local5 == true) ? ({}) : ([]));
var _local2 = _local4;
while (_local2 < list.length) {
if (_local2 == _local4) {
_local3 = _local3.slice(1);
}
var _local1;
var _local8 = (_local1.slice(-1) == ((_local5 == true) ? "}" : "]")) || (_local2 == (list.length - 1));
if (_local8 == true) {
_local1 = _local1.slice(0, -1);
}
if ((_local5 == true) && (_local1.indexOf(":") > -1)) {
var _local7 = _local1.split(":");
_local6[trimWhite(_local7[0])] = evaluate(trimWhite(_local7[1]));
} else if (_local10 == true) {
_local6.push(evaluate(trimWhite(_local1)));
}
if (_local8 == true) {
_local11.push(_local6);
_local4 = _local2;
break;
}
_local2++;
}
} else {
_local11.push(evaluate(trimWhite(_local3)));
}
_local4++;
}
return(_local11);
};
var parts = callbackStr.split("(");
var p0 = parts[0];
var p1 = parts[1];
return({func:p0.slice(p0.lastIndexOf(".") + 1), scope:eval (p0.slice(0, p0.lastIndexOf("."))), args:evaluateList(p1.slice(0, p1.lastIndexOf(")")).split(","))});
}
static function initShortcuts() {
shortcuts = new Object();
var methods = {alphaTo:"_alpha", scaleTo:"_scale", sizeTo:"_size", rotateTo:"_rotation", brightnessTo:"_brightness", brightOffsetTo:"_brightOffset", contrastTo:"_contrast", colorTo:"_tint", tintPercentTo:"_tintPercent", colorResetTo:"_colorReset", invertColorTo:"_invertColor"};
var _local4 = _global.com.mosesSupposes.fuse.FuseFMP.getAllShortcuts();
var _local7 = {blur:1, blurX:1, blurY:1, strength:1, shadowAlpha:1, highlightAlpha:1, angle:1, distance:1, alpha:1, color:1};
for (var _local9 in _local4) {
if (_local7[_local4[_local9].split("_")[1]] === 1) {
methods[_local4[_local9] + "To"] = _local4[_local9];
}
}
var _local8 = {__resolve:function (name) {
var propName = methods[name];
return(function () {
var _local4 = _global.com.mosesSupposes.fuse.ZigoEngine.doTween.apply(com.mosesSupposes.fuse.ZigoEngine, new Array(this, propName).concat(arguments));
return(_local4);
});
}};
var _local5 = {__resolve:function (name) {
var _local3 = {setter:function (v) {
_global.com.mosesSupposes.fuse.ZigoEngine.doTween(this, ((name == "_tintString") ? "_tint" : (name)), v, 0);
}};
switch (name) {
case "_colorReset" :
_local3.getter = function () {
return(100 - _global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this).tintPercent);
};
break;
case "_colorTransform" :
_local3.getter = function () {
return(Color(new Color(this)).getTransform());
};
break;
case "_fade" :
_local3.getter = function () {
return(this._alpha);
};
break;
case "_size" :
_local3.getter = function () {
return(((this._width == this._height) ? (this._width) : null));
};
break;
case "_scale" :
_local3.getter = function () {
return(((this._xscale == this._yscale) ? (this._xscale) : null));
};
break;
default :
_local3.getter = function () {
return(_global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this)[name.slice(1)]);
};
}
return(_local3);
}};
for (var _local9 in methods) {
shortcuts[_local9] = _local8[_local9];
if ((_local9 != "alphaTo") && (_local9 != "rotateTo")) {
shortcuts[methods[_local9]] = _local5[methods[_local9]];
}
}
shortcuts._tintString = _local5._tintString;
shortcuts._colorTransform = _local5._colorTransform;
shortcuts._fade = _local5._fade;
shortcuts.tween = function (props, endVals, seconds, ease, delay, callback) {
if ((arguments.length == 1) && (typeof(props) == "object")) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween({target:this, action:props}));
}
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, props, endVals, seconds, ease, delay, callback));
};
shortcuts.removeTween = (shortcuts.stopTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.removeTween(this, props);
});
shortcuts.removeAllTweens = (shortcuts.stopAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.removeTween("ALL");
});
shortcuts.isTweening = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweening(this, prop));
};
shortcuts.getTweens = function () {
return(com.mosesSupposes.fuse.ZigoEngine.getTweens(this));
};
shortcuts.lockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, true);
};
shortcuts.unlockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, false);
};
shortcuts.isTweenLocked = function () {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenLocked(this));
};
shortcuts.isTweenPaused = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenPaused(this, prop));
};
shortcuts.pauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.pauseTween(this, props);
};
shortcuts.resumeTween = (shortcuts.unpauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween(this, props);
});
shortcuts.pauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.pauseTween("ALL");
};
shortcuts.resumeAllTweens = (shortcuts.unpauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween("ALL");
});
shortcuts.ffTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.ffTween(this, props);
};
shortcuts.rewTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, false, suppressStartEvents);
};
shortcuts.rewAndPauseTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, true, suppressStartEvents);
};
shortcuts.skipTweenTo = function (seconds, props) {
com.mosesSupposes.fuse.ZigoEngine.skipTweenTo(seconds, this, props);
};
shortcuts.bezierTo = function (destX, destY, controlX, controlY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_bezier_", {x:destX, y:destY, controlX:controlX, controlY:controlY}, seconds, ease, delay, callback));
};
shortcuts.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_colorTransform", {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab}, seconds, ease, delay, callback));
};
shortcuts.tintTo = function (rgb, percent, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_tint", {tint:rgb, percent:percent}, seconds, ease, delay, callback));
};
shortcuts.slideTo = function (destX, destY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_x,_y", [destX, destY], seconds, ease, delay, callback));
};
shortcuts.fadeIn = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 100, seconds, ease, delay, callback));
};
shortcuts.fadeOut = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 0, seconds, ease, delay, callback));
};
mcshortcuts = new Object();
mcshortcuts._frame = {getter:function () {
return(this._currentframe);
}, setter:function (v) {
this.gotoAndStop(Math.round(v));
}};
mcshortcuts.frameTo = function (endframe, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_frame", ((endframe != undefined) ? (endframe) : (this._totalframes)), seconds, ease, delay, callback));
};
}
static var registryKey = "shortcuts";
static var shortcuts = null;
static var mcshortcuts = null;
}
Symbol 574 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.3r1 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 575 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage.call(com.mosesSupposes.fuse.ZigoEngine, "onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local6 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local8 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local3 = {tintPercent:Number(((_local6 == true) ? (100 - _local1.ra) : 0))};
if (_local3.tintPercent != 0) {
var _local5 = 100 / _local3.tintPercent;
_local3.tint = (((_local1.rb * _local5) << 16) | ((_local1.gb * _local5) << 8)) | (_local1.bb * _local5);
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local6 == true) && (_local8 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 576 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 577 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 9 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 114 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 115 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 117 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 116 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 10 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 578 MovieClip [__Packages.KeySetter] Frame 0
class KeySetter extends mx.core.UIComponent
{
var disableListKeys_mc, createClassObject, label_mc, button_mc, state, listOwner, addEventListener, __width, __height, isSelected, wasSelected, getCellIndex, cancelInput, dispatchEvent, removeEventListener;
function KeySetter () {
super();
}
function createChildren() {
disableListKeys_mc = createClassObject(mx.core.UIComponent, "disableListKeys_mc", 1, {owner:this});
label_mc = createClassObject(mx.controls.Label, "label_mc", 2, {styleName:this, owner:this});
button_mc = createClassObject(mx.controls.Button, "button_mc", 3, {styleName:this, owner:this});
state = "none";
listOwner.keySetter_state = state;
setupInput();
addEventListener("unload", this);
size();
}
function size() {
var _local2 = 96;
label_mc._x = 0;
label_mc.setSize(__width - _local2, __height);
button_mc._x = __width - _local2;
button_mc.setSize(_local2, __height);
}
function getPreferredHeight() {
return(22);
}
function setValue(str, item, sel) {
if (item == undefined) {
label_mc.visible = false;
button_mc.visible = false;
} else {
label_mc.text = item.keyName;
button_mc.label = getKeyLabel(item.keyCode);
label_mc.visible = true;
button_mc.visible = true;
}
isSelected = (sel != "normal") && (listOwner.selectedItem == item);
if ((isSelected && (!wasSelected)) && (state == "none")) {
setState("readySelect");
}
if (sel == "normal") {
setState("none");
}
button_mc.emphasized = state == "readyKeyCode";
wasSelected = isSelected;
}
function click() {
if (state != "readyKeyCode") {
listOwner.selectedIndex = getCellIndex().itemIndex;
setState("readyKeyCode");
}
}
function setupInput() {
addEventListener("keyUp", this);
addEventListener("onEnter", this);
button_mc.addEventListener("click", this);
cancelInput = {focusOut:function () {
this.setState("readySelect");
}};
disableListKeys_mc.addEventListener("focusOut", cancelInput);
}
function keyUp() {
if (state == "readyKeyCode") {
var _local5 = Key.getCode();
var _local6 = listOwner.getItemAt(getCellIndex().itemIndex).keyName;
listOwner.dataProvider.editField(getCellIndex().itemIndex, "keyCode", _local5);
var _local3 = {type:"changeKey"};
for (var _local4 in listOwner.selectedItem) {
_local3[_local4] = listOwner.selectedItem[_local4];
}
listOwner.dispatchEvent(_local3);
var _this = this;
_global.setTimeout(function () {
_this.setState("readySelect");
}, 34);
} else if (isSelected) {
if (state != "readyKeyCode") {
if (Key.getCode() == 13) {
dispatchEvent({type:"onEnter"});
} else if (Key.getCode() == 27) {
listOwner.dispatchEvent({type:"onEsc"});
}
}
}
}
function onEnter() {
if (state == "readySelect") {
var _this = this;
_global.setTimeout(function () {
_this.setState("readyKeyCode");
}, 34);
}
}
function setState(newState) {
if ((isSelected && (state == "readyKeyCode")) && (newState != "readyKeyCode")) {
listOwner.setFocus();
button_mc.emphasized = false;
}
if (newState == "none") {
button_mc.emphasized = false;
} else if (newState == "readySelect") {
button_mc.emphasized = false;
} else if (newState == "readyKeyCode") {
button_mc.emphasized = true;
disableListKeys_mc.setFocus();
}
state = newState;
listOwner.keySetter_state = state;
}
function getKeyLabel(code) {
switch (code) {
case 8 :
var _local1 = "Backspace";
break;
case 9 :
_local1 = "Tab";
break;
case 13 :
_local1 = "Enter";
break;
case 16 :
_local1 = "Shift";
break;
case 17 :
_local1 = "Ctrl";
break;
case 19 :
_local1 = "Pause / Break";
break;
case 20 :
_local1 = "CAPS Lock";
break;
case 27 :
_local1 = "Esc";
break;
case 32 :
_local1 = "Space";
break;
case 33 :
_local1 = "Page Up";
break;
case 34 :
_local1 = "Page Down";
break;
case 35 :
_local1 = "End";
break;
case 36 :
_local1 = "Home";
break;
case 37 :
_local1 = "arrow: LEFT";
break;
case 38 :
_local1 = "arrow: UP";
break;
case 39 :
_local1 = "arrow: RIGHT";
break;
case 40 :
_local1 = "arrow: DOWN";
break;
case 45 :
_local1 = "Insert";
break;
case 46 :
_local1 = "Delete";
break;
case 91 :
_local1 = "Win";
break;
case 93 :
_local1 = "Contextual";
break;
case 96 :
_local1 = "num pad 0";
break;
case 97 :
_local1 = "num pad 1";
break;
case 98 :
_local1 = "num pad 2";
break;
case 99 :
_local1 = "num pad 3";
break;
case 100 :
_local1 = "num pad 4";
break;
case 101 :
_local1 = "num pad 5";
break;
case 102 :
_local1 = "num pad 6";
break;
case 103 :
_local1 = "num pad 7";
break;
case 104 :
_local1 = "num pad 8";
break;
case 105 :
_local1 = "num pad 9";
break;
case 106 :
_local1 = "num pad *";
break;
case 107 :
_local1 = "num pad +";
break;
case 109 :
_local1 = "num pad -";
break;
case 110 :
_local1 = "num pad .";
break;
case 111 :
_local1 = "num pad /";
break;
case 112 :
_local1 = "F1";
break;
case 113 :
_local1 = "";
break;
case 114 :
_local1 = "";
break;
case 115 :
_local1 = "F4";
break;
case 116 :
_local1 = "F5";
break;
case 117 :
_local1 = "F6";
break;
case 118 :
_local1 = "F7";
break;
case 119 :
_local1 = "F8";
break;
case 120 :
_local1 = "F9";
break;
case 121 :
_local1 = "F10";
break;
case 122 :
_local1 = "F11";
break;
case 123 :
_local1 = "F12";
break;
case 124 :
_local1 = "F13";
break;
case 125 :
_local1 = "F14";
break;
case 126 :
_local1 = "F15";
break;
case 144 :
_local1 = "Num Lock";
break;
case 145 :
_local1 = "Scroll Lock";
break;
case 186 :
_local1 = ";";
break;
case 187 :
_local1 = "=";
break;
case 188 :
_local1 = "<";
break;
case 189 :
_local1 = "-";
break;
case 190 :
_local1 = ">";
break;
case 191 :
_local1 = "/";
break;
case 192 :
_local1 = "~";
break;
case 219 :
_local1 = "[";
break;
case 220 :
_local1 = "\\";
break;
case 221 :
_local1 = "]";
break;
case 222 :
_local1 = "\"";
break;
default :
_local1 = String.fromCharCode(code);
}
return(_local1);
}
function unload() {
removeEventListener("keyUp", this);
removeEventListener("onEnter", this);
button_mc.removeEventListener("click", this);
disableListKeys_mc.removeEventListener("focusOut", cancelInput);
removeEventListener("unload", this);
}
}
Symbol 313 MovieClip [__Packages.mx.controls.Label] Frame 0
class mx.controls.Label extends mx.core.UIObject
{
var _xscale, _yscale, labelField, tabEnabled, tabChildren, useHandCursor, _color, initText, __autoSize, _getTextFormat, __width, setSize, _x, __height, getStyle;
function Label () {
super();
}
function init(Void) {
super.init();
_xscale = (_yscale = 100);
labelField.selectable = false;
labelField.styleName = this;
tabEnabled = false;
tabChildren = false;
useHandCursor = false;
_color = mx.core.UIObject.textColorList;
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(labelField.html);
}
function setHtml(value) {
if (value != labelField.html) {
labelField.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
var _local2 = labelField;
if (_local2.html == true) {
return(_local2.htmlText);
}
return(_local2.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = labelField;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
adjustForAutoSize();
}
}
function get autoSize() {
return(__autoSize);
}
function set autoSize(v) {
if (_global.isLivePreview == true) {
v = "none";
}
__autoSize = v;
if (!initializing) {
draw();
}
//return(autoSize);
}
function draw(Void) {
var _local2 = labelField;
if (initializing) {
var _local4 = text;
initializing = false;
setText(_local4);
delete initText;
}
if (_local2.html) {
var _local4 = _local2.htmlText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
if (_local2.html) {
_local2.htmlText = _local4;
}
adjustForAutoSize();
}
function adjustForAutoSize() {
var _local2 = labelField;
var _local3 = __autoSize;
if ((_local3 != undefined) && (_local3 != "none")) {
_local2._height = _local2.textHeight + 3;
var _local4 = __width;
setSize(_local2.textWidth + 4, _local2._height);
if (_local3 == "right") {
_x = _x + (_local4 - __width);
} else if (_local3 == "center") {
_x = _x + ((_local4 - __width) / 2);
} else if (_local3 == "left") {
_x = _x + 0;
}
} else {
_local2._x = 0;
_local2._width = __width;
_local2._height = __height;
}
}
function size(Void) {
var _local2 = labelField;
_local2._width = __width;
_local2._height = __height;
}
function setEnabled(enable) {
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
labelField.textColor = col;
}
function get styleSheet() {
return(labelField.styleSheet);
}
function set styleSheet(v) {
labelField.styleSheet = v;
//return(styleSheet);
}
static var symbolName = "Label";
static var symbolOwner = Object(mx.controls.Label);
var className = "Label";
static var version = "2.0.2.126";
var initializing = true;
var clipParameters = {text:1, html:1, autoSize:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Label.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 125 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.126";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 139 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local11 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local9 = (__width - borderW) - borderW;
var _local10 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local11 = Math.min(_local9 - _local7, _local15 + 5);
_local3._width = _local11;
_local8 = Math.min(_local10, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local9 - _local11) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local9 - _local11) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local11;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local10 - _local6) / 2;
_local4 = (_local10 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local11 = Math.min(_local9, _local15 + 5);
_local3._width = _local11;
_local8 = Math.min(_local10 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local9 - _local11) / 2;
_local2._x = (_local9 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local10 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local10 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.126";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 579 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 580 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 581 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 582 MovieClip [__Packages.WalkCollisionSystem] Frame 0
class WalkCollisionSystem
{
var collisionMethods, player_mc, walk_obj, xOffset, yOffset;
function WalkCollisionSystem (player_mc, walk_obj, xOffset, yOffset) {
collisionMethods = new Array();
this.player_mc = player_mc;
this.walk_obj = walk_obj;
this.xOffset = (xOffset ? (xOffset) : 0);
this.yOffset = (yOffset ? (yOffset) : 0);
}
function run() {
var _local2 = 0;
while (_local2 < collisionMethods.length) {
collisionMethods[_local2].call(this);
_local2++;
}
}
}
Symbol 583 MovieClip [__Packages.com.mosesSupposes.fuse.FuseFMP] Frame 0
class com.mosesSupposes.fuse.FuseFMP
{
static var _classes, _shortcuts, _getter, _setter;
function FuseFMP () {
}
static function simpleSetup() {
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
_global.FuseFMP = com.mosesSupposes.fuse.FuseFMP;
for (var _local2 in _classes) {
_global[_local2] = _classes[_local2];
}
}
static function initialize(target) {
if (_classes == undefined) {
_shortcuts = {getFilterName:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterName(f));
}, getFilterIndex:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterIndex(this, f));
}, getFilter:function (f, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, f, createNew));
}, writeFilter:function (f, pObj) {
return(com.mosesSupposes.fuse.FuseFMP.writeFilter(this, f, pObj));
}, removeFilter:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.removeFilter(this, f));
}, getFilterProp:function (prop, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterProp(this, prop, createNew));
}, setFilterProp:function (prop, v) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, prop, v);
}, setFilterProps:function (fOrPObj, pObj) {
com.mosesSupposes.fuse.FuseFMP.setFilterProps(this, fOrPObj, pObj);
}, traceAllFilters:function () {
com.mosesSupposes.fuse.FuseFMP.traceAllFilters();
}};
_classes = {BevelFilter:flash.filters.BevelFilter, BlurFilter:flash.filters.BlurFilter, ColorMatrixFilter:flash.filters.ColorMatrixFilter, ConvolutionFilter:flash.filters.ConvolutionFilter, DisplacementMapFilter:flash.filters.DisplacementMapFilter, DropShadowFilter:flash.filters.DropShadowFilter, GlowFilter:flash.filters.GlowFilter, GradientBevelFilter:flash.filters.GradientBevelFilter, GradientGlowFilter:flash.filters.GradientGlowFilter};
_getter = {__resolve:function (name) {
var _local4 = function () {
var _local3 = this;
if (_local3.filters != undefined) {
var _local2 = name.split("_");
if (_local2[1] == "blur") {
_local2[1] = "blurX";
}
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, _local2[0] + "Filter", false)[_local2[1]]);
}
};
return(_local4);
}};
_setter = {__resolve:function (name) {
var _local3 = function (val) {
var _local2 = this;
if (_local2.filters != undefined) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, name, val);
}
};
return(_local3);
}};
}
if (arguments[0] == null) {
return(undefined);
}
var _local6 = [MovieClip, Button, TextField];
for (var _local13 in arguments) {
var _local7 = false;
for (var _local10 in _local6) {
if ((arguments[_local13] instanceof _local6[_local10]) || (arguments[_local13] == Function(_local6[_local10]).prototype)) {
_local7 = true;
break;
}
}
if (!_local7) {
com.mosesSupposes.fuse.FuseKitCommon.error("201", _local13);
continue;
}
for (var _local11 in _classes) {
var _local5 = new _classes[_local11]();
for (var _local8 in _local5) {
if (typeof(_local5[_local8]) == "function") {
continue;
}
var _local4 = (_local11.substr(0, -6) + "_") + _local8;
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
if (_local8 == "blurX") {
_local4 = _local4.slice(0, -1);
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
}
}
}
for (var _local9 in _shortcuts) {
arguments[_local13][_local9] = _shortcuts[_local9];
_global.ASSetPropFlags(arguments[_local13], _local9, 7, 1);
}
}
}
static function deinitialize() {
if (_classes == undefined) {
return(undefined);
}
if (arguments.length == 0) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
for (var _local8 in arguments) {
for (var _local7 in _classes) {
var _local4 = new _classes[_local7]();
for (var _local5 in _local4) {
if (typeof(_local4[_local5]) == "function") {
continue;
}
var _local3 = (_local7.substr(0, -6) + "_") + _local5;
_global.ASSetPropFlags(arguments[_local8], _local3, 0, 2);
arguments[_local8].addProperty(_local3, null, null);
delete arguments[_local8][_local3];
}
}
for (var _local6 in _shortcuts) {
_global.ASSetPropFlags(arguments[_local8], _local6, 0, 2);
delete arguments[_local8][_local6];
}
}
}
static function getFilterName(instance) {
if (_classes == undefined) {
initialize(null);
}
for (var _local1 in _classes) {
if (instance.__proto__ == Function(_classes[_local1]).prototype) {
return(_local1);
}
}
return(null);
}
static function getFilterIndex(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local2 = target.filters;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].__proto__ == filter.__proto__) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getFilter(target, filter, createNew) {
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
if (createNew != true) {
return(null);
}
_local1 = writeFilter(target, filter);
if (_local1 == -1) {
return(null);
}
}
return(target.filters[_local1]);
}
static function writeFilter(target, filter, propsObj) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local4 = target.filters;
var _local2 = getFilterIndex(target, filter);
if (_local2 == -1) {
_local4.push(filter);
} else {
_local4[_local2] = filter;
}
target.filters = _local4;
if (typeof(propsObj) == "object") {
setFilterProps(target, filter, propsObj);
}
_local2 = getFilterIndex(target, filter);
return(_local2);
}
static function removeFilter(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
var _local2 = target.filters;
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
return(false);
}
_local2.splice(_local1, 1);
target.filters = _local2;
return(true);
}
static function getFilterProp(target, propname, createNew) {
var _local1 = propname.split("_");
if (_local1[1] == "blur") {
_local1[1] = "blurX";
}
return(getFilter(target, _local1[0] + "Filter", createNew)[_local1[1]]);
}
static function setFilterProp(target, propname, value) {
if (_classes == undefined) {
initialize(null);
}
var _local8 = propname.split("_");
var _local5 = _local8[0] + "Filter";
if (_classes[_local5] == undefined) {
return(undefined);
}
var _local2 = new _classes[_local5]();
if ((BLUR_ZERO == true) && (_local5 == "BlurFilter")) {
_local2.blurX = (_local2.blurY = 0);
}
var _local6 = _local8[1];
var _local1 = target.filters.length || 0;
while (_local1-- , _local1 > -1) {
if (target.filters[_local1].__proto__ == _local2.__proto__) {
_local2 = target.filters[_local1];
break;
}
}
if (_local2 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local5, target);
}
if (_local6 == "blur") {
_local2.blurX = value;
_local2.blurY = value;
} else {
if ((typeof(value) == "string") && (_local6.toLowerCase().indexOf("color") > -1)) {
if (value.charAt(0) == "#") {
value = value.slice(1);
}
value = ((value.charAt(1).toLowerCase() != "x") ? (Number("0x" + value)) : (Number(value)));
}
_local2[_local6] = value;
}
var _local7 = target.filters;
if (_local1 == -1) {
_local7.push(_local2);
} else {
_local7[_local1] = _local2;
}
target.filters = _local7;
}
static function setFilterProps(target, filterOrPropsObj, propsObj) {
if (arguments.length < 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("203", arguments.length);
return(undefined);
}
if (_classes == undefined) {
initialize(null);
}
var _local10 = new Object();
var _local11 = arguments.length == 2;
if (_local11 == false) {
var _local14 = getFilterName(getInstance(filterOrPropsObj));
if (_classes[_local14] == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("204", filterOrPropsObj);
return(undefined);
}
_local10[_local14] = 1;
} else {
propsObj = filterOrPropsObj;
for (var _local12 in propsObj) {
var _local14 = _local12.split("_")[0] + "Filter";
if ((_classes[_local14] != undefined) && (_local10[_local14] == undefined)) {
_local10[_local14] = 1;
}
}
}
if (!(target instanceof Array)) {
target = [target];
}
for (var _local15 in target) {
var _local5 = target[_local15];
for (var _local14 in _local10) {
var _local3 = new _classes[_local14]();
if ((BLUR_ZERO == true) && (_local14 == "BlurFilter")) {
_local3.blurX = (_local3.blurY = 0);
}
var _local4 = _local5.filters.length || 0;
while (_local4-- , _local4 > -1) {
if (_local5.filters[_local4].__proto__ == _local3.__proto__) {
_local3 = _local5.filters[_local4];
break;
}
}
if (_local3 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local14, _local5);
continue;
}
var _local7 = String(_local14).slice(0, -6) + "_";
for (var _local12 in propsObj) {
var _local6 = _local12.indexOf(_local7) == 0;
if ((_local11 == true) && (_local6 == false)) {
continue;
}
var _local2 = propsObj[_local12];
if (_local6 == true) {
var _local12 = _local12.slice(_local7.length);
}
if (_local12 == "blur") {
_local3.blurX = _local2;
_local3.blurY = _local2;
} else {
if ((typeof(_local2) == "string") && (_local12.toLowerCase().indexOf("color") > -1)) {
if (_local2.charAt(0) == "#") {
_local2 = _local2.slice(1);
}
_local2 = ((_local2.charAt(1).toLowerCase() != "x") ? (Number("0x" + _local2)) : (Number(_local2)));
}
_local3[_local12] = _local2;
}
}
var _local8 = _local5.filters;
if (_local4 == -1) {
_local8.push(_local3);
} else {
_local8[_local4] = _local3;
}
_local5.filters = _local8;
}
}
}
static function getAllShortcuts() {
if (_classes == undefined) {
initialize(null);
}
var _local2 = [];
for (var _local4 in _classes) {
var _local1 = new _classes[_local4]();
for (var _local3 in _local1) {
if (typeof(_local1[_local3]) == "function") {
continue;
}
_local2.push((_local4.substr(0, -6) + "_") + _local3);
if (_local3 == "blurX") {
_local2.push(_local4.substr(0, -6) + "_blur");
}
}
}
return(_local2);
}
static function traceAllFilters() {
if (_classes == undefined) {
initialize(null);
}
var _local1 = "------ FuseFMP filter properties ------\n";
for (var _local4 in _classes) {
_local1 = _local1 + _local4;
var _local2 = new _classes[_local4]();
for (var _local3 in _local2) {
if (typeof(_local2[_local3]) == "function") {
continue;
}
_local1 = _local1 + ((("\t- " + _local4.substr(0, -6)) + "_") + _local3);
if (_local3 == "blurX") {
_local1 = _local1 + (("\t- " + _local4.substr(0, -6)) + "_blur");
}
}
_local1 = _local1 + newline;
}
com.mosesSupposes.fuse.FuseKitCommon.output(_local1);
}
static function getInstance(filter) {
if (filter instanceof flash.filters.BitmapFilter) {
return(flash.filters.BitmapFilter(filter));
}
if (typeof(filter) == "function") {
for (var _local4 in _classes) {
if (filter == _classes[_local4]) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
if (typeof(filter) == "string") {
var _local3 = String(filter);
if (_local3.substr(-6) != "Filter") {
_local3 = _local3 + "Filter";
}
for (var _local4 in _classes) {
if (_local4 == _local3) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
return(null);
}
static var registryKey = "fuseFMP";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var BLUR_ZERO = true;
}
Symbol 584 MovieClip [__Packages.ParticleSystem] Frame 0
class ParticleSystem
{
var particle_array, particlesToMake, emitter_mc, particlesPerFrame, speed, speedVariation, life, lifeVariation, sprayTime, scale, scaleVariation, growFrames, shrinkFrames, fadeInFrames, fadeOutFrames, customData, image, angle, spread, loopInterval, sprayTimer, onComplete;
function ParticleSystem (newEmitter_mc, newSettings, newCustomData) {
particle_array = new Array();
particlesToMake = 0;
emitter_mc = newEmitter_mc;
particlesPerFrame = ((newSettings.particlesPerFrame != undefined) ? (newSettings.particlesPerFrame) : 1);
speed = ((newSettings.speed != undefined) ? (newSettings.speed) : 1);
speedVariation = ((newSettings.speedVariation != undefined) ? (newSettings.speedVariation) : 0);
life = ((newSettings.life != undefined) ? (newSettings.life) : 30);
lifeVariation = ((newSettings.lifeVariation != undefined) ? (newSettings.lifeVariation) : 0);
sprayTime = (newSettings.sprayTime ? (newSettings.sprayTime) : null);
scale = ((newSettings.scale != undefined) ? (newSettings.scale) : 1);
scaleVariation = ((newSettings.scaleVariation != undefined) ? (newSettings.scaleVariation) : 0);
growFrames = ((newSettings.growFrames != undefined) ? (newSettings.growFrames) : 0);
shrinkFrames = ((newSettings.shrinkFrames != undefined) ? (newSettings.shrinkFrames) : 0);
fadeInFrames = ((newSettings.fadeInFrames != undefined) ? (newSettings.fadeInFrames) : 0);
fadeOutFrames = ((newSettings.fadeOutFrames != undefined) ? (newSettings.fadeOutFrames) : 0);
customData = {};
if (newSettings.customData) {
customData = newSettings.customData;
}
if (newCustomData) {
customData = newCustomData;
}
image = ((newSettings.image != undefined) ? (newSettings.image) : "test_particle");
angle = ((newSettings.angle != undefined) ? (newSettings.angle) : 0);
spread = ((newSettings.spread != undefined) ? (newSettings.spread) : 360);
var _local3 = 30;
loopInterval = setInterval(this, "loop", _local3);
}
function loop() {
makeNewParticles();
moveAllParticles();
checkSprayTime();
}
function makeNewParticles() {
particlesToMake = particlesToMake + particlesPerFrame;
var _local2 = 0;
while (_local2 < Math.floor(particlesToMake)) {
var _local3 = makeParticle();
if (_local3) {
particle_array.push(_local3);
}
var _local4 = true;
_local2++;
}
if (_local4) {
particlesToMake = 0;
}
}
function makeParticle() {
var _local2 = Math.floor(Math.random() * 9999);
while (emitter_mc._parent.getInstanceAtDepth(_local2) != undefined) {
_local2 = Math.floor(Math.random() * 9999);
}
var _local6 = "particle_" + _local2;
var _local8 = (speed + (Math.random() * speedVariation)) - (speedVariation / 2);
var _local5 = (-angle) % 360;
_local5 = _local5 + ((Math.random() * spread) - (spread / 2));
var _local7 = (_local5 * (Math.PI*2)) / 360;
var _local12 = flash.geom.Point.polar(_local8, _local7);
var _local9 = (life + (Math.random() * lifeVariation)) - (lifeVariation / 2);
var _local4 = (scale + (Math.random() * scaleVariation)) - (scaleVariation / 2);
_local4 = _local4 * 100;
var _local3 = emitter_mc._parent.attachMovie(image, _local6, _local2, {particleData:customData, particle_vec:_local12, particleLife:_local9, particleFullLife:_local9, particleFullScale:_local4});
_local3._x = emitter_mc._x;
_local3._y = emitter_mc._y;
_local3._xscale = (_local3._yscale = _local4);
if (growFrames != 0) {
_local3._xscale = (_local3._yscale = 0);
}
return(_local3);
}
function moveAllParticles() {
var _local2 = 0;
while (_local2 < particle_array.length) {
var _local3 = particle_array[_local2];
_local3.particleLife--;
if (checkForDeath(_local2)) {
_local2--;
} else {
moveParticle(_local2);
growParticle(_local2);
shrinkParticle(_local2);
fadeInParticle(_local2);
fadeOutParticle(_local2);
}
_local2++;
}
}
function moveParticle(p) {
var _local2 = particle_array[p];
_local2._x = _local2._x + _local2.particle_vec.x;
_local2._y = _local2._y + _local2.particle_vec.y;
}
function checkSprayTime() {
if (sprayTime != null) {
if ((particlesPerFrame > 0) && (sprayTimer == null)) {
sprayTimer = sprayTime;
}
if (sprayTimer == 0) {
particlesPerFrame = 0;
sprayTimer = null;
} else if (sprayTimer > 0) {
sprayTimer--;
}
}
}
function checkForDeath(p) {
var _local2 = particle_array[p];
if (_local2.particleLife <= 0) {
particle_array.splice(p, 1);
_local2.removeMovieClip();
if (particle_array.length == 0) {
onComplete();
}
return(true);
}
return(false);
}
function growParticle(p) {
if (growFrames) {
var _local2 = particle_array[p];
if (_local2.particleLife > (_local2.particleFullLife - growFrames)) {
var _local3 = _local2.particleFullLife - _local2.particleLife;
var _local5 = _local3 / growFrames;
var _local4 = _local2.particleFullScale * _local5;
_local2._xscale = (_local2._yscale = _local4);
}
}
}
function shrinkParticle(p) {
if (shrinkFrames) {
var _local2 = particle_array[p];
if (_local2.particleLife <= shrinkFrames) {
var _local3 = 100 / shrinkFrames;
_local2._xscale = _local2._xscale - _local3;
_local2._yscale = _local2._yscale - _local3;
}
}
}
function fadeInParticle(p) {
if (fadeInFrames) {
var _local2 = particle_array[p];
if (_local2.particleLife > (_local2.particleFullLife - fadeInFrames)) {
var _local4 = _local2.particleFullLife - _local2.particleLife;
var _local5 = _local4 / fadeInFrames;
var _local3 = 100 * _local5;
_local2._alpha = _local3;
}
}
}
function fadeOutParticle(p) {
if (fadeOutFrames) {
var _local2 = particle_array[p];
if (_local2.particleLife <= fadeOutFrames) {
var _local3 = 100 / fadeOutFrames;
_local2._alpha = _local2._alpha - _local3;
}
}
}
function deleteAllParticles() {
for (var _local2 in particle_array) {
particle_array[_local2].removeMovieClip();
}
}
}
Symbol 11 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.2.126";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 12 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
this[_local5] = _local2;
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.2.126";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 13 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 14 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 15 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 16 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 17 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.2.126";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 118 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 119 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.126";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 120 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 121 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 122 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local8 = false;
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
_local8 = true;
}
if (_local8) {
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 123 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.126";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 124 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 126 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 127 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 128 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 129 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 130 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 131 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 132 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 133 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.126";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 134 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 135 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 136 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 137 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 138 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 140 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.126";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 141 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 142 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 294 MovieClip [__Packages.mx.containers.ScrollPane] Frame 0
class mx.containers.ScrollPane extends mx.core.ScrollView
{
var _total, _loaded, destroyChildAt, createChild, __scrollContent, spContentHolder, hScroller, vScroller, __get__hScrollPolicy, __vScrollPolicy, __get__vScrollPolicy, tabEnabled, keyDown, mask_mc, hPosition, __get__maxHPosition, vPosition, __get__maxVPosition, __hPosition, __vPosition, invalidate;
function ScrollPane () {
super();
}
function getBytesTotal() {
return(_total);
}
function getBytesLoaded() {
return(_loaded);
}
function set contentPath(scrollableContent) {
if (!initializing) {
if (scrollableContent == undefined) {
destroyChildAt(0);
} else {
if (this[mx.core.View.childNameBase + 0] != undefined) {
destroyChildAt(0);
}
createChild(scrollableContent, "spContentHolder");
}
}
__scrollContent = scrollableContent;
//return(contentPath);
}
function get contentPath() {
return(__scrollContent);
}
function get content() {
return(spContentHolder);
}
function setHPosition(position) {
if ((position <= hScroller.maxPos) && (position >= hScroller.minPos)) {
super.setHPosition(position);
spContentHolder._x = -position;
}
}
function setVPosition(position) {
if ((position <= vScroller.maxPos) && (position >= vScroller.minPos)) {
super.setVPosition(position);
spContentHolder._y = -position;
}
}
function get vLineScrollSize() {
return(__vLineScrollSize);
}
function set vLineScrollSize(vLineSize) {
__vLineScrollSize = vLineSize;
vScroller.__set__lineScrollSize(vLineSize);
//return(vLineScrollSize);
}
function get hLineScrollSize() {
return(__hLineScrollSize);
}
function set hLineScrollSize(hLineSize) {
__hLineScrollSize = hLineSize;
hScroller.__set__lineScrollSize(hLineSize);
//return(hLineScrollSize);
}
function get vPageScrollSize() {
return(__vPageScrollSize);
}
function set vPageScrollSize(vPageSize) {
__vPageScrollSize = vPageSize;
vScroller.__set__pageScrollSize(vPageSize);
//return(vPageScrollSize);
}
function get hPageScrollSize() {
return(__hPageScrollSize);
}
function set hPageScrollSize(hPageSize) {
__hPageScrollSize = hPageSize;
hScroller.__set__pageScrollSize(hPageSize);
//return(hPageScrollSize);
}
function set hScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
//return(__get__hScrollPolicy());
}
function set vScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
//return(__get__vScrollPolicy());
}
function get scrollDrag() {
return(__scrollDrag);
}
function set scrollDrag(s) {
__scrollDrag = s;
if (__scrollDrag) {
spContentHolder.useHandCursor = true;
spContentHolder.onPress = function () {
this._parent.startDragLoop();
};
spContentHolder.tabEnabled = false;
spContentHolder.onRelease = (spContentHolder.onReleaseOutside = function () {
delete this.onMouseMove;
});
__scrollDrag = true;
} else {
delete spContentHolder.onPress;
spContentHolder.tabEnabled = false;
spContentHolder.tabChildren = true;
spContentHolder.useHandCursor = false;
__scrollDrag = false;
}
//return(scrollDrag);
}
function init(Void) {
super.init();
tabEnabled = true;
keyDown = _onKeyDown;
}
function createChildren(Void) {
super.createChildren();
mask_mc._visible = false;
initializing = false;
if ((__scrollContent != undefined) && (__scrollContent != "")) {
contentPath = (__scrollContent);
}
}
function size(Void) {
super.size();
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
hPosition = Math.min(hPosition, __get__maxHPosition());
vPosition = Math.min(vPosition, __get__maxVPosition());
}
function setScrollProperties(columnCount, columnWidth, rowCount, rowHeight) {
super.setScrollProperties(columnCount, columnWidth, rowCount, rowHeight);
hScroller.__set__lineScrollSize(__hLineScrollSize);
hScroller.__set__pageScrollSize(__hPageScrollSize);
vScroller.__set__lineScrollSize(__vLineScrollSize);
vScroller.__set__pageScrollSize(__vPageScrollSize);
}
function onScroll(scrollEvent) {
spContentHolder._x = -__hPosition;
spContentHolder._y = -__vPosition;
super.onScroll(scrollEvent);
}
function childLoaded(obj) {
super.childLoaded(obj);
onComplete();
}
function onComplete(Void) {
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
hPosition = 0;
vPosition = 0;
scrollDrag = (__scrollDrag);
invalidate();
}
function startDragLoop(Void) {
spContentHolder.lastX = spContentHolder._xmouse;
spContentHolder.lastY = spContentHolder._ymouse;
spContentHolder.onMouseMove = function () {
var _local5 = this.lastX - this._xmouse;
var _local4 = this.lastY - this._ymouse;
_local5 = _local5 + this._parent.hPosition;
_local4 = _local4 + this._parent.vPosition;
var _local3 = this._parent.getViewMetrics();
var _local7 = (this._parent.__height - _local3.top) - _local3.bottom;
var _local6 = (this._parent.__width - _local3.left) - _local3.right;
this._parent.__hPosition = Math.max(0, Math.min(_local5, this._width - _local6));
this._parent.__vPosition = Math.max(0, Math.min(_local4, this._height - _local7));
this._parent.hScroller.scrollPosition = this._parent.__hPosition;
this._x = -this._parent.hPosition;
this._parent.vScroller.scrollPosition = this._parent.__vPosition;
this._y = -this._parent.vPosition;
super.dispatchEvent({type:"scroll"});
};
}
function dispatchEvent(o) {
o.target = this;
_total = o.total;
_loaded = o.current;
super.dispatchEvent(o);
}
function refreshPane(Void) {
contentPath = (__scrollContent);
}
function _onKeyDown(e) {
if (((hScroller != undefined) && (__hPosition <= hScroller.maxPos)) && (__hPosition >= hScroller.minPos)) {
if (e.code == 37) {
hPosition = hPosition - hLineScrollSize;
} else if (e.code == 39) {
hPosition = hPosition + hLineScrollSize;
}
}
if (((vScroller != undefined) && (__vPosition <= vScroller.maxPos)) && (__vPosition >= vScroller.minPos)) {
if (e.code == 33) {
vPosition = vPosition - vPageScrollSize;
} else if (e.code == 34) {
vPosition = vPosition + vPageScrollSize;
}
if (e.code == 40) {
vPosition = vPosition + vLineScrollSize;
} else if (e.code == 38) {
vPosition = vPosition - vLineScrollSize;
}
}
if (e.code == 36) {
vPosition = vScroller.minPos;
} else if (e.code == 35) {
vPosition = vScroller.maxPos;
}
}
static var symbolName = "ScrollPane";
static var symbolOwner = mx.containers.ScrollPane;
var className = "ScrollPane";
static var version = "2.0.2.126";
var __hScrollPolicy = "auto";
var __scrollDrag = false;
var __vLineScrollSize = 5;
var __hLineScrollSize = 5;
var __vPageScrollSize = 20;
var __hPageScrollSize = 20;
var clipParameters = {contentPath:1, scrollDrag:1, hScrollPolicy:1, vScrollPolicy:1, vLineScrollSize:1, hLineScrollSize:1, vPageScrollSize:1, hPageScrollSize:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.containers.ScrollPane.prototype.clipParameters, mx.core.ScrollView.prototype.clipParameters);
var initializing = true;
}
Symbol 296 MovieClip [__Packages.mx.controls.TextArea] Frame 0
class mx.controls.TextArea extends mx.core.ScrollView
{
var label, invalidate, initText, dispatchValueChangedEvent, getHPosition, setHPosition, getVPosition, setVPosition, _color, focusTextField, tfx, tfy, tfw, tfh, doLater, _vpos, _hpos, hookedV, vScroller, hookedH, hScroller, getViewMetrics, __get__width, __get__height, hScrollPolicy, vScrollPolicy, getStyle, getFocusManager, addEventListener, removeEventListener, _getTextFormat;
function TextArea () {
super();
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(x) {
label.maxChars = x;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(s) {
label.restrict = ((s == "") ? null : (s));
//return(restrict);
}
function get wordWrap() {
return(label.wordWrap);
}
function set wordWrap(s) {
label.wordWrap = s;
invalidate();
//return(wordWrap);
}
function get editable() {
return(__editable);
}
function set editable(x) {
__editable = x;
label.type = (x ? "input" : "dynamic");
//return(editable);
}
function get password() {
return(label.password);
}
function set password(s) {
label.password = s;
//return(password);
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
var _local2 = label;
if (_local2.html == true) {
return(_local2.htmlText);
}
return(_local2.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
invalidate();
}
dispatchValueChangedEvent(t);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
label.hscroll = pos;
label.background = false;
//return(hPosition);
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
label.scroll = pos + 1;
label.background = false;
//return(vPosition);
}
function get maxVPosition() {
var _local2 = label.maxscroll - 1;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
var _local2 = label.maxhscroll;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function init(Void) {
super.init();
label.styleName = this;
_color = mx.core.UIObject.textColorList;
focusTextField = label;
label.owner = this;
label.onSetFocus = function (x) {
this._parent.onSetFocus(x);
};
label.onKillFocus = function (x) {
this._parent.onKillFocus(x);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = function () {
this.owner.adjustScrollBars();
this.owner.dispatchEvent({type:"change"});
this.owner.dispatchValueChangedEvent(this.owner.text);
};
label.onScroller = function () {
this.owner.hPosition = this.hscroll;
this.owner.vPosition = this.scroll - 1;
};
if (text == undefined) {
text = ("");
}
}
function createChildren(Void) {
super.createChildren();
label.autoSize = "none";
}
function layoutContent(x, y, totalW, totalH, displayW, displayH) {
var _local2 = label;
if ((((tfx != x) || (tfy != y)) || (tfw != displayW)) || (tfh != displayH)) {
tfx = x;
tfy = y;
tfw = displayW;
tfh = displayH;
_local2.move(tfx, tfy);
_local2.setSize(tfw, tfh);
doLater(this, "adjustScrollBars");
}
}
function scrollChanged(Void) {
var _local2 = Selection;
if (_local2.lastBeginIndex != undefined) {
restoreSelection();
}
label.background = false;
}
function onScroll(docObj) {
var _local3 = label;
super.onScroll(docObj);
_local3.hscroll = hPosition + 0;
_local3.scroll = vPosition + 1;
_vpos = _local3.scroll;
_hpos = _local3.hscroll;
_local3.background = false;
if (hookedV != true) {
vScroller.addEventListener("scrollChanged", this);
hookedV = true;
}
if (hookedH != true) {
hScroller.addEventListener("scrollChanged", this);
hookedH = true;
}
}
function size(Void) {
var _local3 = getViewMetrics();
var _local7 = _local3.left + _local3.right;
var _local4 = _local3.top + _local3.bottom;
var _local6 = _local3.left;
var _local5 = _local3.top;
tfx = _local6;
tfy = _local5;
tfw = __get__width() - _local7;
tfh = __get__height() - _local4;
super.size();
label.move(tfx, tfy);
label.setSize(tfw, tfh);
if (__get__height() <= 40) {
hScrollPolicy = "off";
vScrollPolicy = "off";
}
doLater(this, "adjustScrollBars");
}
function setEnabled(enable) {
vScroller.enabled = enable;
hScroller.enabled = enable;
label.type = (((editable == false) || (enable == false)) ? "dynamic" : "input");
label.selectable = enable;
var _local3 = getStyle((enable ? "color" : "disabledColor"));
if (_local3 == undefined) {
_local3 = (enable ? 0 : 8947848);
}
setColor(_local3);
}
function setColor(col) {
label.textColor = col;
}
function setFocus(Void) {
Selection.setFocus(label);
}
function onSetFocus(x) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
getFocusManager().defaultPushButtonEnabled = false;
addEventListener("keyDown", this);
super.onSetFocus(x);
}
function onKillFocus(x) {
getFocusManager().defaultPushButtonEnabled = true;
removeEventListener("keyDown", this);
super.onKillFocus(x);
}
function restoreSelection(x) {
var _local2 = Selection;
Selection.setSelection(_local2.lastBeginIndex, _local2.lastEndIndex);
label.scroll = _vpos;
label.hscroll = _hpos;
}
function getLineOffsets(Void) {
var _local16 = _getTextFormat();
var _local18 = _local16.getTextExtent2(label.text);
var _local5 = _root._getTextExtent;
_local5.setNewTextFormat(_local16);
var _local14 = label.wordWrap;
var _local9 = 0;
var _local7 = (label._width - 2) - 2;
var _local12 = new Array();
var _local17 = new String(label.text);
var _local15 = _local17.split("\r");
var _local11 = 0;
while (_local11 < _local15.length) {
_local12.push(_local9);
var _local4 = _local15[_local11];
_local5.text = _local4;
var _local13 = Math.ceil(_local5.textWidth / _local7);
var _local10 = Math.floor(_local4.length / _local13);
var _local3;
while (_local14 && (_local5.textWidth > _local7)) {
_local3 = _local4.indexOf(" ", _local10);
var _local6;
if (_local3 == -1) {
_local3 = _local4.lastIndexOf(" ");
if (_local3 == -1) {
_local3 = _local10;
}
}
_local6 = _local4.substr(0, _local3);
_local5.text = _local6;
if (_local5.textWidth > _local7) {
while (_local5.textWidth > _local7) {
var _local8 = _local3;
_local3 = _local4.lastIndexOf(" ", _local3 - 1);
if (_local3 == -1) {
_local3 = _local8 - 1;
}
_local6 = _local4.substr(0, _local3);
_local5.text = _local6;
}
} else if (_local5.textWidth < _local7) {
var _local8 = _local3;
while (_local5.textWidth < _local7) {
_local8 = _local3;
_local3 = _local4.indexOf(" ", _local3 + 1);
if (_local3 == -1) {
if (_local4.indexOf(" ", 0) != -1) {
break;
}
_local3 = _local8 + 1;
}
_local6 = _local4.substr(0, _local3);
_local5.text = _local6;
}
_local3 = _local8;
}
_local9 = _local9 + _local3;
_local12.push(_local9 + 1);
_local4 = _local4.substr(_local3);
if (_local4.charAt(0) == " ") {
_local4 = _local4.substr(1, _local4.length - 1);
_local9 = _local9 + 1;
}
_local5.text = _local4;
}
_local9 = _local9 + (_local4.length + 1);
_local11++;
}
return(_local12);
}
function keyDown(e) {
var _local5 = e.code;
if (_local5 == 34) {
var _local6 = (label.bottomScroll - label.scroll) + 1;
var _local3 = getLineOffsets();
var _local2 = Math.min(label.bottomScroll + 1, label.maxscroll);
if (_local2 == label.maxscroll) {
var _local4 = label.length;
Selection.setSelection(_local4, _local4);
} else {
label.scroll = _local2;
Selection.setSelection(_local3[_local2 - 1], _local3[_local2 - 1]);
}
} else if (_local5 == 33) {
var _local6 = (label.bottomScroll - label.scroll) + 1;
var _local3 = getLineOffsets();
var _local2 = label.scroll - 1;
if (_local2 < 1) {
Selection.setSelection(0, 0);
} else {
Selection.setSelection(_local3[_local2 - 1], _local3[_local2 - 1]);
label.scroll = Math.max(_local2 - _local6, 1);
}
}
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = true;
_local2.wordWrap = wordWrap == true;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = ((editable == true) ? "input" : "dynamic");
size();
_local2.background = false;
}
function adjustScrollBars() {
var _local2 = label;
var _local4 = (_local2.bottomScroll - _local2.scroll) + 1;
var _local3 = (_local4 + _local2.maxscroll) - 1;
if (_local3 < 1) {
_local3 = 1;
}
var _local5 = 0;
if ((_local2.textWidth + 5) > _local2._width) {
if (!_local2.wordWrap) {
_local5 = _local2._width + _local2.maxhscroll;
}
} else {
_local2.hscroll = 0;
_local2.background = false;
}
if ((_local2.height / _local4) != Math.round(_local2.height / _local4)) {
_local3--;
}
setScrollProperties(_local5, 1, _local3, _local2.height / _local4);
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
super.setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding);
if (vScroller == undefined) {
hookedV = false;
}
if (hScroller == undefined) {
hookedH = false;
}
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
function get styleSheet() {
return(label.styleSheet);
}
function set styleSheet(v) {
label.styleSheet = v;
//return(styleSheet);
}
static var symbolName = "TextArea";
static var symbolOwner = mx.controls.TextArea;
static var version = "2.0.2.126";
var className = "TextArea";
var initializing = true;
var clipParameters = {text:1, wordWrap:1, editable:1, maxChars:1, restrict:1, html:1, password:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextArea.prototype.clipParameters, mx.core.ScrollView.prototype.clipParameters);
var __vScrollPolicy = "auto";
var __hScrollPolicy = "auto";
var __editable = true;
}
Symbol 337 MovieClip [__Packages.mx.controls.TextInput] Frame 0
class mx.controls.TextInput extends mx.core.UIComponent
{
var owner, enterListener, label, tabChildren, tabEnabled, focusTextField, _color, _parent, border_mc, createClassObject, dispatchValueChangedEvent, __get__width, __get__height, tfx, tfy, tfw, tfh, getStyle, bind, updateModel, _getTextFormat, enabled;
function TextInput () {
super();
}
function addEventListener(event, handler) {
if (event == "enter") {
addEnterEvents();
}
super.addEventListener(event, handler);
}
function enterOnKeyDown() {
if (Key.getAscii() == 13) {
owner.dispatchEvent({type:"enter"});
}
}
function addEnterEvents() {
if (enterListener == undefined) {
enterListener = new Object();
enterListener.owner = this;
enterListener.onKeyDown = enterOnKeyDown;
}
}
function init(Void) {
super.init();
label.styleName = this;
tabChildren = true;
tabEnabled = false;
focusTextField = label;
_color = mx.core.UIObject.textColorList;
label.onSetFocus = function () {
this._parent.onSetFocus();
};
label.onKillFocus = function (n) {
this._parent.onKillFocus(n);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = onLabelChanged;
}
function setFocus() {
Selection.setFocus(label);
}
function onLabelChanged(Void) {
_parent.dispatchEvent({type:"change"});
_parent.dispatchValueChangedEvent(text);
}
function createChildren(Void) {
super.createChildren();
if (border_mc == undefined) {
createClassObject(_global.styles.rectBorderClass, "border_mc", 0, {styleName:this});
}
border_mc.swapDepths(label);
label.autoSize = "none";
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
if (label.html == true) {
return(label.htmlText);
}
return(label.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
}
dispatchValueChangedEvent(t);
}
function size(Void) {
border_mc.setSize(__get__width(), __get__height());
var _local2 = border_mc.__get__borderMetrics();
var _local6 = _local2.left + _local2.right;
var _local3 = _local2.top + _local2.bottom;
var _local5 = _local2.left;
var _local4 = _local2.top;
tfx = _local5;
tfy = _local4;
tfw = __get__width() - _local6;
tfh = __get__height() - _local3;
label.move(tfx, tfy);
label.setSize(tfw, tfh + 1);
}
function setEnabled(enable) {
label.type = (((__editable == true) || (enable == false)) ? "input" : "dynamic");
label.selectable = enable;
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
label.textColor = col;
}
function onKillFocus(newFocus) {
if (enterListener != undefined) {
Key.removeListener(enterListener);
}
if (bind != undefined) {
updateModel(text);
}
super.onKillFocus(newFocus);
}
function onSetFocus(oldFocus) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
if (enterListener != undefined) {
Key.addListener(enterListener);
}
super.onSetFocus(oldFocus);
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = false;
_local2.wordWrap = false;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = (((__editable == true) || (enabled == false)) ? "input" : "dynamic");
size();
}
function setEditable(s) {
__editable = s;
label.type = (s ? "input" : "dynamic");
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(w) {
label.maxChars = w;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(w) {
label.restrict = ((w == "") ? null : (w));
//return(restrict);
}
function get hPosition() {
return(label.hscroll);
}
function set hPosition(w) {
label.hscroll = w;
//return(hPosition);
}
function get maxHPosition() {
return(label.maxhscroll);
}
function get editable() {
return(__editable);
}
function set editable(w) {
setEditable(w);
//return(editable);
}
function get password() {
return(label.password);
}
function set password(w) {
label.password = w;
//return(password);
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
static var symbolName = "TextInput";
static var symbolOwner = mx.controls.TextInput;
static var version = "2.0.2.126";
var className = "TextInput";
var initializing = true;
var clipParameters = {text:1, editable:1, password:1, maxChars:1, restrict:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextInput.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var _maxWidth = mx.core.UIComponent.kStretch;
var __editable = true;
var initText = "";
}
Symbol 398 MovieClip [__Packages.mx.controls.NumericStepper] Frame 0
class mx.controls.NumericStepper extends mx.core.UIComponent
{
var boundingBox_mc, _visible, tabEnabled, tabChildren, nextButton_mc, __width, prevButton_mc, __height, inputField, StepTrack_mc, focusTextField, createObject, enabled, __set__visible, setSize, createClassObject, __maxChars, dispatchEvent;
function NumericStepper () {
super();
}
function init() {
super.init();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
_visible = false;
tabEnabled = false;
tabChildren = true;
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
if (initializing) {
__visible = x;
}
}
function layoutControl() {
nextButton_mc._x = __width - nextButton_mc.__width;
nextButton_mc._y = 0;
prevButton_mc._x = __width - prevButton_mc.__width;
prevButton_mc._y = __height - prevButton_mc.__height;
inputField.setSize(__width - nextButton_mc.__width, __height);
StepTrack_mc._width = Math.max(nextButton_mc.__width, prevButton_mc.__width);
StepTrack_mc._x = __width - StepTrack_mc._width;
StepTrack_mc._height = __height - (nextButton_mc._height + prevButton_mc._height);
StepTrack_mc._y = nextButton_mc.__height;
}
function createChildren() {
super.createChildren();
addAsset("nextButton_mc", skinIDUpArrow);
addAsset("prevButton_mc", skinIDDownArrow);
addAsset("inputField", skinIDInput);
focusTextField = inputField.label;
createObject("StepTrack", "StepTrack_mc", 2);
size();
}
function draw() {
prevButton_mc.enabled = enabled;
nextButton_mc.enabled = enabled;
inputField.enabled = enabled;
size();
initializing = false;
__set__visible(__visible);
}
function size() {
var _local2 = calcMinHeight();
var _local3 = calcMinWidth();
if (__height < _local2) {
setSize(__width, _local2);
}
if (__width < _local3) {
setSize(_local3, __height);
}
layoutControl();
}
function calcMinHeight() {
return(22);
}
function calcMinWidth() {
return(40);
}
function addAsset(id, skinID) {
var _local2 = new Object();
_local2.styleName = this;
if (skinID == 10) {
_local2.falseUpSkin = upArrowUp;
_local2.falseOverSkin = upArrowOver;
_local2.falseDownSkin = upArrowDown;
_local2.falseDisabledSkin = upArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local5 = nextButton_mc;
_local5.tabEnabled = false;
_local5.styleName = this;
_local5._x = __width - _local5.__width;
_local5._y = 0;
_local5.owner = this;
_local5.autoRepeat = true;
_local5.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local5.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 11) {
_local2.falseUpSkin = downArrowUp;
_local2.falseOverSkin = downArrowOver;
_local2.falseDownSkin = downArrowDown;
_local2.falseDisabledSkin = downArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local3 = prevButton_mc;
_local3.tabEnabled = false;
_local3.styleName = this;
_local3._x = __width - _local3.__width;
_local3._y = __height - _local3.__height;
_local3.owner = this;
_local3.autoRepeat = true;
_local3.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local3.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 9) {
createClassObject(mx.controls.TextInput, id, skinID);
var _local4 = inputField;
_local4.styleName = this;
_local4.setSize(__width - nextButton_mc.__width, __height);
_local4.restrict = "0-9\\-\\.\\,";
_local4.maxChars = __maxChars;
_local4.text = value;
_local4.onSetFocus = function () {
this._parent.onSetFocus();
};
_local4.onKillFocus = function () {
this._parent.onKillFocus();
};
_local4.drawFocus = function (b) {
this._parent.drawFocus(b);
};
_local4.onKeyDown = function () {
this._parent.onFieldKeyDown();
};
}
}
function setFocus() {
Selection.setFocus(inputField);
}
function onKillFocus() {
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = true;
super.onKillFocus();
Key.removeListener(inputField);
if (Number(inputField.text) != value) {
var _local3 = checkValidValue(Number(inputField.text));
inputField.text = _local3;
value = (_local3);
dispatchEvent({type:"change"});
}
}
function onSetFocus() {
super.onSetFocus();
Key.addListener(inputField);
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = false;
}
function onFieldKeyDown() {
var _local2 = value;
switch (Key.getCode()) {
case 40 :
var _local3 = value - stepSize;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 38 :
_local3 = stepSize + value;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 36 :
inputField.text = minimum;
value = (minimum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 35 :
inputField.text = maximum;
value = (maximum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 13 :
value = (Number(inputField.text));
if (_local2 == value) {
break;
}
dispatchEvent({type:"change"});
}
}
function get nextValue() {
if (checkRange(value + stepSize)) {
__nextValue = value + stepSize;
return(__nextValue);
}
}
function get previousValue() {
if (checkRange(__value - stepSize)) {
__previousValue = value - stepSize;
return(__previousValue);
}
}
function set maxChars(num) {
__maxChars = num;
inputField.maxChars = __maxChars;
//return(maxChars);
}
function get maxChars() {
return(__maxChars);
}
function get value() {
return(__value);
}
function set value(v) {
var _local2 = checkValidValue(v);
if (_local2 == __value) {
return;
}
inputField.text = (__value = _local2);
//return(value);
}
function get minimum() {
return(__minimum);
}
function set minimum(v) {
__minimum = v;
//return(minimum);
}
function get maximum() {
return(__maximum);
}
function set maximum(v) {
__maximum = v;
//return(maximum);
}
function get stepSize() {
return(__stepSize);
}
function set stepSize(v) {
__stepSize = v;
//return(stepSize);
}
function onFocus() {
}
function buttonPress(button) {
var _local2 = value;
if (button._name == "nextButton_mc") {
value = value + stepSize;
} else {
value = value - stepSize;
}
if (_local2 != value) {
dispatchEvent({type:"change"});
Selection.setSelection(0, 0);
}
}
function checkRange(v) {
return((v >= minimum) and (v <= maximum));
}
function checkValidValue(val) {
var _local7 = val / stepSize;
var _local9 = Math.floor(_local7);
var _local2 = stepSize;
var _local6 = minimum;
var _local5 = maximum;
if ((val > _local6) and (val < _local5)) {
if ((_local7 - _local9) == 0) {
return(val);
}
var _local8 = Math.floor(val / _local2);
var _local4 = _local8 * _local2;
if (((((val - _local4) >= (_local2 / 2)) && (_local5 >= (_local4 + _local2))) && (_local6 <= (_local4 - _local2))) || (((val + _local2) == _local5) && (((_local5 - _local4) - _local2) > 1E-14))) {
_local4 = _local4 + _local2;
}
return(_local4);
}
if (val >= _local5) {
return(_local5);
}
return(_local6);
}
function onLabelChanged(o) {
var _local2 = checkValidValue(Number(o.__get__text()));
o.__set__text(_local2);
value = (_local2);
}
function get tabIndex() {
return(inputField.tabIndex);
}
function set tabIndex(w) {
inputField.tabIndex = w;
//return(tabIndex);
}
static var symbolName = "NumericStepper";
static var symbolOwner = mx.controls.NumericStepper;
static var version = "2.0.2.126";
var className = "NumericStepper";
var upArrowUp = "StepUpArrowUp";
var upArrowDown = "StepUpArrowDown";
var upArrowOver = "StepUpArrowOver";
var upArrowDisabled = "StepUpArrowDisabled";
var downArrowUp = "StepDownArrowUp";
var downArrowDown = "StepDownArrowDown";
var downArrowOver = "StepDownArrowOver";
var downArrowDisabled = "StepDownArrowDisabled";
var skinIDUpArrow = 10;
var skinIDDownArrow = 11;
var skinIDInput = 9;
var initializing = true;
var __visible = true;
var __minimum = 0;
var __maximum = 10;
var __stepSize = 1;
var __value = 0;
var __nextValue = 0;
var __previousValue = 0;
var clipParameters = {minimum:1, maximum:1, stepSize:1, value:1, maxChars:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.NumericStepper.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
}
Symbol 319 MovieClip Frame 1
data_txt = "";
data = new XML(data_txt);
onLoad(data);
Symbol 321 MovieClip Frame 1
stop();
Symbol 322 MovieClip [scroll] Frame 1
stop();
_this = this;
if (data == undefined) {
data = {target:"player", smoothness:0.2, mode:"chase"};
}
screenWidth = 320;
screenHeight = 240;
if (_parent == SPRITES) {
OVERLAY.attachMovie("scroll", "scroll", nextDepth(OVERLAY), {data:data, _x:_x, _y:_y});
_this.removeMovieClip();
}
LOOP.addObject(_this, "scroll");
data.target = (target ? (target) : (data.target));
initTarget = data.target;
_this.getTarget = function () {
return(_chaseTarget);
};
_this.setTarget = function (newValue) {
_chaseTarget = SPRITES[newValue];
ROOT.game_mc.scroll_obj.target_mc = _this;
};
_this.addProperty("target", _this.getTarget, _this.setTarget);
target = initTarget;
data.smoothness = (smoothness ? (smoothness) : (data.smoothness));
initSmoothness = data.smoothness;
_this.getSmoothness = function () {
return(ROOT.game_mc.scroll_obj.smoothness);
};
_this.setSmoothness = function (newValue) {
ROOT.game_mc.scroll_obj.smoothness = newValue;
};
_this.addProperty("smoothness", _this.getSmoothness, _this.setSmoothness);
smoothness = initSmoothness;
data.mode = (mode ? (mode) : (data.mode));
initMode = data.mode;
_this.getMode = function () {
return(_mode);
};
_this.setMode = function (newValue) {
_mode = newValue;
_this.gotoAndStop(newValue);
};
_this.addProperty("mode", _this.getMode, _this.setMode);
mode = initMode;
Symbol 322 MovieClip [scroll] Frame 2
loop = function () {
_this._x = target._x;
_this._y = target._y;
};
Symbol 322 MovieClip [scroll] Frame 10
loop = function () {
var _local1 = Math.floor(target._x / screenWidth);
var _local2 = Math.floor(target._y / screenHeight);
_this._x = ((screenWidth * _local1) + (screenWidth / 2)) - 8;
_this._y = (screenHeight * _local2) + (screenHeight / 2);
};
Symbol 322 MovieClip [scroll] Frame 20
loop = function () {
};
Symbol 323 MovieClip [rpgSprite] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
_this = this;
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
makeStringObject = function (input_str, defaultContainer_str, thisName) {
var _local9 = null;
var _local8 = input_str.indexOf("{");
if ((_local8 == -1) || (_local8 == undefined)) {
_local9 = input_str;
} else {
var _local7 = {};
var _local12 = input_str.indexOf("}", _local8 + 1);
var _local10 = input_str.substring(_local8 + 1, _local12);
_local10 = nestedEval(_local10, defaultContainer_str, thisName);
var _local6 = _local10.split(",");
var _local2 = 0;
while (_local2 < _local6.length) {
var _local3 = _local6[_local2];
var _local4 = _local3.indexOf(":");
var _local5 = _local3.substr(0, _local4);
var _local1 = _local3.substr(_local4 + 1);
_local1 = getImpliedValue(_local1);
_local7[_local5] = _local1;
_local2++;
}
_local9 = _local7;
}
return(_local9);
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
if (data.copySprite.id) {
var settings = data.copySprite.data;
var copiedData = {};
var spriteName = nestedEval(data.copySprite.id, "RAM", "_this");
var spriteRef = evalPath(spriteName, "COMMON", "_this");
copyObject(spriteRef.data, copiedData);
_this.data = copiedData;
for (var nam in settings) {
var newValue = _this.nestedEval(settings[nam], "RAM", "_this");
newValue = _this.makeStringObject(newValue, "RAM", "_this");
_this[nam] = newValue;
}
}
image = newSprite(data.initialAppearance, this, "image", 0);
image._y = 8;
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
if (brightness) {
init_brightness = brightness;
} else if ((this.transform.colorTransform.redMultiplier == this.transform.colorTransform.greenMultiplier) && (this.transform.colorTransform.redMultiplier == this.transform.colorTransform.blueMultiplier)) {
init_brightness = (this.transform.colorTransform.redOffset * 100) / 255;
} else {
init_brightness = 0;
}
get_brightness = function () {
return(this.transform.colorTransform.redOffset);
};
set_brightness = function (newValue) {
var _local3 = _alpha / 100;
var _local2 = (newValue * 255) / 100;
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, _local3, _local2, _local2, _local2, 0);
};
this.addProperty("brightness", get_brightness, set_brightness);
brightness = init_brightness;
delete init_brightness;
delete get_brightness;
delete set_brightness;
tile = tile || ({});
tile.tileSize = 16;
tile.offset = tile.offset || ({});
tile.offset.x = 0;
tile.offset.y = 0;
get_xTile = function () {
return(Math.floor(_x / tile.tileSize));
};
set_xTile = function (newValue) {
_x = ((newValue * tile.tileSize) + tile.offset.x);
};
tile.addProperty("x", get_xTile, set_xTile);
get_yTile = function () {
return(Math.floor((_y - (tile.offset.y / 2)) / tile.tileSize));
};
set_yTile = function (newValue) {
_y = ((newValue * tile.tileSize) + tile.offset.y);
};
tile.addProperty("y", get_yTile, set_yTile);
moveTimeout = [];
moveTimeout.addTimeout = function (timeoutID) {
var _local2 = {timeoutID:timeoutID};
this.push(_local2);
};
moveTimeout.remove = function (timeoutID) {
var _local2 = this.length - 1;
while (_local2 >= 0) {
if (this[_local2].timeoutID == timeoutID) {
clearTimeout(this[_local2].timeoutID);
this.splice(_local2, 1);
}
_local2--;
}
};
moveTimeout.exists = function (timeoutID) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 >= 0) {
if (this[_local2].timeoutID == timeoutID) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
moveTimeout.removeAll = function () {
var _local1 = moveTimeout.length - 1;
while (_local1 >= 0) {
clearTimeout(moveTimeout[_local1].timeoutID);
moveTimeout.splice(_local1, 1);
_local1--;
}
};
stopMoving = function () {
_this.moveTimeout.removeAll();
_this.slideY.onMotionFinished();
};
makeDefaultScriptFunction = function (nam) {
_this["allow_" + nam] = true;
_this[nam] = function () {
if ((_this.scripts[nam].length > 0) && (_this["allow_" + nam])) {
_this["allow_" + nam] = false;
_this.scripts[nam].done = function () {
var _local1 = function (_this) {
_this["allow_" + nam] = true;
checkAsk();
};
setTimeout(_local1, 34, _this);
};
scripts[nam].runEvent(0);
}
};
};
makeScriptSystem = function () {
var _this = [];
AsBroadcaster.initialize(_this);
_this.index = 0;
_this.isDone = null;
_this.runEvent = function (eventIndex) {
eventIndex = eventIndex || 0;
_this.index = eventIndex;
if (eventIndex >= _this.length) {
_this.isDone = true;
if (eventIndex == _this.length) {
_this.done();
_this.broadcastMessage("onScriptDone");
}
} else {
_this.isDone = false;
_this[eventIndex].run(_this[eventIndex]);
}
};
_this.nextEvent = function () {
var _local1 = (_this.checkForInterrupt ? (_this.checkForInterrupt()) : true);
if (_local1) {
_this.runEvent(_this.index + 1);
} else {
_this.done();
_this.broadcastMessage("onScriptDone");
}
};
return(_this);
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
define_comment = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
var _local1 = nestedEval(thisCommand_obj.data.message, "RAM", "_this");
if (_local1) {
trace("comment: " + _local1);
}
thisCommand_obj.nextEvent();
};
};
define_fadeMusic = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("fadeMusic");
}
var _local3 = thisCommand_obj.data.volume;
var _local1 = thisCommand_obj.data.duration;
MUSIC.fadeTo(_local3, _local1);
thisCommand_obj.nextEvent();
};
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
define_fadeScreen = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("\nFade: " + thisCommand_obj.data.fadeDir);
}
var _local1 = function () {
if (thisCommand_obj.data.waitForEnd) {
thisCommand_obj.nextEvent();
}
};
var _local2 = ((thisCommand_obj.data.fadeDir == "out") ? "doFadeOut" : "doFadeIn");
TRANSITION[_local2]().then(_local1);
if (!thisCommand_obj.data.waitForEnd) {
thisCommand_obj.nextEvent();
}
};
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
define_if = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
var _local3 = thisCommand_obj.data;
var _local6 = nestedEval(_local3.condition[0], "RAM", "_this");
var _local2 = evalPath(_local6, "RAM", "_this");
var _local4 = getImpliedValue(_local3.condition[2]);
_local4 = nestedEval(_local4, "RAM", "_this");
var _local1 = getImpliedValue(_local4);
var _local5 = false;
switch (_local3.condition[1]) {
case "=" :
_local5 = _local2 == _local1;
break;
case "!=" :
_local5 = _local2 != _local1;
break;
case ">" :
if ((isNaN(_local2) == false) && (isNaN(_local1) == false)) {
_local5 = _local2 > _local1;
}
break;
case ">=" :
if ((isNaN(_local2) == false) && (isNaN(_local1) == false)) {
_local5 = _local2 >= _local1;
}
break;
case "<" :
if ((isNaN(_local2) == false) && (isNaN(_local1) == false)) {
_local5 = _local2 < _local1;
}
break;
case "<=" :
if (!((isNaN(_local2) == false) && (isNaN(_local1) == false))) {
break;
}
_local5 = _local2 <= _local1;
}
if (TRACE_SCRIPT) {
trace((((("if: " + _local3.condition[0]) + " ") + _local3.condition[1]) + " ") + _local3.condition[2]);
trace((((((((("\t (" + _local2) + " ") + _local3.condition[1]) + " ") + _local1) + ")") + " (") + _local5) + ")");
}
if (_local5 && (_local3.length > 0)) {
thisCommand_obj.script.done = function () {
thisCommand_obj.nextEvent();
};
thisCommand_obj.script.runEvent(0);
} else {
thisCommand_obj.nextEvent();
}
};
};
define_move = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
var _local3 = nestedEval(thisCommand_obj.data.sprite, "RAM", "_this");
if (_local3 == "this") {
_local3 = _this._name;
}
thisCommand_obj.sprite = evalPath(_local3, "SPRITES", "_this");
if (TRACE_SCRIPT) {
trace("move: " + _local3);
}
var _local2 = 0;
while (_local2 < this.script.length) {
this.script[_local2].sprite = thisCommand_obj.sprite;
_local2++;
}
thisCommand_obj.sprite.lastMove = {};
AsBroadcaster.initialize(thisCommand_obj.sprite.lastMove);
thisCommand_obj.script.thisCommand_obj = thisCommand_obj;
thisCommand_obj.script.done = function () {
if (TRACE_SCRIPT) {
trace("move done for: " + thisCommand_obj.sprite);
}
this.thisCommand_obj.sprite.lastMove.broadcastMessage("onMotionFinished");
delete this.thisCommand_obj.sprite.lastMove;
};
thisCommand_obj.script.runEvent(0);
setTimeout(thisCommand_obj.nextEvent, 1);
};
};
define_music = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
var _local2 = MUSIC.volume;
var _local4 = MUSIC.songVolume;
MUSIC.songVolume = 100;
MUSIC.volume = 100;
MUSIC.fade.onMotionFinished();
var _local1 = nestedEval(thisCommand_obj.data.file, "RAM", "_this");
if (TRACE_SCRIPT) {
trace("music: " + _local1);
}
MUSIC.playSong(_local1);
MUSIC.volume = _local2;
MUSIC.songVolume = thisCommand_obj.data.volume;
thisCommand_obj.nextEvent();
};
};
define_pause = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("pause");
}
var _local3 = thisCommand_obj.data.system;
var _local1 = thisCommand_obj.data.isPaused;
LOOP.pauseSet(_local3, _local1);
thisCommand_obj.nextEvent();
};
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
makeStringObject = function (input_str, defaultContainer_str, thisName) {
var _local9 = null;
var _local8 = input_str.indexOf("{");
if ((_local8 == -1) || (_local8 == undefined)) {
_local9 = input_str;
} else {
var _local7 = {};
var _local12 = input_str.indexOf("}", _local8 + 1);
var _local10 = input_str.substring(_local8 + 1, _local12);
_local10 = nestedEval(_local10, defaultContainer_str, thisName);
var _local6 = _local10.split(",");
var _local2 = 0;
while (_local2 < _local6.length) {
var _local3 = _local6[_local2];
var _local4 = _local3.indexOf(":");
var _local5 = _local3.substr(0, _local4);
var _local1 = _local3.substr(_local4 + 1);
_local1 = getImpliedValue(_local1);
_local7[_local5] = _local1;
_local2++;
}
_local9 = _local7;
}
return(_local9);
};
define_setVariable = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
var _local9 = 1;
var _local11 = getTimer();
var _local10 = _local11 - startTime;
if (isNaN(_local10) || (_local10 > _local9)) {
if (thisCommand_obj.data.update == undefined) {
thisCommand_obj.data.update = true;
}
var _local5 = thisCommand_obj.data;
var _local7 = nestedEval(_local5.condition[0], "RAM", "_this");
var _local8 = _local7.lastIndexOf(".");
if (_local8 == -1) {
var _local12 = "RAM";
var _local2 = RAM;
} else {
var _local12 = _local7.substr(0, _local8);
var _local2 = evalPath(_local12, "RAM", "_this");
}
var _local1 = _local7.substr(_local8 + 1);
var _local14 = false;
var _local4 = makeStringObject(_local5.condition[2], "RAM", "_this");
_local4 = getImpliedValue(_local4);
if (_local4 == "\\object") {
_local2[_local1] = {};
_local14 = true;
} else if (_local4 == "\\array") {
_local2[_local1] = [];
_local14 = true;
} else if (_local4 == "\\delete") {
_local2[_local1] = undefined;
delete _local2[_local1];
_local14 = true;
}
_local4 = nestedEval(_local4, "RAM", "_this");
var _local3 = getImpliedValue(_local4);
if (!_local14) {
if (TRACE_SCRIPT) {
trace(((((((("setVariable: " + _local1) + " (") + _local2[_local1]) + " ") + _local5.condition[1]) + " ") + _local3) + ")");
}
switch (_local5.condition[1]) {
case "=" :
_local2[_local1] = _local3;
break;
case "+" :
var _local13 = (!isNaN(_local2[_local1])) && (!isNaN(_local3));
if (_local13) {
_local2[_local1] = Number(_local2[_local1]) + Number(_local3);
} else {
_local2[_local1] = String(_local2[_local1]) + String(_local3);
}
break;
case "-" :
_local2[_local1] = _local2[_local1] - Number(_local3);
break;
case "*" :
_local2[_local1] = _local2[_local1] * Number(_local3);
break;
case "/" :
if (Number(_local3) == 0) {
_local2[_local1] = undefined;
} else {
_local2[_local1] = _local2[_local1] / Number(_local3);
}
break;
case "%" :
if (Number(_local3) == 0) {
_local2[_local1] = undefined;
} else {
_local2[_local1] = _local2[_local1] % Number(_local3);
}
break;
case "!" :
if (typeof(_local3) != "boolean") {
break;
}
_local2[_local1] = !_local3;
}
if ((typeof(_local2[_local1]) == "number") && (isNaN(_local2[_local1]))) {
_local2[_local1] = undefined;
}
}
if (_local5.update) {
SPRITES.updateSprites();
}
thisCommand_obj.nextEvent();
} else {
setTimeout(thisCommand_obj.run, _local9, thisCommand_obj);
}
};
};
define_sound = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("sound");
}
var _local2 = thisCommand_obj.data.file;
var _local3 = thisCommand_obj.data.name;
if (_local2 != "") {
var _local5 = thisCommand_obj.data.volume;
var _local4 = thisCommand_obj.data.loop;
var _local6 = SOUND.play(_local2, _local5, _local4);
ROOT.soundLoop.addSound(_local3, _local6, true);
} else {
ROOT.soundLoop.remove(_local3);
}
thisCommand_obj.nextEvent();
};
command_obj.soundLoop = soundLoop;
};
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
callUnload = function (parent) {
for (var nam in parent) {
var thisChild = parent[nam];
if (thisChild instanceof MovieClip) {
reportedPath = String(eval (thisChild._target));
actualPath = (String(eval (parent._target)) + ".") + nam;
if (reportedPath.indexOf(actualPath) != -1) {
callUnload(thisChild);
}
}
}
parent.onKillFocus(null);
parent.dispatchEvent({type:"unload"});
parent.broadcastMessage("unload");
parent.unload();
parent.onUnload();
parent.removeEventListener("keyDown", parent);
parent.removeEventListener("keyUp", parent);
Key.removeListener(parent);
Mouse.removeListener(parent);
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
makeStringObject = function (input_str, defaultContainer_str, thisName) {
var _local9 = null;
var _local8 = input_str.indexOf("{");
if ((_local8 == -1) || (_local8 == undefined)) {
_local9 = input_str;
} else {
var _local7 = {};
var _local12 = input_str.indexOf("}", _local8 + 1);
var _local10 = input_str.substring(_local8 + 1, _local12);
_local10 = nestedEval(_local10, defaultContainer_str, thisName);
var _local6 = _local10.split(",");
var _local2 = 0;
while (_local2 < _local6.length) {
var _local3 = _local6[_local2];
var _local4 = _local3.indexOf(":");
var _local5 = _local3.substr(0, _local4);
var _local1 = _local3.substr(_local4 + 1);
_local1 = getImpliedValue(_local1);
_local7[_local5] = _local1;
_local2++;
}
_local9 = _local7;
}
return(_local9);
};
define_swf = function (command_obj) {
if (command_obj.data.linkage) {
command_obj.run = function (thisCommand_obj, skipSwfloader) {
command_obj.copyObject = copyObject;
command_obj.makeStringObject = makeStringObject;
command_obj.nestedEval = nestedEval;
command_obj.evalPath = evalPath;
command_obj.getImpliedValue = getImpliedValue;
command_obj.resolveContainer = resolveContainer;
var _local12 = nestedEval(thisCommand_obj.data.target, "RAM", "_this");
var _local5 = evalPath(_local12, "RAM", "_this");
var _local4 = nestedEval(thisCommand_obj.data.name, "RAM", "_this");
var _local6 = 0;
if ((_local4 == "") || (_local4 == undefined)) {
do {
_local4 = "swf_" + _local6;
_local6++;
} while (_local5[_local4]);
}
if (TRACE_SCRIPT) {
trace((((("Place swf: " + thisCommand_obj.data.linkage) + " named: ") + _local4) + " waitForEnd: ") + thisCommand_obj.data.waitForEnd);
}
var _local8 = ((thisCommand_obj.data.depth == -1) ? (nextDepth(_local5)) : (nestedEval(thisCommand_obj.data.depth, "RAM", "_this")));
var storedObj = {};
copyObject(thisCommand_obj.data, storedObj);
storedObj.name = _local4;
storedObj.depth = _local8;
if (!skipSwfloader) {
ROOT.swfLoader.add(storedObj);
}
var swfLoader = new MovieClipLoader();
swfLoader.root = ROOT;
swfLoader.commandData = thisCommand_obj.data.data;
swfLoader.nextEvent = thisCommand_obj.nextEvent;
swfLoader.waitForEnd = thisCommand_obj.data.waitForEnd;
swfLoader.levelId = ROOT.game_mc.uid;
callUnload(_local5[_local4]);
_local5[_local4].removeMovieClip();
var _local10 = _local5.getInstanceAtDepth(_local8);
callUnload(_local10);
_local10.removeMovieClip();
var _local7 = thisCommand_obj.data.linkage;
_local7 = nestedEval(_local7, "RAM", "_this");
var _local13 = false;
_local5.attachMovie(_local7, _local4, _local8);
if ((_local5[_local4] == _local5) || (_local5[_local4] == undefined)) {
_local5.createEmptyMovieClip(_local4, _local8);
var _local14 = flash.display.BitmapData.loadBitmap(_local7);
_local5[_local4].attachBitmap(_local14, 0);
if ((_local5[_local4]._width == undefined) || (_local5[_local4]._width == 0)) {
_local13 = true;
} else {
thisCommand_obj.data.waitForEnd = false;
}
}
swfLoader.passData = function (newClip, commandData) {
newClip.parentSprite = _this;
for (var _local3 in commandData) {
var _local1 = command_obj.nestedEval(commandData[_local3], "RAM", "_this");
_local1 = command_obj.makeStringObject(_local1, "RAM", "_this");
newClip[_local3] = _local1;
}
newClip.onClose = function () {
ROOT.swfLoader.remove(storedObj);
};
setTimeout(function () {
newClip.start();
}, 33);
};
swfLoader.detectLastFrame = function (newClip, nextEvent) {
newClip.detectLastFrame = {parent:newClip, nextEvent:nextEvent, swfData:thisCommand_obj.data, loop:function (thisObj) {
if ((thisObj.parent._currentframe == thisObj.parent._totalframes) || (thisObj.parent._currentframe == undefined)) {
ROOT.swfLoader.remove(thisObj.swfData);
clearInterval(thisObj.intervalId);
_global.ROOT = swfLoader.root;
var _local3 = swfLoader.levelId == ROOT.game_mc.uid;
if (_local3) {
thisObj.nextEvent();
}
}
}, intervalId:null, start:function () {
if (this.intervalId != null) {
clearInterval(this.intervalId);
}
this.intervalId = setInterval(this.loop, 34, this);
this.loop();
}};
newClip.detectLastFrame.start();
};
if (_local13) {
swfLoader.onLoadInit = function (newClip) {
swfLoader.passData(newClip, this.commandData);
if (swfLoader.waitForEnd) {
swfLoader.detectLastFrame(newClip, this.nextEvent);
}
delete swfLoader;
};
swfLoader.onLoadError = function (newClip) {
this.unloadClip(newClip);
newClip.removeMovieClip();
delete swfLoader;
};
swfLoader.loadClip(_local7, _local5[_local4]);
} else {
swfLoader.passData(_local5[_local4], swfLoader.commandData);
if (swfLoader.waitForEnd) {
swfLoader.detectLastFrame(_local5[_local4], thisCommand_obj.nextEvent);
}
delete swfLoader;
}
if (thisCommand_obj.data.waitForEnd == false) {
thisCommand_obj.nextEvent();
}
};
} else {
command_obj.run = function (thisCommand_obj, preserveSwfloader) {
if (!preserveSwfloader) {
ROOT.swfLoader.remove(thisCommand_obj.data);
}
if (TRACE_SCRIPT) {
trace((("removeSwf named: " + thisCommand_obj.data.name) + " from: ") + thisCommand_obj.data.target);
}
var targetName = nestedEval(thisCommand_obj.data.name, "RAM", "_this");
if ((targetName == "") || (targetName == undefined)) {
thisCommand_obj.nextEvent();
} else {
var autoDelay = 1;
var endTime = getTimer();
var elapsedTime = (endTime - startTime);
if (TRACE_SCRIPT) {
trace("\t elapsedTime: " + elapsedTime);
}
if (isNaN(elapsedTime) || (elapsedTime > autoDelay)) {
var defaultContainer = "OVERLAY";
target_str = nestedEval(thisCommand_obj.data.target, "RAM", "_this");
var startAt = target_str.indexOf(".");
if (startAt == -1) {
var container = defaultContainer;
var containerIsGlobal = false;
for (var nam in _global) {
if (nam == target_str) {
containerIsGlobal = true;
break;
}
}
var theRest = target_str;
var target = (containerIsGlobal ? (eval (theRest)) : (eval ((container + ".") + theRest)));
if (target_str == "this") {
var target = _this;
}
} else {
var containerName = target_str.substr(0, startAt);
var container = nestedEval(containerName, "RAM", "_this");
var theRest = target_str.substr(startAt + 1);
var target = eval ((container + ".") + theRest);
}
if ((target == SPRITES) && (target[targetName].remove)) {
target[targetName].remove();
} else {
callUnload(target[targetName]);
target[targetName].removeMovieClip();
}
thisCommand_obj.nextEvent();
} else {
if (TRACE_SCRIPT) {
trace("\t too early, wait for 1 millisecond");
}
setTimeout(thisCommand_obj.run, autoDelay, thisCommand_obj);
}
}
};
}
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
define_removeSwf = function (command_obj) {
command_obj.run = function (thisCommand_obj, preserveSwfloader) {
if (!preserveSwfloader) {
ROOT.swfLoader.remove(thisCommand_obj.data);
}
if (TRACE_SCRIPT) {
trace((("removeSwf (old) named: " + thisCommand_obj.data.name) + " from: ") + thisCommand_obj.data.target);
}
var targetName = nestedEval(thisCommand_obj.data.name, "RAM", "_this");
if ((targetName == "") || (targetName == undefined)) {
thisCommand_obj.nextEvent();
} else {
var autoDelay = 1;
var endTime = getTimer();
var elapsedTime = (endTime - startTime);
if (TRACE_SCRIPT) {
trace("\t elapsedTime: " + elapsedTime);
}
if (isNaN(elapsedTime) || (elapsedTime > autoDelay)) {
var defaultContainer = "OVERLAY";
target_str = nestedEval(thisCommand_obj.data.target, "RAM", "_this");
var startAt = target_str.indexOf(".");
if (startAt == -1) {
var container = defaultContainer;
var containerIsGlobal = false;
for (var nam in _global) {
if (nam == target_str) {
containerIsGlobal = true;
break;
}
}
var theRest = target_str;
var target = (containerIsGlobal ? (eval (theRest)) : (eval ((container + ".") + theRest)));
if (target_str == "this") {
var target = _this;
}
} else {
var containerName = target_str.substr(0, startAt);
var container = nestedEval(containerName, "RAM", "_this");
var theRest = target_str.substr(startAt + 1);
var target = eval ((container + ".") + theRest);
}
if ((target == SPRITES) && (target[targetName].remove)) {
target[targetName].remove();
} else {
target[targetName].unload();
target[targetName].onUnload();
target[targetName].removeMovieClip();
}
thisCommand_obj.nextEvent();
} else {
if (TRACE_SCRIPT) {
trace("\t too early, wait for 1 millisecond");
}
setTimeout(thisCommand_obj.run, autoDelay, thisCommand_obj);
}
}
};
};
define_teleport = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
ROOT.game_mc.uid = null;
LOOP.removeSet("player");
LOOP.removeSet("scroll");
LOOP.removeSet("sprites");
thisCommand_obj.fadeOutDone = function () {
var _local5 = Boolean(TRACE_SCRIPT);
if (_local5) {
trace("teleport");
}
if (!thisCommand_obj.data.forceFullPath) {
var _local1 = thisCommand_obj.data.relativeLevel;
}
var _local7 = thisCommand_obj.data.level;
if (_local5) {
trace(" fullPath: " + _local7);
trace(" relativePath: " + _local1);
}
if ((_local1 != undefined) && (_local1 != "undefined")) {
var _local6 = ROOT.level_xml.filePath;
if (_local5) {
trace(" currentPath: " + _local6);
}
var _local2 = _local6.lastIndexOf("\\");
if (_local2 == -1) {
var _local3 = "";
} else {
var _local3 = _local6.substr(0, _local2 + 1);
}
var _local4 = -1;
while (_local4 = _local1.indexOf("..") , _local4 != -1) {
_local2 = _local3.lastIndexOf("\\", _local2 - 1);
var _local3 = _local3.substr(0, _local2 + 1);
var _local1 = _local1.substr(_local4 + 3);
}
_local7 = _local3 + _local1;
}
_local7 = nestedEval(_local7, "RAM", "_this");
if (_local5) {
trace(" teleporting to: " + _local7);
}
if (typeof(thisCommand_obj.data.position.x) == "string") {
if (thisCommand_obj.data.position.x.charAt(0) != "[") {
thisCommand_obj.data.position.x = ("[" + thisCommand_obj.data.position.x) + "]";
}
}
if (typeof(thisCommand_obj.data.position.y) == "string") {
if (thisCommand_obj.data.position.y.charAt(0) != "[") {
thisCommand_obj.data.position.y = ("[" + thisCommand_obj.data.position.y) + "]";
}
}
var _local11 = Number(nestedEval(thisCommand_obj.data.position.x, "RAM", "_this"));
var _local10 = Number(nestedEval(thisCommand_obj.data.position.y, "RAM", "_this"));
if (thisCommand_obj.data.position) {
var _local9 = {x:_local11 + 8, y:_local10 + 8};
var _local8 = _local9;
} else {
var _local8 = {x:SPRITES.player._x, y:SPRITES.player._y};
}
thisCommand_obj.endScript();
ROOT.loadLevel(_local7, _local8);
};
if (!LEVEL.alreadyTeleporting) {
LEVEL.alreadyTeleporting = true;
var _local8 = SPRITES.player.image.getParams();
if (_local8) {
RAM.playerSprite = _local8;
}
var _local7 = thisCommand_obj.data.transition;
_local7 = nestedEval(_local7, "RAM", "_this");
TRANSITION.start(_local7).then(thisCommand_obj.fadeOutDone);
}
};
};
getPathValue = function (path, defaultContainer) {
var path = (path ? (path) : "");
var defaultContainer = (defaultContainer ? (defaultContainer) : "RAM");
if (typeof(path) == "string") {
path = path.split(" ").join("");
}
var startAt = path.indexOf(".");
if (startAt == undefined) {
var output = path;
} else if (startAt == -1) {
var containerIsGlobal = eval ("_global." + path);
if (path == "this") {
containerIsGlobal = true;
}
var output = (containerIsGlobal ? (eval (path)) : (eval ((defaultContainer + ".") + path)));
} else {
var containerEnd = path.indexOf(".");
var containerName = path.substr(0, containerEnd);
var containerIsGlobal = eval ("_global." + containerName);
if (containerName == "this") {
containerIsGlobal = true;
}
if (containerName == "_level0") {
containerIsGlobal = true;
}
if (!containerIsGlobal) {
path = "RAM." + path;
}
var output = eval (path);
}
return(output);
};
define_wait = function (command_obj) {
command_obj.animDone = function () {
SPRITES[this.spriteName].image.removeListener(this);
this.spriteName = null;
delete this.spriteName;
this.nextEvent();
};
command_obj.run = function (thisCommand_obj) {
var _local3 = thisCommand_obj.data.mode;
if (TRACE_SCRIPT) {
trace("wait for: " + _local3);
}
if (_local3 == "time") {
var _local15 = setTimeout(thisCommand_obj.nextEvent, thisCommand_obj.data.value * 1000);
thisCommand_obj.storeTimeout(_local15);
}
if (_local3 == "movement") {
var _local6 = thisCommand_obj.data.value;
thisCommand_obj.spritesLeft = [];
if (_local6 == "ALL") {
for (var _local5 in SPRITES) {
var sprite = SPRITES[_local5];
if (sprite.lastMove) {
var _local2 = {sprite:sprite, thisCommand_obj:thisCommand_obj};
thisCommand_obj.spritesLeft.push(_local2);
}
}
} else {
if (_local6 == "this") {
_local6 = _this._name;
}
var sprite = SPRITES[_local6];
if (sprite.lastMove) {
var _local2 = {sprite:sprite, thisCommand_obj:thisCommand_obj};
thisCommand_obj.spritesLeft.push(_local2);
}
}
if (thisCommand_obj.spritesLeft.length > 0) {
for (var _local5 in thisCommand_obj.spritesLeft) {
var _local2 = thisCommand_obj.spritesLeft[_local5];
var sprite = _local2.sprite;
_local2.onMotionFinished = function () {
this.sprite.lastMove.removeListener(this);
this.thisCommand_obj.spritesLeft.pop();
if (this.thisCommand_obj.spritesLeft.length <= 0) {
setTimeout(this.thisCommand_obj.nextEvent, 34);
}
};
sprite.lastMove.addListener(_local2);
}
} else {
thisCommand_obj.nextEvent();
}
}
if (_local3 == "animation") {
var _local6 = thisCommand_obj.data.value;
if (_local6 == "this") {
_local6 = _this._name;
}
thisCommand_obj.spriteName = _local6;
var _local14 = SPRITES[_local6].image.getParam("frame");
var _local10 = SPRITES[_local6].image.getParam("frames");
if (_local14 < _local10) {
SPRITES[_local6].image.addListener(this);
} else {
thisCommand_obj.nextEvent();
}
}
if (_local3 == "movieclip") {
var _local4 = thisCommand_obj.data.value;
if (_local4 == "this") {
_local4 = "SPRITES." + _this._name;
}
if (_local4.substr(0, 5) == "this.") {
var _local12 = _local4.substr(5);
_local4 = (("SPRITES." + _this._name) + ".") + _local12;
}
var newClip = getPathValue(_local4, "SPRITES." + _this._name);
var _local11 = typeof(newClip) == "movieclip";
if (_local11) {
newClip.detectLastFrame = {levelId:ROOT.game_mc.uid, parent:newClip, loop:function (thisObj) {
var _local2 = thisObj.levelId == ROOT.game_mc.uid;
if (((thisObj.parent._currentframe == thisObj.parent._totalframes) || (thisObj.parent._currentframe == undefined)) || (_local2 == false)) {
if (thisObj.intervalId != null) {
clearInterval(thisObj.intervalId);
}
newClip.detectLastFrame = null;
delete newClip.detectLastFrame;
if (_local2) {
thisCommand_obj.nextEvent();
}
}
}, intervalId:null, start:function () {
if (this.intervalId != null) {
clearInterval(this.intervalId);
}
this.intervalId = setInterval(this.loop, 34, this);
this.loop();
}};
newClip.detectLastFrame.start();
} else {
thisCommand_obj.nextEvent();
}
}
if (_local3 == "fadeMusic") {
command_obj.storeTimeout(999);
command_obj.onFadeComplete = function () {
MUSIC.removeListener(thisCommand_obj);
command_obj.nextEvent();
};
if (!MUSIC.isFading) {
command_obj.onFadeComplete();
} else {
MUSIC.addListener(command_obj);
}
}
if (_local3 == "sound") {
var _local13 = {onSoundComplete:function () {
thisCommand_obj.nextEvent();
}};
ROOT.soundLoop[thisCommand_obj.data.value].sound.addListener(_local13);
}
if (_local3 == "script") {
var _local6 = thisCommand_obj.data.value;
if (_local6 == "this") {
_local6 = _this._name;
}
var _local9 = SPRITES[_local6];
var _local8 = thisCommand_obj.data.value2;
if (_local9 && (_local8)) {
var thisScript = _local9.scripts[_local8];
if (thisScript) {
if (thisScript.isDone == false) {
var waitObj = {};
waitObj.onScriptDone = function () {
thisScript.removeListener(waitObj);
thisCommand_obj.nextEvent();
};
thisScript.addListener(waitObj);
}
}
} else {
thisCommand_obj.nextEvent();
}
}
};
command_obj.scriptBase = scriptBase;
command_obj.getTimeout = function () {
return(this.scriptBase.timeoutID);
};
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
define_while = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (_this.scriptInterruptCheck()) {
var _local3 = thisCommand_obj.getConditionResult(thisCommand_obj);
var _local2 = thisCommand_obj.data.condition;
if (TRACE_SCRIPT) {
trace((((((("while: " + _local2[0]) + " ") + _local2[1]) + " ") + _local2[2]) + " result: ") + _local3);
}
if (_this._name.length == 0) {
for (var _local1 in _this.scripts) {
if (_this.scripts[_local1].timeoutID != undefined) {
clearTimeout(_this.scripts[_local1].timeoutID);
}
}
thisCommand_obj = null;
_local3 = true;
}
if (_local3 == true) {
thisCommand_obj.script.done = function () {
var _local1 = setTimeout(thisCommand_obj.run, 1, thisCommand_obj);
thisCommand_obj.storeTimeout(_local1);
};
if (thisCommand_obj.script.length > 0) {
thisCommand_obj.script.runEvent(0);
} else {
var _local4 = setTimeout(thisCommand_obj.run, 34, thisCommand_obj);
thisCommand_obj.storeTimeout(_local4);
}
} else {
thisCommand_obj.nextEvent();
}
}
};
command_obj.getConditionResult = function (thisCommand_obj) {
var _local3 = thisCommand_obj.data;
var _local5 = nestedEval(_local3.condition[0], "RAM", "_this");
var _local2 = evalPath(_local5, "RAM", "_this");
var _local4 = getImpliedValue(_local3.condition[2]);
_local4 = nestedEval(_local4, "RAM", "_this");
var _local1 = getImpliedValue(_local4);
var _local6 = false;
switch (_local3.condition[1]) {
case "=" :
_local6 = _local2 == _local1;
break;
case "!=" :
_local6 = _local2 != _local1;
break;
case ">" :
if ((isNaN(_local2) == false) && (isNaN(_local1) == false)) {
_local6 = _local2 > _local1;
}
break;
case ">=" :
if ((isNaN(_local2) == false) && (isNaN(_local1) == false)) {
_local6 = _local2 >= _local1;
}
break;
case "<" :
if ((isNaN(_local2) == false) && (isNaN(_local1) == false)) {
_local6 = _local2 < _local1;
}
break;
case "<=" :
if (!((isNaN(_local2) == false) && (isNaN(_local1) == false))) {
break;
}
_local6 = _local2 <= _local1;
}
return(_local6);
};
};
define_anim = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("set isAnimating");
}
var _local1 = thisCommand_obj.data.value;
thisCommand_obj.sprite.image.setParams({isAnimating:_local1});
thisCommand_obj.nextEvent();
};
};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
define_appearance = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("appearance");
}
var _local4 = thisCommand_obj.sprite.image;
var _local3 = thisCommand_obj.data.value;
var _local1 = {};
copyObject(_local3, _local1);
_local1.charset = nestedEval(_local3.charset, "RAM", "_this");
if (_local1.animDirection == undefined) {
_local1.animDirection = 1;
}
thisCommand_obj.sprite.image.setParams(_local1);
thisCommand_obj.nextEvent();
};
};
define_direction = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("direction");
}
var _local1 = thisCommand_obj.data.value;
thisCommand_obj.sprite.image.setParams({direction:_local1});
thisCommand_obj.nextEvent();
};
};
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
makeStringObject = function (input_str, defaultContainer_str, thisName) {
var _local9 = null;
var _local8 = input_str.indexOf("{");
if ((_local8 == -1) || (_local8 == undefined)) {
_local9 = input_str;
} else {
var _local7 = {};
var _local12 = input_str.indexOf("}", _local8 + 1);
var _local10 = input_str.substring(_local8 + 1, _local12);
_local10 = nestedEval(_local10, defaultContainer_str, thisName);
var _local6 = _local10.split(",");
var _local2 = 0;
while (_local2 < _local6.length) {
var _local3 = _local6[_local2];
var _local4 = _local3.indexOf(":");
var _local5 = _local3.substr(0, _local4);
var _local1 = _local3.substr(_local4 + 1);
_local1 = getImpliedValue(_local1);
_local7[_local5] = _local1;
_local2++;
}
_local9 = _local7;
}
return(_local9);
};
define_lookAt = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("lookAt");
}
var _local2 = thisCommand_obj.sprite;
var _local4 = nestedEval(thisCommand_obj.data.value, "RAM", "_this");
var _local1 = SPRITES[_local4];
if (!_local1) {
_local1 = _this;
}
var _local3 = _local1;
_local2.image.lookAt(_local2, _local3);
thisCommand_obj.nextEvent();
};
};
define_moveAbsolute = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("moveAbsolute");
}
if (typeof(thisCommand_obj.data.position.x) == "string") {
if (thisCommand_obj.data.position.x.charAt(0) != "[") {
thisCommand_obj.data.position.x = ("[" + thisCommand_obj.data.position.x) + "]";
}
}
if (typeof(thisCommand_obj.data.position.y) == "string") {
if (thisCommand_obj.data.position.y.charAt(0) != "[") {
thisCommand_obj.data.position.y = ("[" + thisCommand_obj.data.position.y) + "]";
}
}
var _local6 = Number(nestedEval(thisCommand_obj.data.position.x, "RAM", "_this"));
var _local5 = Number(nestedEval(thisCommand_obj.data.position.y, "RAM", "_this") - 8);
var _local3 = thisCommand_obj.sprite._x;
var _local2 = thisCommand_obj.sprite._y;
if (thisCommand_obj.data.autoDirection) {
var _local7 = _local6 - _local3;
var _local8 = _local5 - _local2;
if (Math.abs(_local8) > Math.abs(_local7)) {
if (_local8 < 0) {
thisCommand_obj.sprite.image.setParams({direction:"up"});
} else {
thisCommand_obj.sprite.image.setParams({direction:"down"});
}
} else if (_local7 < 0) {
thisCommand_obj.sprite.image.setParams({direction:"left"});
} else {
thisCommand_obj.sprite.image.setParams({direction:"right"});
}
}
if (thisCommand_obj.data.autoAnim) {
thisCommand_obj.sprite.image.setParams({isAnimating:true});
}
var originalName = thisCommand_obj.sprite._name;
if (thisCommand_obj.data.duration == 0) {
thisCommand_obj.data.duration = 0.001;
}
var slideX = ((thisCommand_obj.sprite.slideX = new mx.transitions.Tween(thisCommand_obj.sprite, "_x", null, _local3, _local6, thisCommand_obj.data.duration, true)));
var slideY = ((thisCommand_obj.sprite.slideY = new mx.transitions.Tween(thisCommand_obj.sprite, "_y", null, _local2, _local5, thisCommand_obj.data.duration, true)));
slideY.thisCommand_obj = thisCommand_obj;
var motionDone = function (thisTween) {
var _local2 = thisCommand_obj.sprite == SPRITES[originalName];
var _local1 = !_local2;
slideX.onMotionFinished = null;
slideY.onMotionFinished = null;
slideX.stop();
slideY.stop();
delete slideX;
delete slideY;
delete thisCommand_obj.sprite.slideX;
delete thisCommand_obj.sprite.slideY;
if (!_local1) {
if (thisCommand_obj.data.autoAnim) {
thisCommand_obj.sprite.image.setParams({isAnimating:false});
}
}
var _local3 = thisCommand_obj.moveTimeout.exists(thisCommand_obj.timeout);
if (_local3) {
thisCommand_obj.moveTimeout.remove(thisCommand_obj.timeout);
if (!_local1) {
thisCommand_obj.nextEvent();
}
}
};
slideY.onMotionFinished = motionDone;
slideY.onMotionChanged = function () {
var _local2 = this.thisCommand_obj;
_this.gridCollide_obj.loop();
var _local5 = _local2.moveTimeout.exists(_local2.timeout);
var _local4 = _local2.sprite == SPRITES[originalName];
var _local3 = !_local4;
if (_local3) {
_local2.sprite.resetToStartPosition();
}
if (_local3 || (!_local5)) {
motionDone(this);
}
};
var _local10 = function () {
};
var _local9 = thisCommand_obj.data.duration * 1000;
thisCommand_obj.timeout = setTimeout(_local10, _local9, thisCommand_obj);
thisCommand_obj.moveTimeout.addTimeout(thisCommand_obj.timeout);
};
};
define_moveRelative = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("moveRelative");
}
if (typeof(thisCommand_obj.data.position.x) == "string") {
if (thisCommand_obj.data.position.x.charAt(0) != "[") {
thisCommand_obj.data.position.x = ("[" + thisCommand_obj.data.position.x) + "]";
}
}
if (typeof(thisCommand_obj.data.position.y) == "string") {
if (thisCommand_obj.data.position.y.charAt(0) != "[") {
thisCommand_obj.data.position.y = ("[" + thisCommand_obj.data.position.y) + "]";
}
}
var _local2 = Number(nestedEval(thisCommand_obj.data.position.x, "RAM", "_this"));
var _local3 = Number(nestedEval(thisCommand_obj.data.position.y, "RAM", "_this"));
if (thisCommand_obj.data.autoDirection) {
if (Math.abs(_local3) > Math.abs(_local2)) {
if (_local3 < 0) {
thisCommand_obj.sprite.image.setParams({direction:"up"});
} else {
thisCommand_obj.sprite.image.setParams({direction:"down"});
}
} else if (_local2 < 0) {
thisCommand_obj.sprite.image.setParams({direction:"left"});
} else {
thisCommand_obj.sprite.image.setParams({direction:"right"});
}
}
if (thisCommand_obj.data.autoAnim) {
thisCommand_obj.sprite.image.setParams({isAnimating:true});
}
var originalName = thisCommand_obj.sprite._name;
var _local5 = thisCommand_obj.sprite._x;
var _local4 = thisCommand_obj.sprite._y;
var _local12 = _local5 + _local2;
var _local11 = _local4 + _local3;
if (thisCommand_obj.data.duration == 0) {
thisCommand_obj.data.duration = 0.001;
}
var slideX = ((thisCommand_obj.sprite.slideX = new mx.transitions.Tween(thisCommand_obj.sprite, "_x", null, _local5, _local12, thisCommand_obj.data.duration, true)));
var slideY = ((thisCommand_obj.sprite.slideY = new mx.transitions.Tween(thisCommand_obj.sprite, "_y", null, _local4, _local11, thisCommand_obj.data.duration, true)));
slideY.thisCommand_obj = thisCommand_obj;
var motionDone = function (thisTween) {
var _local2 = thisCommand_obj.sprite == SPRITES[originalName];
var _local1 = !_local2;
slideX.onMotionFinished = null;
slideY.onMotionFinished = null;
slideX.stop();
slideY.stop();
delete slideX;
delete slideY;
delete thisCommand_obj.sprite.slideX;
delete thisCommand_obj.sprite.slideY;
if (!_local1) {
if (thisCommand_obj.data.autoAnim) {
thisCommand_obj.sprite.image.setParams({isAnimating:false});
}
}
var _local3 = thisCommand_obj.moveTimeout.exists(thisCommand_obj.timeout);
if (_local3) {
thisCommand_obj.moveTimeout.remove(thisCommand_obj.timeout);
if (!_local1) {
thisCommand_obj.nextEvent();
}
}
};
slideY.onMotionFinished = motionDone;
slideY.onMotionChanged = function () {
var _local2 = this.thisCommand_obj;
_this.gridCollide_obj.loop();
var _local5 = _local2.moveTimeout.exists(_local2.timeout);
var _local4 = _local2.sprite == SPRITES[originalName];
var _local3 = !_local4;
if (_local3) {
_local2.sprite.resetToStartPosition();
}
if (_local3 || (!_local5)) {
motionDone(this);
}
};
var _local8 = function () {
};
var _local7 = thisCommand_obj.data.duration * 1000;
thisCommand_obj.timeout = setTimeout(_local8, _local7, thisCommand_obj);
thisCommand_obj.moveTimeout.addTimeout(thisCommand_obj.timeout);
};
};
define_moveWait = function (command_obj) {
command_obj.run = function (thisCommand_obj) {
if (TRACE_SCRIPT) {
trace("moveWait");
}
var _local3 = function (thisCommand_obj) {
thisCommand_obj.moveTimeout.remove();
thisCommand_obj.nextEvent();
};
var _local2 = thisCommand_obj.data.value * 1000;
thisCommand_obj.timeout = setTimeout(_local3, _local2, thisCommand_obj);
thisCommand_obj.moveTimeout.addTimeout(thisCommand_obj.timeout);
};
command_obj.moveTimeout = moveTimeout;
};
scripts = {};
scriptInterruptCheck = function () {
if (_this.isCommonEvent) {
var _local1 = ((levelId == COMMON._parent.uid) && (COMMON._parent.uid != undefined)) && (levelId != undefined);
} else {
var _local1 = ((levelId == ROOT.game_mc.uid) && (ROOT.game_mc.uid != undefined)) && (levelId != undefined);
}
return(_local1);
};
isCommonEvent = COMMON[_name] == _this;
levelId = (isCommonEvent ? (COMMON._parent.uid) : (ROOT.game_mc.uid));
addScripting = function (sourceArray, destScript, scriptBase) {
var _local2 = 0;
while (_local2 < sourceArray.length) {
if (isNaN(_local2) == false) {
var _local3 = sourceArray[_local2];
var _local1 = {};
destScript[_local2] = _local1;
_local1.data = _local3;
_local1.nextEvent = destScript.nextEvent;
_local1.storeTimeout = function (timeoutID) {
scriptBase.timeoutID = timeoutID;
};
_local1.moveTimeout = _this.moveTimeout;
var _local4 = "define_" + _local3.type;
_this[_local4](_local1);
if (_local3.length > 0) {
_local1.script = makeScriptSystem();
_local1.script.checkForInterrupt = scriptInterruptCheck;
addScripting(_local3, _local1.script, scriptBase);
}
}
_local2++;
}
};
for (var nam in data.scripts) {
scripts[nam] = makeScriptSystem();
scripts[nam].checkForInterrupt = scriptInterruptCheck;
addScripting(data.scripts[nam], scripts[nam], scripts[nam]);
makeDefaultScriptFunction(nam);
}
auto = function () {
if (scripts.auto.length > 0) {
startTime = getTimer();
scripts.auto.done = function () {
checkAsk();
};
scripts.auto.runEvent(0);
}
};
allow_talk = true;
talk = function () {
if ((scripts.talk.length > 0) && (allow_talk)) {
var _local1 = SPRITES.player.isPaused;
LOOP.pauseSet("player", true);
LOOP.pauseSet("fieldMenu", true);
LOOP.pauseSet("sprites", true);
playerWasAnimating = SPRITES.player.image.init.isAnimating;
SPRITES.player.image.setParams({isAnimating:false});
HUD.ask.close();
scripts.talk.done = function () {
var _local1 = ((playerWasPaused != undefined) ? (playerWasPaused) : false);
LOOP.pauseSet("player", _local1);
LOOP.pauseSet("fieldMenu", _local1);
LOOP.pauseSet("sprites", _local1);
SPRITES.player.image.setParams({isAnimating:playerWasAnimating});
checkAsk();
};
scripts.talk.runEvent(0);
}
};
allow_collision = true;
collision = function () {
scripts.collision.done = function () {
checkAsk();
};
scripts.collision.runEvent(0);
};
lastCollision = true;
checkCollision = function () {
if ((scripts.collision.length > 0) && (allow_collision)) {
bumpThreshold = (this.noCollide ? 8 : 15.5);
var _local3 = _this._x - SPRITES.player._x;
var _local2 = _this._y - SPRITES.player._y;
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local4 = _local5 < bumpThreshold;
if (_local4 && (!lastCollision)) {
collision();
}
lastCollision = _local4;
}
};
gridCollide_obj = {lastX:null, lastY:null, loop:function () {
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
if ((_local2 != this.lastX) || (_local3 != this.lastY)) {
SPRITE_GRID.remove(this.lastX, this.lastY, _this);
SPRITE_GRID.add(_local2, _local3, _this);
if ((SPRITES.player.tile.x == this.lastX) && (SPRITES.player.tile.y == this.lastY)) {
SPRITE_GRID.gridLeave(_local2, _local3);
}
if ((SPRITES.player.tile.x == _local2) && (SPRITES.player.tile.y == _local3)) {
SPRITE_GRID.gridCollide(_local2, _local3);
}
}
this.lastX = _local2;
this.lastY = _local3;
}};
gridCollide_obj.loop();
_this.allow_gridCollide = true;
_this.scripts.gridCollide.done = function () {
var _local1 = function (_this) {
_this.allow_gridCollide = true;
};
setTimeout(_local1, 34, _this);
};
_this.gridCollide = function () {
if (_this.allow_gridCollide) {
if (_this.scripts[nam].length > 0) {
_this.allow_gridCollide = false;
scripts.gridCollide.runEvent(0);
}
}
};
allow_see = true;
see = function () {
if ((scripts.see.length > 0) && (allow_see)) {
canSee = false;
scripts.see.done = function () {
checkAsk();
var _local1 = function (_this) {
_this.canSee = true;
};
setTimeout(_local1, 34, _this);
};
scripts.see.runEvent(0);
}
};
if (seeDistance == undefined) {
seeDistance = 7;
}
canSee = true;
checkSee = function () {
var _local11 = function (xTile, yTile) {
var _local1 = MAP.collision_array[xTile][yTile];
return(((_local1 == 1) || (_local1 == 2)) || (_local1 == undefined));
};
var _local12 = function (xTile, yTile) {
var _local4 = false;
var _local3 = SPRITE_GRID[xTile][yTile];
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3[_local1];
if (_local2.noCollide != true) {
_local4 = true;
break;
}
_local1++;
}
return(_local4);
};
if ((scripts.see.length > 0) && (canSee)) {
var _local8 = new flash.geom.Point(0, 0);
if (image.isFacing("up")) {
_local8.y = -16;
} else if (image.isFacing("down")) {
_local8.y = 16;
} else if (image.isFacing("left")) {
_local8.x = -16;
} else if (image.isFacing("right")) {
_local8.x = 16;
}
seePoint = new flash.geom.Point(_x, _y);
var _local9 = false;
var _local5 = 0;
while (_local5 < seeDistance) {
seePoint = seePoint.add(_local8);
var _local4 = Math.floor(seePoint.x / 16);
var _local3 = Math.floor(seePoint.y / 16);
if (_local11(_local4, _local3)) {
break;
}
if (_local12(_local4, _local3)) {
break;
}
var _local2 = seePoint.clone();
_parent.localToGlobal(_local2);
if (SPRITES.player.hit.hitTest(_local2.x, _local2.y, false)) {
_local9 = true;
break;
}
_local5++;
}
if (_local9) {
see();
}
}
};
allow_click = true;
canClick = true;
click = function () {
if ((((scripts.click.length > 0) && (canClick)) && (_this.isPaused != true)) && (allow_click)) {
canClick = false;
scripts.click.done = function () {
checkAsk();
var _local1 = function (_this) {
_this.canClick = true;
};
setTimeout(_local1, 34, _this);
};
scripts.click.runEvent(0);
}
};
if (scripts.click.length > 0) {
image.mask_mc.onRelease = click;
}
canCheckScreen = true;
allow_screen = true;
lastOnScreen = null;
if ((scripts.onScreen.length > 0) || (scripts.offScreen.length > 0)) {
checkScreen = function () {
if (canCheckScreen) {
thisPos = new flash.geom.Point(0, 0);
_this.localToGlobal(thisPos);
isOnScreen = SCREEN.hitTest(thisPos.x, thisPos.y, false);
if ((isOnScreen == true) && (lastOnScreen == false)) {
_this.doOnScreen();
}
if ((isOnScreen != true) && (lastOnScreen != false)) {
_this.doOffScreen();
}
lastOnScreen = isOnScreen;
}
};
}
doOnScreen = function () {
if ((scripts.onScreen.length > 0) && (allow_screen)) {
canCheckScreen = false;
scripts.onScreen.done = function () {
_this.canCheckScreen = true;
};
scripts.onScreen.runEvent(0);
}
};
doOffScreen = function () {
if ((scripts.offScreen.length > 0) && (allow_screen)) {
canCheckScreen = false;
scripts.offScreen.done = function () {
_this.canCheckScreen = true;
};
scripts.offScreen.runEvent(0);
}
};
askIsEnabled = function () {
return(SPRITES.player.ask_obj.isPaused == false);
};
hasAsk = false;
for (var nam in scripts) {
if ((((nam != "auto") && (nam != "talk")) && (nam != "collision")) && (nam != "see")) {
hasAsk = true;
break;
}
}
playerFacingThis = function () {
switch (SPRITES.player.image.internal.direction) {
case 0 :
var _local5 = 0;
var _local4 = -1;
break;
case 1 :
_local5 = 1;
_local4 = 0;
break;
case 2 :
_local5 = 0;
_local4 = 1;
break;
case 3 :
_local5 = -1;
_local4 = 0;
}
var _local2 = 0 + (_local5 * 16);
var _local3 = 0 + (_local4 * 16);
var _local1 = new flash.geom.Point(_local2, _local3);
SPRITES.player.localToGlobal(_local1);
return(_this.hit.hitTest(_local1.x, _local1.y, false));
};
checkAsk = function () {
if ((HUD.ask.sprite != _this) && (playerFacingThis())) {
HUD.ask.open(_this);
} else if ((HUD.ask.sprite == _this) && (playerFacingThis() == false)) {
HUD.ask.close();
}
};
init_useMapCollision = useMapCollision || null;
get_useMapCollision = function () {
return(_useMapCollision);
};
set_useMapCollision = function (newValue) {
_useMapCollision = getImpliedValue(newValue);
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 1;
} else if (_useMapCollision == false) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
this.addProperty("useMapCollision", get_useMapCollision, set_useMapCollision);
useMapCollision = init_useMapCollision;
loop = function () {
if (askIsEnabled() && (hasAsk)) {
checkAsk();
}
checkSee();
checkCollision();
checkScreen();
};
killWait = function () {
for (var _local2 in this) {
if (this[_local2].timeoutID != null) {
clearTimeout(this[_local2].timeoutID);
this[_local2].timeoutID = null;
}
}
moveTimeout.removeAll();
};
onUnload = function () {
if (_useMapCollision == true) {
}
SPRITE_GRID.remove(tile.x, tile.y, _this);
image.onUnload();
killWait();
LOOP.removeObject(_this, "sprites");
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
auto();
Symbol 324 MovieClip [player] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
function makeCornerSlip(walk_obj, wallValues) {
var xOffset = null;
var yOffset = null;
var player_mc = this;
var collision_array = null;
var walk_obj = null;
walk_obj.wallValues = wallValues;
var tileSize = (player_mc.tile.tileSize || 16);
var _local15 = 4;
var cornerSize = _local15;
var lookAhead = (_local15 + (tileSize / 2));
var isWallId = function (collisionId) {
var _local1 = 0;
while (_local1 < wallValues.length) {
if (wallValues[_local1] == collisionId) {
return(true);
}
_local1++;
}
return(false);
};
var isWall = function (xPixel, yPixel) {
var _local3 = Math.floor(xPixel / tileSize);
var _local2 = Math.floor(yPixel / tileSize);
var _local1 = collision_array[_local3][_local2];
return(isWallId(_local1));
};
var getWhichWay = function () {
if ((walk_obj.xVel == 0) && (walk_obj.yVel == 0)) {
return(false);
}
if (Math.abs(walk_obj.xVel) == Math.abs(walk_obj.yVel)) {
return(false);
}
var _local1 = {};
_local1.x = Math.abs(walk_obj.xVel);
_local1.y = Math.abs(walk_obj.yVel);
var _local3 = Math.max(_local1.x, _local1.y);
if (_local3 > tileSize) {
_local3 = tileSize;
}
var _local4 = ((_local1.x > _local1.y) ? "x" : "y");
var _local5 = ((_local4 == "x") ? "y" : "x");
var _local6 = {};
_local6[_local4] = (_local1[_local4] / walk_obj[_local4 + "Vel"]) || 0;
_local6[_local5] = (_local1[_local5] / walk_obj[_local5 + "Vel"]) || 0;
var _local2 = {forwardAxis:_local4, sideAxis:_local5, moveDir:_local6, slideSpeed:_local3};
return(_local2);
};
var getSlideDir = function (dir) {
var _local4 = {x:0, y:0};
var _local3 = dir.sideAxis;
var _local2 = dir.forwardAxis;
var _local6 = dir.moveDir;
var _local1 = {};
_local1[_local3] = player_mc["_" + _local3] - cornerSize;
_local1[_local2] = player_mc["_" + _local2] + (lookAhead * _local6[_local2]);
var _local7 = isWall(_local1.x, _local1.y);
_local1[_local3] = player_mc["_" + _local3] + cornerSize;
_local1[_local2] = player_mc["_" + _local2] + (lookAhead * _local6[_local2]);
var _local5 = isWall(_local1.x, _local1.y);
if (_local7 && (!_local5)) {
_local4[_local3] = 1;
} else if ((!_local7) && (_local5)) {
_local4[_local3] = -1;
} else {
_local4 = null;
}
return(_local4);
};
var setVelocity = function (slideDir, slideSpeed) {
var _local1 = {x:slideSpeed, y:slideSpeed};
_local1.x = _local1.x * slideDir.x;
_local1.y = _local1.y * slideDir.y;
walk_obj.xVel = walk_obj.xVel + _local1.x;
walk_obj.yVel = walk_obj.yVel + _local1.y;
if (walk_obj.xVel > tileSize) {
walk_obj.xVel = tileSize;
} else if (walk_obj.xVel < (-tileSize)) {
walk_obj.xVel = -tileSize;
}
if (walk_obj.yVel > tileSize) {
walk_obj.yVel = tileSize;
} else if (walk_obj.yVel < (-tileSize)) {
walk_obj.yVel = -tileSize;
}
};
var _local19 = function () {
xOffset = this.xOffset;
yOffset = this.yOffset;
player_mc = this.player_mc;
collision_array = this.collision_array;
walk_obj = this.walk_obj;
if (!walk_obj.wallValues) {
walk_obj.wallValues = [1];
}
var _local2 = getWhichWay();
if (_local2) {
var _local3 = getSlideDir(_local2);
if (_local3) {
setVelocity(_local3, _local2.slideSpeed);
}
}
};
return(_local19);
}
function makeTileCollision(walk_obj, wallValues) {
walk_obj.wallValues = wallValues;
var _local28 = function () {
if (this.walk_obj.wallValues == undefined) {
this.walk_obj.wallValues = [1];
}
var _local2 = 4;
var _local11 = this.walk_obj.xVel;
var _local10 = this.walk_obj.yVel;
var _local12 = Math.abs(_local11) / _local11;
var _local23 = ((this.player_mc._x + (_local2 * _local12)) + _local11) + this.xOffset;
var _local22 = (this.player_mc._y - _local2) + this.yOffset;
var _local19 = Math.floor(_local23 / 16);
var _local18 = Math.floor(_local22 / 16);
var _local7 = this.collision_array[_local19][_local18];
var _local15 = ((this.player_mc._x + (_local2 * _local12)) + _local11) + this.xOffset;
var _local14 = (this.player_mc._y + _local2) + this.yOffset;
var _local16 = Math.floor(_local15 / 16);
var _local17 = Math.floor(_local14 / 16);
var _local6 = this.collision_array[_local16][_local17];
var _local3 = false;
for (var _local9 in this.walk_obj.wallValues) {
if ((_local7 == this.walk_obj.wallValues[_local9]) || (_local6 == this.walk_obj.wallValues[_local9])) {
_local3 = true;
}
}
if ((_local7 == undefined) || (_local6 == undefined)) {
_local3 = true;
}
if (_local3) {
this.walk_obj.xVel = 0;
}
var _local13 = Math.abs(_local10) / _local10;
var _local25 = (this.player_mc._x - _local2) + this.xOffset;
var _local24 = ((this.player_mc._y + (_local2 * _local13)) + _local10) + this.yOffset;
var _local26 = Math.floor(_local25 / 16);
var _local28 = Math.floor(_local24 / 16);
var _local8 = this.collision_array[_local26][_local28];
var _local21 = (this.player_mc._x + _local2) + this.xOffset;
var _local20 = ((this.player_mc._y + (_local2 * _local13)) + _local10) + this.yOffset;
var _local27 = Math.floor(_local21 / 16);
var _local29 = Math.floor(_local20 / 16);
var _local5 = this.collision_array[_local27][_local29];
var _local4 = false;
for (var _local9 in this.walk_obj.wallValues) {
if ((_local8 == this.walk_obj.wallValues[_local9]) || (_local5 == this.walk_obj.wallValues[_local9])) {
_local4 = true;
}
}
if ((_local8 == undefined) || (_local5 == undefined)) {
_local4 = true;
}
if (_local4) {
this.walk_obj.yVel = 0;
}
};
return(_local28);
}
function makeSpriteCollision() {
var _local15 = function () {
var _local3 = 4;
var _local7 = this.walk_obj.xVel;
var _local6 = this.walk_obj.yVel;
for (var _local14 in this.spriteLayer_mc) {
var _local2 = this.spriteLayer_mc[_local14];
if ((_local2 != this.player_mc) && (_local2.noCollide != true)) {
var _local4 = Math.abs(_local7) / _local7;
if (_local4) {
var _local8 = ((this.player_mc._x + (_local3 * _local4)) + _local7) - this.xOffset;
var _local9 = (this.player_mc._y - _local3) - this.yOffset;
if ((((_local8 > (_local2._x - 8)) && (_local9 > (_local2._y - 8))) && (_local8 < (_local2._x + 8))) && (_local9 < (_local2._y + 8))) {
var _local12 = 1;
} else {
var _local12 = 0;
}
_local8 = ((this.player_mc._x + (_local3 * _local4)) + _local7) - this.xOffset;
_local9 = (this.player_mc._y + _local3) - this.yOffset;
if ((((_local8 > (_local2._x - 8)) && (_local9 > (_local2._y - 8))) && (_local8 < (_local2._x + 8))) && (_local9 < (_local2._y + 8))) {
var _local11 = 1;
} else {
var _local11 = 0;
}
if ((_local12 != 0) || (_local11 != 0)) {
this.walk_obj.xVel = 0;
}
}
var _local5 = Math.abs(_local6) / _local6;
if (_local5) {
var _local8 = (this.player_mc._x - _local3) - this.xOffset;
var _local9 = ((this.player_mc._y + (_local3 * _local5)) + _local6) - this.yOffset;
if ((((_local8 > (_local2._x - 8)) && (_local9 > (_local2._y - 8))) && (_local8 < (_local2._x + 8))) && (_local9 < (_local2._y + 8))) {
var _local13 = 1;
} else {
var _local13 = 0;
}
_local8 = (this.player_mc._x + _local3) - this.xOffset;
_local9 = ((this.player_mc._y + (_local3 * _local5)) + _local6) - this.yOffset;
if ((((_local8 > (_local2._x - 8)) && (_local9 > (_local2._y - 8))) && (_local8 < (_local2._x + 8))) && (_local9 < (_local2._y + 8))) {
var _local10 = 1;
} else {
var _local10 = 0;
}
if ((_local13 != 0) || (_local10 != 0)) {
this.walk_obj.yVel = 0;
}
}
}
}
};
return(_local15);
}
stop();
_this = this;
if (brightness) {
init_brightness = brightness;
} else if ((this.transform.colorTransform.redMultiplier == this.transform.colorTransform.greenMultiplier) && (this.transform.colorTransform.redMultiplier == this.transform.colorTransform.blueMultiplier)) {
init_brightness = (this.transform.colorTransform.redOffset * 100) / 255;
} else {
init_brightness = 0;
}
get_brightness = function () {
return(this.transform.colorTransform.redOffset);
};
set_brightness = function (newValue) {
var _local3 = _alpha / 100;
var _local2 = (newValue * 255) / 100;
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, _local3, _local2, _local2, _local2, 0);
};
this.addProperty("brightness", get_brightness, set_brightness);
brightness = init_brightness;
delete init_brightness;
delete get_brightness;
delete set_brightness;
tile = tile || ({});
tile.tileSize = 16;
tile.offset = tile.offset || ({});
tile.offset.x = 0;
tile.offset.y = 0;
get_xTile = function () {
return(Math.floor(_x / tile.tileSize));
};
set_xTile = function (newValue) {
_x = ((newValue * tile.tileSize) + tile.offset.x);
};
tile.addProperty("x", get_xTile, set_xTile);
get_yTile = function () {
return(Math.floor((_y - (tile.offset.y / 2)) / tile.tileSize));
};
set_yTile = function (newValue) {
_y = ((newValue * tile.tileSize) + tile.offset.y);
};
tile.addProperty("y", get_yTile, set_yTile);
onUnload();
delete onUnload;
moveTimeout = [];
moveTimeout.addTimeout = function (timeoutID) {
var _local2 = {timeoutID:timeoutID};
this.push(_local2);
};
moveTimeout.remove = function (timeoutID) {
var _local2 = this.length - 1;
while (_local2 >= 0) {
if (this[_local2].timeoutID == timeoutID) {
clearTimeout(this[_local2].timeoutID);
this.splice(_local2, 1);
}
_local2--;
}
};
moveTimeout.exists = function (timeoutID) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 >= 0) {
if (this[_local2].timeoutID == timeoutID) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
moveTimeout.removeAll = function () {
var _local1 = moveTimeout.length - 1;
while (_local1 >= 0) {
clearTimeout(moveTimeout[_local1].timeoutID);
moveTimeout.splice(_local1, 1);
_local1--;
}
};
justPaused = function () {
var _local1 = isPaused && (!lastPaused);
return(_local1);
};
justUnPaused = function () {
var _local1 = (!isPaused) && (lastPaused);
return(_local1);
};
stopAnim = function () {
image.setParams({isAnimating:false});
};
cancelVelocity = function () {
_this.walk_obj.xVel = (_this.walk_obj.xVel = 0);
};
lastPos = new flash.geom.Point(_this._x, _this._y);
setLastPos = function () {
lastPos.x = _this._x;
lastPos.y = _this._y;
};
createFollowerPath = function () {
var _local4 = new flash.geom.Point(_this._x, _this._y);
var _local5 = _local4.subtract(oldPlayerPos);
if (_local5.length > 16) {
var _local1 = 0;
while (_local1 < pos_array.length) {
pos_array[_local1] = {x:_this._x, y:_this._y};
_local1++;
}
}
};
onEnterFrame = function () {
if (justPaused()) {
lawnMower.stop(false);
stopAnim();
setLastPos();
cancelVelocity();
}
if (justUnPaused()) {
createFollowerPath();
}
lastPaused = isPaused;
};
LOOP.addObject(this, "player");
var image = newSprite(RAM.playerSprite, this, "image", 0);
image._y = 6;
makeWalk = function (player_mc, playerSprite_mc) {
var _this = new Object();
_this.walkSpeed = 3;
_this.acel = 1.2;
_this.decel = 0.5;
_this.xVel = 0;
_this.yVel = 0;
_this.playerSprite_mc = playerSprite_mc;
_this.up_key = 38;
_this.down_key = 40;
_this.left_key = 37;
_this.right_key = 39;
_this.loop = function () {
if (Key.isDown(RAM.keys.down || (_this.down_key))) {
_this.playerSprite_mc.setParams({direction:"down"});
if (_this.yVel < _this.walkSpeed) {
_this.yVel = _this.yVel + _this.acel;
}
if (_this.yVel > _this.walkSpeed) {
_this.yVel = _this.walkSpeed;
}
} else if (Key.isDown(RAM.keys.up || (_this.up_key))) {
_this.playerSprite_mc.setParams({direction:"up"});
if (_this.yVel > (-_this.walkSpeed)) {
_this.yVel = _this.yVel - _this.acel;
}
if (_this.yVel < (-_this.walkSpeed)) {
_this.yVel = -_this.walkSpeed;
}
} else if (Math.abs(_this.yVel) > 1) {
_this.yVel = _this.yVel * _this.decel;
} else {
_this.yVel = 0;
}
if (Key.isDown(RAM.keys.right || (_this.right_key))) {
_this.playerSprite_mc.setParams({direction:"right"});
if (_this.xVel < _this.walkSpeed) {
_this.xVel = _this.xVel + _this.acel;
}
if (_this.xVel > _this.walkSpeed) {
_this.xVel = _this.walkSpeed;
}
} else if (Key.isDown(RAM.keys.left || (_this.left_key))) {
_this.playerSprite_mc.setParams({direction:"left"});
if (_this.xVel > (-_this.walkSpeed)) {
_this.xVel = _this.xVel - _this.acel;
}
if (_this.xVel < (-_this.walkSpeed)) {
_this.xVel = -_this.walkSpeed;
}
} else if (Math.abs(_this.xVel) > 1) {
_this.xVel = _this.xVel * _this.decel;
} else {
_this.xVel = 0;
}
_this.collision.run();
var _local3 = 5;
var _local5 = 4;
var _local6 = 10;
var _local2 = ((Math.abs(_this.xVel) > Math.abs(_this.yVel)) ? (Math.abs(_this.xVel)) : (Math.abs(_this.yVel)));
var _local4 = Math.abs(_local2) / _local6;
var _local1 = _local3 - (_local5 * _local4);
_local1 = ((_local1 < 1) ? 1 : (_local1));
_this.playerSprite_mc.setParams({delay:_local1});
if ((Math.abs(_this.xVel) <= 0.05) && (Math.abs(_this.yVel) <= 0.05)) {
_this.playerSprite_mc.setParams({isAnimating:false});
} else {
_this.playerSprite_mc.setParams({isAnimating:true});
}
player_mc._x = player_mc._x + _this.xVel;
player_mc._y = player_mc._y + _this.yVel;
};
_this.loopInterval = setInterval(_this.loop, 33.3333333333333);
return(_this);
};
this.walk_obj = makeWalk(this, image);
clearInterval(this.walk_obj.loopInterval);
LOOP.addObject(this.walk_obj, "player");
this.walk_obj.collision = new WalkCollisionSystem(_this, _this.walk_obj, 0, 0);
haveSwim = RAM.items.tm_swim > 0;
var wall_array = (haveSwim ? ([1]) : ([1, 2]));
this.walk_obj.collision.collision_array = MAP.collision_array;
this.walk_obj.collision.collisionMethods.push(makeCornerSlip(this.walk_obj, wall_array));
this.walk_obj.collision.collisionMethods.push(makeTileCollision(this.walk_obj, wall_array));
this.walk_obj.collision.spriteLayer_mc = SPRITES;
this.walk_obj.collision.collisionMethods.push(makeSpriteCollision());
makeTalk = function (player_mc, playerImage_mc, spriteLayer_mc, talkKey, xOffset, yOffset) {
talkKey = (talkKey ? (talkKey) : 32);
var _this = new Object();
_this.player_mc = player_mc;
_this.playerImage_mc = playerImage_mc;
_this.spriteLayer_mc = spriteLayer_mc;
_this.xOffset = ((xOffset != undefined) ? (xOffset) : 0);
_this.yOffset = ((yOffset != undefined) ? (yOffset) : 0);
_this.talk_key = talkKey;
_this.lastKey = false;
_this.loop = function () {
if (Key.isDown(RAM.keys.talk || (_this.talk_key))) {
if (_this.lastKey == false) {
_this.lastKey = true;
switch (_this.playerImage_mc.internal.direction) {
case 0 :
var _local6 = 0;
var _local5 = -16;
break;
case 1 :
_local6 = 16;
_local5 = 0;
break;
case 2 :
_local6 = 0;
_local5 = 16;
break;
case 3 :
_local6 = -16;
_local5 = 0;
}
var _local2 = (_this.player_mc._x + _local6) + _this.xOffset;
var _local3 = (_this.player_mc._y + _local5) + _this.yOffset;
for (var _local4 in _this.spriteLayer_mc) {
var _local1 = _this.spriteLayer_mc[_local4];
if ((((_local2 > (_local1._x - 8)) && (_local3 > (_local1._y - 8))) && (_local2 < (_local1._x + 8))) && (_local3 < (_local1._y + 8))) {
_local1.talk();
}
}
}
} else {
_this.lastKey = false;
}
};
_this.loopInterval = setInterval(_this.loop, 33);
return(_this);
};
this.talk_obj = makeTalk(this, image, SPRITES, RAM.keys.talk, 0, 0);
clearInterval(this.talk_obj.loopInterval);
LOOP.addObject(this.talk_obj, "player");
this.ask_obj = {};
LOOP.addObject(this.ask_obj, "player");
showSplash = function () {
var _local2 = nextDepth(OVERLAY);
var _local4 = "splash_" + _local2;
var _local1 = OVERLAY.createEmptyMovieClip(_local4, _local2);
_local1._x = _x;
_local1._y = _y;
var _local3 = new MovieClipLoader();
_local3.loadClip("swf\\splash.swf", _local1);
};
swim_obj = {lastTerrain:undefined, loop:function () {
var _local3 = Math.floor(_this._x / 16);
var _local4 = Math.floor(_this._y / 16);
var _local2 = MAP.collision_array[_local3][_local4];
if ((_local2 == 2) && (this.lastTerrain != 2)) {
if (this.lastTerrain != undefined) {
showSplash();
}
_this.walk_obj.walkSpeed = 1.5;
_this.walk_obj.acel = 0.15;
_this.walk_obj.decel = 0.99;
_this.walk_obj.xVel = 0;
_this.walk_obj.yVel = 0;
var _local5 = {charset:"charset\\ashSwim.png", pose:0, columns:1, rows:1, animDirection:1, delay:4};
_this.image.setParams(_local5);
} else if ((_local2 != 2) && (this.lastTerrain == 2)) {
if (this.lastTerrain != undefined) {
showSplash();
}
_this.walk_obj.walkSpeed = 3;
_this.walk_obj.acel = 1.2;
_this.walk_obj.decel = 0.5;
_this.image.setParams(RAM.playerSprite);
}
this.lastTerrain = _local2;
}, enable:function () {
_this.walk_obj.wallValues = [1];
}, disable:function () {
_this.walk_obj.wallValues = [1, 2];
}};
LOOP.addObject(this.swim_obj, "player");
slippery_obj = {lastTerrain:0, loop:function () {
var _local4 = Math.floor(_x / 16);
var _local3 = Math.floor(_y / 16);
var _local2 = MAP.collision_array[_local4][_local3];
if ((_local2 == 4) && (this.lastTerrain != 4)) {
walk_obj.acel = 0.1;
walk_obj.decel = 0.9;
} else if ((_local2 == 0) && (this.lastTerrain == 4)) {
walk_obj.acel = 1.2;
walk_obj.decel = 0.5;
}
this.lastTerrain = _local2;
}};
LOOP.addObject(this.slippery_obj, "player");
lawnMower = {items:RAM.items, keyboard:RAM.keys, collision:MAP.collision_array, grassId:3, mowedTileId:270, mowedCollisionId:0, lastPos:{x:-999, y:-999}, isRunning:false, start:function () {
this.items.fuel = 99999 /* 0x01869F */;
this.lastPos = this.getTile(_this._x, _this._y);
this.rememberAppearance();
this.useMowerAppearance();
this.disableFeatures();
this.startMowerLoop();
this.isRunning = true;
}, stop:function (restoreFeatures) {
if (this.isRunning) {
if (restoreFeatures == undefined) {
restoreFeatures = true;
}
this.restoreAppearance();
if (restoreFeatures) {
this.enableFeatures();
}
this.stopMowerLoop();
this.isRunning = false;
}
}, loop:function () {
if (this.mowingWasCancelled()) {
this.stop();
} else {
var _local2 = this.perStep();
if (_local2) {
if (this.haveFuel()) {
this.collideGrass(_local2);
this.collideGrassFight(_local2);
this.reduceFuel();
} else {
this.stop();
}
}
}
}, rememberAppearance:function () {
this.oldLook = _this.image.getParams();
}, restoreAppearance:function () {
if (this.oldLook) {
_this.image.setParams(this.oldLook);
RAM.playerSprite = this.oldLook;
}
}, useMowerAppearance:function () {
var _local1 = {charset:"charset/ash_bike.png", directions:4, frame:0, frames:2, pose:0, columns:1, rows:1, animType:"yoyo", animDirection:1, delay:3, isAnimating:true};
_this.image.setParams(_local1);
}, disableFeatures:function () {
LOOP.pauseSet("fieldMenu", true);
LOOP.pauseObject(_this.ask_obj, true);
LOOP.pauseObject(_this.talk_obj, true);
LOOP.pauseObject(_this.swim_obj, true);
_this.swim_obj.disable();
}, enableFeatures:function () {
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseObject(_this.ask_obj, false);
LOOP.pauseObject(_this.talk_obj, false);
LOOP.pauseObject(_this.swim_obj, false);
if (_this.haveSwim) {
_this.swim_obj.enable();
}
}, startMowerLoop:function () {
LOOP.addObject(this, "player");
}, stopMowerLoop:function () {
LOOP.removeObject(this, "player");
}, collideGrass:function (newPos) {
var _local6 = this.collision[newPos.x][newPos.y];
if (_local6 == this.grassId) {
MAP.setTile(newPos.x, newPos.y, this.mowedTileId, 0);
this.collision[newPos.x][newPos.y] = this.mowedCollisionId;
var _local3 = nextDepth(SPRITES);
var _local5 = "grassCut_" + _local3;
var _local4 = {x:(newPos.x * 16) + 8, y:(newPos.y * 16) + 8};
SPRITES.attachMovie("grassCut", _local5, _local3, {_x:_local4.x, _y:_local4.y + 9, noCollide:true});
}
}, collideGrassFight:function (newPos) {
for (var _local4 in SPRITES) {
if (SPRITES[_local4].isGrassFight) {
var _local1 = new flash.geom.Point((newPos.x * 16) + 8, (newPos.y * 16) + 8);
var _local3 = _local1.clone();
MAP.localToGlobal(_local1);
if (SPRITES[_local4].hit.hitTest(_local1.x, _local1.y, false)) {
SPRITES[_local4].remove();
}
}
}
}, perStep:function () {
var _local2 = this.getTile(_this._x, _this._y);
var _local3 = _this.image.getParam("direction");
switch (_local3) {
case 0 :
_local2.y--;
break;
case 1 :
_local2.x++;
break;
case 2 :
_local2.y++;
break;
case 3 :
_local2.x--;
}
if ((_local2.x != this.lastPos.x) || (_local2.y != this.lastPos.y)) {
this.lastPos = _local2;
return(_local2);
}
return(false);
}, reduceFuel:function () {
if (this.items.fuel < Number.POSITIVE_INFINITY) {
this.items.fuel--;
}
if (this.items.fuel <= 0) {
delete this.items.fuel;
}
}, haveFuel:function () {
return(this.items.fuel > 0);
}, mowingWasCancelled:function () {
var _local4 = Key.isDown(this.keyboard.cancel);
var _local3 = Key.isDown(this.keyboard.menu);
var _local5 = Key.isDown(this.keyboard.ask);
var _local2 = (_local4 || (_local3)) || (_local5);
return(_local2);
}, getTile:function (px, py) {
return({x:Math.floor(px / 16), y:Math.floor(py / 16)});
}, null:null};
this.gridCollide_obj = {lastX:null, lastY:null, loop:function () {
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
if ((_local2 != this.lastX) || (_local3 != this.lastY)) {
SPRITE_GRID.gridLeave(this.lastX, this.lastY);
SPRITE_GRID.gridCollide(_local2, _local3);
}
this.lastX = _local2;
this.lastY = _local3;
}};
LOOP.addObject(this.gridCollide_obj, "player");
this.onUnload = function () {
lawnMower.stop();
for (var _local2 in this) {
if (this[_local2].timeoutID) {
clearTimeout(this[_local2].timeoutID);
this[_local2].timeoutID = null;
}
}
LOOP.removeSet("player");
};
Symbol 325 MovieClip [game_mc] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
function onUnload() {
ROOT.broadcastMessage("onRemoveLevel");
var _local2 = function (varName) {
_global[varName] = null;
delete _global[varname];
};
_local2("MAP");
_local2("SPRITES");
_local2("PANORAMA");
_local2("UNDERLAY");
_local2("OVERLAY");
_local2("SPRITE_GRID");
LOOP.removeSet("player");
LOOP.removeSet("sprites");
LOOP.removeSet("scroll");
clearTimeout(menu_int);
LOOP.removeObject(menuDelay, "fieldmenu");
}
function createLayers() {
_global.UNDERLAY.removeMovieClip();
_global.UNDERLAY = MAP.createEmptyMovieClip("UNDERLAY", 1);
_global.SPRITES.removeMovieClip();
_global.SPRITES = MAP.createEmptyMovieClip("SPRITES", 11);
_global.OVERLAY.removeMovieClip();
_global.OVERLAY = MAP.createEmptyMovieClip("OVERLAY", 101);
}
function resetSpriteGrid() {
_global.SPRITE_GRID = new Array(MAP.width);
var _local3 = 0;
while (_local3 < MAP.width) {
SPRITE_GRID[_local3] = new Array(MAP.height);
var _local2 = 0;
while (_local2 < MAP.height) {
SPRITE_GRID[_local3][_local2] = [];
_local2++;
}
_local3++;
}
_global.SPRITE_GRID.gridCollide = function (xx, yy) {
var _local2 = SPRITE_GRID[xx][yy];
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].gridCollide();
_local1++;
}
};
_global.SPRITE_GRID.gridLeave = function (xx, yy) {
var _local2 = SPRITE_GRID[xx][yy];
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].gridLeave();
_local1++;
}
};
_global.SPRITE_GRID.add = function (xx, yy, sprite) {
var _local5 = ((xx != null) && (yy != null)) && (sprite != null);
if (_local5) {
var _local2 = SPRITE_GRID[xx][yy];
if (_local2) {
var _local3 = true;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == sprite) {
_local3 = false;
break;
}
_local1++;
}
if (_local3) {
_local2.push(sprite);
}
}
}
};
_global.SPRITE_GRID.remove = function (xx, yy, sprite) {
var _local4 = ((xx != null) && (yy != null)) && (sprite != null);
if (_local4) {
var _local2 = SPRITE_GRID[xx][yy];
if (_local2) {
var _local1 = _local2.length - 1;
while (_local1 >= 0) {
if (_local2[_local1] == sprite) {
_local2.splice(_local1, 1);
}
_local1--;
}
}
}
};
}
function createPlayer() {
var _local2 = (start_point ? (start_point.x) : 0);
var _local1 = (start_point ? (start_point.y) : 0);
player_mc = SPRITES.attachMovie("player", "player", nextDepth(SPRITES));
player_mc._x = _local2;
player_mc._y = _local1;
}
function createSprites() {
SPRITES.spritesRemaining = [];
var _local2 = 0;
while (_local2 < levelData.sprites.length) {
SPRITES.spritesRemaining.push(levelData.sprites[_local2]);
_local2++;
}
SPRITES.spritesRemaining.remove = function (thisName) {
var _local1 = SPRITES.spritesRemaining.length - 1;
while (_local1 >= 0) {
if (SPRITES.spritesRemaining[_local1].name == thisName) {
SPRITES.spritesRemaining.splice(_local1, 1);
break;
}
_local1--;
}
};
addSprite = function (thisSprite) {
var _local3 = SPRITES[thisSprite.name];
if (_local3 == undefined) {
var _local8 = thisSprite.type;
var _local2 = thisSprite.name;
var _local4 = nextDepth(SPRITES);
var _local7 = thisSprite.position.x;
var _local6 = thisSprite.position.y;
var _local5 = thisSprite.data;
var newSprite_mc = SPRITES.attachMovie(_local8, _local2, _local4, {_x:_local7, _y:_local6, data:_local5, name:_local2});
newSprite_mc.remove = function () {
SPRITES.spritesRemaining.remove(this.name);
_this.removeSprite(this);
};
newSprite_mc.resetToStartPosition = function () {
SPRITES[this.name]._x = thisSprite.position.x;
SPRITES[this.name]._y = thisSprite.position.y;
};
newSprite_mc.respawn = function () {
_this.removeSprite(thisSprite);
_this.addSprite(thisSprite);
newSprite_mc.resetToStartPosition();
};
LOOP.addObject(newSprite_mc, "sprites");
}
};
removeSprite = function (thisSprite) {
var _local1 = SPRITES[thisSprite.name];
if (_local1) {
LOOP.removeObject(_local1, "sprites");
callUnload(_local1);
_local1._name = nextName("_removed_", SPRITES);
_local1.removeMovieClip();
}
};
SPRITES.updateSprites = function () {
updateFlaggedSprites(SPRITES.spritesRemaining, RAM, addSprite, removeSprite);
ROOT.common.sprites.updateSprites();
};
}
function clearParty() {
for (var _local2 in RAM.party) {
if (SPRITES[_local2]) {
var _local1 = SPRITES[_local2];
_local1._name = "del_" + Math.floor(Math.random() * 9999);
_local1.onUnload();
_local1.removeMovieClip();
_local1.unloadMovie();
}
}
}
function updateParty() {
var _local4 = "player";
var _local3 = [];
for (var _local5 in RAM.party) {
_local3.push(_local5);
}
_local3.reverse();
for (var _local5 in RAM.party) {
if (SPRITES[_local5]) {
var _local2 = SPRITES[_local5];
_local2._name = "del_" + Math.floor(Math.random() * 9999);
_local2.onUnload();
_local2.removeMovieClip();
_local2.unloadMovie();
}
}
var _local1 = 0;
while (_local1 < _local3.length) {
RAM_F.party.placeMember(_local3[_local1], _local4);
_local4 = _local3[_local1];
_local1++;
}
}
function addAutoSorting() {
autoSorter = addAutoSort(SPRITES, 16);
}
function addAutoScrolling() {
MAP.scroll(player_mc._x, player_mc._y, 320, 240, 1);
scroll_obj = addAutoScroll(MAP, SPRITES.player, 320, 240, 1);
clearInterval(scroll_obj.loopInterval);
OVERLAY.attachMovie("scroll", "scroll", nextDepth(OVERLAY), {smoothness:0.2, mode:"chase", target:"player"});
setTimeout(function () {
LOOP.addObject(scroll_obj, "scroll");
}, 1, scroll_obj);
}
function addMood(mood) {
mood = mood || "none";
_global.MOOD_MC = _this.attachMovie("MOOD_MC", "mood_mc", 10, {mood:mood});
}
_this = this;
AsBroadcaster.initialize(this);
HUD.closeAll();
LOOP.pauseSet("fieldMenu", true);
HUD.ask.sprite = null;
MOOD_MC.mood = "none";
uid = Math.random();
makeMap = function (instanceName, target_mc, depth, width, height) {
function addCollisionMethods(_this) {
_this.twoPointCollide = function (side, sprite_mc, velocity_obj, xOffset, yOffset) {
xOffset = (xOffset ? (xOffset) : 0);
yOffset = (yOffset ? (yOffset) : 0);
var _local1 = new flash.geom.Point(sprite_mc._x + velocity_obj.xVel, sprite_mc._y + velocity_obj.yVel);
var _local3 = _local1.clone();
buffer = 4;
switch (side) {
case "up" :
_local1.x = _local1.x - (sprite_mc.width - buffer);
_local1.y = _local1.y - sprite_mc.height;
_local3.x = _local3.x + (sprite_mc.width - buffer);
_local3.y = _local3.y - sprite_mc.height;
break;
case "down" :
_local1.x = _local1.x - (sprite_mc.width - buffer);
_local1.y = _local1.y + sprite_mc.height;
_local3.x = _local3.x + (sprite_mc.width - buffer);
_local3.y = _local3.y + sprite_mc.height;
break;
case "left" :
_local1.x = _local1.x - sprite_mc.width;
_local1.y = _local1.y - (sprite_mc.height - buffer);
_local3.x = _local3.x - sprite_mc.width;
_local3.y = _local3.y + (sprite_mc.height - buffer);
break;
case "right" :
_local1.x = _local1.x + sprite_mc.width;
_local1.y = _local1.y - (sprite_mc.height - buffer);
_local3.x = _local3.x + sprite_mc.width;
_local3.y = _local3.y + (sprite_mc.height - buffer);
}
_local1.x = _local1.x + xOffset;
_local1.y = _local1.y + yOffset;
_local3.x = _local3.x + xOffset;
_local3.y = _local3.y + yOffset;
_local1.x = Math.floor(_local1.x / 16);
_local1.y = Math.floor(_local1.y / 16);
_local3.x = Math.floor(_local3.x / 16);
_local3.y = Math.floor(_local3.y / 16);
var _local5 = _this[_local1.x][_local1.y];
var _local7 = _this[_local3.x][_local3.y];
var _local4 = 0;
if ((_local5 > 0) || (_local7 > 0)) {
if ((_local5 == 1) || (_local7 == 1)) {
_local4 = 1;
} else {
_local4 = _local5;
}
}
return(_local4);
};
_this.getPixelCollision = function (x, y) {
x = Math.floor(x / 16);
y = Math.floor(y / 16);
return(_this[x][y]);
};
_this.getTileCollision(x, y);
return(_this[x][y]);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
target_mc = (target_mc ? (target_mc) : this);
depth = ((depth != undefined) ? (depth) : (nextDepth(target_mc)));
width = (width ? (width) : 20);
height = (height ? (height) : 15);
var _this = target_mc.createEmptyMovieClip(instanceName, depth);
_this.width = width;
_this.height = height;
_this.chipset_pic = new flash.display.BitmapData(480, 256, true, 0);
_this.collision_array = new Array();
var x = 0;
while (x < width) {
_this.collision_array[x] = new Array();
var y = 0;
while (y < height) {
_this.collision_array[x][y] = 0;
y++;
}
x++;
}
addCollisionMethods(_this.collision_array);
_this.reset = function (width, height) {
function addCollisionMethods(_this) {
_this.twoPointCollide = function (side, sprite_mc, velocity_obj, xOffset, yOffset) {
xOffset = (xOffset ? (xOffset) : 0);
yOffset = (yOffset ? (yOffset) : 0);
var _local1 = new flash.geom.Point(sprite_mc._x + velocity_obj.xVel, sprite_mc._y + velocity_obj.yVel);
var _local3 = _local1.clone();
buffer = 4;
switch (side) {
case "up" :
_local1.x = _local1.x - (sprite_mc.width - buffer);
_local1.y = _local1.y - sprite_mc.height;
_local3.x = _local3.x + (sprite_mc.width - buffer);
_local3.y = _local3.y - sprite_mc.height;
break;
case "down" :
_local1.x = _local1.x - (sprite_mc.width - buffer);
_local1.y = _local1.y + sprite_mc.height;
_local3.x = _local3.x + (sprite_mc.width - buffer);
_local3.y = _local3.y + sprite_mc.height;
break;
case "left" :
_local1.x = _local1.x - sprite_mc.width;
_local1.y = _local1.y - (sprite_mc.height - buffer);
_local3.x = _local3.x - sprite_mc.width;
_local3.y = _local3.y + (sprite_mc.height - buffer);
break;
case "right" :
_local1.x = _local1.x + sprite_mc.width;
_local1.y = _local1.y - (sprite_mc.height - buffer);
_local3.x = _local3.x + sprite_mc.width;
_local3.y = _local3.y + (sprite_mc.height - buffer);
}
_local1.x = _local1.x + xOffset;
_local1.y = _local1.y + yOffset;
_local3.x = _local3.x + xOffset;
_local3.y = _local3.y + yOffset;
_local1.x = Math.floor(_local1.x / 16);
_local1.y = Math.floor(_local1.y / 16);
_local3.x = Math.floor(_local3.x / 16);
_local3.y = Math.floor(_local3.y / 16);
var _local5 = _this[_local1.x][_local1.y];
var _local7 = _this[_local3.x][_local3.y];
var _local4 = 0;
if ((_local5 > 0) || (_local7 > 0)) {
if ((_local5 == 1) || (_local7 == 1)) {
_local4 = 1;
} else {
_local4 = _local5;
}
}
return(_local4);
};
_this.getPixelCollision = function (x, y) {
x = Math.floor(x / 16);
y = Math.floor(y / 16);
return(_this[x][y]);
};
_this.getTileCollision(x, y);
return(_this[x][y]);
}
for (var _local4 in _this) {
var _local1 = _this[_local4];
if (typeof(_local1) == "movieclip") {
if (_local4.slice(0, 5) == "layer") {
_local1.removeMovieClip();
}
} else if (_local1 instanceof flash.display.BitmapData) {
if ((_local4.slice(0, 5) == "layer") || (_local4 == "chipset_pic")) {
_this[_local4].dispose();
delete _this[_local4];
}
}
}
_this.width = (width ? (width) : (_this.width));
_this.height = (height ? (height) : (_this.height));
_this.chipset_pic = new flash.display.BitmapData(480, 256, true, 0);
_this.collision_array = new Array();
var x = 0;
while (x < _this.width) {
_this.collision_array[x] = new Array();
var y = 0;
while (y < _this.height) {
_this.collision_array[x][y] = 0;
y++;
}
x++;
}
addCollisionMethods(_this.collision_array);
};
_this.setTile = function (x, y, id, layer) {
layer = ((layer != undefined) ? (layer) : 0);
var _local4 = 30;
var _local9 = id % _local4;
var _local8 = Math.floor(id / _local4);
var _local5 = new flash.geom.Rectangle(_local9 * 16, _local8 * 16, 16, 16);
var _local6 = new flash.geom.Point(x * 16, y * 16);
var _local2 = ("layer" + layer) + "_mc";
var _local3 = ("layer" + layer) + "_pic";
if (_this[_local2] == undefined) {
var _local7 = (_this[_local3] = new flash.display.BitmapData(_this.width * 16, _this.height * 16, true, 0));
_this.createEmptyMovieClip(_local2, layer * 10);
_this[_local2].attachBitmap(_local7, 0, false, false);
}
_this[_local3].copyPixels(_this.chipset_pic, _local5, _local6);
};
_this.loadChipset = function (fileName) {
var _local2 = new flash.geom.Rectangle(0, 0, 480, 256);
_this.chipset_pic.fillRect(_local2, 0);
var _local1 = flash.display.BitmapData.loadBitmap(fileName);
if (_local1.width > -1) {
_this.chipset_pic = _local1.clone();
_local1.dispose();
_this.onLoad();
} else {
_this.createEmptyMovieClip("load_mc", 99);
_this.load_mc._xscale = 1;
_this.load_mc._yscale = 1;
_this.loader = new MovieClipLoader();
_this.loader.loadClip(fileName, _this.load_mc);
_this.loader.onLoadInit = function (load_mc) {
var _local1 = new flash.display.BitmapData(480, 256, true, 0);
_local1.draw(_this.load_mc);
_this.chipset_pic = _local1.clone();
_local1.dispose();
_this.onLoad();
_this.loader.unloadClip(load_mc);
delete _this.loader;
};
}
};
_this.drawObj = function (data_obj) {
switch (data_obj.format) {
case 2 :
_this.drawCompactObj(data_obj);
break;
default :
_this.drawLargeObj(data_obj);
}
};
_this.drawLargeObj = function (data_obj) {
_this.reset();
_this.width = data_obj.width;
_this.height = data_obj.height;
if (data_obj.collision != undefined) {
_this.collision_array = new Array();
var x = 0;
while (x < data_obj.width) {
_this.collision_array[x] = new Array();
var y = 0;
while (y < data_obj.height) {
_this.collision_array[x][y] = data_obj.collision[x][y];
y++;
}
x++;
}
addCollisionMethods(_this.collision_array);
}
var _local11 = new flash.geom.Rectangle(0, 0, 480, 256);
_this.chipset_pic.fillRect(_local11, 0);
var _local10 = flash.display.BitmapData.loadBitmap(data_obj.chipset);
if (_local10.width > -1) {
_this.chipset_pic = _local10.clone();
_local10.dispose();
var _local1 = 0;
while (_local1 < data_obj.layers.length) {
var x = 0;
while (x < _this.width) {
var y = 0;
while (y < _this.height) {
var _local2 = data_obj.layers[_local1][x][y];
_this.setTile(x, y, _local2, _local1);
y++;
}
x++;
}
_local1++;
}
_this.onLoad();
delete _this.loadData;
} else {
_this.createEmptyMovieClip("load_mc", 99);
_this.load_mc._xscale = 1;
_this.load_mc._yscale = 1;
_this.loader = new MovieClipLoader();
_this.loader.loadClip(data_obj.chipset, _this.load_mc);
_this.loader.onLoadInit = function (load_mc) {
var _local5 = new flash.display.BitmapData(480, 256, true, 0);
_local5.draw(_this.load_mc);
var _local6 = new flash.geom.Rectangle(0, 0, 480, 256);
_this.chipset_pic.copyPixels(_local5, _local6, {x:0, y:0});
_this.loader.unloadClip(_this.load_mc);
var _local3 = 0;
while (_local3 < data_obj.layers.length) {
var _local2 = 0;
while (_local2 < _this.width) {
var _local1 = 0;
while (_local1 < _this.height) {
var _local4 = data_obj.layers[_local3][_local2][_local1];
_this.setTile(_local2, _local1, _local4, _local3);
_local1++;
}
_local2++;
}
_local3++;
}
_this.onLoad();
delete _this.loadData;
delete _this.loader;
};
}
};
_this.drawCompactObj = function (data_obj) {
_this.reset();
_this.width = data_obj.width;
_this.height = data_obj.height;
var _local4 = 1;
if (data_obj.collision != undefined) {
_this.collision_array = new Array();
var x = 0;
while (x < data_obj.width) {
_this.collision_array[x] = new Array();
var y = 0;
while (y < data_obj.height) {
var _local1 = data_obj.collision.charAt(_local4);
if (_local1 == "0x") {
var _local3 = 33;
} else {
var _local3 = parseInt(_local1, 36);
}
_local4++;
_this.collision_array[x][y] = _local3;
y++;
}
x++;
}
addCollisionMethods(_this.collision_array);
}
var _local13 = new flash.geom.Rectangle(0, 0, 480, 256);
_this.chipset_pic.fillRect(_local13, 0);
var drawLayers = function () {
var _local4 = 0;
while (_local4 < data_obj.layers.length) {
var _local6 = 1;
var _local3 = 0;
while (_local3 < _this.width) {
var _local1 = 0;
while (_local1 < _this.height) {
var _local2 = data_obj.layers[_local4].substr(_local6, 2);
if (_local2 == "0x") {
var _local5 = 33;
} else {
var _local5 = parseInt(_local2, 36);
}
_local6 = _local6 + 2;
_this.setTile(_local3, _local1, _local5, _local4);
_local1++;
}
_local3++;
}
_local4++;
}
};
var _local12 = flash.display.BitmapData.loadBitmap(data_obj.chipset);
if (_local12.width > -1) {
_this.chipset_pic = _local12.clone();
_local12.dispose();
drawLayers();
_this.onLoad();
delete _this.loadData;
delete drawLayers;
} else {
_this.createEmptyMovieClip("load_mc", 99);
_this.load_mc._xscale = 1;
_this.load_mc._yscale = 1;
_this.loader = new MovieClipLoader();
_this.loader.loadClip(data_obj.chipset, _this.load_mc);
_this.loader.onLoadInit = function (load_mc) {
var _local1 = new flash.display.BitmapData(480, 256, true, 0);
_local1.draw(_this.load_mc);
var _local2 = new flash.geom.Rectangle(0, 0, 480, 256);
_this.chipset_pic.copyPixels(_local1, _local2, {x:0, y:0});
_this.loader.unloadClip(_this.load_mc);
drawLayers();
_this.onLoad();
delete _this.loadData;
delete _this.loader;
delete drawLayers;
};
}
};
_this.load = function (fileName) {
XML.prototype.ignoreWhite = true;
_this.attachMovie(fileName, "loadMap_mc", 98);
if (_this.loadMap_mc) {
_this.loadMap_mc.onLoad = function (data) {
_this.load_xml = data;
_this.loadData = new Object();
readXml_getValue = function (newValue) {
var _local2 = null;
var _local3 = newValue.substr(0, 4);
if (_local3 == "bol_") {
var _local4 = newValue.substr(4);
newValue = _local4 == "true";
_local2 = newValue;
} else if (_local3 == "num_") {
var _local4 = newValue.substr(4);
newValue = Number(_local4);
_local2 = newValue;
} else if (_local3 == "str_") {
var _local4 = newValue.substr(4);
newValue = String(_local4);
_local2 = newValue;
} else if (isNaN(Number(newValue))) {
if (newValue == "true") {
_local2 = true;
} else if (newValue == "false") {
_local2 = false;
} else if (newValue == "undefined") {
_local2 = undefined;
} else {
var _local6 = "";
var _local5 = String.fromCharCode(10);
newValue = newValue.split(_local5).join("");
_local2 = newValue;
}
} else {
_local2 = Number(newValue);
}
return(_local2);
};
readXml = function (parentPath, targetData) {
for (var _local1 in parentPath.attributes) {
if (_local1 != "xmlType") {
var _local6 = parentPath.attributes[_local1];
targetData[_local1] = readXml_getValue(_local6);
}
}
for (var _local8 in parentPath.childNodes) {
var _local2 = parentPath.childNodes[_local8];
var _local1 = _local2.nodeName;
var _local4 = _local2.attributes.xmlType;
if (_local4 == "array") {
targetData[_local1] = new Array();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
} else if (_local4 == "variable") {
var _local6 = _local2.attributes.value;
targetData[_local1] = readXml_getValue(_local6);
} else if (_local4 == "object") {
targetData[_local1] = new Object();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
}
}
delete stringSlice;
};
readXml(_this.load_xml, _this.loadData);
_this.drawObj(_this.loadData.map);
loadMap_mc.removeMovieClip();
};
} else {
_this.load_xml = new XML();
_this.load_xml.load(fileName);
_this.load_xml.onLoad = function (success) {
readXml_getValue = function (newValue) {
var _local2 = null;
var _local3 = newValue.substr(0, 4);
if (_local3 == "bol_") {
var _local4 = newValue.substr(4);
newValue = _local4 == "true";
_local2 = newValue;
} else if (_local3 == "num_") {
var _local4 = newValue.substr(4);
newValue = Number(_local4);
_local2 = newValue;
} else if (_local3 == "str_") {
var _local4 = newValue.substr(4);
newValue = String(_local4);
_local2 = newValue;
} else if (isNaN(Number(newValue))) {
if (newValue == "true") {
_local2 = true;
} else if (newValue == "false") {
_local2 = false;
} else if (newValue == "undefined") {
_local2 = undefined;
} else {
var _local6 = "";
var _local5 = String.fromCharCode(10);
newValue = newValue.split(_local5).join("");
_local2 = newValue;
}
} else {
_local2 = Number(newValue);
}
return(_local2);
};
readXml = function (parentPath, targetData) {
for (var _local1 in parentPath.attributes) {
if (_local1 != "xmlType") {
var _local6 = parentPath.attributes[_local1];
targetData[_local1] = readXml_getValue(_local6);
}
}
for (var _local8 in parentPath.childNodes) {
var _local2 = parentPath.childNodes[_local8];
var _local1 = _local2.nodeName;
var _local4 = _local2.attributes.xmlType;
if (_local4 == "array") {
targetData[_local1] = new Array();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
} else if (_local4 == "variable") {
var _local6 = _local2.attributes.value;
targetData[_local1] = readXml_getValue(_local6);
} else if (_local4 == "object") {
targetData[_local1] = new Object();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
}
}
delete stringSlice;
};
if (success) {
_this.loadData = new Object();
readXml(_this.load_xml, _this.loadData);
_this.drawObj(_this.loadData.map);
}
};
}
};
_this.scroll = function (x, y, screenWidth, screenHeight, smoothness) {
if ((x == undefined) && (SPRITES.player._x != undefined)) {
x = SPRITES.player._x;
}
if ((y == undefined) && (SPRITES.player._y != undefined)) {
y = SPRITES.player._y;
}
screenWidth = (screenWidth ? (screenWidth) : 320);
screenHeight = (screenHeight ? (screenHeight) : 240);
smoothness = (smoothness ? (smoothness) : 1);
var _local5 = screenWidth / 2;
var _local7 = screenHeight / 2;
var _local2 = _this.width * 16;
var _local4 = _this.height * 16;
var _local8 = _this._x;
var _local6 = _this._y;
if (x < _local5) {
var _local12 = 0;
} else if (x > (_local2 - _local5)) {
var _local12 = (-_local2) + screenWidth;
} else {
var _local12 = (-x) + _local5;
}
if (y < _local7) {
var _local13 = 0;
} else if (y > (_local4 - _local7)) {
var _local13 = (-_local4) + screenHeight;
} else {
var _local13 = (-y) + _local7;
}
if (_local2 < screenWidth) {
var _local15 = screenWidth - _local2;
_local8 = _local15 / 2;
} else {
_local8 = _local8 + ((_local12 - _this._x) * smoothness);
}
if (_local4 < screenHeight) {
var _local14 = screenHeight - _local4;
_local6 = _local14 / 2;
} else {
_local6 = _local6 + ((_local13 - _this._y) * smoothness);
}
_this._x = Math.floor(_local8);
_this._y = Math.floor(_local6);
};
return(_this);
};
updateFlaggedSprites = function (sprites, flagRoot, addSprite, removeSprite) {
var getFlagParts = function (flag) {
var _local2 = [];
var _local4 = flag.charAt(0);
while (_local4 == " ") {
flag = flag.substr(1);
_local4 = flag.charAt(0);
}
var _local3 = flag.charAt(flag.length - 1);
while (_local3 == " ") {
flag = flag.substr(0, flag.length - 1);
_local3 = flag.charAt(flag.length - 1);
}
if (flag.charAt(0) == "!") {
flag = flag.substr(1) + "!";
var _local5 = flag.indexOf("!");
var _local6 = _local5 + 1;
} else if (flag.indexOf("!=") != -1) {
var _local5 = flag.indexOf("!=");
var _local6 = _local5 + 2;
} else if (flag.indexOf("<=") != -1) {
var _local5 = flag.indexOf("<=");
var _local6 = _local5 + 2;
} else if (flag.indexOf(">=") != -1) {
var _local5 = flag.indexOf(">=");
var _local6 = _local5 + 2;
} else if (flag.indexOf("<") != -1) {
var _local5 = flag.indexOf("<");
var _local6 = _local5 + 1;
} else if (flag.indexOf(">") != -1) {
var _local5 = flag.indexOf(">");
var _local6 = _local5 + 1;
} else if (flag.indexOf("=") != -1) {
var _local5 = flag.indexOf("=");
var _local6 = _local5 + 1;
} else {
var _local5 = flag.length;
flag = flag + "!=undefined";
var _local6 = _local5 + 2;
}
_local2.push(flag.substr(0, _local5));
_local2.push(flag.substring(_local5, _local6));
_local2.push(flag.substr(_local6));
_local3 = _local2[0].charAt(_local2[0].length - 1);
while (_local3 == " ") {
_local2[0] = _local2[0].substr(0, _local2[0].length - 1);
_local3 = _local2[0].charAt(_local2[0].length - 1);
}
_local4 = _local2[2].charAt(0);
while (_local4 == " ") {
_local2[2] = _local2[2].substr(1);
_local4 = _local2[2].charAt(0);
}
return(_local2);
};
var checkFlag = function (spriteFlag, flagRoot) {
var output = true;
var flagParts_array = getFlagParts(spriteFlag);
var variable = flagParts_array[0];
var operation = flagParts_array[1];
var value = flagParts_array[2];
if (isNaN(value) == false) {
value = Number(value);
}
if (value == "true") {
value = true;
}
if (value == "false") {
value = false;
}
if (value == "undefined") {
value = undefined;
}
var endAt = variable.lastIndexOf(".");
if (endAt != -1) {
var flagPath = variable.substr(0, endAt);
var flagName = variable.substr(endAt + 1);
var flagPath = ("flagRoot." + flagPath);
} else {
var flagName = variable;
var flagPath = "flagRoot";
}
var displayValue = eval ((flagPath + ".") + flagName);
switch (operation) {
case "!" :
output = (displayValue == undefined) || (displayValue == false);
break;
case "=" :
output = displayValue == value;
break;
case "!=" :
if ((!Boolean(displayValue)) && (!Boolean(value))) {
displayValue = false;
value = false;
}
output = displayValue != value;
break;
case "<" :
output = displayValue < value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) == "string") {
output = false;
}
break;
case ">" :
output = displayValue > value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) == "string") {
output = false;
}
break;
case "<=" :
output = displayValue <= value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) == "string") {
output = false;
}
break;
case ">=" :
output = displayValue >= value;
if (displayValue == undefined) {
output = false;
}
if (typeof(displayValue) != "string") {
break;
}
output = false;
}
return(output);
};
var s = 0;
while (s < sprites.length) {
var thisSprite = sprites[s];
var testResult = true;
var sf = 0;
while (sf < thisSprite.flags.length) {
var thisSpriteFlag = thisSprite.flags[sf];
testResult = checkFlag(thisSpriteFlag, flagRoot);
if (testResult == false) {
break;
}
sf++;
}
if (testResult == true) {
addSprite(thisSprite);
} else if (testResult == false) {
removeSprite(thisSprite);
}
s++;
}
};
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
addAutoSort = function (spriteLayer_mc, ignoreList) {
var _this = new Object();
_this.spriteLayer_mc = spriteLayer_mc;
_this.ignoreList = ignoreList || ([]);
_this.parallelSprites = 10;
_this.loop = function () {
if (_this.spriteLayer_mc._name != undefined) {
for (var _local7 in spriteLayer_mc) {
var _local5 = true;
var _local1 = 0;
while (_local1 < ignoreList.length) {
if (_local7 == ignoreList[_local1]) {
_local5 = false;
}
_local1++;
}
if (_local5 == true) {
var _local2 = _this.spriteLayer_mc[_local7];
if (_local2._y != 0) {
var _local3 = _local2._y * _this.parallelSprites;
if (_local2.overAll) {
_local3 = (2880 * _this.parallelSprites) + _this.parallelSprites;
}
var _local6 = _local2.getDepth();
var _local4 = _this.spriteLayer_mc.getInstanceAtDepth(_local3);
while ((_local4 != undefined) && (_local4 != _local2)) {
_local3++;
_local4 = _this.spriteLayer_mc.getInstanceAtDepth(_local3);
}
_local2.swapDepths(_local3);
}
}
}
} else {
clearInterval(_this.loopInterval);
}
};
_this.loopInterval = setInterval(_this.loop, 33.3333333333333);
return(_this);
};
addAutoScroll = function (map_mc, target_mc, screenWidth, screenHeight, smoothness) {
var _this = new Object();
_this.map_mc = map_mc;
_this.target_mc = target_mc;
_this.screenWidth = (screenWidth ? (screenWidth) : 320);
_this.screenHeight = (screenHeight ? (screenHeight) : 240);
_this.smoothness = (smoothness ? (smoothness) : 1);
_this.loop = function () {
if (_this.target_mc) {
_this.map_mc.scroll(_this.target_mc._x, _this.target_mc._y, _this.screenWidth, _this.screenHeight, _this.smoothness);
}
};
_this.loopInterval = setInterval(_this.loop, 33.3333333333333);
return(_this);
};
_global.nextName = function (base_str, parent_mc) {
if (base_str && (parent_mc)) {
var _local2 = 0;
var _local1 = base_str;
while (parent_mc[_local1] != undefined) {
_local1 = base_str + _local2;
_local2++;
}
}
return(_local1);
};
callUnload = function (parent) {
for (var nam in parent) {
var thisChild = parent[nam];
if (thisChild instanceof MovieClip) {
reportedPath = String(eval (thisChild._target));
actualPath = (String(eval (parent._target)) + ".") + nam;
if (reportedPath.indexOf(actualPath) != -1) {
callUnload(thisChild);
}
}
}
parent.onKillFocus(null);
parent.dispatchEvent({type:"unload"});
parent.broadcastMessage("unload");
parent.unload();
parent.onUnload();
parent.removeEventListener("keyDown", parent);
parent.removeEventListener("keyUp", parent);
Key.removeListener(parent);
Mouse.removeListener(parent);
};
_global.PANORAMA.removeMovieClip();
_global.PANORAMA = _this.createEmptyMovieClip("PANORAMA", 0);
var newScrollArea = (new flash.geom.Rectangle(0, 0, 320, 240));
_this.scrollRect = newScrollArea;
_global.MAP_RENDER = _this.createEmptyMovieClip("map_render", 2);
init_renderScale = renderScale || 1;
get_renderScale = function () {
return(_renderScale);
};
set_renderScale = function (newValue) {
if (newValue != _renderScale) {
_renderScale = newValue;
MAP_RENDER._xscale = (MAP_RENDER._yscale = 100 / _renderScale);
map_pic.dispose();
map_pic = new flash.display.BitmapData(320 * _renderScale, 240 * _renderScale, false, 0);
MAP_RENDER.attachBitmap(map_pic, 0, "always", false);
MAP_RENDER.loop();
MAP_RENDER.pic = map_pic;
_this.broadcastMessage("onRenderScale", newValue);
}
};
this.addProperty("renderScale", get_renderScale, set_renderScale);
renderScale = init_renderScale;
MAP_RENDER.loop = function () {
var _local1 = new flash.geom.Matrix();
_local1.translate(MAP._x, MAP._y);
_local1.scale(renderScale, renderScale);
map_pic.draw(MAP, _local1);
};
LOOP.addObject(MAP_RENDER, "renderMap");
init_render = ((render != undefined) ? (render) : false);
get_render = function () {
return(_render);
};
set_render = function (newValue) {
if (_render != newValue) {
_render = newValue;
if (newValue == true) {
MAP_RENDER.loop();
LOOP.pauseSet("renderMap", false);
MAP_RENDER._visible = true;
MAP._visible = false;
} else {
LOOP.pauseSet("renderMap", true);
MAP_RENDER._visible = false;
MAP._visible = true;
}
_this.broadcastMessage("onRenderToggle", newValue);
}
};
this.addProperty("render", get_render, set_render);
render = init_render;
MOOD_MC.removeExtraClips();
addMood(prevMood);
_global.MAP = makeMap("map_mc", _this, 1);
MAP._visible = false;
MAP.opaqueBackground = 0;
MAP.onLoad = function () {
createLayers();
resetSpriteGrid();
createPlayer();
LOOP.pauseSet("fieldMenu", false);
createSprites();
SPRITES.updateSprites();
updateParty();
addAutoSorting();
addAutoScrolling();
MAP._visible = true;
render = true;
VOW.firstWait(100).then(TRANSITION.doFadeIn);
MAP.onUnload = function () {
LOOP.removeObject(MAP_RENDER, "renderMap");
_this.mood_mc.removeMovieClip();
clearInterval(autoSorter.loopInterval);
LOOP.removeObject(scroll_obj, "scroll");
for (var _local1 in SPRITES) {
LOOP.removeObject(SPRITES[_local1], "sprites");
}
};
_this.onLoad();
ROOT.broadcastMessage("onNewLevel");
};
MAP.drawObj(levelData.map);
Symbol 329 MovieClip Frame 1
_this = this;
_x = Math.floor(_x);
_y = Math.floor(_y);
__width = Math.floor(_width);
__height = Math.floor(_height);
_yscale = 100;
_xscale = 100;
fade_mc._visible = false;
fade_mc._width = __width;
fade_mc._height = __height;
marker._visible = false;
_this.createEmptyMovieClip("background_mc", 1);
background_pic = new flash.display.BitmapData(__width, __height, true, 0);
background_mc.attachBitmap(background_pic, 0, true, false);
background_mc.cacheAsBitmap = true;
background_mc.setMask(fade_mc);
background_mc.swapDepths(fade_mc);
drawRect = function (pic, x, y, w, h) {
background_mc.beginBitmapFill(pic);
background_mc.moveTo(x, y);
background_mc.lineTo(x + w, y);
background_mc.lineTo(x + w, y + h);
background_mc.lineTo(x, y + h);
background_mc.lineTo(x, y);
background_mc.endFill();
};
displayBackground = function () {
var _local3 = new flash.display.BitmapData(32, 32, true, 0);
_local3.draw(image_mc);
var _local4 = new flash.geom.Rectangle(8, 8, 16, 16);
var _local15 = new flash.geom.Rectangle(0, 8, 8, 16);
var _local14 = new flash.geom.Rectangle(24, 8, 8, 16);
var _local9 = new flash.geom.Rectangle(8, 0, 16, 8);
var _local8 = new flash.geom.Rectangle(8, 24, 16, 8);
var _local10 = Math.ceil((__height - 16) / 16);
var _local13 = Math.ceil((__width - 16) / 16);
var _local2 = 0;
while (_local2 < _local10) {
var _local1 = 0;
while (_local1 < _local13) {
var _local6 = new flash.geom.Point(8 + (_local1 * _local4.width), 8 + (_local2 * _local4.height));
background_pic.copyPixels(_local3, _local4, _local6);
if (_local2 == (_local10 - 1)) {
var _local7 = new flash.geom.Point(8 + (_local1 * _local9.width), 0);
var _local5 = new flash.geom.Point(8 + (_local1 * _local8.width), __height - 8);
background_pic.copyPixels(_local3, _local9, _local7);
background_pic.copyPixels(_local3, _local8, _local5);
}
_local1++;
}
var _local11 = new flash.geom.Point(0, 8 + (_local2 * _local15.height));
var _local12 = new flash.geom.Point(__width - 8, 8 + (_local2 * _local14.height));
background_pic.copyPixels(_local3, _local15, _local11);
background_pic.copyPixels(_local3, _local14, _local12);
_local2++;
}
var _local16 = new flash.geom.Rectangle(0, 0, 8, 8);
var _local17 = new flash.geom.Point(0, 0);
background_pic.copyPixels(_local3, _local16, _local17);
_local16 = new flash.geom.Rectangle(0, 24, 8, 8);
_local17 = new flash.geom.Point(0, __height - 8);
background_pic.copyPixels(_local3, _local16, _local17);
_local16 = new flash.geom.Rectangle(24, 0, 8, 8);
_local17 = new flash.geom.Point(__width - 8, 0);
background_pic.copyPixels(_local3, _local16, _local17);
_local16 = new flash.geom.Rectangle(24, 24, 8, 8);
_local17 = new flash.geom.Point(__width - 8, __height - 8);
background_pic.copyPixels(_local3, _local16, _local17);
_this.image_mc.unloadMovie();
};
imageLoader = new MovieClipLoader();
initImage = image;
_image = "";
_this.getImage = function () {
return(_image);
};
_this.setImage = function (newValue, doEvent) {
if (newValue != _this._image) {
_this._image = newValue;
_this.image_mc.unloadMovie();
var _local3 = new flash.geom.Rectangle(0, 0, __width, __height);
background_pic.fillRect(_local3, 0);
_this.createEmptyMovieClip("image_mc", 0);
_this.image_mc._alpha = 0;
_this.image_mc.attachMovie(newValue, "image", 0);
if ((_this.image_mc._width == undefined) || (_this.image_mc._width == 0)) {
var _local2 = flash.display.BitmapData.loadBitmap(newValue);
_this.image_mc.attachBitmap(_local2, 0);
if (_this.image_mc._width == 0) {
imageLoader.onLoadInit = function () {
displayBackground();
};
imageLoader.loadClip(newValue, image_mc);
} else {
displayBackground();
}
} else {
displayBackground();
}
}
};
_this.addProperty("image", _this.getImage, _this.setImage);
image = initImage;
Symbol 331 MovieClip [textbox_mc] Frame 1
stop();
_this = this;
ROOT.forceEmbedded(message_txt);
SOUND.play("sound\\cursor_select.mp3");
makeProperty = function (propName, defaultValue) {
var _local1 = _this[propName];
if (_this["get_" + propName] == undefined) {
_this["get_" + propName] = function () {
return(_this["_" + propName]);
};
}
if (_this["set_" + propName] == undefined) {
_this["set_" + propName] = function (newValue) {
_this["_" + propName] = newValue;
};
}
_this.addProperty(propName, _this["get_" + propName], _this["set_" + propName]);
var _local2 = ((_local1 != undefined) ? (_local1) : (defaultValue));
if (_local2 != undefined) {
_this["set_" + propName](_local2);
}
};
makeProperty("closeOnSpace", true);
makeProperty("closeOnClick", true);
makeProperty("typeDelay", 0);
makeProperty("enterKey", RAM.keys.talk);
makeProperty("cancelKey", RAM.keys.cancel);
makeProperty("skipKey", 16);
makeProperty("typingSound", "");
makeProperty("soundSystem", SOUND);
get_background = function () {
return(bg.image);
};
set_background = function (newValue, doEvent) {
if (newValue == "swf\\win_default.png") {
newValue = ("swf\\win_" + RAM.winBorder) + ".png";
}
bg.image = newValue;
};
makeProperty("background");
var offset = 16;
faceLoader = new MovieClipLoader();
minTextWidth = 240;
minTextOffset = 72;
maxTextWidth = 296;
maxTextOffset = 16;
faceMargin = 6;
set_face = function (newValue, doEvent) {
face_mc.complete = function () {
var _local2 = (face_mc._x + face_mc._width) + faceMargin;
var _local1 = maxTextWidth - face_mc._width;
_this.message_txt._width = _local1 - faceMargin;
_this.message_txt._x = _local2;
};
face_mc.error = function () {
var _local2 = face_mc._x;
var _local1 = maxTextWidth;
_this.message_txt._width = _local1;
_this.message_txt._x = _local2;
};
face_mc.file = newValue;
};
makeProperty("face");
message_txt.condenseWhite = false;
readIndex = 0;
delayTimeout = null;
forceSound = true;
waitForClick = false;
doneTyping = false;
initInstantDisplay = (instantDisplay ? (instantDisplay) : false);
_html = "<p>";
set_text = function (newValue, doEvent) {
var _local3 = 0;
var _local6 = String.fromCharCode(10);
while (newValue.indexOf(_local6, _local3) != -1) {
var _local2 = newValue.indexOf(_local6, _local3);
var _local5 = newValue.slice(0, _local2);
var _local4 = newValue.slice(_local2 + 1);
newValue = _local5 + _local4;
_local3 = _local2;
}
_local3 = 0;
_local6 = String.fromCharCode(13);
while (newValue.indexOf(_local6, _local3) != -1) {
var _local2 = newValue.indexOf(_local6, _local3);
var _local5 = newValue.slice(0, _local2);
var _local4 = newValue.slice(_local2 + 1);
newValue = (_local5 + "\\n") + _local4;
_local3 = _local2;
_local3 = _local3 + 2;
}
_this._text = newValue;
_this._html = "<p>";
_this.message_txt.htmlText = "";
_this.readIndex = 0;
_this.waitForClick = false;
_this.doneTyping = false;
_this.instantDisplay = false;
clearTimeout(_this.delayTimeout);
if (newValue != "") {
_this.forceSound = true;
setTimeout(_this.typeMessage, 34);
}
};
typeMessage = function () {
if (!_this.doneTyping) {
var _local1 = _text.charAt(_this.readIndex);
if (Key.isDown(_this.skipKey)) {
_this.instantDisplay = true;
}
if (_local1 == "\\") {
_this.readIndex++;
var _local2 = String(_text.charAt(_this.readIndex));
switch (_local2) {
case "." :
var _local3 = 1;
_this.forceSound = true;
break;
case "!" :
_this.waitForClick = true;
break;
case "n" :
_this._html = _this._html + newline;
break;
case "s" :
_this.readIndex++;
var _local7 = Number(_text.charAt(_this.readIndex));
_this.typeDelay = _local7;
if (_this.typeDelay == 0) {
_this.forceSound = true;
}
break;
case "l" :
_this._html = _this._html + "<p align=\"left\">";
break;
case "m" :
_this._html = _this._html + "<p align=\"center\">";
break;
case "r" :
_this._html = _this._html + "<p align=\"right\">";
break;
case "#" :
_this.readIndex++;
var _local4 = _text.charAt(_this.readIndex) == "#";
if (_local4) {
_this._html = _this._html + "</font>";
} else {
var _local5 = String(_text.substr(_this.readIndex, 6));
_this._html = _this._html + (("<font color=\"#" + _local5) + "\">");
_this.readIndex = _this.readIndex + 5;
}
break;
default :
if (isNaN(_local2)) {
break;
}
var _local9 = _text.charAt(_this.readIndex);
var _local8 = Number(_local9);
_local3 = _local8;
_this.forceSound = true;
}
} else {
var _local6 = (_this.typeDelay > 0) && (!_this.instantDisplay);
if (_this.forceSound || (_local6)) {
if (_local1 != _this.enterKey) {
_this.soundSystem.play(_this.typingSound);
_this.forceSound = false;
}
}
_this._html = _this._html + _local1;
}
_this.message_txt.htmlText = _this._html;
_this.readIndex++;
if (_this.readIndex < _text.length) {
if (_this.instantDisplay) {
_this.typeMessage();
} else if (_local3) {
_this.delayTimeout = setTimeout(_this.typeMessage, _local3 * 200);
} else if (_this.waitForClick) {
} else if (_local2) {
_this.typeMessage();
} else if (_this.typeDelay) {
if (_local1 == " ") {
_this.typeMessage();
} else {
_this.delayTimeout = setTimeout(_this.typeMessage, _this.typeDelay * 25);
}
} else {
_this.typeMessage();
}
} else {
_this.doneTyping = true;
_this.messageDone();
}
}
};
makeProperty("text");
instantDisplay = initInstantDisplay;
if (_this.instantDisplay) {
clearTimeout(_this.delayTimeout);
setTimeout(_this.typeMessage, 34);
}
closeTriggers = {};
close = function () {
if (_this.doneTyping) {
_this.nextFrame();
}
};
closeTriggers.onMouseUp = function () {
if (_this.closeOnClick) {
close();
}
if (_this.waitForClick) {
_this.waitForClick = false;
setTimeout(_this.typeMessage, 25);
}
};
Mouse.addListener(closeTriggers);
if (Key.isDown(_this.enterKey) || (Key.isDown(_this.cancelKey))) {
waitForInitRelease = true;
}
closeTriggers.onKeyUp = function () {
var _local1 = Key.getCode();
if (!waitForInitRelease) {
if (Key.isDown(_this.skipKey)) {
_this.waitForClick = false;
clearTimeout(_this.delayTimeout);
_this.typeMessage();
}
if ((((_local1 == _this.enterKey) || (_local1 == _this.cancelKey)) && (_this.closeOnSpace)) && (!_this.waitForClick)) {
close();
}
if (_this.waitForClick) {
_this.waitForClick = false;
typeMessage();
}
} else if (!(Key.isDown(_this.enterKey) || (Key.isDown(_this.cancelKey)))) {
waitForInitRelease = false;
}
};
Key.addListener(closeTriggers);
onUnload = function () {
clearTimeout(_this.delayTimeout);
Mouse.removeListener(closeTriggers);
Key.removeListener(closeTriggers);
};
Instance of Symbol 329 MovieClip "bg" in Symbol 331 MovieClip [textbox_mc] Frame 1
//component parameters
onClipEvent (construct) {
image = "";
}
Instance of Symbol 157 MovieClip [imageLoader] "face_mc" in Symbol 331 MovieClip [textbox_mc] Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = false;
enabled = true;
visible = true;
}
Symbol 331 MovieClip [textbox_mc] Frame 2
stop();
_name = "";
_this.onClose();
removeThis = function (_this) {
_this.onUnload();
_this.removeMovieClip();
};
setTimeout(removeThis, 34, this);
Symbol 332 MovieClip [transition] Frame 1
_this = this;
depth = 0;
start = function (linkage) {
if (_this.image._name) {
return(VOW.make().keep());
}
var _local1 = VOW.make();
if (!linkage) {
linkage = "transition_cut";
}
depth = Number(!depth);
var _local2 = "effect_" + depth;
_this.image = _this.attachMovie(linkage, _local2, depth);
VOW.firstWait(34).then(doFadeOut).then(_local1.keep);
return(_local1.promise);
};
doFadeOut = function () {
return(_this.image.doFadeOut() || (start("transition_fade")));
};
doFadeIn = function () {
var _local1 = null;
if (_this.image._name) {
_local1 = _this.image.doFadeIn();
} else {
vow = VOW.make();
vow.keep();
_local1 = vow.promise;
}
return(_local1);
};
Symbol 336 MovieClip [simpleList_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
function setup(newList) {
list_array = newList;
var _local5 = list_txt.scroll;
var _local4 = selection;
maxSelection = list_array.length - 1;
list_txt.text = "";
var _local1 = 0;
while (_local1 < newList.length) {
if (_local1 > 0) {
list_txt.text = list_txt.text + newline;
}
var _local3 = newList[_local1].name;
_local3 = _local3.split("_").join(" ");
list_txt.text = list_txt.text + _local3;
if (selection >= newList.length) {
selection = 0;
list_txt.scroll = 1;
quantity_txt.scroll = 1;
placeCursor();
s = 0;
while (s < newList.length) {
scrollDown();
s++;
}
placeCursor();
highlight(selection);
} else {
selection = 0;
list_txt.scroll = 1;
quantity_txt.scroll = 1;
placeCursor();
s = 0;
while (s < _local4) {
scrollDown();
s++;
}
placeCursor();
highlight(selection);
}
_local1++;
}
}
function scrollUp() {
if (selection > 0) {
selection--;
}
if (selection < (list_txt.scroll - 1)) {
list_txt.scroll--;
quantity_txt.scroll--;
}
}
function scrollDown() {
if (selection < maxSelection) {
selection++;
}
if (selection > (page + (list_txt.scroll - 1))) {
list_txt.scroll++;
quantity_txt.scroll++;
}
}
ROOT.forceEmbedded(list_txt);
bg_mc.winBorder = winBorder;
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
selection = 0;
setup(list_array);
page = 9;
lineSize = 14;
placeCursor = function () {
var _local1 = -(list_txt.scroll - 1);
cursor_mc._y = (list_txt._y + 1) + ((selection + _local1) * lineSize);
};
onKeyDown = function () {
if (Key.isDown(RAM.keys.ok)) {
SOUND.play("sound\\cursor_select.mp3");
selectItem(selection);
}
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
if (Key.isDown(RAM.keys.up || 38)) {
SOUND.play("sound\\cursor_highlight.mp3");
if (selection > 0) {
scrollUp();
} else {
s = 0;
while (s < list_array.length) {
scrollDown();
s++;
}
}
placeCursor();
highlight(selection);
}
if (Key.isDown(RAM.keys.down || 40)) {
SOUND.play("sound\\cursor_highlight.mp3");
if (selection < (list_array.length - 1)) {
scrollDown();
} else {
s = 0;
while (s < list_array.length) {
scrollUp();
s++;
}
}
placeCursor();
highlight(selection);
}
if (Key.isDown(RAM.keys.left || 37)) {
SOUND.play("sound\\cursor_highlight.mp3");
s = 0;
while (s < page) {
scrollUp();
s++;
}
placeCursor();
highlight(selection);
}
if (Key.isDown(RAM.keys.right || 39)) {
SOUND.play("sound\\cursor_highlight.mp3");
s = 0;
while (s < page) {
scrollDown();
s++;
}
placeCursor();
highlight(selection);
}
};
Instance of Symbol 293 MovieClip "close_btn" in Symbol 336 MovieClip [simpleList_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 339 MovieClip [TextInput] Frame 1
#initclip 86
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 342 MovieClip [testMove_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
onKeyDown = function () {
if (Key.isDown(RAM.keys.ok)) {
}
var _local2 = String(_root.focusManager.getFocus());
if ((Key.isDown(RAM.keys.cancel) && (_local2.indexOf("player_txt") == -1)) && (_local2.indexOf("enemt_txt") == -1)) {
cancel();
}
};
Symbol 342 MovieClip [testMove_menu] Frame 2
stop();
Instance of Symbol 339 MovieClip [TextInput] "player_txt" in Symbol 342 MovieClip [testMove_menu] Frame 2
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "tackle";
maxChars = null;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
this.setFocus();
}
this.addEventListener("load", __f_load);
}
Instance of Symbol 339 MovieClip [TextInput] "enemy_txt" in Symbol 342 MovieClip [testMove_menu] Frame 2
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "tackle";
maxChars = null;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 49 MovieClip [Button] "test_btn" in Symbol 342 MovieClip [testMove_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "test";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_click(eventObj) {
var _local2 = new Array();
_local2.push(_parent.player_txt.text);
_local2.push(_parent.enemy_txt.text);
_parent.selectItem(_local2);
_parent.close();
}
this.addEventListener("click", __f_click);
}
Symbol 345 MovieClip [desc_menu] Frame 1
function close() {
this.removeMovieClip();
}
ROOT.updateText(this, desc_txt, "text");
bg_mc.winBorder = winBorder;
Symbol 347 MovieClip [money_menu] Frame 1
bg_mc.winBorder = winBorder;
Symbol 347 MovieClip [money_menu] Frame 2
function close() {
this.removeMovieClip();
}
stop();
ROOT.updateText(this, money_txt, "text");
init_text = text || "";
get_text = function () {
return(money_txt.text);
};
set_text = function (newValue) {
money_txt.text = newValue;
};
this.addProperty("text", get_text, set_text);
text = init_text;
Symbol 350 MovieClip [list_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
function setup(newList) {
list_array = newList;
var _local6 = list_txt.scroll;
var _local5 = selection;
maxSelection = list_array.length - 1;
list_txt.text = "";
quantity_txt.text = "";
var _local1 = 0;
while (_local1 < newList.length) {
if (_local1 > 0) {
list_txt.text = list_txt.text + newline;
quantity_txt.text = quantity_txt.text + newline;
}
var _local3 = newList[_local1].name;
_local3 = _local3.split("_").join(" ");
list_txt.text = list_txt.text + _local3;
var _local4 = ((newList[_local1].quantity != undefined) ? (newList[_local1].quantity) : " ");
quantity_txt.text = quantity_txt.text + _local4;
if (selection >= newList.length) {
selection = 0;
list_txt.scroll = 1;
quantity_txt.scroll = 1;
placeCursor();
s = 0;
while (s < newList.length) {
scrollDown();
s++;
}
placeCursor();
highlight(selection);
} else {
selection = 0;
list_txt.scroll = 1;
quantity_txt.scroll = 1;
placeCursor();
s = 0;
while (s < _local5) {
scrollDown();
s++;
}
placeCursor();
highlight(selection);
}
_local1++;
}
}
function scrollUp() {
if (selection > 0) {
selection--;
}
if (selection < (list_txt.scroll - 1)) {
list_txt.scroll--;
quantity_txt.scroll--;
}
}
function scrollDown() {
if (selection < maxSelection) {
selection++;
}
if (selection > (page + (list_txt.scroll - 1))) {
list_txt.scroll++;
quantity_txt.scroll++;
}
}
ROOT.forceEmbedded(list_txt);
ROOT.forceEmbedded(quantity_txt);
bg_mc.winBorder = winBorder;
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
selection = 0;
setup(list_array);
page = 9;
lineSize = 14;
placeCursor = function () {
var _local1 = -(list_txt.scroll - 1);
cursor_mc._y = (list_txt._y + 1) + ((selection + _local1) * lineSize);
};
onKeyDown = function () {
var _local1 = true;
for (var _local2 in RAM.keys) {
if (RAM.keys[_local2] == 83) {
_local1 = false;
}
}
var _local4 = Selection.getFocus().indexOf("search_txt");
if ((_local1 && (Key.isDown(83))) && (_local4 == undefined)) {
search_btn.click();
}
if ((Selection.getFocus() != search_txt) && (Key.isDown(RAM.keys.ok))) {
SOUND.play("sound\\cursor_select.mp3");
selectItem(selection);
}
if ((Selection.getFocus() != search_txt) && (Key.isDown(RAM.keys.cancel))) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
if ((Selection.getFocus() != search_txt) && (Key.isDown(RAM.keys.up || 38))) {
var _local3 = selection;
scrollUp();
if (selection != _local3) {
SOUND.play("sound\\cursor_highlight.mp3");
}
placeCursor();
highlight(selection);
}
if ((Selection.getFocus() != search_txt) && (Key.isDown(RAM.keys.down || 40))) {
var _local3 = selection;
scrollDown();
if (selection != _local3) {
SOUND.play("sound\\cursor_highlight.mp3");
}
placeCursor();
highlight(selection);
}
if ((Selection.getFocus() != search_txt) && (Key.isDown(RAM.keys.left || 37))) {
var _local3 = selection;
s = 0;
while (s < page) {
scrollUp();
s++;
}
if (selection != _local3) {
SOUND.play("sound\\cursor_highlight.mp3");
}
placeCursor();
highlight(selection);
}
if ((Selection.getFocus() != search_txt) && (Key.isDown(RAM.keys.right || 39))) {
var _local3 = selection;
s = 0;
while (s < page) {
scrollDown();
s++;
}
if (selection != _local3) {
SOUND.play("sound\\cursor_highlight.mp3");
}
placeCursor();
highlight(selection);
}
};
Instance of Symbol 293 MovieClip "close_btn" in Symbol 350 MovieClip [list_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 350 MovieClip [list_menu] Frame 2
stop();
Instance of Symbol 339 MovieClip [TextInput] "search_txt" in Symbol 350 MovieClip [list_menu] Frame 2
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "";
enabled = false;
visible = false;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_change(eventObj) {
if (_parent.active) {
var _local6 = null;
var _local2 = 0;
while (_local2 < _parent.list_array.length) {
var _local4 = _parent.list_array[_local2].name.toLowerCase().indexOf(text.toLowerCase());
if (_local4 == 0) {
_local6 = _local2;
break;
}
_local2++;
}
var _local7 = _local6 - _parent.selection;
var _local5 = _local7 / Math.abs(_local7);
_local7 = Math.abs(_local7);
var _local3 = 0;
while (_local3 < _local7) {
if (_local5 > 0) {
_parent.scrollDown();
}
if (_local5 < 0) {
_parent.scrollUp();
}
_local3++;
}
_parent.placeCursor();
_parent.highlight(_parent.selection);
}
}
this.addEventListener("change", __f_change);
}
onClipEvent (load) {
function __f_enter(eventObj) {
if (_parent.active) {
SOUND.play("sound/cursor_select.mp3");
_parent.search_btn._visible = true;
_parent.search_btn.enabled = true;
Selection.setFocus(undefined);
_visible = false;
enabled = false;
}
}
this.addEventListener("enter", __f_enter);
}
onClipEvent (load) {
function __f_focusIn(eventObj) {
if (_parent.active) {
if (Key.isDown(83)) {
Key.addListener(s_held);
}
}
}
this.addEventListener("focusIn", __f_focusIn);
}
onClipEvent (load) {
function __f_load(eventObj) {
s_held = {};
s_held.onKeyUp = function () {
if (!Key.isDown(83)) {
text = "";
Key.removeListener(s_held);
}
};
}
this.addEventListener("load", __f_load);
}
Instance of Symbol 49 MovieClip [Button] "search_btn" in Symbol 350 MovieClip [list_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "SEARCH";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
click = function () {
if (_parent.active) {
SOUND.play("sound\\cursor_select.mp3");
_parent.search_txt._visible = true;
_parent.search_txt.enabled = true;
Selection.setFocus(_parent.search_txt);
_visible = false;
enabled = false;
}
};
}
this.addEventListener("load", __f_load);
}
onClipEvent (load) {
function __f_click(eventObj) {
click();
}
this.addEventListener("click", __f_click);
}
Symbol 351 MovieClip [shop_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
function register(itemList) {
if (!RAM.shops) {
RAM.shops = {};
}
if (_this.shopName) {
if (!RAM.shops[_this.shopName]) {
RAM.shops[_this.shopName] = {};
}
var _local3 = RAM.shops[_this.shopName];
var _local1 = 0;
while (_local1 < itemList.length) {
var _local2 = itemList[_local1].id;
if (_local3[_local2] == undefined) {
_local3[_local2] = ROM.shops.initStock;
}
_local1++;
}
}
}
function resortShop() {
var _local1 = RAM.shops[_this.shopName];
delete RAM.shops[_this.shopName];
RAM.shops[_this.shopName] = _local1;
}
function setup(newList) {
if (_this.shopName) {
register(newList);
resortShop();
}
stock_mc._visible = _this.shopName != undefined;
list_array = newList;
buyList_mc.list_array = newList;
buyList_mc.setup(newList);
}
if (!shopType) {
shopType = "items";
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
setup(list_array);
Instance of Symbol 347 MovieClip [money_menu] "money_mc" in Symbol 351 MovieClip [shop_menu] Frame 1
/* no clip actions */
Instance of Symbol 350 MovieClip [list_menu] "buyList_mc" in Symbol 351 MovieClip [shop_menu] Frame 1
onClipEvent (load) {
selectItem = _parent.selectItem;
shopType = _parent.shopType || "items";
highlight = function () {
_parent.selection = selection;
if (_parent.getDescription) {
var _local2 = _parent.getDescription(selection);
if ((_local2 == undefined) || (_local2 == "undefined")) {
_local2 = "";
}
_parent.desc_mc.text = _local2;
}
var _local3 = list_array[selection].id;
if (RAM[shopType][_local3] != undefined) {
var _local6 = RAM[shopType][_local3];
} else {
var _local6 = 0;
}
_parent.owned_mc.text = "You: " + _local6;
var _local5 = _parent.shopName;
if (_local5) {
var _local4 = RAM.shops[_local5][_local3];
_parent.stock_mc.text = ((_local4 != undefined) ? ("Shop: " + _local4) : "");
}
_parent.money_mc.text = "$" + RAM.money;
_parent.highlight(selection);
};
cancel = function () {
Key.removeListener(this);
_parent.cancel();
_parent.close();
};
}
Instance of Symbol 347 MovieClip [money_menu] "buy_mc" in Symbol 351 MovieClip [shop_menu] Frame 1
onClipEvent (load) {
text = _parent.sign;
}
Symbol 353 MovieClip [save_menu] Frame 1
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
close = function () {
close = null;
delete close;
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
};
onKeyDown = function () {
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
if (Key.isDown(RAM.keys.ok)) {
_root.focusManager.getFocus().dispatchEvent({type:"click"});
_root.focusManager.setFocus(null);
}
};
Instance of Symbol 293 MovieClip "close_btn" in Symbol 353 MovieClip [save_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 353 MovieClip [save_menu] Frame 2
stop();
setInitialFocus = function () {
cookie_btn.setFocus();
};
setTimeout(setInitialFocus, 200);
Instance of Symbol 49 MovieClip [Button] "cookie_btn" in Symbol 353 MovieClip [save_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Flash Cookie";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (mouseMove) {
if (_parent.active) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
_parent.help_mc.text = "Save as a Flash cookie.";
}
}
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active && (enabled)) {
_root.focusManager.setFocus(null);
enabled = false;
SOUND.play("sound\\cursor_select.mp3");
setTimeout(function () {
ROOT.saveSettings();
var _local1 = ROOT.saveGame(RAM, ROOT.getGameId());
label = (_local1 ? "Saved" : "Save Failed");
}, 1);
_parent.cancel();
_parent.close();
}
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 49 MovieClip [Button] "clipboard_btn" in Symbol 353 MovieClip [save_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Clipboard";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (mouseMove) {
if (_parent.active) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
_parent.help_mc.text = "Copy the saved data to the clipboard.";
}
}
}
onClipEvent (load) {
function __f_click(eventObj) {
var this_btn = this;
if (_parent.active && (enabled)) {
SOUND.play("sound\\cursor_select.mp3");
ROOT.saveSettings();
writeXml = function (targetObject, targetXml, rootName) {
rootName = (rootName ? (rootName) : "data");
var _local2 = targetXml;
var _local1 = addNode(rootName, _local2);
addAttr(_local1, "xmlType", "object");
scanObject(targetObject, _local1);
};
scanObject = function (parentData, targetPath) {
for (childName in parentData) {
childPath = parentData[childName];
var _local1 = targetPath;
var _local3 = childName;
if (typeof(childPath) == "object") {
if (childPath.length == undefined) {
childType = "object";
} else {
childType = "array";
}
} else {
childType = "variable";
}
if (childType == "variable") {
if (typeof(childPath) == "boolean") {
childPath = "bol_" + String(childPath);
} else if (typeof(childPath) == "number") {
childPath = "num_" + String(childPath);
} else if (typeof(childPath) == "string") {
childPath = "str_" + String(childPath);
}
if (isNaN(Number(childName)) == false) {
_local1 = addNode(childName, targetPath);
_local3 = "value";
addAttr(_local1, "xmlType", "variable");
}
addAttr(_local1, _local3, childPath);
}
}
for (childName in parentData) {
childPath = parentData[childName];
if (typeof(childPath) == "object") {
if (childPath.length == undefined) {
childType = "object";
} else {
childType = "array";
}
} else {
childType = "variable";
}
if (childType != "variable") {
if (childType == "object") {
var _local4 = addNode(childName, targetPath);
addAttr(_local4, "xmlType", "object");
scanObject(childPath, _local4);
}
if (childType == "array") {
var _local4 = addNode(childName, targetPath);
addAttr(_local4, "xmlType", "array");
scanObject(childPath, _local4);
}
}
}
delete childName;
delete childPath;
delete childType;
};
addNode = function (newNodeName, xmlPath) {
var _local1 = new XML();
var _local2 = _local1.createElement(newNodeName);
xmlPath.appendChild(_local2);
var _local3 = xmlPath.lastChild;
return(_local3);
};
addAttr = function (targetNode, newVariable, newValue) {
targetNode.attributes[newVariable] = newValue;
};
save_xml = new XML();
writeXml(RAM, save_xml);
var _local13 = function () {
var _local2 = nextDepth(HUD);
var _local3 = "menu_" + _local2;
clipboard_menu = HUD.attachMovie("copyClipboard_menu", _local3, _local2, {parentMenu:_parent, text:save_xml});
};
_local13();
this_btn.enabled = false;
_parent.cookie_btn.enabled = false;
clipboard_menu.cancel = function () {
this_btn.enabled = true;
_parent.cookie_btn.enabled = true;
_parent.cancel();
_parent.close();
};
}
}
this.addEventListener("click", __f_click);
}
Symbol 356 MovieClip [rename_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseFMP);
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
Symbol 356 MovieClip [rename_menu] Frame 2
function enableOkBtn() {
ok_btn.enabled = name_txt.text != "";
}
function useDefault() {
name_txt.text = defaultName;
enableOkBtn();
}
function setup(portrait, varName, newDefault) {
image = portrait;
defaultName = newDefault;
image_mc.file = portrait;
name_txt.text = newDefault;
enableOkBtn();
}
stop();
defaultName = defaultName || "";
ok_btn.enabled = false;
onKeyDown = function () {
var _local2 = String(_root.focusManager.getFocus());
if (Key.isDown(RAM.keys.cancel) && (_local2.indexOf("name_txt") == -1)) {
SOUND.play("sound\\EBokay.mp3");
useDefault();
selectItem(name_txt.text);
close();
}
};
setup(image, null, defaultName);
name_txt.setFocus();
name_txt.tabIndex = 1;
ok_btn.tabIndex = 2;
random_btn.tabIndex = 3;
Instance of Symbol 49 MovieClip [Button] "random_btn" in Symbol 356 MovieClip [rename_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Random";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
index = 0;
shuffle = function (a, b) {
return(Math.floor(Math.random() * 3) - 1);
};
name_list = [];
name_list[0] = _parent.defaultName || "";
var _local2 = [];
var _local4 = _parent.id;
var _local3 = ROM.pokemon[_local4];
if (_local3) {
name_list[0] = _local4;
if (_local3.nicknames.length > 0) {
_local2 = _local2.concat(_local3.nicknames);
}
}
if (ROM.nicknames.length > 0) {
_local2 = _local2.concat(ROM.nicknames);
}
_local2.sort(shuffle);
name_list = name_list.concat(_local2);
getNextName = function () {
var _local1 = name_list[index].charAt(0).toUpperCase() + name_list[index].substr(1);
index++;
if (index >= name_list.length) {
index = 0;
}
return(_local1);
};
}
this.addEventListener("load", __f_load);
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active) {
SOUND.play("sound\\randomName.mp3");
var _local2 = "";
var _local3 = 2;
do {
_local2 = getNextName();
_local3--;
if (_local3 <= 0) {
break;
}
} while (_local2.toLowerCase() == _parent.name_txt.text.toLowerCase());
_parent.name_txt.text = _local2;
_parent.enableOkBtn();
}
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 339 MovieClip [TextInput] "name_txt" in Symbol 356 MovieClip [rename_menu] Frame 2
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_change(eventObj) {
if (_parent.active) {
SOUND.play("sound\\cursor_highlight.mp3");
_parent.enableOkBtn();
}
}
this.addEventListener("change", __f_change);
}
onClipEvent (load) {
function __f_enter(eventObj) {
if (_parent.active) {
if (text != "") {
SOUND.play("sound\\EBokay.mp3");
_parent.selectItem(text);
_parent.close();
}
}
}
this.addEventListener("enter", __f_enter);
}
Instance of Symbol 49 MovieClip [Button] "ok_btn" in Symbol 356 MovieClip [rename_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "OK";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active) {
if (_parent.name_txt.text != "") {
SOUND.play("sound\\EBokay.mp3");
var _local2 = _parent.name_txt.text;
while (_local2.charAt(0) == " ") {
_local2 = _local2.substr(1);
}
while (_local2.charAt(_local2.length - 1) == " ") {
_local2 = _local2.substr(0, _local2.length - 1);
}
_parent.selectItem(_local2);
_parent.close();
}
}
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 157 MovieClip [imageLoader] "image_mc" in Symbol 356 MovieClip [rename_menu] Frame 2
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 293 MovieClip "close_btn" in Symbol 356 MovieClip [rename_menu] Frame 2
on (release) {
if (_parent.active) {
SOUND.play("sound\\EBokay.mp3");
_parent.useDefault();
_parent.selectItem(_parent.name_txt.text);
_parent.close();
}
}
Instance of Symbol 49 MovieClip [Button] "default_btn" in Symbol 356 MovieClip [rename_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Prev";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
getPrevName = function () {
name_list = _parent.random_btn.name_list;
_parent.random_btn.index--;
if (_parent.random_btn.index < 0) {
_parent.random_btn.index = name_list.length - 1;
}
var _local2 = name_list[_parent.random_btn.index].charAt(0).toUpperCase() + name_list[_parent.random_btn.index].substr(1);
return(_local2);
};
}
this.addEventListener("load", __f_load);
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active) {
SOUND.play("sound\\randomName.mp3");
var _local2 = "";
var _local3 = 2;
do {
_local2 = getPrevName();
_local3--;
if (_local3 <= 0) {
break;
}
} while (_local2.toLowerCase() == _parent.name_txt.text.toLowerCase());
_parent.name_txt.text = _local2;
_parent.enableOkBtn();
}
}
this.addEventListener("click", __f_click);
}
Symbol 361 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 1
stop();
tooltip = "No strengths\nNo weaknesses";
Symbol 376 MovieClip Frame 2
tooltip = "Strong against plant\nWeak against water";
Symbol 376 MovieClip Frame 3
tooltip = "Stong against fire\nWeak against electric";
Symbol 376 MovieClip Frame 4
tooltip = "Strong against water\nWeak against rock";
Symbol 376 MovieClip Frame 5
tooltip = "Stong against electric\nWeak against water\nWeak against plant";
Symbol 376 MovieClip Frame 6
tooltip = "Strong against rock\nWeak against fire";
Symbol 376 MovieClip Frame 7
tooltip = "Weak against itself";
Symbol 379 MovieClip [bigDesc_menu] Frame 1
function close() {
this.removeMovieClip();
}
stop();
bg_mc.winBorder = winBorder;
custom_fmt = {leading:-6};
ROOT.updateText(this, desc_txt.label, "text", custom_fmt);
desc_txt.vScrollPolicy = "off";
desc_txt.border_mc._visible = false;
desc_txt.label.selectable = false;
Instance of Symbol 299 MovieClip [TextArea] "desc_txt" in Symbol 379 MovieClip [bigDesc_menu] Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
html = false;
text = "";
wordWrap = true;
maxChars = null;
restrict = "";
enabled = true;
password = false;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 386 MovieClip Frame 1
function setTextField() {
message_txt.text = _text;
if (!_text) {
message_txt._visible = false;
}
if (_text.length > 16) {
message_txt.wordWrap = true;
message_txt.autoSize = "left";
message_txt._width = 130;
} else {
message_txt.wordWrap = false;
message_txt.autoSize = "none";
var _local2 = message_txt.getTextFormat();
var _local1 = _local2.getTextExtent(_text);
message_txt._width = _local1.textFieldWidth;
message_txt._height = _local1.textFieldHeight + 0;
}
setOffset();
setBalloonPos();
}
function setBalloonPos() {
balloon_mc._x = message_txt._x - 2;
balloon_mc._y = message_txt._y;
balloon_mc._width = message_txt._width + 4;
balloon_mc._height = message_txt._height;
}
function setOffset() {
setVertOffset();
setHorzOffset();
}
function setHorzOffset() {
if (canDisplayRight()) {
if (message_txt._y == 0) {
message_txt._x = 16;
} else {
message_txt._x = 0;
}
} else {
message_txt._x = -message_txt._width;
}
}
function setVertOffset() {
if (canDisplayUp()) {
message_txt._y = -message_txt._height;
} else {
message_txt._y = 0;
}
}
function canDisplayRight() {
var _local2 = message_txt._width;
var _local1 = new flash.geom.Point(0, 0);
_this.localToGlobal(_local1);
root.globalToLocal(_local1);
return(_local1.x < (320 - _local2));
}
function canDisplayUp() {
var _local2 = message_txt._height;
var _local1 = new flash.geom.Point(0, 0);
_this.localToGlobal(_local1);
root.globalToLocal(_local1);
return(_local1.y > _local2);
}
function onMouseMove() {
if (delay == undefined) {
delay = 300;
}
hide();
if (timeout != undefined) {
clearTimeout(timeout);
}
timeout = setTimeout(function () {
show();
}, delay);
checkUnload();
}
function show() {
if (timeout != undefined) {
clearTimeout(timeout);
}
setTextField();
if (text) {
setPosition();
setOffset();
setBalloonPos();
reveal();
}
}
function setPosition() {
_x = _parent._xmouse;
_y = _parent._ymouse;
}
function reveal() {
message_txt._visible = true;
_yscale = 0;
_xscale = 0;
_alpha = 100;
com.mosesSupposes.fuse.ZigoEngine.doTween(_this, "_xscale, _yscale", [100, 100], 0.2, "easeOutBack");
}
function hide() {
var _local2 = function () {
isHiding = false;
};
if (!isHiding) {
isHiding = true;
_yscale = 100;
_xscale = 100;
var _local1 = (delay - 1) / 1000;
if (_local1 < 0.1) {
_local1 = 0;
}
com.mosesSupposes.fuse.ZigoEngine.doTween(_this, "_alpha", 0, _local1, "easeOutQuad", 0, _local2);
}
}
function checkUnload() {
if ((_name == "") || (_name == undefined)) {
onUnload();
}
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
}
_this = this;
tabEnabled = false;
focusEnabled = false;
useHandCursor = false;
message_txt.tabEnabled = false;
message_txt.backgroundColor = 14209200 /* 0xD8D0B0 */;
message_txt.borderColor = 10066329 /* 0x999999 */;
message_txt.embedFonts = true;
timeout = undefined;
message_txt._visible = false;
hide();
_alpha = 0;
root = ROOT || (_root);
init_text = text || "";
get_text = function () {
return(_text);
};
set_text = function (newValue) {
newValue = newValue.split("_").join(" ");
_text = newValue;
if (newValue && (!isHiding)) {
setTextField();
}
};
this.addProperty("text", get_text, set_text);
text = init_text;
isHiding = false;
Mouse.addListener(_this);
onUnload = function () {
Mouse.removeListener(_this);
if (timeout != undefined) {
clearTimeout(timeout);
}
};
Symbol 387 MovieClip [pokedax_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
pokeList_mc.close();
desc_txt.close();
_this.removeMovieClip();
}
ROOT.forceEmbedded(completed_txt);
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
Instance of Symbol 350 MovieClip [list_menu] "pokeList_mc" in Symbol 387 MovieClip [pokedax_menu] Frame 1
onClipEvent (load) {
pokeList_array = new Array();
for (var nam in RAM.pokedex) {
var name = RAM_F.getNickname(nam);
var name = name.toUpperCase();
var name = name.split("_").join(" ");
var numCaught = 0;
var p = 0;
while (p < RAM.pokemon.length) {
if (RAM.pokemon[p].id == nam) {
numCaught++;
}
p++;
}
var p = 0;
while (p < RAM.storage.length) {
if (RAM.storage[p].id == nam) {
numCaught++;
}
p++;
}
pokeList_array.push({name:RAM_F.getNickname(name), quantity:numCaught, id:nam});
}
pokeList_array.sortOn("id");
list_array = pokeList_array;
highlight = function (index) {
var _local2 = pokeList_array[index].id;
var _local4 = RAM.pokedex[_local2].lastPhoto;
if (_local4 == "") {
_local4 = "no_picture";
}
_parent.image_mc.file = _local4;
_parent.map_mc.pokemon = _local2;
var _local5 = String(RAM.pokedex[_local2].caught);
_parent.caught_mc.gotoAndStop(_local5);
var _local6 = ROM.pokemon[_local2].type;
_parent.type_mc.gotoAndStop(_local6);
_parent.type_mc.updateTooltip();
var _local3 = ROM.pokemon[_local2].description;
_local3 = _local3.split("_").join(" ");
if ((_local3 == undefined) || (_local3 == "undefined")) {
_local3 = "";
}
_parent.desc_txt.text = _local3;
_parent.charmable_mc._visible = ROM.pokemon[_local2].catchRules.charm;
};
cancel = function () {
_parent.cancel();
_parent.close();
};
}
Instance of Symbol 376 MovieClip "type_mc" in Symbol 387 MovieClip [pokedax_menu] Frame 1
onClipEvent (load) {
useHandCursor = false;
onRollOver = (onDragOver = function () {
updateTooltip = function () {
setTimeout(function () {
_parent.tooltip.text = tooltip;
}, 34);
};
updateTooltip();
});
onRollOut = (onDragOut = function () {
_parent.tooltip.text = "";
updateTooltip = null;
});
}
Instance of Symbol 382 MovieClip "charmable_mc" in Symbol 387 MovieClip [pokedax_menu] Frame 1
onClipEvent (load) {
useHandCursor = false;
onRollOver = (onDragOver = function () {
_parent.tooltip.text = "This pokemon can be charmed into joining you.";
});
onRollOut = (onDragOut = function () {
_parent.tooltip.text = "";
});
}
Instance of Symbol 303 MovieClip [map_menu] "map_mc" in Symbol 387 MovieClip [pokedax_menu] Frame 1
onClipEvent (load) {
cancel = function () {
this.active = false;
this._visible = false;
};
doLater = function (_this) {
_this.parentMenu = _this._parent.pokeList_mc;
_this.close = null;
delete _this.close;
_this.cancel();
_this.active = false;
};
_visible = false;
setTimeout(doLater, 1, this);
}
Instance of Symbol 386 MovieClip "tooltip" in Symbol 387 MovieClip [pokedax_menu] Frame 1
//component parameters
onClipEvent (construct) {
text = "";
delay = 300;
}
Symbol 387 MovieClip [pokedax_menu] Frame 2
stop();
onKeyDown = function () {
if (pokeList_mc.active) {
if (Key.isDown(RAM.keys.cancel)) {
cancel();
close();
} else if (Key.isDown(65)) {
area_btn.click();
}
}
};
var totalSeen = 0;
for (var nam in RAM.pokedex) {
totalSeen++;
}
var totalPokemon = 0;
for (var nam in ROM.pokemon) {
totalPokemon++;
}
completed_txt.text = (totalSeen + " / ") + totalPokemon;
init_selectedPokemon = selectedPokemon || 0;
get_selectedPokemon = function () {
var _local2 = pokeList_mc.selection;
var _local1 = pokeList_mc.list_array[_local2].id;
return(_local1);
};
set_selectedPokemon = function (newValue) {
var _local5 = null;
var _local1 = 0;
while (_local1 < pokeList_mc.list_array.length) {
var _local3 = pokeList_mc.list_array[_local1].id == newValue;
if (_local3) {
_local5 = _local1;
break;
}
_local1++;
}
var _local4 = _local5 - pokeList_mc.selection;
var _local7 = _local4 / Math.abs(_local4);
_local4 = Math.abs(_local4);
if (_local7 > 0) {
var _local2 = 0;
while (_local2 < _local4) {
pokeList_mc.scrollDown();
_local2++;
}
}
if (_local7 < 0) {
var _local2 = 0;
while (_local2 < _local4) {
pokeList_mc.scrollUp();
_local2++;
}
}
var _local8 = function (index, list) {
list.highlight(index);
list.placeCursor();
};
setTimeout(_local8, 1, pokeList_mc.selection, pokeList_mc);
};
this.addProperty("selectedPokemon", get_selectedPokemon, set_selectedPokemon);
selectedPokemon = init_selectedPokemon;
Instance of Symbol 157 MovieClip [imageLoader] "image_mc" in Symbol 387 MovieClip [pokedax_menu] Frame 2
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 49 MovieClip [Button] "area_btn" in Symbol 387 MovieClip [pokedax_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "AREA";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_load(eventObj) {
toggleMap = function (map_mc, selectedPokemon) {
SOUND.play("sound\\cursor_select.mp3");
if (!map_mc._visible) {
map_mc.pokemon = selectedPokemon;
map_mc._visible = true;
} else {
map_mc._visible = false;
}
};
click = function () {
if (_parent.active) {
setTimeout(toggleMap, 1, _parent.map_mc, _parent.selectedPokemon);
_root.focusManager.setFocus(undefined);
}
};
}
this.addEventListener("load", __f_load);
}
onClipEvent (load) {
function __f_click(eventObj) {
click();
}
this.addEventListener("click", __f_click);
}
Symbol 388 MovieClip [photo_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_quality = "LOW";
_this.removeMovieClip();
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseFMP);
}
bg_mc.winBorder = winBorder;
bg2_mc.winBorder = winBorder;
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
Symbol 388 MovieClip [photo_menu] Frame 2
stop();
_quality = "HIGH";
keywords = {};
for (var nam in pictures) {
var startAt = pictures[nam].lastIndexOf("\\");
if (startAt == -1) {
var startAt = pictures[nam].lastIndexOf("/");
}
var endAt = pictures[nam].lastIndexOf(".");
var fileName = pictures[nam].substring(startAt + 1, endAt);
var newWords = fileName.split("_");
for (var index in newWords) {
var thisWord = newWords[index];
thisWord = thisWord.split("0").join("");
thisWord = thisWord.split("1").join("");
thisWord = thisWord.split("2").join("");
thisWord = thisWord.split("3").join("");
thisWord = thisWord.split("4").join("");
thisWord = thisWord.split("5").join("");
thisWord = thisWord.split("6").join("");
thisWord = thisWord.split("7").join("");
thisWord = thisWord.split("8").join("");
thisWord = thisWord.split("9").join("");
keywords[thisWord] = true;
}
}
thumbnails_pane.content.photos = pictures;
for (var nam in keywords) {
character_list.addItem(nam.toUpperCase());
}
character_list.selectedIndex = 0;
var selectedName = character_list.getItemAt(0).label;
thumbnails_pane.content.charName = selectedName;
onKeyDown = function () {
if (Key.isDown(RAM.keys.ok)) {
SOUND.play("sound\\cursor_select.mp3");
if (!selectItem) {
picture_pane.toggleZoom();
}
if (picture_pane.file) {
selectItem(picture_pane.file);
}
}
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
if (picture_pane.isZoomed) {
picture_pane.zoomOut();
} else {
cancel();
close();
}
}
if (RAM.keys.up != 38) {
if (Key.isDown(RAM.keys.up)) {
character_list.selectedIndex--;
character_list.onChange();
}
}
if (RAM.keys.down != 40) {
if (Key.isDown(RAM.keys.down)) {
character_list.selectedIndex++;
character_list.onChange();
}
}
if (Key.isDown(RAM.keys.left || 37)) {
var _local1 = thumbnails_pane.content;
if (_local1.selection > 0) {
SOUND.play("sound\\cursor_highlight.mp3");
_local1.selectImage(_local1.selection - 1);
}
}
if (Key.isDown(RAM.keys.right || 39)) {
var _local1 = thumbnails_pane.content;
if (_local1.selection < (_local1.image_array.length - 1)) {
SOUND.play("sound\\cursor_highlight.mp3");
_local1.selectImage(_local1.selection + 1);
}
}
};
character_list.drawFocus = "";
character_list.setFocus();
character_list.selectedIndex = 0;
Instance of Symbol 295 MovieClip [ScrollPane] "thumbnails_pane" in Symbol 388 MovieClip [photo_menu] Frame 2
//component parameters
onClipEvent (construct) {
contentPath = "photo_thumbs_mc";
hLineScrollSize = 40;
hPageScrollSize = 40;
hScrollPolicy = "on";
scrollDrag = false;
vLineScrollSize = 40;
vPageScrollSize = 40;
vScrollPolicy = "off";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 113 MovieClip [List] "character_list" in Symbol 388 MovieClip [photo_menu] Frame 2
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
onClipEvent (load) {
function __f_load(eventObj) {
onChange = function () {
if (_parent.active) {
SOUND.play("sound\\cursor_highlight.mp3");
var _local2 = selectedItem.label;
_parent.thumbnails_pane.content.show(_local2);
}
};
}
this.addEventListener("load", __f_load);
}
onClipEvent (load) {
function __f_change(eventObj) {
onChange();
}
this.addEventListener("change", __f_change);
}
Instance of Symbol 293 MovieClip "close_btn" in Symbol 388 MovieClip [photo_menu] Frame 2
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_quality = "LOW";
_parent.cancel();
_parent.close();
}
}
Instance of Symbol 157 MovieClip [imageLoader] "picture_pane" in Symbol 388 MovieClip [photo_menu] Frame 2
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = true;
enabled = true;
visible = true;
}
onClipEvent (load) {
function __f_load(eventObj) {
_this = this;
isZoomed = false;
animSpeed = 0.2;
ease = "easeInOutQuad";
small = {x:_this._x, y:_this._y};
big = {x:16, y:0};
zoomIn = function () {
isZoomed = true;
var _local1 = 160 - ((_this.content._width * 1.66) / 2);
_this.slideTo(_local1, big.y, animSpeed, ease);
_this.scaleTo(166, animSpeed, ease);
};
zoomOut = function () {
isZoomed = false;
_this.slideTo(small.x, small.y, animSpeed, ease);
_this.scaleTo(100, animSpeed, ease);
};
toggleZoom = function () {
if (_parent.active) {
if (isZoomed) {
zoomOut();
} else {
zoomIn();
}
}
};
}
this.addEventListener("load", __f_load);
}
on (release) {
SOUND.play("sound\\cursor_select.mp3");
toggleZoom();
}
onClipEvent (load) {
function __f_complete(eventObj) {
if (isZoomed) {
var _local1 = 160 - ((_this.content._width * 1.66) / 2);
_this._x = _local1;
}
}
this.addEventListener("complete", __f_complete);
}
Symbol 391 MovieClip [pasteClipboard_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
loadData_txt.embedFonts = true;
loadData_txt.filters = ROOT.textShadow;
bg_mc.winBorder = winBorder;
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
onKeyDown = function () {
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
};
Instance of Symbol 293 MovieClip in Symbol 391 MovieClip [pasteClipboard_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 391 MovieClip [pasteClipboard_menu] Frame 2
stop();
_root.focusManager.setFocus(loadData_txt);
Instance of Symbol 49 MovieClip [Button] in Symbol 391 MovieClip [pasteClipboard_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "OK";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active && (_parent.loadData_txt.text != "")) {
SOUND.play("sound/cursor_select.mp3");
_parent.ok(_parent.loadData_txt.text);
_parent.selectItem(_parent.loadData_txt.text);
_parent.close();
}
}
this.addEventListener("click", __f_click);
}
Symbol 403 MovieClip [StepThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 415 MovieClip [NumericStepper] Frame 1
#initclip 87
Object.registerClass("NumericStepper", mx.controls.NumericStepper);
#endinitclip
stop();
Instance of Symbol 45 MovieClip [SimpleButton] in Symbol 415 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 339 MovieClip [TextInput] in Symbol 415 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 418 MovieClip [options_menu] Frame 1
function close() {
HUD.setKeys.key_list = null;
key_list.unload();
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
desc_txt.remove();
_this.removeMovieClip();
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
Instance of Symbol 293 MovieClip "close_btn" in Symbol 418 MovieClip [options_menu] Frame 1
on (release) {
if (_parent.active && (_parent.readKey != true)) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 418 MovieClip [options_menu] Frame 2
stop();
onKeyDown = function () {
var _local3 = String(_root.focusManager.getFocus());
var _local4 = _local3.indexOf("key_list") > -1;
if (key_list.keySetter_state != "readyKeyCode") {
var _local2 = _local4 && (RAM.keys.cancel == 13);
if (Key.isDown(RAM.keys.cancel) && (!_local2)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
}
};
border_num.value = RAM.winBorder;
if (active) {
key_list.setFocus();
}
sound_num.value = SOUND.volume;
music_num.value = MUSIC.volume;
function onUnload() {
key_list.removeEventListener("changeKey", this);
key_list.removeEventListener("onEsc", this);
}
key_list.setStyle("embedFonts", false);
key_list.setStyle("fontFamily", "_sans");
key_list.cellRenderer = "KeySetter";
HUD.setKeys.key_list = key_list;
key_list.update = function () {
_keys = RAM.keys;
key_list.removeAll();
var _local5 = key_list.selectedIndex;
var _local4 = key_list.vPosition;
if (_keys != undefined) {
key_ary = [];
for (var _local3 in _keys) {
key_ary.push({keyName:_local3, keyCode:_keys[_local3]});
}
key_list.dataProvider = key_ary;
key_list.enabled = true;
if (_local4) {
key_list.vPosition = _local4;
}
key_list.setFocus();
key_list.selectedIndex = _local5 || 0;
} else {
key_list.enabled = false;
}
};
key_list.update();
changeKey = function (evt) {
_keys[evt.keyName] = evt.keyCode;
HUD.setKeys.key_win.update();
};
key_list.addEventListener("changeKey", this);
Instance of Symbol 415 MovieClip [NumericStepper] "border_num" in Symbol 418 MovieClip [options_menu] Frame 2
//component parameters
onClipEvent (construct) {
maximum = 7;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_change(eventObj) {
if (_parent.active) {
SOUND.play("sound\\cursor_highlight.mp3");
RAM.winBorder = value;
_parent.parentMenu.bg_mc.gotoAndStop(RAM.winBorder);
HUD.moneyMenu.bg_mc.gotoAndStop(RAM.winBorder);
_parent.desc_txt.bg_mc.gotoAndStop(RAM.winBorder);
_parent.bg_mc.gotoAndStop(RAM.winBorder);
} else {
value = RAM.winBorder;
}
}
this.addEventListener("change", __f_change);
}
Instance of Symbol 415 MovieClip [NumericStepper] "sound_num" in Symbol 418 MovieClip [options_menu] Frame 2
//component parameters
onClipEvent (construct) {
maximum = 100;
minimum = 0;
stepSize = 25;
value = 100;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_change(eventObj) {
if (_parent.active) {
SOUND.volume = value;
SOUND.play("sound\\cursor_highlight.mp3");
} else {
value = SOUND.volume;
}
}
this.addEventListener("change", __f_change);
}
Instance of Symbol 415 MovieClip [NumericStepper] "music_num" in Symbol 418 MovieClip [options_menu] Frame 2
//component parameters
onClipEvent (construct) {
maximum = 100;
minimum = 0;
stepSize = 25;
value = 100;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_change(eventObj) {
if (_parent.active) {
MUSIC.volume = value;
SOUND.play("sound\\cursor_highlight.mp3");
} else {
value = MUSIC.volume;
}
}
this.addEventListener("change", __f_change);
}
Instance of Symbol 113 MovieClip [List] "key_list" in Symbol 418 MovieClip [options_menu] Frame 2
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 420 MovieClip [load_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
onKeyDown = function () {
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
if (Key.isDown(RAM.keys.ok)) {
_root.focusManager.getFocus().dispatchEvent({type:"click"});
_root.focusManager.setFocus(null);
}
};
Instance of Symbol 293 MovieClip "close_btn" in Symbol 420 MovieClip [load_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 420 MovieClip [load_menu] Frame 2
stop();
setInitialFocus = function () {
cookie_btn.setFocus();
};
setTimeout(setInitialFocus, 200);
Instance of Symbol 49 MovieClip [Button] "cookie_btn" in Symbol 420 MovieClip [load_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Flash Cookie";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (mouseMove) {
if (_parent.active) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
_parent.help_mc.text = "Load from a Flash cookie.";
}
}
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active && (enabled)) {
SOUND.play("sound\\cursor_select.mp3");
var _local2 = ROOT.loadGame(ROOT.getGameId());
if (_local2) {
_parent.selectItem();
} else {
label = "No data to load.";
}
}
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 49 MovieClip [Button] "clipboard_btn" in Symbol 420 MovieClip [load_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Clipboard";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (mouseMove) {
if (_parent.active) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
_parent.help_mc.text = "Paste saved data from the clipboard.";
}
}
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active && (enabled)) {
SOUND.play("sound\\cursor_select.mp3");
var _local11 = nextDepth(HUD);
var _local16 = "menu_" + _local11;
clipboard_menu = HUD.attachMovie("pasteClipboard_menu", _local16, _local11, {parentMenu:_parent});
this.enabled = false;
_parent.cookie_btn.enabled = false;
_this = this;
clipboard_menu.ok = function (loadString) {
XML.prototype.ignoreWhite = true;
var _local11 = new XML(loadString);
readXml_getValue = function (newValue) {
var _local2 = null;
var _local3 = newValue.substr(0, 4);
if (_local3 == "bol_") {
var _local4 = newValue.substr(4);
newValue = _local4 == "true";
_local2 = newValue;
} else if (_local3 == "num_") {
var _local4 = newValue.substr(4);
newValue = Number(_local4);
_local2 = newValue;
} else if (_local3 == "str_") {
var _local4 = newValue.substr(4);
newValue = String(_local4);
_local2 = newValue;
} else if (isNaN(Number(newValue))) {
if (newValue == "true") {
_local2 = true;
} else if (newValue == "false") {
_local2 = false;
} else if (newValue == "undefined") {
_local2 = undefined;
} else {
var _local6 = "";
var _local5 = String.fromCharCode(10);
newValue = newValue.split(_local5).join("");
_local2 = newValue;
}
} else {
_local2 = Number(newValue);
}
return(_local2);
};
readXml = function (parentPath, targetData) {
for (var _local1 in parentPath.attributes) {
if (_local1 != "xmlType") {
var _local6 = parentPath.attributes[_local1];
targetData[_local1] = readXml_getValue(_local6);
}
}
for (var _local8 in parentPath.childNodes) {
var _local2 = parentPath.childNodes[_local8];
var _local1 = _local2.nodeName;
var _local4 = _local2.attributes.xmlType;
if (_local4 == "array") {
targetData[_local1] = new Array();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
} else if (_local4 == "variable") {
var _local6 = _local2.attributes.value;
targetData[_local1] = readXml_getValue(_local6);
} else if (_local4 == "object") {
targetData[_local1] = new Object();
var _local7 = targetData[_local1];
readXml(_local2, _local7);
}
}
delete stringSlice;
};
var _local10 = {};
readXml(_local11.firstChild, _local10);
var _local12 = ROOT.restoreData(_local10);
_this.enabled = true;
_parent.cookie_btn.enabled = true;
if (_local12) {
_parent.selectItem();
} else {
label = "Invalid data";
}
};
clipboard_menu.cancel = function () {
_this.enabled = true;
_parent.cookie_btn.enabled = true;
};
}
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 157 MovieClip [imageLoader] "image_pane" in Symbol 423 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = true;
enabled = true;
visible = true;
}
onClipEvent (load) {
function __f_complete(eventObj) {
var _local2 = 242;
var _local1 = (_local2 - content._width) / 2;
_x = _local1;
}
this.addEventListener("complete", __f_complete);
}
Symbol 424 MovieClip [image_menu] Frame 1
function close() {
_quality = "LOW";
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseFMP);
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
SOUND.play("sound\\camera.mp3");
_this = this;
waitForRelease = Key.isDown(RAM.keys.talk) || (Key.isDown(RAM.keys.cancel));
onKeyUp = function () {
if (!(Key.isDown(RAM.keys.talk) || (Key.isDown(RAM.keys.cancel)))) {
waitForRelease = false;
}
};
onKeyDown = function () {
var _local1 = Key.getCode();
if ((_local1 == RAM.keys.talk) || (_local1 == RAM.keys.cancel)) {
if (!waitForRelease) {
SOUND.play("sound\\cursor_select.mp3");
cancel();
close();
}
}
};
onRelease = function () {
SOUND.play("sound\\cursor_select.mp3");
cancel();
close();
};
Symbol 424 MovieClip [image_menu] Frame 2
stop();
brightnessDone = function () {
photoImage._brightness = 0;
};
setup = function (imageName) {
photoImage.image_pane.file = imageName;
var _local2 = "easeOutQuad";
var _local1 = 1;
photoImage._scale = 90;
photoImage.scaleTo(100, _local1, _local2);
photoImage._x = 51;
photoImage._y = 26;
photoImage.slideTo(39, 16, _local1, _local2);
background_mc._alpha = 0;
background_mc.alphaTo(50, _local1, _local2);
photoImage._brightness = 100;
photoImage.brightnessTo(0, _local1 * 2, _local2, 0, brightnessDone);
};
setup(image);
_quality = "HIGH";
photoImage.DropShadow_blur = 10;
photoImage.DropShadow_distance = 10;
photoImage.DropShadow_alpha = 0.3;
Symbol 426 MovieClip [currentPokemon_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
}
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
list_bg.winBorder = winBorder;
info_bg.winBorder = winBorder;
heldItem_mc.winBorder = winBorder;
list_pane.setStyle("borderStyle", "none");
Instance of Symbol 293 MovieClip "close_btn" in Symbol 426 MovieClip [currentPokemon_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Instance of Symbol 295 MovieClip [ScrollPane] "list_pane" in Symbol 426 MovieClip [currentPokemon_menu] Frame 1
//component parameters
onClipEvent (construct) {
contentPath = "empty";
hLineScrollSize = 5;
hPageScrollSize = 20;
hScrollPolicy = "off";
scrollDrag = false;
vLineScrollSize = 33;
vPageScrollSize = 198;
vScrollPolicy = "auto";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 426 MovieClip [currentPokemon_menu] Frame 2
function selectPokemon(index) {
SOUND.play("sound\\cursor_highlight.mp3");
var _local10 = stat_array[selection];
_local10.alphaTo(50, 0.1, "easeInOutQuad");
var _local8 = stat_array[index];
_local8.alphaTo(100, 0.1, "easeInOutQuad");
selection = index;
var _local4 = party_obj[index].id;
var _local2 = RAM.pokedex[_local4].lastPhoto;
if ((_local2 == "") || (_local2 == undefined)) {
_local2 = "no_picture";
}
image_mc.file = _local2;
var _local7 = _local4.charAt(0).toUpperCase() + _local4.substr(1);
var _local6 = RAM_F.getNickname(_local7);
_local6 = _local6.split("_").join(" ");
id_txt.text = _local7;
var _local1 = party_obj[index].heldItem;
_local1 = _local1.split("_").join(" ");
_local1 = _local1.charAt(0).toUpperCase() + _local1.substr(1);
if (_local1 == "Undefined") {
_local1 = "";
}
heldItem_mc.text = "HELD ITEM: " + _local1;
_local8 = stat_array[selection];
var _local3 = new flash.geom.Point(0, halfHeight);
_local8.localToGlobal(_local3);
if (_local3.y < pane_top_p.y) {
var _local9 = statHeight * selection;
ZigoEngine.doTween(list_pane, "vPosition", _local9, 0.2, "easeOutQuad");
} else if (_local3.y > pane_bottom_p.y) {
var _local11 = Math.ceil((_local3.y - pane_bottom_p.y) / statHeight);
var _local9 = (statHeight * (selection + 1)) - list_pane.height;
ZigoEngine.doTween(list_pane, "vPosition", _local9, 0.2, "easeOutQuad");
}
}
stop();
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
ROOT.updateText(this, id_txt, "text");
var xOffset = 0;
var yOffset = 0;
var statHeight = 33;
var halfHeight = (statHeight / 2);
var thisStat;
var selection = 0;
var maxSelection = (party_obj.length - 1);
container = list_pane.content;
pane_top_p = new flash.geom.Point(0, list_pane._y);
pane_bottom_p = new flash.geom.Point(0, list_pane._y + list_pane._height);
_this.localToGlobal(pane_top_p);
_this.localToGlobal(pane_bottom_p);
stat_array = [];
var p = 0;
while (p < party_obj.length) {
var newDepth = nextDepth(container);
var newName = ("stat_" + p);
thisStat = container.attachMovie("pokeStatus_menu", newName, newDepth);
stat_array.push(thisStat);
thisStat._x = xOffset;
thisStat._y = yOffset + (statHeight * p);
var pokeName;
if (party_obj[p].nickname && (party_obj[p].nickname != "undefined")) {
pokeName = party_obj[p].nickname;
} else {
pokeName = party_obj[p].id;
pokeName = pokeName.charAt(0).toUpperCase() + pokeName.substr(1);
pokeName = RAM_F.getNickname(pokeName);
}
thisStat.name = pokeName;
var hp = party_obj[p].hp;
thisStat.hp = hp;
var maxHp = party_obj[p].maxHp;
thisStat.maxHp = maxHp;
var level = party_obj[p].level;
thisStat.level = level;
var exp = party_obj[p].exp;
thisStat.exp = exp;
var status_obj = party_obj[p].status;
thisStat.status_obj = status_obj;
thisStat.index = p;
thisStat._alpha = 50;
thisStat.onPress = function () {
if (_this.active) {
selectPokemon(this.index);
}
};
p++;
}
selectPokemon(selection);
highlight(selection);
onKeyDown = function () {
var _local1 = true;
for (var _local3 in RAM.keys) {
if (RAM.keys[_local3] == 67) {
_local1 = false;
}
}
var _local2 = true;
for (var _local3 in RAM.keys) {
if (RAM.keys[_local3] == 82) {
_local2 = false;
}
}
if ((_local1 && (Key.isDown(67))) && (Selection.getFocus() != move_btn)) {
move_btn.click();
}
if ((_local2 && (Key.isDown(82))) && (Selection.getFocus() != rename_btn)) {
rename_btn.click();
}
if (Key.isDown(RAM.keys.ok) && (Selection.getFocus() != move_btn)) {
SOUND.play("sound\\cursor_select.mp3");
selectItem(selection);
}
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
if (Key.isDown(RAM.keys.up || 38)) {
if (selection > 0) {
selectPokemon(selection - 1);
}
highlight(seleciton);
}
if (Key.isDown(RAM.keys.down || 40)) {
if (selection < maxSelection) {
selectPokemon(selection + 1);
}
highlight(seleciton);
}
if (Key.isDown(RAM.keys.left || 37)) {
if (selection > 0) {
var _local4 = selection - 6;
if (_local4 < 0) {
_local4 = 0;
}
selectPokemon(_local4);
}
highlight(seleciton);
}
if (Key.isDown(RAM.keys.right || 39)) {
if (selection < maxSelection) {
var _local4 = selection + 6;
if (_local4 > maxSelection) {
_local4 = maxSelection;
}
selectPokemon(_local4);
}
highlight(seleciton);
}
};
Instance of Symbol 49 MovieClip [Button] "move_btn" in Symbol 426 MovieClip [currentPokemon_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "CHECK MOVES";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
click = function () {
SOUND.play("sound\\cursor_select.mp3");
var _local10 = _parent;
var _local14 = _parent.selection;
var _local11 = nextDepth(HUD);
var _local12 = "menu_" + _local11;
var _local7 = _parent.party_obj[_local14];
moveList_array = new Array();
var _local6 = 0;
while (_local6 < _local7.moves.length) {
var _local9 = _local7.moves[_local6];
if (_local9 == "undefined") {
_local9 = "";
}
if (_local9) {
var _local4 = _local9;
var _local5 = ROM.pokemon[_local7.id].moves;
var _local3 = 0;
while (_local3 < _local5.length) {
if (_local5[_local3].id == _local9) {
_local4 = _local5[_local3].nickName || (_local5[_local3].id);
} else if (_local5[_local3] == _local9) {
_local4 = _local9;
}
_local3++;
}
_local4 = _local4.split("_").join(" ");
_local4 = _local4.charAt(0).toUpperCase() + _local4.substr(1);
moveList_array.push({name:_local4, id:_local9});
}
_local6++;
}
var move_menu = HUD.attachMovie("simpleList_menu", _local12, _local11, {parentMenu:_local10, list_array:moveList_array, winBorder:_local10.winBorder});
move_menu._x = 208;
move_menu._y = fieldMenu._y + 16;
_local11 = nextDepth(HUD);
_local12 = "menu_" + _local11;
var descMenu = HUD.attachMovie("desc_menu", _local12, _local11, {winBorder:_local10.winBorder});
descMenu._y = 208;
move_menu.highlight = function (index) {
var _local1 = moveList_array[index].id;
descMenu.text = ROM.moves[_local1].description;
};
move_menu.selectItem = function () {
delete moveList_array;
descMenu.close();
move_menu.close();
};
move_menu.cancel = function () {
delete moveList_array;
descMenu.close();
};
_root.focusManager.setFocus(undefined);
};
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active) {
click();
}
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 157 MovieClip [imageLoader] "image_mc" in Symbol 426 MovieClip [currentPokemon_menu] Frame 2
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 49 MovieClip [Button] "rename_btn" in Symbol 426 MovieClip [currentPokemon_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "RENAME";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
click = function () {
SOUND.play("sound\\cursor_select.mp3");
var thisPokemon = _parent.party_obj[_parent.selection];
var thisStat = _parent.stat_array[_parent.selection];
var _local3 = RAM.pokedex[thisPokemon.id].lastPhoto;
if ((_local3 == "") || (_local3 == undefined)) {
_local3 = "no_picture";
}
var _local5 = function (newName) {
if ((RAM[thisPokemon.id] != undefined) && (thisPokemon.nickname == undefined)) {
if (newName == "") {
newName = thisPokemon.id.charAt(0).toUpperCase() + thisPokemon.id.substr(1);
}
RAM[thisPokemon.id] = newName;
thisStat.name = newName;
} else {
thisPokemon.nickname = ((newName == "") ? undefined : (newName));
var _local2 = RAM_F.getNickname(thisPokemon.id);
_local2 = _local2.charAt(0).toUpperCase() + _local2.substr(1);
thisStat.name = ((thisPokemon.nickname == undefined) ? (_local2) : (thisPokemon.nickname));
}
};
var _local11 = thisPokemon.nickname;
var _local4 = nextDepth(_parent);
var _local6 = "rename" + _local4;
var _local7 = _parent.attachMovie("rename_menu", _local6, _local4, {parentMenu:_parent, image:_local3, id:thisPokemon.id, defaultName:"", selectItem:_local5, _x:144});
};
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active) {
click();
}
}
this.addEventListener("click", __f_click);
}
Symbol 434 MovieClip [copyClipboard_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
_this = this;
saveData_txt.embedFonts = true;
saveData_txt.filters = ROOT.textShadow;
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
onKeyDown = function () {
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
}
};
System.setClipboard(text);
louder_mc._visible = false;
copied_mc._visible = false;
clickText_mc.onPress = function () {
louder_mc._visible = true;
System.setClipboard(text);
copied_mc._visible = true;
VOW.firstWait(1500).then(function () {
copied_mc._visible = false;
});
};
Instance of Symbol 293 MovieClip in Symbol 434 MovieClip [copyClipboard_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Symbol 434 MovieClip [copyClipboard_menu] Frame 2
stop();
Instance of Symbol 49 MovieClip [Button] in Symbol 434 MovieClip [copyClipboard_menu] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "OK";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
onClipEvent (load) {
function __f_click(eventObj) {
if (_parent.active) {
SOUND.play("sound\\cursor_select.mp3");
_parent.cancel();
_parent.close();
}
}
this.addEventListener("click", __f_click);
}
Symbol 436 MovieClip [battleDesc_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
Key.removeListener(this);
this.removeMovieClip();
}
ROOT.forceEmbedded(desc_txt);
bg_mc.winBorder = winBorder;
Key.removeListener(parentMenu);
Key.removeListener(this);
Key.addListener(this);
onKeyDown = function () {
if (Key.isDown(RAM.keys.ok)) {
selectItem();
close();
}
if (Key.isDown(RAM.keys.cancel)) {
cancel();
close();
}
};
Symbol 439 MovieClip [battleChoices_menu] Frame 1
function close() {
SOUND.play("sound\\cursor_select.mp3");
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
Key.removeListener(this);
this.removeMovieClip();
}
function setup(newList) {
list_array = newList;
maxSelection = list_array.length - 1;
list0_txt.text = "";
list1_txt.text = "";
var _local4 = ((newList.length < listHeight) ? (newList.length) : (listHeight));
var _local2 = 0;
while (_local2 < _local4) {
var _local1 = newList[_local2].name;
_local1 = _local1.split("_").join(" ");
list0_txt.text = list0_txt.text + (_local1 + newline);
_local2++;
}
_local4 = newList.length;
_local2 = listHeight;
while (_local2 < _local4) {
var _local1 = newList[_local2].name;
_local1 = _local1.split("_").join(" ");
list1_txt.text = list1_txt.text + (_local1 + newline);
_local2++;
}
}
ROOT.forceEmbedded(list0_txt);
ROOT.forceEmbedded(list1_txt);
Key.removeListener(parentMenu);
Key.removeListener(this);
Key.addListener(this);
selection = 0;
listWidth = 2;
listHeight = 3;
lineWidth = 58;
lineHeight = 12;
xCursorOrigin = 6;
yCursorOrigin = 8;
xCursor = 0;
yCursor = 0;
setSelection();
if (list_array) {
setup(list_array);
}
setSelection = function () {
var _local1 = listHeight * xCursor;
_local1 = _local1 + yCursor;
selection = _local1;
placeCursor();
};
placeCursor = function () {
cursor_mc._x = xCursorOrigin + (lineWidth * xCursor);
cursor_mc._y = yCursorOrigin + (lineHeight * yCursor);
};
onKeyDown = function () {
if (Key.isDown(RAM.keys.ok)) {
SOUND.play("sound\\cursor_select.mp3");
selectItem(selection);
}
if (Key.isDown(RAM.keys.cancel)) {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
}
if (Key.isDown(RAM.keys.up || 38)) {
if (yCursor > 0) {
SOUND.play("sound\\cursor_highlight.mp3");
yCursor--;
setSelection();
}
}
if (Key.isDown(RAM.keys.down || 40)) {
if (yCursor < (listHeight - 1)) {
SOUND.play("sound\\cursor_highlight.mp3");
yCursor++;
yCursor = yCursor % listHeight;
setSelection();
}
}
if (Key.isDown(RAM.keys.left || 37)) {
if (xCursor > 0) {
SOUND.play("sound\\cursor_highlight.mp3");
xCursor--;
setSelection();
}
}
if (Key.isDown(RAM.keys.right || 39)) {
if (xCursor < (listWidth - 1)) {
SOUND.play("sound\\cursor_highlight.mp3");
xCursor++;
xCursor = xCursor % listWidth;
setSelection();
}
}
};
Symbol 440 MovieClip [badges_menu] Frame 1
function close() {
Key.removeListener(parentMenu);
Key.addListener(parentMenu);
parentMenu.active = true;
Key.removeListener(_this);
active = false;
_this.removeMovieClip();
}
boulder_badge.file = (RAM.items.boulder_badge ? "badge1.png" : "leader1.png");
cascade_badge.file = (RAM.items.cascade_badge ? "badge2.png" : "leader2.png");
thunder_badge.file = (RAM.items.thunder_badge ? "badge3.png" : "leader3.png");
marsh_badge.file = (RAM.items.marsh_badge ? "badge4.png" : "leader4.png");
rainbow_badge.file = (RAM.items.rainbow_badge ? "badge5.png" : "leader5.png");
soul_badge.file = (RAM.items.soul_badge ? "badge6.png" : "leader6.png");
volcano_badge.file = (RAM.items.volcano_badge ? "badge7.png" : "leader7.png");
earth_badge.file = (RAM.items.earth_badge ? "badge8.png" : "leader8.png");
Key.removeListener(parentMenu);
parentMenu.active = false;
Key.removeListener(this);
Key.addListener(this);
active = true;
_this = this;
onKeyDown = function () {
SOUND.play("sound\\cursor_cancel.mp3");
cancel();
close();
};
Instance of Symbol 293 MovieClip "close_btn" in Symbol 440 MovieClip [badges_menu] Frame 1
on (release) {
if (_parent.active) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.cancel();
_parent.close();
}
}
Instance of Symbol 157 MovieClip [imageLoader] "boulder_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge1.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "earth_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge8.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "volcano_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge7.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "soul_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge6.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "rainbow_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge5.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "marsh_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge4.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "thunder_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge3.png";
scaleContent = true;
enabled = true;
visible = true;
}
Instance of Symbol 157 MovieClip [imageLoader] "cascade_badge" in Symbol 440 MovieClip [badges_menu] Frame 1
//component parameters
onClipEvent (construct) {
file = "badge2.png";
scaleContent = true;
enabled = true;
visible = true;
}
Symbol 441 MovieClip [showMenu] Frame 1
Symbol 441 MovieClip [showMenu] Frame 2
getPathValue = function (path, defaultContainer) {
var path = (path ? (path) : "");
var defaultContainer = (defaultContainer ? (defaultContainer) : "RAM");
if (typeof(path) == "string") {
path = path.split(" ").join("");
}
var startAt = path.indexOf(".");
if (startAt == undefined) {
var output = path;
} else if (startAt == -1) {
var containerIsGlobal = eval ("_global." + path);
if (path == "this") {
containerIsGlobal = true;
}
var output = (containerIsGlobal ? (eval (path)) : (eval ((defaultContainer + ".") + path)));
} else {
var containerEnd = path.indexOf(".");
var containerName = path.substr(0, containerEnd);
var containerIsGlobal = eval ("_global." + containerName);
if (containerName == "this") {
containerIsGlobal = true;
}
if (containerName == "_level0") {
containerIsGlobal = true;
}
if (!containerIsGlobal) {
path = "RAM." + path;
}
var output = eval (path);
}
return(output);
};
getContainer = function (target, defaultContainer, defaultContainerName) {
var _local8;
var _local3;
var _local2 = null;
var _local5;
var _local6;
var _local9;
var _local7 = null;
_local8 = defaultContainer || (_global.RAM);
_local3 = defaultContainerName || "RAM";
if (target) {
_local2 = target.lastIndexOf(".");
if (_local2 == -1) {
if (target == _local3) {
_local5 = null;
} else {
_local6 = _local3;
_local5 = _local8;
}
} else {
_local6 = target.substr(0, _local2);
_local5 = getPathValue(_local6, _local3);
}
_local9 = target.substr(_local2 + 1);
_local7 = {container:_local5, name:_local9};
return(_local7);
}
};
if (target == "undefined") {
target = undefined;
}
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
params = {};
for (var nam in this) {
if (((((((((nam != "params") && (nam != "menuName")) && (nam != "target")) && (nam != "onClose")) && (nam != "detectLastFrame")) && (nam != "getImpliedValue")) && (nam != "getPathValue")) && (nam != "getContainer")) && (nam != "parentSprite")) {
params[nam] = getImpliedValue(this[nam]);
}
}
stop();
_this = this;
close = function () {
_this.nextFrame();
};
var settings = {parentMenu:null, cancel:close};
target_mc = this;
newDepth = 0;
newName = "menu_mc";
switch (menuName) {
case "battle_mc" :
var opponent_array = [];
for (var nam in params) {
if ((((nam != "background") && (nam != "trainerId")) && (nam != "run")) && (nam != "money")) {
if (typeof(params[nam]) == "object") {
var newPokemon = params[nam];
newPokemon.id = nam;
} else {
var newPokemon = {id:nam, level:params[nam]};
}
opponent_array.push(newPokemon);
}
}
if (trainerId) {
opponent_array[0].trainerId = trainerId;
}
settings.background = background;
settings.opponent_array = opponent_array;
settings.canRun = params.run;
settings.money = params.money;
if (target) {
RAM[target] = undefined;
}
settings._this = _this;
settings.win = function () {
if (_this.target) {
RAM[_this.target] = "win";
}
setTimeout(_this.close, 1);
};
settings.caught = function () {
trace("battle caught()");
if (_this.target) {
RAM[_this.target] = "caught";
}
setTimeout(_this.close, 1);
};
settings.lose = function () {
if (_this.target) {
RAM[_this.target] = "lose";
}
setTimeout(_this.close, 1);
};
settings.run = function () {
if (_this.target) {
RAM[_this.target] = "run";
}
setTimeout(_this.close, 1);
};
target_mc = ROOT;
newDepth = 2;
newName = "battle_mc";
break;
case "buy_menu" :
var hideExpensive = (hideExpensive ? (hideExpensive) : false);
if (!params.shopType) {
params.shopType = "items";
}
var shopType = params.shopType;
var itemList = [];
for (var nam in params) {
if (((nam != "hideExpensive") && (nam != "shopName")) && (nam != "shopType")) {
var newItem = {id:nam, name:nam.substr(0, 1).toUpperCase() + nam.substr(1), quantity:((ROM[shopType][nam].price || 0) + Number(params[nam])) || 0};
if (!hideExpensive) {
itemList.push(newItem);
} else if (RAM.money >= newItem.quantity) {
itemList.push(newItem);
}
}
}
settings.list_array = itemList;
settings.shopName = params.shopName;
settings.shopType = params.shopType;
settings.sign = "BUY";
settings.selectItem = function (index) {
if (settings.list_array[index].id != undefined) {
var _local2 = settings.list_array[index].quantity;
var _local5 = RAM.money >= _local2;
var _local1 = settings.shopName;
var _local6 = settings.shopType;
var _local7 = settings.list_array[index].id;
if (_local1) {
var _local4 = RAM.shops[_local1][_local7] > 0;
} else {
var _local4 = true;
}
if (_local5 && (_local4)) {
RAM.money = RAM.money - _local2;
if (_local1) {
RAM.shops[_local1][_local7]--;
}
_local7 = settings.list_array[index].id;
var _local8 = RAM_F[_local6].addItem(_local7);
thisMenu.buyList_mc.highlight();
}
if (!_local4) {
thisMenu.desc_mc.text = "Sold out!";
} else if (!_local5) {
thisMenu.desc_mc.text = "Not enough Pokey-dollars!";
}
}
};
settings.getDescription = function (index) {
var _local3 = settings.list_array[index].id;
var _local2 = settings.shopType;
var _local4 = ROM[_local2][_local3];
var _local1 = _local4.description;
if (_local1 == undefined) {
_local1 = "";
}
return(_local1);
};
menuName = "shop_menu";
break;
case "sell_menu" :
if (!params.shopType) {
params.shopType = "items";
}
var shopType = params.shopType;
addShopItems = function () {
var _local5 = [];
for (var _local6 in params) {
if (((RAM[shopType][_local6] != undefined) && (_local6 != "shopName")) && (_local6 != "shopType")) {
var _local1 = {id:_local6, name:_local6.substr(0, 1).toUpperCase() + _local6.substr(1), quantity:((ROM[shopType][_local6].price || 0) + Number(params[_local6])) || 0};
_local5.push(_local1);
}
}
settings.list_array = _local5;
return(_local5);
};
addShopItems();
settings.shopName = params.shopName;
settings.shopType = params.shopType;
settings.sign = "SELL";
settings.selectItem = function (index) {
var _local1 = settings.list_array[index].id;
var _local3 = settings.shopName;
var _local2 = settings.shopType;
if (RAM[_local2][_local1] != undefined) {
var _local4 = settings.list_array[index].quantity;
RAM.money = RAM.money + _local4;
if (_local3) {
RAM.shops[_local3][_local1]++;
} else {
RAM_F.shops.restockRandom(_local1);
}
var _local7 = RAM_F[_local2].removeItem(_local1);
var _local5 = addShopItems();
thisMenu.setup(_local5);
thisMenu.buyList_mc.highlight();
}
};
settings.getDescription = function (index) {
var _local4 = settings.list_array[index].id;
var _local3 = settings.shopType;
var _local2 = ROM[_local3][_local4];
if (_local2 != undefined) {
var _local1 = _local2.description;
if (_local1 == undefined) {
_local1 = "";
}
return(_local1);
}
return("You don't have any items they want.");
};
menuName = "shop_menu";
break;
case "rename_menu" :
settings.character = character;
settings.defaultName = name;
settings.image = image;
settings.id = id;
if (target) {
RAM[target] = undefined;
}
settings.selectItem = function (newName) {
if ((!target) && (character)) {
target = "RAM." + character;
}
var _local1 = getContainer(target);
if (_local1.container && (_local1.name)) {
_local1.container[_local1.name] = newName;
}
close();
};
break;
case "photo_menu" :
var display = {};
if (params.filter) {
for (var nam in RAM.photos) {
if (RAM.photos[nam].indexOf(params.filter) != -1) {
display[nam] = RAM.photos[nam];
}
}
} else {
for (var nam in RAM.photos) {
display[nam] = RAM.photos[nam];
}
}
for (var nam in params) {
if (nam != "filter") {
display[nam] = params[nam];
}
}
settings.pictures = display;
if (target) {
RAM[target] = undefined;
}
settings.selectItem = function (path) {
if (target) {
RAM[target] = path;
}
close();
};
break;
case "pasteClipboard_menu" :
if (target) {
RAM[target] = undefined;
}
settings.ok = function (newText) {
if (target) {
RAM[target] = newText;
}
close();
};
break;
case "load_menu" :
settings.selectItem = close;
break;
case "list_menu" :
var list = [];
for (var nam in params) {
var newItem = {name:nam, quantity:params[nam]};
list.push(newItem);
}
settings.list_array = list;
if (target) {
RAM[target] = undefined;
}
settings.selectItem = function (index) {
if (target) {
RAM[target] = settings.list_array[index].name;
}
close();
};
break;
case "image_menu" :
settings.image = image;
settings.selectItem = close;
break;
case "currentPokemon_menu" :
settings.party_obj = RAM.pokemon;
if (target) {
RAM[target] = undefined;
}
settings.selectItem = function (index) {
if (target) {
RAM[target] = RAM.pokemon[index];
}
close();
};
break;
case "battleDesc_menu" :
settings.text = text;
settings.selectItem = function () {
close();
};
break;
case "testMove_menu" :
settings.selectItem = function (ary) {
if (target) {
RAM[target] = ary[0];
}
if (target2) {
RAM[target2] = ary[1];
}
thisMenu.close();
close();
};
settings.cancel = function () {
trace("testMove_menu.cancel()");
thisMenu.close();
close();
};
break;
case "battleChoices_menu" :
var list = [];
for (var nam in params) {
list.push({name:nam});
}
settings.list_array = list;
settings.selectItem = function (index) {
if (target) {
if (settings.list_array[index].name) {
RAM[target] = settings.list_array[index].name;
}
}
thisMenu.close();
close();
};
settings.cancel = function () {
thisMenu.close();
close();
};
break;
case "simpleList_menu" :
var list = [];
for (var nam in params) {
list.push({name:nam});
}
settings.list_array = list;
settings.selectItem = function (index) {
if (target) {
if (settings.list_array[index].name) {
RAM[target] = settings.list_array[index].name;
}
}
thisMenu.close();
close();
};
}
thisMenu = target_mc.attachMovie(menuName, newName, newDepth, settings);
Symbol 441 MovieClip [showMenu] Frame 3
stop();
onUnload();
onClose();
var removeLater = function () {
this.removeMovieClip();
this.unloadMovie();
};
setTimeout(removeLater, 1);
Symbol 446 MovieClip Frame 1
this.onRollOver = function () {
icon._alpha = 100;
};
this.onRollOut = function () {
icon._alpha = 40;
};
Symbol 447 MovieClip Frame 1
_this = this;
icon.swapDepths(1);
icon.onPress = function () {
if (!_this.key_win) {
SOUND.play("sound\\cursor_cancel.mp3");
_this.attachMovie("set_keys", "key_win", 0);
} else {
SOUND.play("sound\\cursor_cancel.mp3");
_this.key_win.removeMovieClip();
}
};
Symbol 451 MovieClip Frame 1
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
}
_this = this;
keyboard = {};
Key.addListener(keyboard);
_visible = false;
this._scale = 0;
sprite = null;
questions = null;
isOpen = false;
open = function (newSprite) {
if (SPRITES.player.isPaused == false) {
if (newSprite != sprite) {
sprite = newSprite;
questions = [];
for (var _local1 in sprite.scripts) {
if (((_local1 != "auto") && (_local1 != "talk")) && (_local1 != "collision")) {
if (RAM.ask[_local1]) {
questions.push(_local1);
}
}
}
if (questions.length > 0) {
doOpen();
}
}
}
};
doOpen = function () {
if (isOpen == false) {
_visible = true;
com.mosesSupposes.fuse.ZigoEngine.doTween(_this, "_scale", 100, 0.25, "easeOutBack");
Key.removeListener(keyboard);
Key.addListener(keyboard);
isOpen = true;
}
};
close = function () {
sprite = null;
questions = null;
var _local1 = function () {
_this._visible = false;
};
com.mosesSupposes.fuse.ZigoEngine.doTween(_this, "_scale", 0, 0.25, "easeInBack", null, _local1);
Key.removeListener(keyboard);
isOpen = false;
};
keyboard.onKeyUp = function () {
if (Key.getCode() == RAM.keys.ask) {
onRelease();
}
};
openList = function () {
if ((SPRITES.player.isPaused == false) && (questions.length > 0)) {
LOOP.pauseSet("player", true);
LOOP.pauseSet("fieldMenu", true);
LOOP.pauseSet("sprites", true);
var _local7 = [];
var _local1 = 0;
while (_local1 < questions.length) {
var _local2 = questions[_local1].split("_").join(" ");
_local7.push({name:_local2});
_local1++;
}
var _local4 = nextDepth(HUD);
var _local6 = "menu_" + _local4;
questionMenu = HUD.attachMovie("simpleList_menu", _local2, _local4, {parentMenu:HUD, list_array:_local7});
SOUND.play("sound\\cursor_select.mp3");
questionMenu.cancel = function () {
LOOP.pauseSet("player", false);
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseSet("sprites", false);
questionMenu.close();
questionMenu = null;
delete questionMenu;
};
questionMenu.selectItem = function (index) {
var _local1 = questions[index];
_this.doAsk(_local1);
};
}
};
onRelease = openList;
doAsk = function (question) {
questionMenu.close();
questionMenu = null;
delete questionMenu;
if (sprite._parent) {
sprite.scripts[question].done = function () {
var _local1 = _this.sprite;
_this.close();
_this.open(_local1);
LOOP.pauseSet("player", false);
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseSet("sprites", false);
};
sprite.scripts[question].runEvent(0);
} else {
_this.close();
LOOP.pauseSet("player", false);
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseSet("sprites", false);
}
};
onUnload = function () {
Key.removeListener(keyboard);
};
Symbol 452 MovieClip [hud] Frame 1
function closeAll() {
for (var _local2 in HUD) {
var _local1 = HUD[_local2];
if (((_local1 != _this) && (_local1.getDepth() >= 0)) && (_local1.getDepth)) {
Key.removeListener(_local1);
_local1.active = false;
_local1.removeMovieClip();
}
}
Key.addListener(_this);
_this.active = true;
}
function remove() {
closeAll();
Key.removeListener(_this);
_this.active = false;
_this.removeMovieClip();
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
var getNickname = function (pokeObj) {
var _local1 = "";
if (pokeObj.nickname) {
_local1 = pokeObj.nickname;
_local1 = _local1.substr(0, 1).toUpperCase() + _local1.substr(1);
} else {
_local1 = pokeObj.id;
_local1 = _local1.substr(0, 1).toUpperCase() + _local1.substr(1);
_local1 = RAM_F.getNickname(_local1);
}
return(_local1);
};
Key.addListener(this);
active = true;
_this = this;
onKeyDown = function () {
if (Key.isDown(RAM.keys.menu) && (isPaused != true)) {
SOUND.play("sound\\cursor_cancel.mp3");
LOOP.pauseSet("player", true);
LOOP.pauseSet("sprites", true);
var _local17 = false;
if (RAM.items.pokedax > 0) {
_local17 = true;
}
var _local4 = false;
for (var _local21 in RAM.items) {
_local4 = true;
}
var _local3 = false;
for (var _local21 in RAM.equipment) {
_local3 = true;
}
var _local22 = false;
if (RAM.items.camera > 0) {
_local22 = true;
}
var _local24 = false;
if ((((((((RAM.items.boulder_badge > 0) || (RAM.items.cascade_badge > 0)) || (RAM.items.thunder_badge > 0)) || (RAM.items.rainbow_badge > 0)) || (RAM.items.marsh_badge > 0)) || (RAM.items.soul_badge > 0)) || (RAM.items.volcano_badge > 0)) || (RAM.items.earth_badge > 0)) {
_local24 = true;
}
var _local13 = nextDepth(HUD);
var _local20 = "menu_" + _local13;
mainList_array = new Array();
mainList_array.push({name:"Pokemon", id:"pokemon"});
if (_local17) {
mainList_array.push({name:"Pokedax", id:"pokedax"});
}
if (_local4) {
mainList_array.push({name:"Items", id:"items"});
}
if (_local3) {
mainList_array.push({name:"Equipment", id:"equipment"});
}
if (_local22) {
mainList_array.push({name:"Photos", id:"photos"});
}
if (_local24) {
mainList_array.push({name:"Badges", id:"badges"});
}
mainList_array.push({name:"Save", id:"save"});
mainList_array.push({name:"Load", id:"load"});
mainList_array.push({name:"Options", id:"options"});
fieldMenu = HUD.attachMovie("simpleList_menu", _local20, _local13, {parentMenu:this, list_array:mainList_array});
fieldMenu._x = 208;
fieldMenu._y = 0;
_local13 = nextDepth(HUD);
_local20 = "menu_" + _local13;
moneyMenu = HUD.attachMovie("money_menu", _local20, _local13, {text:"$" + RAM.money});
moneyMenu._x = 240;
moneyMenu._y = 208;
fieldMenu.cancel = function () {
closeAll();
LOOP.pauseSet("player", false);
LOOP.pauseSet("sprites", false);
};
fieldMenu.selectItem = function (index) {
var thisItem = mainList_array[index].id;
switch (thisItem) {
case "pokemon" :
var _local12 = nextDepth(HUD);
var _local18 = "menu_" + _local12;
var _local34 = RAM.pokemon;
var _local28 = HUD.attachMovie("currentPokemon_menu", _local18, _local12, {parentMenu:fieldMenu, party_obj:_local34});
break;
case "pokedax" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var _local26 = HUD.attachMovie("pokedax_menu", _local18, _local12, {parentMenu:fieldMenu});
break;
case "items" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
buildItemList = function () {
itemList_array = [];
for (var _local4 in RAM.items) {
if (RAM.items[_local4] > 0) {
var _local1 = _local4.toUpperCase();
_local1 = _local1.split("_").join(" ");
var _local3 = RAM.items[_local4];
var _local2 = _local4;
itemList_array.push({name:_local1, quantity:_local3, id:_local2});
}
}
itemList_array.sortOn("id");
};
buildItemList();
var item_menu = HUD.attachMovie("list_menu", _local18, _local12, {parentMenu:fieldMenu, list_array:itemList_array});
item_menu._x = 160;
item_menu._y = fieldMenu._y + 16;
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var descMenu = HUD.attachMovie("desc_menu", _local18, _local12);
descMenu._y = 208;
item_menu.highlight = function (index) {
var _local1 = itemList_array[index].id;
var _local2 = (ROM.items[_local1].price ? ("$" + ROM.items[_local1].price) : "");
var _local3 = (ROM.items[_local1].description ? (ROM.items[_local1].description) : "");
var _local4 = (((_local2 != "") && (_local3 != "")) ? " - " : "");
descMenu.text = (_local2 + _local4) + _local3;
};
item_menu.cancel = function () {
delete itemList_array;
descMenu.close();
};
restockItemShop = function () {
RAM_F.shops.restockRandom(thisItem);
delete thisItem;
};
item_menu.selectItem = function (index) {
thisItem = itemList_array[index].id;
switch (thisItem) {
case "pokeball" :
descMenu.text = RAM_F.getNickname("Oak") + ": This can only be used in battle.";
break;
case "pokeboll" :
descMenu.text = RAM_F.getNickname("Jessie") + ": This can only be used in battle!";
break;
case "rocketball" :
descMenu.text = RAM_F.getNickname("James") + ": This can only be used in battle.";
break;
case "potion" :
var _local4 = nextDepth(HUD);
var _local6 = "menu_" + _local4;
var _local9 = "Select a pokemon to heal.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local10 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local6, _local2, {parentMenu:item_menu, party_obj:_local10});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local3 = getNickname(_local1);
if (_local1.hp <= 0) {
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local8 = _local3 + " needs to be revived first.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local6, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else if (_local1.hp == _local1.maxHp) {
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local8 = _local3 + " isn't hurt.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local6, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else {
var _local5 = RAM_F.items.removeItem("potion");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound/heal.mp3");
_local1.hp = _local1.hp + 10;
_local1.hp = ((_local1.hp > _local1.maxHp) ? _local1.maxHp : _local1.hp);
var _local4 = "stat_" + index;
var _local7 = itemPokeMenu.container;
_local7[_local4].setHp(_local1.hp, _local1.maxHp);
if (_local5 == 0) {
itemPokeMenu.close();
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
break;
case "super_potion" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
_local9 = "Select a pokemon to heal.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local10 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local6, _local2, {parentMenu:item_menu, party_obj:_local10});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local3 = getNickname(_local1);
if (_local1.hp <= 0) {
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local8 = _local3 + " needs to be revived first.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local6, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else if (_local1.hp == _local1.maxHp) {
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local8 = _local3 + " isn't hurt.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local6, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else {
var _local5 = RAM_F.items.removeItem("super_potion");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound/heal.mp3");
_local1.hp = _local1.hp + 50;
_local1.hp = ((_local1.hp > _local1.maxHp) ? _local1.maxHp : _local1.hp);
var _local4 = "stat_" + index;
var _local7 = itemPokeMenu.container;
_local7[_local4].setHp(_local1.hp, _local1.maxHp);
if (_local5 == 0) {
itemPokeMenu.close();
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
break;
case "mega_potion" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
_local9 = "Select a pokemon to heal.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local10 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local6, _local2, {parentMenu:item_menu, party_obj:_local10});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local3 = getNickname(_local1);
if (_local1.hp <= 0) {
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local8 = _local3 + " needs to be revived first.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local6, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else if (_local1.hp == _local1.maxHp) {
var _local2 = nextDepth(HUD);
var _local6 = "menu_" + _local2;
var _local8 = _local3 + " isn't hurt.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local6, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else {
var _local5 = RAM_F.items.removeItem("mega_potion");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound/heal.mp3");
_local1.hp = _local1.hp + (_local1.maxHp / 2);
_local1.hp = ((_local1.hp > _local1.maxHp) ? _local1.maxHp : _local1.hp);
var _local4 = "stat_" + index;
var _local7 = itemPokeMenu.container;
_local7[_local4].setHp(_local1.hp, _local1.maxHp);
if (_local5 == 0) {
itemPokeMenu.close();
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
break;
case "revive" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
_local9 = "Select a pokemon to heal.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local2 = nextDepth(HUD);
var _local5 = "menu_" + _local2;
var _local10 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local5, _local2, {parentMenu:item_menu, party_obj:_local10});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local6 = getNickname(_local1);
if (_local1.hp > 0) {
var _local2 = nextDepth(HUD);
var _local5 = "menu_" + _local2;
var _local8 = _local6 + " hasn't fainted.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local2, {parentMenu:itemPokeMenu, text:_local8});
prompt2Menu._y = 80;
} else {
var _local4 = RAM_F.items.removeItem("revive");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound/heal.mp3");
_local1.hp = _local1.maxHp;
var _local3 = "stat_" + index;
var _local7 = itemPokeMenu.container;
_local7[_local3].setHp(_local1.hp, _local1.maxHp);
if (_local4 == 0) {
itemPokeMenu.close();
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
break;
case "antidote" :
descMenu.text = "No need. Poison doesn't last outside of battle";
break;
case "parlz" :
descMenu.text = RAM_F.getNickname("Jessie") + ": You don't use this outside a battle!";
break;
case "parlz_heal" :
descMenu.text = RAM_F.getNickname("Oak") + ": No need to use this outside a battle.";
break;
case "air_horn" :
descMenu.text = RAM_F.getNickname("Oak") + ": This is a battle item.";
break;
case "bull_horn" :
descMenu.text = "Hippie: You only use this in war, man!";
break;
case "fan_art" :
descMenu.text = RAM_F.getNickname("Humbird0") + ": Use this in a battle.";
break;
case "lawn_mower" :
HUD.closeAll();
LOOP.pauseSet("player", false);
LOOP.pauseSet("sprites", false);
SPRITES.player.lawnMower.start();
break;
case "c4" :
descMenu.text = RAM_F.getNickname("Snake") + ": Some things are only meant for battle.";
break;
case "tm_strength" :
descMenu.text = "Auto-use. 'Talk' to a rock to move or break it.";
break;
case "tm_cut" :
descMenu.text = "Auto-use. Just 'talk' to a tree to cut it.";
break;
case "tm_swim" :
descMenu.text = "Auto-use. 'Talk' to water to start swimming.";
break;
case "pokedax" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
var _local10 = HUD.attachMovie("pokedax_menu", _local6, _local4, {parentMenu:item_menu});
break;
case "camera" :
descMenu.text = RAM_F.getNickname("Jenny") + ": No need to use it. It works automatically!";
break;
case "boulder_badge" :
descMenu.text = RAM_F.getNickname("Brock") + ": It doesn't actually do anything.";
break;
case "cascade_badge" :
descMenu.text = ((RAM_F.getNickname("Misty") + ": ") + RAM_F.getNickname("Ash")) + "! You can't use that!";
break;
case "thunder_badge" :
descMenu.text = RAM_F.getNickname("Snake") + ": In the field, this is useless.";
break;
case "rainbow_badge" :
descMenu.text = RAM_F.getNickname("Erika") + ": You can't use it. It just looks pretty.";
break;
case "marsh_badge" :
descMenu.text = RAM_F.getNickname("Sabrina") + ": It's not meant to be used...";
break;
case "soul_badge" :
descMenu.text = RAM_F.getNickname("Koga") + ": Fool! It's only a key item!";
break;
case "volcano_badge" :
descMenu.text = RAM_F.getNickname("Blane") + ": It doesn't do anything.";
break;
case "earth_badge" :
descMenu.text = RAM_F.getNickname("Giovanni") + ": It's a mere tricket. You cannot use it!";
break;
case "fire_stone" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
_local9 = "Select an Eevee to evolve.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local9 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local5, _local3, {parentMenu:item_menu, party_obj:_local9});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local6 = getNickname(_local1);
if (_local1.id != "eevee") {
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local7 = "Fire Stones can only be used on Eevee's.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local3, {parentMenu:itemPokeMenu, text:_local7});
prompt2Menu._y = 80;
} else {
var _local4 = RAM_F.items.removeItem("fire_stone");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound\\evolve.mp3");
_local1.id = "flareon";
var _local2 = "stat_" + index;
_local6 = getNickname(_local1);
itemPokeMenu[_local2].setName(_local6);
itemPokeMenu[_local2]._brightness = 100;
ZigoEngine.doTween(itemPokeMenu[_local2], "_brightness", 0, 1, "easeInQuad");
if (_local4 == 0) {
itemPokeMenu.close();
}
if (RAM.pokedex.flareon == undefined) {
RAM_F.pokedex.addPokemon("flareon");
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local7 = "A new pokemon has been added to your pokedax!";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local3, {parentMenu:itemPokeMenu, text:_local7});
prompt2Menu._y = 160;
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
break;
case "water_stone" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
_local9 = "Select an Eevee to evolve.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local9 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local5, _local3, {parentMenu:item_menu, party_obj:_local9});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local6 = getNickname(_local1);
if (_local1.id != "eevee") {
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local7 = "Water Stones can only be used on Eevee's.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local3, {parentMenu:itemPokeMenu, text:_local7});
prompt2Menu._y = 80;
} else {
var _local4 = RAM_F.items.removeItem("water_stone");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound\\volve.mp3");
_local1.id = "vaporeon";
var _local2 = "stat_" + index;
_local6 = getNickname(_local1);
itemPokeMenu[_local2].setName(_local6);
itemPokeMenu[_local2]._brightness = 100;
ZigoEngine.doTween(itemPokeMenu[_local2], "_brightness", 0, 1, "easeInQuad");
if (_local4 == 0) {
itemPokeMenu.close();
}
if (RAM.pokedex.vaporeon == undefined) {
RAM_F.pokedex.addPokemon("vaporeon");
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local7 = "A new pokemon has been added to your pokedax!";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local3, {parentMenu:itemPokeMenu, text:_local7});
prompt2Menu._y = 160;
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
break;
case "thunder_stone" :
_local4 = nextDepth(HUD);
_local6 = "menu_" + _local4;
_local9 = "Select an Eevee to evolve.";
promptMenu = HUD.attachMovie("battleDesc_menu", _local6, _local4, {parentMenu:item_menu, text:_local9});
promptMenu._y = 80;
promptMenu.selectItem = function () {
promptMenu.close();
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local9 = RAM.pokemon;
itemPokeMenu = HUD.attachMovie("currentPokemon_menu", _local5, _local3, {parentMenu:item_menu, party_obj:_local9});
itemPokeMenu.selectItem = function (index) {
var _local1 = RAM.pokemon[index];
var _local6 = getNickname(_local1);
if (_local1.id != "eevee") {
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local7 = "Thunder Stones can only be used on Eevee's.";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local3, {parentMenu:itemPokeMenu, text:_local7});
prompt2Menu._y = 80;
} else {
var _local4 = RAM_F.items.removeItem("thunder_stone");
restockItemShop();
buildItemList();
item_menu.setup(itemList_array);
SOUND.play("sound\\evolve.mp3");
_local1.id = "jolteon";
var _local2 = "stat_" + index;
_local6 = getNickname(_local1);
itemPokeMenu[_local2].setName(_local6);
itemPokeMenu[_local2]._brightness = 100;
ZigoEngine.doTween(itemPokeMenu[_local2], "_brightness", 0, 1, "easeInQuad");
if (_local4 == 0) {
itemPokeMenu.close();
}
if (RAM.pokedex.jolteon == undefined) {
RAM_F.pokedex.addPokemon("jolteon");
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
var _local7 = "A new pokemon has been added to your pokedax!";
prompt2Menu = HUD.attachMovie("battleDesc_menu", _local5, _local3, {parentMenu:itemPokeMenu, text:_local7});
prompt2Menu._y = 160;
}
}
};
};
promptMenu.cancel = promptMenu.selectItem;
}
};
break;
case "equipment" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
buildEquipList = function () {
equipList_array = [];
for (var _local1 in RAM.equipment) {
if (RAM.equipment[_local1] > 0) {
var _local2 = _local1.toUpperCase();
_local2 = _local2.split("_").join(" ");
var _local4 = RAM.equipment[_local1];
var _local3 = _local1;
equipList_array.push({name:_local2, quantity:_local4, id:_local3});
}
}
equipList_array.push({name:"- Remove item -", quantity:null, id:""});
equipList_array.sortOn("id");
};
buildEquipList();
var equip_menu = HUD.attachMovie("list_menu", _local18, _local12, {parentMenu:fieldMenu, list_array:equipList_array});
equip_menu._x = 160;
equip_menu._y = fieldMenu._y + 16;
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var descMenu = HUD.attachMovie("desc_menu", _local18, _local12);
descMenu._y = 208;
equip_menu.highlight = function (index) {
var _local2 = equipList_array[index].id;
var _local1 = ROM.equipment[_local2].description;
if (_local1 == undefined) {
_local1 = "";
}
descMenu.text = _local1;
};
equip_menu.cancel = function () {
delete equipList_array;
descMenu.close();
};
equip_menu.selectItem = function (equipIndex) {
thisEquip = equipList_array[equipIndex].id;
var _local9 = nextDepth(HUD);
var _local10 = "menu_" + _local9;
buildPokemonList = function () {
pokemonList_array = new Array();
var _local1 = 0;
while (_local1 < RAM.pokemon.length) {
var _local2 = RAM.pokemon[_local1].id;
_local2 = _local2.charAt(0).toUpperCase() + _local2.substr(1);
_local2 = RAM_F.getNickname(_local2);
pokemonList_array.push({name:_local2});
_local1++;
}
};
buildPokemonList();
var pokemonMenu = HUD.attachMovie("simpleList_menu", _local10, _local9, {parentMenu:this, list_array:pokemonList_array});
pokemonMenu._x = 208;
pokemonMenu._y = equip_menu._y + 16;
pokemonMenu.selectItem = function (index) {
var _local4 = RAM.pokemon[index];
var _local2 = _local4.heldItem;
if (thisEquip != _local2) {
_local4.heldItem = thisEquip;
RAM_F.equipment.removeItem(thisEquip);
RAM_F.equipment.addItem(_local2);
buildEquipList();
equip_menu.setup(equipList_array);
}
var _local3 = _local4.id.charAt(0).toUpperCase() + _local4.id.substr(1);
_local3 = RAM_F.getNickname(_local3);
var _local1 = thisEquip;
_local1 = _local1.split("_").join(" ");
_local1 = _local1.charAt(0).toUpperCase() + _local1.substr(1);
if (_local1 != "") {
descMenu.text = ((_local3 + " now has the ") + _local1) + ".";
} else if ((_local1 == "") && (_local2 != "")) {
descMenu.text = ((("Removed " + _local3) + "'s ") + _local2) + ".";
} else if ((_local1 == "") && (_local2 == "")) {
descMenu.text = _local3 + " didn't have anything.";
}
delete thisEquip;
delete pokemonList_array;
pokemonMenu.close();
};
pokemonMenu.cancel = function () {
delete thisEquip;
delete pokemonList_array;
};
pokemonMenu.highlight = function (index) {
var _local1 = RAM.pokemon[index].heldItem;
_local1 = _local1.split("_").join(" ");
_local1 = _local1.substr(0, 1).toUpperCase() + _local1.substr(1);
var _local2 = RAM.pokemon[index].id;
_local2 = _local2.substr(0, 1).toUpperCase() + _local2.substr(1);
_local2 = RAM_F.getNickname(_local2);
if ((_local1 != "") && (_local1 != undefined)) {
descMenu.text = ((_local2 + " is holding a ") + _local1) + ".";
} else {
descMenu.text = _local2 + " isn't holding anything.";
}
};
};
break;
case "photos" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var _local33 = HUD.attachMovie("photo_menu", _local18, _local12, {parentMenu:fieldMenu, pictures:RAM.photos});
break;
case "badges" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var _local14 = HUD.attachMovie("badges_menu", _local18, _local12, {parentMenu:fieldMenu});
_local14._x = 112;
_local14._y = 88;
break;
case "save" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var _local32 = HUD.attachMovie("save_menu", _local18, _local12, {parentMenu:fieldMenu});
break;
case "load" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var _local16 = HUD.attachMovie("load_menu", _local18, _local12, {parentMenu:fieldMenu});
_local16.selectItem = function () {
HUD.closeAll();
};
break;
case "options" :
_local12 = nextDepth(HUD);
_local18 = "menu_" + _local12;
var _local27 = HUD.attachMovie("options_menu", _local18, _local12, {parentMenu:fieldMenu});
}
};
}
};
Symbol 453 MovieClip [battle_mc] Frame 1
!!!ERROR
Symbol 453 MovieClip [battle_mc] Frame 2
delete _global.BATTLE;
LOOP.pauseSet("renderMap", false);
stop();
onUnload();
onClose();
var removeLater = function (_this) {
_this.removeMovieClip();
_this.unloadMovie();
};
setTimeout(removeLater, 1, this);
Symbol 454 MovieClip [breakObject] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
_this = this;
tile = tile || ({});
tile.tileSize = 16;
tile.offset = tile.offset || ({});
tile.offset.x = 0;
tile.offset.y = 0;
get_xTile = function () {
return(Math.floor(_x / tile.tileSize));
};
set_xTile = function (newValue) {
_x = ((newValue * tile.tileSize) + tile.offset.x);
};
tile.addProperty("x", get_xTile, set_xTile);
get_yTile = function () {
return(Math.floor((_y - (tile.offset.y / 2)) / tile.tileSize));
};
set_yTile = function (newValue) {
_y = ((newValue * tile.tileSize) + tile.offset.y);
};
tile.addProperty("y", get_yTile, set_yTile);
var xTile = tile.x;
var yTile = tile.y;
originalCollision = MAP.collision_array[xTile][yTile];
MAP.collision_array[xTile][yTile] = 1;
image = newSprite(data.initialAppearance, this, "image", 0);
image._y = 8;
breakObject = function () {
_this.noCollide = true;
MAP.collision_array[xTile][yTile] = originalCollision;
if (data.sound == undefined) {
data.sound = "sound\\break_rock.mp3";
}
SOUND.play(data.sound);
image.setParams({isAnimating:true});
var _local1 = function () {
_this.remove();
};
setTimeout(_local1, 66.6666666666667 * (image.internal.frames - 1));
};
talk = function () {
if (RAM.items.tm_strength > 0) {
breakObject();
} else {
LOOP.pauseSet("player", true);
LOOP.pauseSet("sprites", true);
LOOP.pauseSet("fieldMenu", true);
var _local1 = nextDepth(HUD);
var _local2 = "menu_" + _local1;
var _local3 = HUD.attachMovie("textbox_mc", _local2, _local1, {parentMenu:HUD, background:"swf\\win_default.png", text:"You're not strong enough to break this."});
_local3.onClose = function () {
LOOP.pauseSet("player", false);
LOOP.pauseSet("sprites", false);
LOOP.pauseSet("fieldMenu", false);
};
}
};
init_useMapCollision = useMapCollision || null;
get_useMapCollision = function () {
return(_useMapCollision);
};
set_useMapCollision = function (newValue) {
_useMapCollision = getImpliedValue(newValue);
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 1;
} else if (_useMapCollision == false) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
this.addProperty("useMapCollision", get_useMapCollision, set_useMapCollision);
useMapCollision = init_useMapCollision;
gridCollide_obj = {lastX:null, lastY:null, loop:function () {
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
if ((_local2 != this.lastX) || (_local3 != this.lastY)) {
SPRITE_GRID.remove(this.lastX, this.lastY, _this);
SPRITE_GRID.add(_local2, _local3, _this);
if ((SPRITES.player.tile.x == this.lastX) && (SPRITES.player.tile.y == this.lastY)) {
SPRITE_GRID.gridLeave(_local2, _local3);
}
if ((SPRITES.player.tile.x == _local2) && (SPRITES.player.tile.y == _local3)) {
SPRITE_GRID.gridCollide(_local2, _local3);
}
}
this.lastX = _local2;
this.lastY = _local3;
}};
gridCollide_obj.loop();
onUnload = function () {
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
SPRITE_GRID.remove(tile.x, tile.y, _this);
};
Symbol 455 MovieClip [cutTree] Frame 1
function onUnload() {
image_mc.removeEventListener("complete", adjustPos);
image_mc.removeEventListener("complete", waitVanish);
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
SPRITE_GRID.remove(tile.x, tile.y, _this);
}
_this = this;
tile = tile || ({});
tile.tileSize = 16;
tile.offset = tile.offset || ({});
tile.offset.x = 0;
tile.offset.y = 0;
get_xTile = function () {
return(Math.floor(_x / tile.tileSize));
};
set_xTile = function (newValue) {
_x = ((newValue * tile.tileSize) + tile.offset.x);
};
tile.addProperty("x", get_xTile, set_xTile);
get_yTile = function () {
return(Math.floor((_y - (tile.offset.y / 2)) / tile.tileSize));
};
set_yTile = function (newValue) {
_y = ((newValue * tile.tileSize) + tile.offset.y);
};
tile.addProperty("y", get_yTile, set_yTile);
adjustPos = function () {
image_mc._x = -(image_mc._width / 2);
image_mc._y = (-image_mc._height) + yOffset;
image_mc._alpha = 100;
};
waitVanish = function () {
_this.onEnterFrame = function () {
if (image_mc.image_mc == undefined) {
_this.onEnterFrame = null;
_this.remove();
}
};
};
error = function () {
trace("ERROR: cutTree file missing");
_this.onEnterFrame = null;
_this.remove();
};
yOffset = 8;
image_mc.removeEventListener("complete", adjustPos);
image_mc.addEventListener("complete", adjustPos);
image_mc.file = "swf\\cutTree\\cutTree.png";
breakObject = function () {
_this.noCollide = true;
SOUND.play("sound\\cut_tree.mp3");
image_mc.removeEventListener("complete", waitVanish);
image_mc.addEventListener("complete", waitVanish);
image_mc.file = "swf\\cutTree\\cutTreeAnim.swf";
};
talk = function () {
if (RAM.items.tm_cut > 0) {
breakObject();
} else {
LOOP.pauseSet("player", true);
LOOP.pauseSet("sprites", true);
LOOP.pauseSet("fieldMenu", true);
var _local1 = nextDepth(HUD);
var _local2 = "menu_" + _local1;
var _local3 = HUD.attachMovie("textbox_mc", _local2, _local1, {parentMenu:HUD, background:"swf\\win_default.png", text:"You need an item to cut this."});
_local3.onClose = function () {
LOOP.pauseSet("player", false);
LOOP.pauseSet("sprites", false);
LOOP.pauseSet("fieldMenu", false);
};
}
};
gridCollide_obj = {lastX:null, lastY:null, loop:function () {
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
if ((_local2 != this.lastX) || (_local3 != this.lastY)) {
SPRITE_GRID.remove(this.lastX, this.lastY, _this);
SPRITE_GRID.add(_local2, _local3, _this);
if ((SPRITES.player.tile.x == this.lastX) && (SPRITES.player.tile.y == this.lastY)) {
SPRITE_GRID.gridLeave(_local2, _local3);
}
if ((SPRITES.player.tile.x == _local2) && (SPRITES.player.tile.y == _local3)) {
SPRITE_GRID.gridCollide(_local2, _local3);
}
}
this.lastX = _local2;
this.lastY = _local3;
}};
gridCollide_obj.loop();
init_useMapCollision = useMapCollision || null;
get_useMapCollision = function () {
return(_useMapCollision);
};
set_useMapCollision = function (newValue) {
_useMapCollision = getImpliedValue(newValue);
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 1;
} else if (_useMapCollision == false) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
this.addProperty("useMapCollision", get_useMapCollision, set_useMapCollision);
useMapCollision = init_useMapCollision;
Instance of Symbol 157 MovieClip [imageLoader] "image_mc" in Symbol 455 MovieClip [cutTree] Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = false;
enabled = true;
visible = true;
}
Symbol 456 MovieClip [grassFight] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
isGrassFight = true;
collisionId = 3;
noCollide = true;
_this = this;
tile = tile || ({});
tile.tileSize = 16;
tile.offset = tile.offset || ({});
tile.offset.x = 0;
tile.offset.y = 0;
get_xTile = function () {
return(Math.floor(_x / tile.tileSize));
};
set_xTile = function (newValue) {
_x = ((newValue * tile.tileSize) + tile.offset.x);
};
tile.addProperty("x", get_xTile, set_xTile);
get_yTile = function () {
return(Math.floor((_y - (tile.offset.y / 2)) / tile.tileSize));
};
set_yTile = function (newValue) {
_y = ((newValue * tile.tileSize) + tile.offset.y);
};
tile.addProperty("y", get_yTile, set_yTile);
if (brightness) {
init_brightness = brightness;
} else if ((this.transform.colorTransform.redMultiplier == this.transform.colorTransform.greenMultiplier) && (this.transform.colorTransform.redMultiplier == this.transform.colorTransform.blueMultiplier)) {
init_brightness = (this.transform.colorTransform.redOffset * 100) / 255;
} else {
init_brightness = 0;
}
get_brightness = function () {
return(this.transform.colorTransform.redOffset);
};
set_brightness = function (newValue) {
var _local3 = _alpha / 100;
var _local2 = (newValue * 255) / 100;
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, _local3, _local2, _local2, _local2, 0);
};
this.addProperty("brightness", get_brightness, set_brightness);
brightness = init_brightness;
delete init_brightness;
delete get_brightness;
delete set_brightness;
var settings = {charset:"charset\\objects\\poke_bushes.png", frames:2, delay:3, isAnimating:false};
image = newSprite(settings, this, "image", 0);
image._y = 8;
image._visible = false;
canMove = function () {
var _local1 = false;
var _local3 = Math.floor(_x / 16);
var _local2 = Math.floor(_y / 16);
var _local4 = MAP.collision_array[_local3][_local2 - 1];
if (_local4 == 3) {
_local1 = true;
}
_local4 = MAP.collision_array[_local3 + 1][_local2];
if (_local4 == 3) {
_local1 = true;
}
_local4 = MAP.collision_array[_local3][_local2 + 1];
if (_local4 == 3) {
_local1 = true;
}
_local4 = MAP.collision_array[_local3 - 1][_local2];
if (_local4 == 3) {
_local1 = true;
}
return(_local1);
};
moveWait = null;
moveLoop = function (_this) {
if (!_this.isPaused) {
movePart1 = function (_this) {
_this.image._visible = true;
if (canMove()) {
moveWait = setTimeout(movePart2, 100, _this);
} else {
moveWait = setTimeout(movePart3, 100, _this);
}
};
movePart2 = function (_this) {
do {
var _local4 = Math.floor(Math.random() * 4);
var _local1 = new flash.geom.Point(0, 0);
switch (_local4) {
case 0 :
_local1.y = _local1.y - 1;
break;
case 1 :
_local1.x = _local1.x + 1;
break;
case 2 :
_local1.y = _local1.y + 1;
break;
case 3 :
_local1.x = _local1.x - 1;
}
var _local6 = Math.floor(_this._x / 16) + _local1.x;
var _local5 = Math.floor(_this._y / 16) + _local1.y;
var _local3 = MAP.collision_array[_local6][_local5];
var isValid = (_local3 == _this.collisionId);
} while (isValid == false);
_x = (_x + (_local1.x * 16));
_y = (_y + (_local1.y * 16));
moveWait = setTimeout(movePart3, 100, _this);
};
movePart3 = function (_this) {
_this.image._visible = false;
delete movePart1;
delete movePart2;
delete movePart3;
};
movePart1(_this);
}
};
moveInterval = setInterval(moveLoop, data.moveFreq * 1000, this);
oldMusic = null;
encounterLoop = function (_this) {
if (!_this.isPaused) {
var _local3 = SPRITES.player;
var _local2 = new flash.geom.Point(0, 0);
_local3.localToGlobal(_local2);
var _local5 = _this.hit.hitTest(_local2.x, _local2.y, false);
if (_local5) {
_local3.lawnMower.stop(true);
_this.oldMusic = MUSIC.songName;
MUSIC.play(data.music);
var _local4 = 2;
var _local1 = ROOT.attachMovie("battle_mc", "battle_mc", _local4, {background:data.background, opponent_array:data.opponent_array, canRun:data.canRun});
_local1.win = function () {
MUSIC.play(_this.oldMusic);
_this.remove();
};
_local1.caught = _local1.win;
_local1.run = _local1.win;
_local1.lose = function () {
ROOT.gameOver();
};
}
}
};
encounterInterval = setInterval(encounterLoop, 100, this);
onUnload = function () {
clearTimeout(moveWait);
clearInterval(moveInterval);
clearInterval(encounterInterval);
SPRITE_GRID.remove(tile.x, tile.y, _this);
};
Symbol 457 MovieClip [storage] Frame 1
var getNickname = function (pokeObj) {
var _local1 = "";
if (pokeObj.nickname) {
_local1 = pokeObj.nickname;
_local1 = _local1.substr(0, 1).toUpperCase() + _local1.substr(1);
} else {
_local1 = pokeObj.id;
_local1 = _local1.substr(0, 1).toUpperCase() + _local1.substr(1);
_local1 = RAM_F.getNickname(_local1);
}
return(_local1);
};
talk = function () {
openMenu();
};
openMenu = function () {
LOOP.pauseSet("player", true);
LOOP.pauseSet("fieldMenu", true);
LOOP.pauseSet("sprites", true);
list_array = [{name:"Deposit", id:"deposit"}, {name:"Withdraw", id:"withdraw"}, {name:"Release", id:"release"}];
var _local3 = nextDepth(HUD);
var _local5 = "menu_" + _local3;
storageOptionsMenu = HUD.attachMovie("simpleList_menu", _local5, _local3, {parentMenu:HUD, list_array:list_array, winBorder:"winXp"});
storageOptionsMenu._x = 208;
storageOptionsMenu.selectItem = function (index) {
var _local9 = list_array[index].id;
switch (_local9) {
case "deposit" :
var cleanUpDeposit = function () {
delete noDepositMenu;
delete depositMenu;
delete refuseDeposit;
delete getSelfRefuse;
delete getPikaRefuse;
};
var getSelfRefuse = function () {
var _local1 = RAM_F.getNickname(RAM.playingAs || "Ash");
_local1 = _local1.charAt(0).toUpperCase() + _local1.substr(1);
return(_local1 + ": That would be a very bad idea.");
};
var getPikaRefuse = function () {
var _local2 = RAM_F.getNickname(RAM.playingAs || "Ash");
if (RAM.pokemon[1].nickname) {
var _local1 = RAM.pokemon[1].nickname;
} else {
var _local1 = RAM.pokemon[1].id;
_local1 = _local1.substr(0, 1).toUpperCase() + _local1.substr(1);
_local1 = RAM_F.getNickname(_local1);
}
return(((_local2 + ": I'm NOT putting ") + _local1) + " in storage!");
};
var refuseDeposit = function (message) {
var _local1 = nextDepth(HUD);
var _local2 = "menu_" + _local1;
noDepositMenu = HUD.attachMovie("battleDesc_menu", _local2, _local1, {parentMenu:depositMenu || (storageOptionsMenu), text:message});
noDepositMenu.selectItem = function () {
noDepositMenu.close();
};
};
if (RAM.pokemon.length > 2) {
var _local4 = nextDepth(HUD);
var _local7 = "menu_" + _local4;
depositMenu = HUD.attachMovie("currentPokemon_menu", _local7, _local4, {parentMenu:storageOptionsMenu, party_obj:RAM.pokemon, winBorder:"winXp"});
depositMenu.cancel = function () {
depositMenu.close();
cleanUpDeposit();
};
depositMenu.selectItem = function (index) {
if (index == 0) {
refuseDeposit(getSelfRefuse());
} else if (index == 1) {
refuseDeposit(getPikaRefuse());
} else {
var _local2 = RAM.pokemon[index];
RAM.storage.push(_local2);
RAM.pokemon.splice(index, 1);
depositMenu.close();
cleanUpDeposit();
}
};
} else if (RAM.pokemon[1]) {
refuseDeposit(getPikaRefuse());
} else {
var _local6 = "You don't have any pokemon!";
refuseDeposit(_local6);
}
break;
case "withdraw" :
if ((RAM.pokemon.length < 6) && (RAM.storage.length > 0)) {
var _local4 = nextDepth(HUD);
var _local7 = "menu_" + _local4;
withdrawMenu = HUD.attachMovie("currentPokemon_menu", _local7, _local4, {parentMenu:storageOptionsMenu, party_obj:RAM.storage, winBorder:"winXp"});
withdrawMenu.cancel = function () {
withdrawMenu.close();
};
withdrawMenu.selectItem = function (index) {
var _local1 = RAM.storage[index];
RAM.pokemon.push(_local1);
RAM.storage.splice(index, 1);
withdrawMenu.close();
};
} else {
var _local4 = nextDepth(HUD);
var _local7 = "menu_" + _local4;
if (RAM.pokemon.length == 6) {
var _local6 = "You can't hold any more pokemon!";
}
if (RAM.storage.length == 0) {
var _local6 = "You don't have any pokemon in storage!";
}
noWithdrawMenu = HUD.attachMovie("battleDesc_menu", _local7, _local4, {parentMenu:storageOptionsMenu, text:_local6, winBorder:"winXp"});
noWithdrawMenu.selectItem = function () {
noWithdrawMenu.close();
};
}
break;
case "release" :
if (RAM.storage.length > 0) {
var _local4 = nextDepth(HUD);
var _local7 = "menu_" + _local4;
releaseMenu = HUD.attachMovie("currentPokemon_menu", _local7, _local4, {parentMenu:storageOptionsMenu, party_obj:RAM.storage, winBorder:"winXp"});
releaseMenu.cancel = function () {
releaseMenu.close();
descMenu.close();
};
releaseMenu.selectItem = function (pokemonIndex) {
if (RAM.storage[pokemonIndex].nickname) {
var pokemonName = RAM.storage[pokemonIndex].nickname;
} else {
var pokemonName = RAM.storage[pokemonIndex].id;
pokemonName = RAM_F.getNickname(pokemonName);
}
var _local3 = ("This will release " + pokemonName) + "!\nAre you sure?";
var _local2 = nextDepth(HUD);
var _local4 = "menu_" + _local2;
descMenu = HUD.attachMovie("desc_menu", _local4, _local2, {winBorder:"winXp", _y:208, text:_local3});
_local2 = nextDepth(HUD);
_local4 = "menu_" + _local2;
choice_array = [{name:"No", id:"no"}, {name:"Yes", id:"yes"}];
confirmMenu = HUD.attachMovie("simpleList_menu", _local4, _local2, {parentMenu:releaseMenu, list_array:choice_array, winBorder:"winXp"});
confirmMenu.cancel = function () {
confirmMenu.close();
delete choice_array;
descMenu.close();
};
confirmMenu.selectItem = function (choiceIndex) {
var _local5 = choice_array[choiceIndex].id;
if (_local5 == "yes") {
var _local1 = RAM.storage[pokemonIndex].trainerId;
RAM_F.trainers.addTrainer(_local1);
RAM.trainers[_local1].caught = false;
RAM.trainers[_local1].wasCaught = true;
RAM.storage.splice(pokemonIndex, 1);
confirmMenu.close();
releaseMenu.close();
descMenu.close();
var _local2 = nextDepth(HUD);
var _local4 = "menu_" + _local2;
var _local3 = pokemonName + " has been released!";
prompt = HUD.attachMovie("battleDesc_menu", _local4, _local2, {parentMenu:storageOptionsMenu, text:_local3, winBorder:"winXp"});
SPRITES.updateSprites();
} else {
confirmMenu.close();
delete choice_array;
descMenu.close();
}
};
};
} else {
var _local4 = nextDepth(HUD);
var _local7 = "menu_" + _local4;
var _local6 = "You don't have any pokemon in storage!";
noWithdrawMenu = HUD.attachMovie("battleDesc_menu", _local7, _local4, {parentMenu:storageOptionsMenu, text:_local6, winBorder:"winXp"});
noWithdrawMenu.selectItem = function () {
noWithdrawMenu.close();
};
}
}
};
storageOptionsMenu.cancel = function () {
LOOP.pauseSet("player", false);
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseSet("sprites", false);
storageOptionsMenu.close();
delete storageOptionsMenu;
delete list_array;
};
};
Symbol 458 MovieClip [trainer] Frame 1
function newSprite(newSettings, newTarget, newName, newDepth) {
newTarget = (newTarget ? (newTarget) : this);
newName = (newName ? (newName) : ("sprite_" + Math.floor(Math.random() * 9999)));
while (newTarget[newName]) {
newName = "sprite_" + Math.floor(Math.random() * 9999);
}
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(newTarget)));
var _this = newTarget.createEmptyMovieClip(newName, newDepth);
_this.internal = {charset:"", direction:0, directions:1, frame:0, frames:1, pose:0, columns:1, rows:1, animType:"loop", animDirection:1, delay:4, isAnimating:true};
_this.copy = new flash.geom.Rectangle(0, 0, 16, 16);
_this.paste = new flash.geom.Point(0, 0);
_this.delayCounter = 0;
_this.loadNewCharset = function (file, callback) {
var _local1 = false;
var _local5 = function (new_pic) {
_this.charset_pic.dispose();
_this.charset_pic = new_pic;
_this.setSpriteSize();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
callback(_this.charset_pic);
};
var copyMovieClip = function () {
_this.charset_pic = new flash.display.BitmapData(_this.loader_mc._width, _this.loader_mc._height, true, 0);
_this.charset_pic.draw(_this.loader_mc);
_this.loader_mc._visible = false;
_this.loader_mc.removeMovieClip();
_this.setSpriteSize();
callback(_this.charset_pic);
};
if (file.generateFilterRect != undefined) {
_local5(file.clone());
return(undefined);
}
var _local4 = flash.display.BitmapData.loadBitmap(file);
_local1 = Boolean(_local4.width > 0);
if (_local1) {
_local5(_local4);
return(undefined);
}
_this.showPlaceHolder();
_this.charset_pic.dispose();
_this.loader_mc = _this.attachMovie(file, "loader_mc", 0, {_x:(-_this.spriteWidth) / 2, _y:-_this.spriteHeight, _visible:false});
_local1 = Boolean(_this.loader_mc != undefined);
if (_local1) {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
}
_this.loader_mc = _this.createEmptyMovieClip("loader_mc", 0);
_this.loader_mc._x = (-_this.spriteWidth) / 2;
_this.loader_mc._y = -_this.spriteHeight;
var _local3 = new MovieClipLoader();
_local3.onLoadComplete = function () {
_this.loader_mc._visible = false;
};
_local3.onLoadInit = function () {
copyMovieClip();
_this.hidePlaceHolder();
return(undefined);
};
_local3.loadClip(file, _this.loader_mc);
};
_this.setSpriteSize = function () {
var _local1 = false;
var _local3 = _this.spriteWidth;
var _local2 = _this.spriteHeight;
_this.spriteWidth = Math.floor((_this.charset_pic.width / _this.internal.columns) / _this.internal.frames);
_this.spriteHeight = Math.floor((_this.charset_pic.height / _this.internal.rows) / _this.internal.directions);
if (_this.spriteWidth > 0) {
if ((_local3 != _this.spriteWidth) || (_local2 != _this.spriteHeight)) {
_this.image_pic.dispose();
_this.image_pic = new flash.display.BitmapData(_this.spriteWidth, _this.spriteHeight, true, 0);
_this.image_mc = _this.createEmptyMovieClip("image_mc", 1);
_this.image_mc._x = (-_this.spriteWidth) / 2;
_this.image_mc._y = -_this.spriteHeight;
_this.image_mc.attachBitmap(_this.image_pic, 0);
_this.copy.width = _this.spriteWidth;
_this.copy.height = _this.spriteHeight;
_this.update();
_local1 = true;
_this.updateMask();
}
}
return(_local1);
};
_this.update = function () {
if (_this.spriteWidth > 0) {
var _local3 = _this.internal.pose % _this.internal.columns;
var _local2 = _this.spriteWidth * _this.internal.frames;
var _local7 = _local3 * _local2;
var _local4 = _this.internal.frame * _this.spriteWidth;
_this.copy.x = _local7 + _local4;
var _local5 = Math.floor(_this.internal.pose / _this.internal.columns);
var _local1 = _this.spriteHeight * _this.internal.directions;
var _local6 = _local5 * _local1;
var _local8 = _this.internal.direction * _this.spriteHeight;
_this.copy.y = _local6 + _local8;
_this.image_pic.copyPixels(_this.charset_pic, _this.copy, _this.paste);
}
};
_this.advanceFrame = function () {
if (_this.internal.frames > 1) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
if (_this.internal.animType == "yoyo") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = _this.internal.frames - 1;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame > 0) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.animDirection = _this.internal.animDirection * -1;
if (_this.internal.frame < (_this.internal.frames - 1)) {
_this.internal.frame = _this.internal.frame + _this.internal.animDirection;
}
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "loop") {
var _local1 = _this.internal.frame;
while (_this.internal.frame < 0) {
_this.internal.frame = _this.internal.frame + _this.internal.frames;
}
_this.internal.frame = _this.internal.frame % _this.internal.frames;
if (_local1 >= _this.internal.frames) {
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_local1 <= -1) {
_this.broadcastMessage("animDone");
_this.animDone();
}
} else if (_this.internal.animType == "once") {
if (_this.internal.frame >= _this.internal.frames) {
_this.internal.frame = 0;
} else if (_this.internal.frame == (_this.internal.frames - 1)) {
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
} else if (_this.internal.frame <= -1) {
_this.internal.frame = 0;
_this.internal.isAnimating = false;
_this.broadcastMessage("animDone");
_this.animDone();
}
}
} else {
_this.internal.frame = 0;
}
};
_this.getParams = function () {
var _local1 = {};
for (var _local2 in _this.internal) {
_local1[_local2] = _this.internal[_local2];
}
return(_local1);
};
_this.getParam = function (nam) {
return(_this.internal[nam]);
};
_this.setParams = function (new_settings) {
var detectStopAnim = function () {
if ((_this.internal.isAnimating == true) && (new_settings.isAnimating == false)) {
applyStopFrame();
}
};
var checkDirection = function () {
var _local1 = _this.internal.directions / 4;
if (_this.internal.direction.toLowerCase() == "up") {
_this.internal.direction = 0;
} else if (_this.internal.direction.toLowerCase() == "right") {
_this.internal.direction = Math.floor(1 * _local1);
} else if (_this.internal.direction.toLowerCase() == "down") {
_this.internal.direction = Math.floor(2 * _local1);
} else if (_this.internal.direction.toLowerCase() == "left") {
_this.internal.direction = Math.floor(3 * _local1);
}
while (_this.internal.direction < 0) {
_this.internal = _this.internal + _this.internal.directions;
}
_this.internal.direction = _this.internal.direction % _this.internal.directions;
};
var checkDelay = function () {
if (_this.internal.delay <= 0) {
_this.internal.delay = 0.1;
}
};
var checkPose = function () {
var _local1 = _this.internal.columns * _this.internal.rows;
if (_this.internal.pose >= _local1) {
_this.internal.pose = 0;
}
};
var checkFrame = function () {
if (_this.internal.frame >= _this.internal.frames) {
applyStopFrame();
}
};
var applyStopFrame = function () {
if (_this.internal.frames == 3) {
_this.internal.frame = 1;
} else {
_this.internal.frame = 0;
}
};
var _local5 = function () {
detectInvalidPose();
detectStopAnim();
for (var _local3 in new_settings) {
var _local1 = new_settings[_local3];
var _local2 = !isNaN(_local1);
if (_local2) {
_this.internal[_local3] = Number(_local1);
} else {
_this.internal[_local3] = _local1;
}
}
checkDirection();
checkFrame();
checkDelay();
checkPose();
var _local4 = _this.setSpriteSize();
if (!_local4) {
_this.update();
}
};
var _local8 = new_settings.charset != _this.internal.charset;
if (new_settings.charset && (_local8)) {
_this.loadNewCharset(new_settings.charset, function () {
_this.broadcastMessage("changeCharset");
_this.changeCharset();
});
_local5();
} else {
_local5();
_this.broadcastMessage("changeCharset");
_this.changeCharset();
}
};
_this.showPlaceHolder = function () {
_this.placeHolder_mc = _this.createEmptyMovieClip("placeHolder_mc", 2);
_this.placeHolder_mc._x = (-_this.spriteWidth) / 2;
_this.placeHolder_mc._y = -_this.spriteHeight;
_this.placeHolder_pic.dispose();
_this.placeHolder_pic = _this.image_pic.clone();
_this.placeHolder_mc.attachBitmap(_this.placeHolder_pic, 0);
_this.image_mc._visible = false;
};
_this.hidePlaceHolder = function () {
_this.placeHolder_pic.dispose();
_this.placeHolder_mc.removeMovieClip();
_this.image_mc._visible = show;
};
_this.isVisible = function () {
var _local1 = _this._visible && (_this._parent._visible);
var _local2 = (_this._alpha > 0) && (_this._parent._alpha > 0);
return(_local1 && (_local2));
};
_this.lookAtCoords = function () {
var _local5 = arguments[0];
var _local4 = arguments[1];
var _local3 = _local5 - _this._parent._x;
var _local2 = _local4 - _this._parent._y;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (_local2 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local3 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.lookAtSprite = function (clip2) {
_this.lookAtCoords(clip2._x, clip2._y);
};
_this.lookAt = function (sprite1, sprite2) {
var _local2 = sprite2._x - sprite1._x;
var _local1 = sprite2._y - sprite1._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local4 = _local2 / _local3;
var _local5 = _local1 / _local3;
if (Math.abs(_local5) > Math.abs(_local4)) {
if (_local5 < 0) {
_this.setParams({direction:"up"});
} else {
_this.setParams({direction:"down"});
}
} else if (_local4 < 0) {
_this.setParams({direction:"left"});
} else {
_this.setParams({direction:"right"});
}
};
_this.isFacing = function (checkDir) {
var _local2 = _this.internal.directions / 4;
if (checkDir.toLowerCase() == "up") {
checkDir = 0;
} else if (checkDir.toLowerCase() == "right") {
checkDir = Math.floor(1 * _local2);
} else if (checkDir.toLowerCase() == "down") {
checkDir = Math.floor(2 * _local2);
} else if (checkDir.toLowerCase() == "left") {
checkDir = Math.floor(3 * _local2);
}
while (checkDir < 0) {
checkDir = checkDir + _this.internal.directions;
}
checkDir = checkDir % _this.internal.directions;
return(_this.internal.direction == checkDir);
};
_this.set_charset = function (new_charset, newThis, callback) {
_this.loadNewCharset(new_charset, callback);
};
_this.set_direction = function (new_dir) {
_this.setParams({direction:new_dir});
};
_this.mask_mc = _this.createEmptyMovieClip("mask_mc", 3);
_this.mask_mc.beginFill(16711680, 0);
_this.mask_mc.lineTo(16, 0);
_this.mask_mc.lineTo(16, 16);
_this.mask_mc.lineTo(0, 16);
_this.mask_mc.lineTo(0, 0);
_this.mask_mc.endFill();
_this.updateMask = function () {
_this.mask_mc._x = (-_this.spriteWidth) / 2;
_this.mask_mc._y = -_this.spriteHeight;
_this.mask_mc._width = _this.spriteWidth;
_this.mask_mc._height = _this.spriteHeight;
};
_this.fps = 30;
_this.loop = function () {
var _local1 = _this._name != "";
if (_this.internal.isAnimating && (_this.isVisible())) {
_this.advanceFrame();
_this.update();
}
if (_local1) {
_this.loopInterval = setTimeout(_this.loop, (1000 / _this.fps) * _this.internal.delay);
}
};
_this.loop();
AsBroadcaster.initialize(_this);
_this.setParams(newSettings);
_this.onUnload = function () {
if (_this.loopInterval != undefined) {
clearTimeout(_this.loopInterval);
}
for (var _local1 in _this._listeners) {
_this._listeners[_local1] = null;
}
_this._listeners = [];
};
return(_this);
}
getImpliedValue = function (input) {
var _local2;
if ((input == "undefined") || (input == undefined)) {
_local2 = undefined;
} else if ((input == "true") || (input === true)) {
_local2 = Boolean(true);
} else if ((input == "false") || (input === false)) {
_local2 = Boolean(false);
} else if (isNaN(input) == false) {
_local2 = Number(input);
} else {
_local2 = input;
}
return(_local2);
};
resolveContainer = function (containerName, thisRef) {
thisRef = (thisRef ? (thisRef) : this);
var _local4 = _global[containerName];
if (containerName == "this") {
_local4 = thisRef;
}
if (containerName == "_root") {
_local4 = _root;
}
if (containerName == "_level0") {
_local4 = _root;
}
if (containerName == "_global") {
_local4 = _global;
}
return(_local4);
};
resolveContainerStr = function (containerName, thisName) {
thisName = (thisName ? (thisName) : "this");
var _local2 = null;
if (containerName == "this") {
_local2 = thisName;
}
if (containerName == "_root") {
_local2 = "_root";
}
if (containerName == "_level0") {
_local2 = "_root";
}
if (containerName == "_global") {
_local2 = "_global";
}
if (_global[containerName]) {
_local2 = containerName;
}
return(_local2);
};
evalPath = function (inputPath, defaultContainer_str, thisName) {
var thisName = (thisName ? (thisName) : "this");
if (typeof(inputPath) == "string") {
if (!defaultContainer_str) {
var defaultContainer_str = thisName;
}
var endAt = inputPath.indexOf(".");
if (endAt == -1) {
endAt = inputPath.length;
}
var container_str = inputPath.substr(0, endAt);
var container_str = resolveContainerStr(container_str, thisName);
if (!container_str) {
var container_str = defaultContainer_str;
endAt = -1;
}
var theRest = inputPath.substr(endAt + 1);
var fullPath = (theRest ? ((container_str + ".") + theRest) : (container_str));
var paramStart = fullPath.indexOf("(");
if (paramStart != -1) {
var paramEnd = fullPath.indexOf(")", paramStart + 1);
var param = fullPath.substring(paramStart + 1, paramEnd);
var functionPath = fullPath.substr(0, paramStart);
var thisFunction = eval (functionPath);
var param_array = String(param).split(",");
var i = 0;
while (i < param_array.length) {
param_array[i] = getImpliedValue(param_array[i]);
i++;
}
var output = thisFunction.apply(this, param_array);
} else {
var output = eval (fullPath);
}
} else {
var output = inputPath;
}
return(output);
};
nestedEval = function (inputPath, defaultContainer_str, thisName) {
if (typeof(inputPath) == "string") {
thisName = (thisName ? (thisName) : "this");
inputPath = String(inputPath);
var _local10 = "";
if (!defaultContainer_str) {
defaultContainer_str = "this";
}
var _local6 = inputPath.split("[");
var _local1 = _local6.length - 1;
while (_local1 > 0) {
var _local2 = _local6[_local1] + _local10;
var _local3 = _local2.indexOf("]");
_local10 = _local2.substr(_local3 + 1);
var _local5 = _local2.substr(0, _local3);
var _local4 = evalPath(_local5, defaultContainer_str, thisName);
_local10 = _local4 + _local10;
_local1--;
}
_local10 = _local6[0] + _local10;
} else {
var _local10 = inputPath;
}
return(_local10);
};
if (brightness) {
init_brightness = brightness;
} else if ((this.transform.colorTransform.redMultiplier == this.transform.colorTransform.greenMultiplier) && (this.transform.colorTransform.redMultiplier == this.transform.colorTransform.blueMultiplier)) {
init_brightness = (this.transform.colorTransform.redOffset * 100) / 255;
} else {
init_brightness = 0;
}
get_brightness = function () {
return(this.transform.colorTransform.redOffset);
};
set_brightness = function (newValue) {
var _local3 = _alpha / 100;
var _local2 = (newValue * 255) / 100;
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, _local3, _local2, _local2, _local2, 0);
};
this.addProperty("brightness", get_brightness, set_brightness);
brightness = init_brightness;
delete init_brightness;
delete get_brightness;
delete set_brightness;
_this = this;
var isCaught = RAM.trainers[data.trainerId].caught;
if (isCaught) {
this.removeMovieClip();
} else {
image = newSprite(data.initialAppearance, this, "image", 0);
image._y = 8;
var exclaimSettings = {charset:"charset\\objects\\poke_exclaim.png"};
exclaim = newSprite(exclaimSettings, this, "exclaim", 1);
exclaim._visible = false;
RAM_F.trainers.addTrainer(data.trainerId);
if (RAM.trainers[data.trainerId].position) {
_x = RAM.trainers[data.trainerId].position.x;
_y = RAM.trainers[data.trainerId].position.y;
image.setParams({direction:RAM.trainers[data.trainerId].position.direction});
} else {
RAM.trainers[data.trainerId].position = {x:_x, y:_y, direction:image.internal.direction};
}
var isDefeated = RAM.trainers[data.trainerId].defeated;
state = (isDefeated ? "defeated" : "looking");
loop = function () {
if (!isPaused) {
if (state != lastState) {
_this[lastState].end();
_this[state].init();
}
_this[state].loop();
lastState = state;
}
};
}
init_useMapCollision = useMapCollision || null;
get_useMapCollision = function () {
return(_useMapCollision);
};
set_useMapCollision = function (newValue) {
_useMapCollision = getImpliedValue(newValue);
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 1;
} else if (_useMapCollision == false) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
this.addProperty("useMapCollision", get_useMapCollision, set_useMapCollision);
useMapCollision = init_useMapCollision;
gridCollide_obj = {lastX:null, lastY:null, loop:function () {
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
if ((_local2 != this.lastX) || (_local3 != this.lastY)) {
SPRITE_GRID.remove(this.lastX, this.lastY, _this);
SPRITE_GRID.add(_local2, _local3, _this);
if ((SPRITES.player.tile.x == this.lastX) && (SPRITES.player.tile.y == this.lastY)) {
SPRITE_GRID.gridLeave(_local2, _local3);
}
if ((SPRITES.player.tile.x == _local2) && (SPRITES.player.tile.y == _local3)) {
SPRITE_GRID.gridCollide(_local2, _local3);
}
}
this.lastX = _local2;
this.lastY = _local3;
}};
gridCollide_obj.loop();
onUnload = function () {
SPRITE_GRID.remove(tile.x, tile.y, _this);
clearInterval(looking.lookInterval);
if (_useMapCollision == true) {
MAP.collision_array[_this.tile.x][_this.tile.y] = 0;
}
};
looking = {lookInterval:null, init:function () {
talk = function () {
image.lookAt(_this, SPRITES.player);
};
if (_this.data.lookAround) {
this.lookInterval = setInterval(this.lookAround, 1500);
}
}, loop:function () {
thisObj = this;
this.seePlayer();
}, end:function () {
clearInterval(this.lookInterval);
}, isSurrounded:function () {
var _local4 = false;
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
var getSpriteCollision = this.getSpriteCollision;
var _local5 = function (xTile, yTile) {
var _local1 = false;
if (MAP.collision_array[xTile][yTile] == 1) {
_local1 = true;
}
if (MAP.collision_array[xTile][yTile] == 2) {
_local1 = true;
}
if (MAP.collision_array[xTile][yTile] == undefined) {
_local1 = true;
}
if (getSpriteCollision(xTile, yTile)) {
_local1 = true;
}
return(_local1);
};
if (_local5(_local2, _local3 - 1)) {
if (_local5(_local2, _local3 + 1)) {
if (_local5(_local2 - 1, _local3)) {
if (_local5(_local2 + 1, _local3)) {
_local4 = true;
}
}
}
}
return(_local4);
}, getMapCollision:function (xTile, yTile) {
var _local1 = MAP.collision_array[xTile][yTile];
return(((_local1 == 1) || (_local1 == 2)) || (_local1 == undefined));
}, getSpriteCollision:function (xTile, yTile) {
var _local4 = false;
var _local3 = SPRITE_GRID[xTile][yTile];
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3[_local1];
if (_local2.noCollide != true) {
_local4 = true;
break;
}
_local1++;
}
return(_local4);
}, isBlocked:function (dir) {
var _local2 = Math.floor(_this._x / 16);
var _local3 = Math.floor(_this._y / 16);
switch (dir) {
case 0 :
_local3--;
break;
case 1 :
_local2++;
break;
case 2 :
_local3++;
break;
case 3 :
_local2--;
}
var _local5 = this.getMapCollision(_local2, _local3);
var _local4 = this.getSpriteCollision(_local2, _local3);
return(Boolean(_local5 || (_local4)));
}, lookAround:function () {
if (looking.isSurrounded()) {
var _local1 = Math.floor(Math.random() * 4);
} else {
do {
var _local1 = Math.floor(Math.random() * 4);
} while (looking.isBlocked(_local1));
}
_this.image.setParams({direction:_local1});
}, sawPlayer:false, searchDir:{x:0, y:0}, searchAt:{x:0, y:0}, seePlayer:function () {
if (!this.sawPlayer) {
var _local9 = _this.image.internal.direction;
switch (_local9) {
case 0 :
this.searchDir = new flash.geom.Point(0, -16);
break;
case 1 :
this.searchDir = new flash.geom.Point(16, 0);
break;
case 2 :
this.searchDir = new flash.geom.Point(0, 16);
break;
case 3 :
this.searchDir = new flash.geom.Point(-16, 0);
}
this.searchAt = new flash.geom.Point(_x, _y);
var _local8 = ((data.seeDistance != undefined) ? (data.seeDistance) : 6);
var _local6 = 0;
while (_local6 < _local8) {
this.searchAt = this.searchAt.add(this.searchDir);
var _local5 = Math.floor(this.searchAt.x / 16);
var _local4 = Math.floor(this.searchAt.y / 16);
if (this.getMapCollision(_local5, _local4)) {
break;
}
if (this.getSpriteCollision(_local5, _local4)) {
break;
}
var _local3 = this.searchAt.clone();
_parent.localToGlobal(_local3);
if (SPRITES.player.hit.hitTest(_local3.x, _local3.y, false)) {
var _local7 = true;
break;
}
_local6++;
}
if (_local7) {
this.sawPlayer = true;
this.approachPlayer();
}
}
}, approachPlayer:function () {
talk = null;
this.exclamationPoint(this);
}, originalMusic:"", exclamationPoint:function () {
LOOP.pauseSet("player", true);
LOOP.pauseSet("sprites", true);
LOOP.pauseSet("fieldMenu", true);
thisObj.originalMusic = MUSIC.songName;
MUSIC.stopMusic();
SOUND.play("sound\\cursor_select.mp3");
clearInterval(this.lookInterval);
_this.exclaim._visible = true;
var _local2 = function () {
ZigoEngine.doTween(_this.exclaim, "_y", -8, 0.1, "easeOutQuad", 0, bounceDown);
};
var bounceDown = function () {
ZigoEngine.doTween(_this.exclaim, "_y", 8, 0.1, "easeInQuad", 0, wait);
};
var wait = function () {
setTimeout(vanish, 500, thisObj);
};
var vanish = function () {
_this.exclaim._visible = false;
thisObj.approach(thisObj);
};
_local2();
}, approach:function () {
MUSIC.play(_this.data.encounterMusic);
var _local1 = thisObj.searchAt.subtract(thisObj.searchDir);
var _local2 = new flash.geom.Point(_x, _y);
var _local4 = flash.geom.Point.distance(_local2, _local1);
var _local5 = 0.26;
var _local3 = (_local5 * _local4) / 16;
_this.image.setParams({isAnimating:true});
_this.slideTo(_local1.x, _local1.y, _local3, "linear", 0, thisObj.preTalk);
}, preTalk:function () {
RAM.trainers[data.trainerId].position.x = _x;
RAM.trainers[data.trainerId].position.y = _y;
RAM.trainers[data.trainerId].position.direction = image.internal.direction;
_this.gridCollide_obj.loop();
_this.image.setParams({isAnimating:false});
var _local1 = nextDepth(HUD);
var _local2 = "menu_" + _local1;
var _local3 = nestedEval(_this.data.encounterText, "RAM", "_this");
var _local4 = HUD.attachMovie("textbox_mc", _local2, _local1, {parentMenu:HUD, background:"swf\\win_default.png", text:_local3, typeDelay:1});
_local4.onClose = function () {
thisObj.battle();
};
}, battle:function () {
MUSIC.play(data.battleMusic);
var _local10 = [];
var _local1 = 0;
while (_local1 < data.pokemon.length) {
var _local2 = {id:data.pokemon[_local1].id, level:data.pokemon[_local1].level, heldItem:data.pokemon[_local1].heldItem, trainerId:data.pokemon[_local1].trainerId};
_local10.push(_local2);
_local1++;
}
var _local7 = ROOT.attachMovie("battle_mc", "battle_mc", 2, {opponent_array:_local10, background:data.background, canRun:false, money:data.winMoney});
_local7.win = function () {
thisObj.afterTalk();
};
_local7.caught = _local7.win;
_local7.run = _local7.win;
_local7.lose = function () {
ROOT.gameOver();
};
}, afterTalk:function () {
MUSIC.play(thisObj.originalMusic);
var _local1 = function () {
thisObj.sawPlayer = false;
_this.state = "defeated";
RAM.trainers[data.trainerId].defeated = true;
LOOP.pauseSet("player", false);
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseSet("sprites", false);
};
if (RAM.trainers[data.trainerId].caught) {
_local1();
_this.removeMovieClip();
} else {
var _local2 = nextDepth(HUD);
var _local3 = "menu_" + _local2;
var _local4 = nestedEval(_this.data.winText, "RAM", "_this");
var _local5 = HUD.attachMovie("textbox_mc", _local3, _local2, {parentMenu:HUD, background:"swf\\win_default.png", text:_local4, typeDelay:1});
_local5.onClose = _local1;
}
}};
defeated = {init:function () {
talk = function () {
image.lookAt(_this, SPRITES.player);
RAM.trainers[data.trainerId].position.direction = image.internal.direction;
LOOP.pauseSet("player", true);
LOOP.pauseSet("fieldMenu", true);
LOOP.pauseSet("sprites", true);
var _local1 = nextDepth(HUD);
var _local2 = "menu_" + _local1;
var _local3 = nestedEval(_this.data.winText, "RAM", "_this");
var _local4 = HUD.attachMovie("textbox_mc", _local2, _local1, {parentMenu:HUD, background:"swf\\win_default.png", text:_local3, typeDelay:1});
_local4.onClose = function () {
LOOP.pauseSet("player", false);
LOOP.pauseSet("fieldMenu", false);
LOOP.pauseSet("sprites", false);
};
};
}};
Symbol 476 MovieClip [transition_pokeball] Frame 1
function doFadeOut() {
var vow = VOW.make();
_this.fadeOutDone = function () {
delete _this.fadeOutDone;
delete _this.remove;
vow.keep();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeOut");
return(vow.promise);
}
function doFadeIn() {
var vow = VOW.make();
_this.fadeInDone = function () {
delete _this.fadeInDone;
_this.remove();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeIn");
return(vow.promise);
}
stop();
stop();
_this = this;
Symbol 476 MovieClip [transition_pokeball] Frame 2
snapshot_pic = new flash.display.BitmapData(320, 240, false, 0);
snapshot_pic.draw(ROOT.game_mc);
mapImage_mc.attachBitmap(snapshot_pic, 0);
Symbol 476 MovieClip [transition_pokeball] Frame 42
stop();
_this.fadeOutDone();
Symbol 476 MovieClip [transition_pokeball] Frame 58
stop();
_this.fadeInDone();
Symbol 477 MovieClip [transition_fade] Frame 1
function doFadeOut() {
var vow = VOW.make();
_this.fadeOutDone = function () {
delete _this.fadeOutDone;
delete _this.remove;
vow.keep();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeOut");
return(vow.promise);
}
function doFadeIn() {
var vow = VOW.make();
_this.fadeInDone = function () {
delete _this.fadeInDone;
_this.remove();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeIn");
return(vow.promise);
}
stop();
stop();
_this = this;
Symbol 477 MovieClip [transition_fade] Frame 16
stop();
_this.fadeOutDone();
Symbol 477 MovieClip [transition_fade] Frame 31
stop();
_this.fadeInDone();
Symbol 478 MovieClip [transition_cut] Frame 1
function doFadeOut() {
var vow = VOW.make();
_this.fadeOutDone = function () {
delete _this.fadeOutDone;
delete _this.remove;
vow.keep();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeOut");
return(vow.promise);
}
function doFadeIn() {
var vow = VOW.make();
_this.fadeInDone = function () {
delete _this.fadeInDone;
_this.remove();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeIn");
return(vow.promise);
}
stop();
stop();
_this = this;
Symbol 478 MovieClip [transition_cut] Frame 2
stop();
_this = this;
snap_pic = new flash.display.BitmapData(320, 240, false, 0);
snap_pic.draw(ROOT.game_mc);
snap_mc = this.createEmptyMovieClip("snap_mc", 0);
snap_mc.attachBitmap(snap_pic, 0);
_this.fadeOutDone();
Symbol 478 MovieClip [transition_cut] Frame 9
stop();
this.fadeInDone();
snap_mc.removeMovieClip();
Symbol 479 MovieClip [intro_mc] Frame 1
stop();
_this = this;
MOOD_MC.mood = "none";
MUSIC.stop();
MUSIC.songVolume = 100;
done = function () {
Key.removeListener(key);
_this.image_mc.unloadMovie();
_this.gotoAndStop("title");
};
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
loader = loadImage("swf\\freakLogo.swf", this, "image_mc", 0);
success = function () {
image_mc.onClose = done;
};
if (!loader) {
success();
}
loader.onLoadInit = success;
loader.onLoadError = done;
key = {onKeyDown:function () {
done();
}};
Key.removeListener(key);
Key.addListener(key);
onPress = key.onKeyDown;
Symbol 479 MovieClip [intro_mc] Frame 6
stop();
_this = this;
MUSIC.stop();
MUSIC.songVolume = 100;
MUSIC.play("music\\title.mp3");
done = function () {
SOUND.play("sound\\cursor_cancel.mp3");
Key.removeListener(key);
_this.image_mc.unloadMovie();
_this.gotoAndStop("menu");
};
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
loader = loadImage("swf\\title.swf", this, "image_mc", 0);
success = function () {
image_mc.onClose = done;
};
if (!loader) {
success();
}
loader.onLoadInit = success;
loader.onLoadError = done;
key = {onKeyDown:function () {
done();
}};
Key.removeListener(key);
Key.addListener(key);
onPress = key.onKeyDown;
Symbol 479 MovieClip [intro_mc] Frame 11
_this = this;
MUSIC.fadeTo(0, 3);
delete onPress;
startList_array = [{name:"LOAD", id:"load"}, {name:"NEW", id:"new"}, {name:"CREDITS", id:"credits"}, {name:"TEST", id:"test"}];
var startMenu = _this.attachMovie("simpleList_menu", "startMenu", nextDepth(_this), {parentMenu:null, list_array:startList_array});
startMenu.selectItem = function (index) {
var _local20 = startList_array[index].id;
switch (_local20) {
case "load" :
var _local15 = nextDepth(_this);
var _local19 = "menu_" + _local15;
var loadMenu = _this.attachMovie("load_menu", _local19, _local15, {parentMenu:startMenu});
loadMenu.selectItem = function () {
loadMenu.close();
startMenu.close();
ROOT.intro_mc.removeMovieClip();
};
break;
case "new" :
startMenu.close();
LOOP.pauseSet("fieldMenu", false);
ROOT.resetRam();
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
copyObject(ROM.ram, _global.RAM);
ROOT.completeRam();
RAM.playerSprite = {};
emptyObject = function (inputObject) {
for (var _local2 in inputObject) {
delete inputObject[_local2];
}
};
getType = function (inputObject) {
var _local1 = "";
if (inputObject instanceof Function) {
_local1 = "function";
} else if (inputObject instanceof MovieClip) {
_local1 = "movieClip";
} else if (inputObject instanceof Array) {
_local1 = "array";
} else if (inputObject instanceof XMLNode) {
_local1 = "xml";
} else if (inputObject instanceof flash.display.BitmapData) {
_local1 = "bitmap";
} else if (inputObject instanceof Object) {
_local1 = "object";
} else {
_local1 = "variable";
}
return(_local1);
};
copyObject = function (srcObj, destObj) {
emptyObject(destObj);
var _local4 = {};
for (var _local6 in srcObj) {
_local4[_local6] = srcObj[_local6];
}
for (var _local6 in _local4) {
var _local1 = _local4[_local6];
var _local3 = getType(_local1);
if (_local3 == "variable") {
destObj[_local6] = _local1;
}
if (_local3 == "bitmap") {
destObj[_local6] = _local1.clone();
}
if (_local3 == "xml") {
destObj[_local6] = _local1.cloneNode(true);
}
if (_local3 == "array") {
destObj[_local6] = new Array();
copyObject(_local1, destObj[_local6]);
}
if (_local3 == "object") {
destObj[_local6] = new Object();
copyObject(_local1, destObj[_local6]);
}
}
};
copyObject(ROM.playerSprite, RAM.playerSprite);
RAM.intro = 1;
RAM_F.pokedex.addPokemon("ash");
RAM.pokedex.ash.caught = true;
RAM.pokedex.ash.lastPhoto = "swf\\pokemon\\ash\\front.png";
RAM_F.pokemon.addPokemon("ash");
RAM.pokemon.ash.trainerId = "ash";
ROOT.loadLevel(ROM.startingPlace.level, ROM.startingPlace);
ROOT.intro_mc.removeMovieClip();
break;
case "credits" :
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
loader = loadImage("swf\\credits.swf", _this, "credits_mc", nextDepth(_this));
success = function () {
var credits_mc = _this.credits_mc;
credits_mc.parentMenu = _this.startMenu;
Key.removeListener(credits_mc.parentMenu);
credits_mc.parentMenu.active = false;
Key.removeListener(credits_mc);
Key.addListener(credits_mc);
credits_mc.active = true;
credits_mc.close = function () {
Key.removeListener(credits_mc.parentMenu);
Key.addListener(credits_mc.parentMenu);
credits_mc.parentMenu.active = true;
Key.removeListener(credits_mc);
credits_mc.active = false;
credits_mc.removeMovieClip();
};
credits_mc.onClose = credits_mc.close;
};
loader.onLoadInit = success;
if (!loader) {
success();
}
loader.onLoadError = function () {
trace("fail");
};
break;
case "test" :
startMenu.close();
LOOP.pauseSet("fieldMenu", false);
var _local18 = "swf\\pictures\\test\\";
RAM.photos.joy1 = _local18 + "joy\\joy1.jpg";
RAM_F.pokedex.addPokemon("ash");
RAM.pokedex.ash.caught = true;
RAM.pokedex.ash.lastPhoto = "";
RAM_F.pokedex.addPokemon("pikachu");
RAM.pokedex.pikachu.caught = false;
RAM.pokedex.pikachu.lastPhoto = "swf\\pokemon\\pikachu\\front.png";
RAM_F.pokedex.addPokemon("eevee");
RAM.items.air_horn = 10;
RAM.items.air_horn = 10;
RAM.items.antidote = 10;
RAM.items.boulder_badge = 10;
RAM.items.bull_horn = 10;
RAM.items.camera = 10;
RAM.items.cascade_badge = 10;
RAM.items.earth_badge = 10;
RAM.items.fan_art = 10;
RAM.items.fire_stone = 10;
RAM.items.gold_nugget = 10;
RAM.items.marsh_badge = 10;
RAM.items.mega_potion = 10;
RAM.items.parlz = 10;
RAM.items.parlz_heal = 10;
RAM.items.pokeball = 10;
RAM.items.pokeboll = 10;
RAM.items.pokedax = 10;
RAM.items.potion = 10;
RAM.items.rainbow_badge = 10;
RAM.items.revive = 10;
RAM.items.rocketball = 10;
RAM.items.soul_badge = 10;
RAM.items.super_potion = 10;
RAM.items.thunder_badge = 10;
RAM.items.thunder_stone = 10;
RAM.items.tm_cut = 10;
RAM.items.tm_strength = 10;
RAM.items.tm_swim = 10;
RAM.items.volcano_badge = 10;
RAM.items.water_stone = 10;
RAM.equipment.angel_berry = 3;
RAM.equipment.anger_berry = 3;
RAM.equipment.anger_shield = 3;
RAM.equipment.armor = 3;
RAM.equipment.blood_money = 3;
RAM.equipment.exp_boost = 3;
RAM.equipment.first_strike = 9;
RAM.equipment.flame_lens = 3;
RAM.equipment.franklin_badge = 3;
RAM.equipment.guts = 3;
RAM.equipment.horn_berry = 3;
RAM.equipment.hp_berry = 3;
RAM.equipment.leech = 3;
RAM.equipment.parlz_berry = 3;
RAM.equipment.parlz_shield = 3;
RAM.equipment.pheramones = 3;
RAM.equipment.poison_berry = 3;
RAM.equipment.poison_shield = 3;
RAM.equipment.poison_touch = 3;
RAM.equipment.power_lens = 3;
RAM.equipment.psycho_lens = 3;
RAM.equipment.reflect = 3;
RAM.equipment.regen = 3;
RAM.equipment.retry = 3;
RAM.equipment.root_lens = 3;
RAM.equipment.scare_berry = 3;
RAM.equipment.scare_shield = 3;
RAM.equipment.sleep_berry = 3;
RAM.equipment.sleep_shield = 3;
RAM.equipment.sprinter = 3;
RAM.equipment.starter = 3;
RAM.equipment.stone_lens = 3;
RAM.equipment.switcheroo = 3;
RAM.equipment.trainer_lure = 3;
RAM.equipment.trigger_happy = 3;
RAM.equipment.volt_lens = 3;
RAM.equipment.volt_touch = 3;
RAM.equipment.water_lens = 3;
RAM.equipment.white_cape = 3;
RAM.money = 92;
RAM_F.pokemon.addPokemon("ash", 1);
RAM_F.pokemon.addPokemon("pikachu", 1);
RAM_F.pokemon.addPokemon("clefable", 1);
RAM_F.pokemon.addPokemon("caterpie", 1);
RAM.storage.push({id:"ditto", trainerId:"", level:9, hp:256, maxHp:256, power:64.1, exp:9, heldItem:"hp_berry", moves:["transform", "scratch", "refresh", "tackle"]});
RAM.storage.push({id:"eevee", trainerId:"", level:5, hp:256, maxHp:256, power:64.1, exp:9, heldItem:"hp_berry", moves:["scratch", "taunt"]});
RAM_F.storage.addPokemon("flareon", 1);
RAM_F.storage.addPokemon("vaporeon", 1);
RAM_F.storage.addPokemon("caterpie", 1);
RAM_F.storage.addPokemon("meowth", 1);
RAM_F.storage.addPokemon("spearow", 1);
RAM_F.storage.addPokemon("onix", 1);
RAM_F.storage.addPokemon("ditto", 1);
RAM_F.storage.addPokemon("eevee", 1);
RAM.ask.normal = true;
RAM.ask.fire = true;
RAM.ask.water = true;
RAM.ask.plant = true;
RAM.ask.rock = true;
RAM.ask.electric = true;
RAM.ask.psychic = true;
RAM.ask.buy = true;
RAM.ask.sell = true;
var _local16 = {x:160, y:128};
RAM.playerSprite = {charset:"charset\\poke_ash.png", direction:0, directions:4, frame:1, frames:3, pose:0, columns:4, rows:2, animType:"yoyo", animDirection:1, delay:4, isAnimating:false};
ROOT.loadLevel("levels\\tests\\test.lvl", _local16);
MUSIC.volume = 25;
MUSIC.play("music\\palletTown.mp3");
ROOT.intro_mc.removeMovieClip();
}
};
startMenu.cancel = function () {
controls.removeMovieClip();
_this.gotoAndStop("title");
};
Symbol 485 MovieClip [pokemonLeft] Frame 1
var mat = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
normalColor = new flash.filters.ColorMatrixFilter(mat);
var mat = [0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0, 0, 0, 1, 0];
grayColor = new flash.filters.ColorMatrixFilter(mat);
var mat = [1.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0];
redColor = new flash.filters.ColorMatrixFilter(mat);
var mat = [0.22, 0.22, 0.22, 0, 0, 0.22, 0.22, 0.22, 0, 0, 0.22, 0.22, 0.22, 0, 0, 0, 0, 0, 1, 0];
darkColor = new flash.filters.ColorMatrixFilter(mat);
update = function (pokemon_array) {
var _local11 = pokemon_array.currentPokemon;
var _local3 = 0;
while (_local3 < 6) {
var _local4 = this["p" + _local3];
var _local6 = pokemon_array[_local3].hp;
_local4._visible = _local6 != undefined;
if (_local6 == 0) {
_local4.filters = [darkColor];
} else if (pokemon_array[_local3] == _local11) {
_local4.filters = [normalColor];
} else {
var _local7 = pokemon_array[_local3].hp / pokemon_array[_local3].maxHp;
var _local8 = (0.67 * (1 - _local7)) + 0.33;
var _local2 = _local7 * 0.33;
var _local9 = [_local8, _local2, _local2, 0, 0, _local2, _local2, _local2, 0, 0, _local2, _local2, _local2, 0, 0, 0, 0, 0, 1, 0];
var _local10 = new flash.filters.ColorMatrixFilter(_local9);
_local4.filters = [_local10];
}
_local3++;
}
};
Symbol 494 MovieClip Frame 1
function placeFillers() {
var _local6 = ROM.battle.expToLevelUp;
var _local3 = fillArea._width / _local6;
var _local1 = 0;
while (_local1 < _local6) {
var _local2 = "fill_" + _local1;
_this.attachMovie("exp_fill", _local2, _local1, {_x:_local1 * _local3, _width:_local3});
_local1++;
}
}
function rasterize() {
}
_this = this;
placeFillers();
rasterize();
Symbol 499 MovieClip Frame 1
function setFlicker(newFlicker) {
if (newFlicker != flicker) {
flickerSwitch = false;
flicker = newFlicker;
if (newFlicker) {
this.onEnterFrame = function () {
flickerSwitch = !flickerSwitch;
if (flickerSwitch) {
this._brightness = 75;
} else {
this._brightness = 0;
}
};
} else {
this.onEnterFrame = function () {
};
}
}
}
flickerSwitch = false;
flicker = false;
Symbol 521 MovieClip [statusDisplay_mc] Frame 1
function setup(newHp, newMaxHp, newName, newLevel, newExp, stat_obj) {
setHp(newHp, newMaxHp);
name = RAM_F.getNickname(newName);
level = newLevel;
setExp(newExp);
setStatus(stat_obj);
}
function setHp(newHp, newMaxHp) {
newMaxHp = (newMaxHp ? (newMaxHp) : (maxHp));
if ((newHp != hp) || (maxHp != newMaxHp)) {
maxHp = Math.floor(newMaxHp);
if (newHp > maxHp) {
newHp = maxHp;
}
if (newHp < 0) {
newHp = 0;
}
var _local4 = hp;
var _local2 = (newHp * 100) / maxHp;
hp = Math.round(newHp);
if ((hp == 0) && (newHp != 0)) {
hp = 1;
}
com.mosesSupposes.fuse.ZigoEngine.doTween(hpFill_mc, "_xscale", _local2, 0.5, "easeOutQuad");
if (hp < _local4) {
hpFill_mc._brightness = 100;
com.mosesSupposes.fuse.ZigoEngine.doTween(hpFill_mc, "_brightness", 0, 0.05, "easeOutQuad");
} else {
hpFill_mc._brightness = 75;
com.mosesSupposes.fuse.ZigoEngine.doTween(hpFill_mc, "_brightness", 0, 0.5, "easeOutQuad");
}
hpFill_mc.tintTo(65280, _local2, 0.05);
if ((_local2 > 0) && (_local2 <= ROM.battle.criticalHpPerc)) {
hpFill_mc.setFlicker(true);
} else {
hpFill_mc.setFlicker(false);
}
}
}
function setExp(newExp) {
var _local2 = ROM.battle.expToLevelUp;
if (newExp > _local2) {
newExp = _local2;
}
if (newExp < 0) {
newExp = 0;
}
if (newExp != exp) {
exp = newExp;
if (exp == undefined) {
expFill_mc._visible = false;
expBracket_mc._visible = false;
} else {
expFill_mc._visible = true;
expBracket_mc._visible = true;
var _local3 = (exp * 100) / _local2;
com.mosesSupposes.fuse.ZigoEngine.doTween(expFillMask_mc, "_xscale", _local3, 0.5, "easeOutQuad");
expFill_mc._brightness = 100;
com.mosesSupposes.fuse.ZigoEngine.doTween(expFill_mc, "_brightness", 0, 0.5, "linear");
}
}
}
function setStatus(stat_obj) {
poison_icon._visible = stat_obj.poisoned;
sleep_icon._visible = stat_obj.sleep;
paralyze_icon._visible = stat_obj.paralyzed;
angry_icon._visible = stat_obj.angry;
scared_icon._visible = stat_obj.scared;
if (stat_obj.horny == 0) {
horny1_icon._visible = false;
horny2_icon._visible = false;
} else if (stat_obj.horny == 1) {
horny1_icon._visible = true;
horny2_icon._visible = false;
} else if (stat_obj.horny == 2) {
horny1_icon._visible = false;
horny2_icon._visible = true;
}
if (stat_obj == undefined) {
poison_icon._visible = false;
sleep_icon._visible = false;
paralyze_icon._visible = false;
angry_icon._visible = false;
scared_icon._visible = false;
horny1_icon._visible = false;
horny2_icon._visible = false;
}
}
function placeDividers() {
var _local3 = expFill_mc._x;
var _local2 = expFill_mc._y;
var _local5 = ROM.battle.expToLevelUp;
var _local4 = expFill_mc._width / _local5;
var _local6 = expFill_mc._height;
_this.lineStyle(1, 2111488, 100, true, "normal", "none", "bevel", 1);
var _local1 = 1;
while (_local1 < _local5) {
_this.moveTo(_local3 + (_local1 * _local4), _local2 + 0);
_this.lineTo(_local3 + (_local1 * _local4), _local2 + _local6);
_local1++;
}
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
}
_this = this;
ROOT.forceEmbedded(name_txt);
ROOT.forceEmbedded(level_txt);
ROOT.forceEmbedded(hp_txt);
ROOT.forceEmbedded(maxHp_txt);
hpFill_mc._xscale = 0;
expFillMask_mc._xscale = 0;
expFillMask_mc._visible = false;
expBracket_mc._visible = false;
poison_icon._visible = false;
sleep_icon._visible = false;
paralyze_icon._visible = false;
angry_icon._visible = false;
scared_icon._visible = false;
horny1_icon._visible = false;
horny2_icon._visible = false;
placeDividers();
Symbol 527 MovieClip [pokeStatus_menu] Frame 1
function close() {
this.removeMovieClip();
}
function setLevel(newLevel) {
level = newLevel;
status_mc.level = newLevel;
}
function setHp(newHp, newMaxHp) {
if (newMaxHp != undefined) {
maxHp = newMaxHp;
status_mc.maxHp = newMaxHp;
}
hp = newHp;
status_mc.setHp(newHp, newMaxHp);
}
function setExp(newExp) {
exp = newExp;
status_mc.setExp(newExp);
}
function setStatus(newStatus_obj) {
status_obj = newStatus_obj;
status_mc.setStatus(newStatus_obj);
}
function updateDisplay() {
status_mc.setup(hp, maxHp, name, level, exp, status_obj);
}
_this = this;
init_name = name || "";
get_name = function () {
return(status_mc.name);
};
set_name = function (newName) {
newName = RAM_F.getNickname(newName);
newName = newName.split("_").join(" ");
status_mc.name = newName;
};
this.addProperty("name", get_name, set_name);
name = init_name;
setTimeout(updateDisplay, 1);
Symbol 545 MovieClip [photo_thumbs_mc] Frame 1
function selectImage(index) {
selection = Number(index);
com.mosesSupposes.fuse.ZigoEngine.doTween(_parent, "hPosition", 40 * index, 1, "easeInOutQuad");
for (var _local3 in image_array) {
var _local2 = image_array[_local3];
_local2.Glow_strength = 0;
}
var _local2 = image_array[index];
_local2.Glow_strength = 2;
_local2.Glow_blur = 10;
_local2.Glow_color = 6724044 /* 0x6699CC */;
_parent._parent.picture_pane.file = _local2.picName;
_parent._parent.highlight(_local2.picName);
}
function show(charName) {
charName = charName.toLowerCase();
for (var _local13 in this) {
this[_local13].removeMovieClip();
}
var _local5 = 0;
image_array = [];
for (var _local13 in photos) {
var _local10 = photos[_local13].toLowerCase();
if (_local10.indexOf(charName) != -1) {
var _local7 = photos[_local13];
var _local9 = "thumb_" + _local5;
var _local3 = this.createEmptyMovieClip(_local9, _local5);
var _local8 = loadImage(_local7, _local3, null, null, false);
_local3._x = 40 * _local5;
var _local6 = function (thisPic) {
thisPic._width = 32;
thisPic._height = 28;
thisPic._visible = true;
_parent.invalidate();
};
_local8.onLoadInit = _local6;
if (!_local8) {
_local6();
}
image_array.push(_local3);
_local3.picName = _local7;
_local3.onRelease = function () {
if (_parent._parent.active) {
SOUND.play("sound\\cursor_highlight.mp3");
for (var _local4 in image_array) {
if (image_array[_local4] == this) {
var _local3 = _local4;
break;
}
}
selectImage(_local3);
}
};
_local5++;
}
}
_parent.invalidate();
if (image_array.length > 0) {
selectImage(0);
}
}
if (!ZigoEngine) {
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
}
com.mosesSupposes.fuse.FuseFMP;
loadImage = function (file, target, newName, newDepth, isVisible) {
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
if (isVisible == undefined) {
isVisible = true;
}
target = (target ? (target) : this);
newDepth = ((newDepth != undefined) ? (newDepth) : (nextDepth(target)));
newName = (newName ? (newName) : ("image_" + newDepth));
if (target[newName]) {
target[newName].removeMovieClip();
}
target[newName].unloadMovie();
var newImage = target.attachMovie(file, newName, newDepth, {_visible:isVisible});
var newImage = target[newName];
if (((newImage == target) || (newImage._width == undefined)) || (newImage._width == 0)) {
var newImage = target.createEmptyMovieClip(newName, newDepth);
newImage._visible = isVisible;
if (file.generateFilterRect != undefined) {
var _local13 = file;
}
if (file.generateFilterRect == undefined) {
var _local13 = flash.display.BitmapData.loadBitmap(file);
}
newImage.attachBitmap(_local13, 0, true, true);
if ((newImage._width == undefined) || (newImage._width == 0)) {
var _local12 = new MovieClipLoader();
var return_obj = {onLoadInit:function () {
}, onLoadError:function () {
}};
var hasLoaded = false;
_local12.onLoadInit = function (loadedClip) {
newImage._visible = isVisible;
hasLoaded = true;
return_obj.onLoadInit(loadedClip);
};
_local12.onLoadError = function () {
return_obj.onLoadError();
};
_local12.loadClip(file, newImage);
if (hasLoaded) {
setTimeout(function () {
return_obj.onLoadInit();
}, 1);
}
return(return_obj);
}
}
};
photos = (photos ? (photos) : (RAM.photos));
if (charName) {
show(charName);
}
Symbol 546 MovieClip [timeOfDay] Frame 1
MOOD_MC.mood = RAM.timeOfDay;
Symbol 548 MovieClip [swf\textbox.swf] Frame 1
stop();
_this = this;
ROOT.forceEmbedded(message_txt);
SOUND.play("sound\\cursor_select.mp3");
makeProperty = function (propName, defaultValue) {
var _local1 = _this[propName];
if (_this["get_" + propName] == undefined) {
_this["get_" + propName] = function () {
return(_this["_" + propName]);
};
}
if (_this["set_" + propName] == undefined) {
_this["set_" + propName] = function (newValue) {
_this["_" + propName] = newValue;
};
}
_this.addProperty(propName, _this["get_" + propName], _this["set_" + propName]);
var _local2 = ((_local1 != undefined) ? (_local1) : (defaultValue));
if (_local2 != undefined) {
_this["set_" + propName](_local2);
}
};
makeProperty("closeOnSpace", true);
makeProperty("closeOnClick", true);
makeProperty("typeDelay", 0);
makeProperty("enterKey", RAM.keys.talk);
makeProperty("cancelKey", RAM.keys.cancel);
makeProperty("skipKey", 16);
makeProperty("typingSound", "");
makeProperty("soundSystem", SOUND);
get_background = function () {
return(bg.image);
};
set_background = function (newValue, doEvent) {
if (newValue == "swf\\win_default.png") {
newValue = ("swf\\win_" + RAM.winBorder) + ".png";
}
bg.image = newValue;
};
makeProperty("background");
var offset = 16;
faceLoader = new MovieClipLoader();
minTextWidth = 240;
minTextOffset = 72;
maxTextWidth = 296;
maxTextOffset = 16;
faceMargin = 6;
set_face = function (newValue, doEvent) {
face_mc.complete = function () {
var _local2 = (face_mc._x + face_mc._width) + faceMargin;
var _local1 = maxTextWidth - face_mc._width;
_this.message_txt._width = _local1 - faceMargin;
_this.message_txt._x = _local2;
};
face_mc.error = function () {
var _local2 = face_mc._x;
var _local1 = maxTextWidth;
_this.message_txt._width = _local1;
_this.message_txt._x = _local2;
};
face_mc.file = newValue;
};
makeProperty("face");
message_txt.condenseWhite = false;
readIndex = 0;
delayTimeout = null;
forceSound = true;
waitForClick = false;
doneTyping = false;
initInstantDisplay = (instantDisplay ? (instantDisplay) : false);
_html = "<p>";
set_text = function (newValue, doEvent) {
var _local3 = 0;
var _local6 = String.fromCharCode(10);
while (newValue.indexOf(_local6, _local3) != -1) {
var _local2 = newValue.indexOf(_local6, _local3);
var _local5 = newValue.slice(0, _local2);
var _local4 = newValue.slice(_local2 + 1);
newValue = _local5 + _local4;
_local3 = _local2;
}
_local3 = 0;
_local6 = String.fromCharCode(13);
while (newValue.indexOf(_local6, _local3) != -1) {
var _local2 = newValue.indexOf(_local6, _local3);
var _local5 = newValue.slice(0, _local2);
var _local4 = newValue.slice(_local2 + 1);
newValue = (_local5 + "\\n") + _local4;
_local3 = _local2;
_local3 = _local3 + 2;
}
_this._text = newValue;
_this._html = "<p>";
_this.message_txt.htmlText = "";
_this.readIndex = 0;
_this.waitForClick = false;
_this.doneTyping = false;
_this.instantDisplay = false;
clearTimeout(_this.delayTimeout);
if (newValue != "") {
_this.forceSound = true;
setTimeout(_this.typeMessage, 34);
}
};
typeMessage = function () {
if (!_this.doneTyping) {
var _local1 = _text.charAt(_this.readIndex);
if (Key.isDown(_this.skipKey)) {
_this.instantDisplay = true;
}
if (_local1 == "\\") {
_this.readIndex++;
var _local2 = String(_text.charAt(_this.readIndex));
switch (_local2) {
case "." :
var _local3 = 1;
_this.forceSound = true;
break;
case "!" :
_this.waitForClick = true;
break;
case "n" :
_this._html = _this._html + newline;
break;
case "s" :
_this.readIndex++;
var _local7 = Number(_text.charAt(_this.readIndex));
_this.typeDelay = _local7;
if (_this.typeDelay == 0) {
_this.forceSound = true;
}
break;
case "l" :
_this._html = _this._html + "<p align=\"left\">";
break;
case "m" :
_this._html = _this._html + "<p align=\"center\">";
break;
case "r" :
_this._html = _this._html + "<p align=\"right\">";
break;
case "#" :
_this.readIndex++;
var _local4 = _text.charAt(_this.readIndex) == "#";
if (_local4) {
_this._html = _this._html + "</font>";
} else {
var _local5 = String(_text.substr(_this.readIndex, 6));
_this._html = _this._html + (("<font color=\"#" + _local5) + "\">");
_this.readIndex = _this.readIndex + 5;
}
break;
default :
if (isNaN(_local2)) {
break;
}
var _local9 = _text.charAt(_this.readIndex);
var _local8 = Number(_local9);
_local3 = _local8;
_this.forceSound = true;
}
} else {
var _local6 = (_this.typeDelay > 0) && (!_this.instantDisplay);
if (_this.forceSound || (_local6)) {
if (_local1 != _this.enterKey) {
_this.soundSystem.play(_this.typingSound);
_this.forceSound = false;
}
}
_this._html = _this._html + _local1;
}
_this.message_txt.htmlText = _this._html;
_this.readIndex++;
if (_this.readIndex < _text.length) {
if (_this.instantDisplay) {
_this.typeMessage();
} else if (_local3) {
_this.delayTimeout = setTimeout(_this.typeMessage, _local3 * 200);
} else if (_this.waitForClick) {
} else if (_local2) {
_this.typeMessage();
} else if (_this.typeDelay) {
if (_local1 == " ") {
_this.typeMessage();
} else {
_this.delayTimeout = setTimeout(_this.typeMessage, _this.typeDelay * 25);
}
} else {
_this.typeMessage();
}
} else {
_this.doneTyping = true;
_this.messageDone();
}
}
};
makeProperty("text");
instantDisplay = initInstantDisplay;
if (_this.instantDisplay) {
clearTimeout(_this.delayTimeout);
setTimeout(_this.typeMessage, 34);
}
closeTriggers = {};
close = function () {
if (_this.doneTyping) {
_this.nextFrame();
}
};
closeTriggers.onMouseUp = function () {
if (_this.closeOnClick) {
close();
}
if (_this.waitForClick) {
_this.waitForClick = false;
setTimeout(_this.typeMessage, 25);
}
};
Mouse.addListener(closeTriggers);
if (Key.isDown(_this.enterKey) || (Key.isDown(_this.cancelKey))) {
waitForInitRelease = true;
}
closeTriggers.onKeyUp = function () {
var _local1 = Key.getCode();
if (!waitForInitRelease) {
if (Key.isDown(_this.skipKey)) {
_this.waitForClick = false;
clearTimeout(_this.delayTimeout);
_this.typeMessage();
}
if ((((_local1 == _this.enterKey) || (_local1 == _this.cancelKey)) && (_this.closeOnSpace)) && (!_this.waitForClick)) {
close();
}
if (_this.waitForClick) {
_this.waitForClick = false;
typeMessage();
}
} else if (!(Key.isDown(_this.enterKey) || (Key.isDown(_this.cancelKey)))) {
waitForInitRelease = false;
}
};
Key.addListener(closeTriggers);
onUnload = function () {
clearTimeout(_this.delayTimeout);
Mouse.removeListener(closeTriggers);
Key.removeListener(closeTriggers);
};
Instance of Symbol 329 MovieClip "bg" in Symbol 548 MovieClip [swf\textbox.swf] Frame 1
//component parameters
onClipEvent (construct) {
image = "";
}
Instance of Symbol 157 MovieClip [imageLoader] "face_mc" in Symbol 548 MovieClip [swf\textbox.swf] Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = false;
enabled = true;
visible = true;
}
Symbol 548 MovieClip [swf\textbox.swf] Frame 2
stop();
_name = "";
_this.onClose();
removeThis = function (_this) {
_this.onUnload();
_this.removeMovieClip();
};
setTimeout(removeThis, 34, this);
Symbol 561 MovieClip [show_controls] Frame 1
function getCharacter(code) {
switch (code) {
case 8 :
var _local1 = "Backspace";
break;
case 9 :
_local1 = "Tab";
break;
case 13 :
_local1 = "Enter";
break;
case 16 :
_local1 = "Shift";
break;
case 17 :
_local1 = "Ctrl";
break;
case 19 :
_local1 = "Pause / Break";
break;
case 20 :
_local1 = "CAPS Lock";
break;
case 27 :
_local1 = "Esc";
break;
case 32 :
_local1 = "Space";
break;
case 33 :
_local1 = "Page Up";
break;
case 34 :
_local1 = "Page Down";
break;
case 35 :
_local1 = "End";
break;
case 36 :
_local1 = "Home";
break;
case 37 :
_local1 = "arrow: LEFT";
break;
case 38 :
_local1 = "arrow: UP";
break;
case 39 :
_local1 = "arrow: RIGHT";
break;
case 40 :
_local1 = "arrow: DOWN";
break;
case 45 :
_local1 = "Insert";
break;
case 46 :
_local1 = "Delete";
break;
case 91 :
_local1 = "Win";
break;
case 93 :
_local1 = "Contextual";
break;
case 96 :
_local1 = "num pad 0";
break;
case 97 :
_local1 = "num pad 1";
break;
case 98 :
_local1 = "num pad 2";
break;
case 99 :
_local1 = "num pad 3";
break;
case 100 :
_local1 = "num pad 4";
break;
case 101 :
_local1 = "num pad 5";
break;
case 102 :
_local1 = "num pad 6";
break;
case 103 :
_local1 = "num pad 7";
break;
case 104 :
_local1 = "num pad 8";
break;
case 105 :
_local1 = "num pad 9";
break;
case 106 :
_local1 = "num pad *";
break;
case 107 :
_local1 = "num pad +";
break;
case 109 :
_local1 = "num pad -";
break;
case 110 :
_local1 = "num pad .";
break;
case 111 :
_local1 = "num pad /";
break;
case 112 :
_local1 = "F1";
break;
case 113 :
_local1 = "";
break;
case 114 :
_local1 = "";
break;
case 115 :
_local1 = "F4";
break;
case 116 :
_local1 = "F5";
break;
case 117 :
_local1 = "F6";
break;
case 118 :
_local1 = "F7";
break;
case 119 :
_local1 = "F8";
break;
case 120 :
_local1 = "F9";
break;
case 121 :
_local1 = "F10";
break;
case 122 :
_local1 = "F11";
break;
case 123 :
_local1 = "F12";
break;
case 124 :
_local1 = "F13";
break;
case 125 :
_local1 = "F14";
break;
case 126 :
_local1 = "F15";
break;
case 144 :
_local1 = "Num Lock";
break;
case 145 :
_local1 = "Scroll Lock";
break;
case 186 :
_local1 = ";";
break;
case 187 :
_local1 = "=";
break;
case 188 :
_local1 = "<";
break;
case 189 :
_local1 = "-";
break;
case 190 :
_local1 = ">";
break;
case 191 :
_local1 = "/";
break;
case 192 :
_local1 = "~";
break;
case 219 :
_local1 = "[";
break;
case 220 :
_local1 = "\\";
break;
case 221 :
_local1 = "]";
break;
case 222 :
_local1 = "\"";
break;
default :
_local1 = String.fromCharCode(code);
}
return(_local1);
}
bg_mc.winBorder = winBorder;
ROOT.updateText(this, title_txt, "text");
title_txt.text = "CONTROLS";
ok_txt.text = getCharacter(RAM.keys.ok);
cancel_txt.text = getCharacter(RAM.keys.cancel);
menu_txt.text = getCharacter(RAM.keys.menu);
talk_txt.text = getCharacter(RAM.keys.talk);
ask_txt.text = getCharacter(RAM.keys.ask);
up_txt.text = getCharacter(RAM.keys.up || 38);
down_txt.text = getCharacter(RAM.keys.down || 40);
left_txt.text = getCharacter(RAM.keys.left || 37);
right_txt.text = getCharacter(RAM.keys.right || 39);
Symbol 562 MovieClip [transition_crossFade] Frame 1
function doFadeOut() {
var vow = VOW.make();
_this.fadeOutDone = function () {
delete _this.fadeOutDone;
delete _this.remove;
vow.keep();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeOut");
return(vow.promise);
}
function doFadeIn() {
var vow = VOW.make();
_this.fadeInDone = function () {
delete _this.fadeInDone;
_this.remove();
};
_this.remove = function () {
delete _this.remove;
vow.keep();
_this.removeMovieClip();
};
_this.gotoAndPlay("fadeIn");
return(vow.promise);
}
stop();
stop();
_this = this;
Symbol 562 MovieClip [transition_crossFade] Frame 2
stop();
_this = this;
snap_pic = new flash.display.BitmapData(320, 240, false, 0);
snap_pic.draw(ROOT.game_mc);
snap_mc = this.createEmptyMovieClip("snap_mc", 0);
snap_mc.attachBitmap(snap_pic, 0);
_this.fadeOutDone();
Symbol 562 MovieClip [transition_crossFade] Frame 10
function fadeLoop() {
snap_mc._alpha = snap_mc._alpha - incriment;
if (snap_mc._alpha <= 0) {
onEnterFrame = null;
_this.fadeInDone();
}
}
stop();
_this = this;
var seconds = 1;
var incriment = (100 / (seconds * 30));
if (snap_mc) {
onEnterFrame = fadeLoop;
} else {
VOW.firstWait(1).then(_this.fadeInDone);
}
Symbol 570 MovieClip [key_marker] Frame 1
hitArea = hit;
image_mc.error = function () {
image_mc.file = "icon_misc.png";
};
init_icon = icon || "icon_misc.png";
get_icon = function () {
return(image_mc.file);
};
set_icon = function (newValue) {
image_mc.file = newValue;
};
this.addProperty("icon", get_icon, set_icon);
icon = init_icon;
Instance of Symbol 157 MovieClip [imageLoader] "image_mc" in Symbol 570 MovieClip [key_marker] Frame 1
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = false;
enabled = true;
visible = true;
}
Symbol 571 MovieClip [set_keys] Frame 1
function storeKeys() {
for (var _local1 in _this) {
if (_this[_local1].char_code != undefined) {
keyLocation.push(_this[_local1]);
}
}
}
function enableTooltips() {
tooltip = _this.attachMovie("Tooltip", "tooltip", 1000, {delay:0.1, text:"textLength"});
}
function updateMarkers() {
var _local4 = 0;
while (_local4 < markers.length) {
markers[_local4].removeMovieClip();
markers[_local4]._name = markers[_local4]._name + "_removed";
markers[_local4].swapDepths(markers[_local4].getDepth() + 100);
_local4++;
}
markers = [];
for (var _local12 in keys) {
var _local11 = keys[_local12];
var _local6 = getLocations(_local11);
var _local1 = 0;
while (_local1 < _local6.length) {
var _local3 = getCenter(_local6[_local1]);
var _local5 = -7;
var _local2 = _this.attachMovie("key_marker", "marker_" + markers.length, markers.length, {keyName:_local12, icon:icons[_local12] || "icon_misc.png", _x:_local3.x + _local5, _y:_local3.y + _local5});
markers.push(_local2);
addTooltip(_local2);
addDrag(_local2);
_local1++;
}
}
applyOverlap();
}
function addKeyPreview() {
Key.addListener(keyboard);
}
function getLocations(code) {
var _local2 = [];
var _local1 = 0;
while (_local1 < keyLocation.length) {
if (keyLocation[_local1].char_code == code) {
_local2.push(keyLocation[_local1]);
}
_local1++;
}
return(_local2);
}
function getCenter(mc) {
output_p = null;
if (mc) {
var _local1 = mc.hit || (mc);
output_p = new flash.geom.Point(Math.round(_local1._width / 2), Math.round(_local1._height / 2));
_local1.localToGlobal(output_p);
_this.globalToLocal(output_p);
}
return(output_p);
}
function addTooltip(marker) {
marker.onRollOver = function () {
tooltip.text = this.keyName;
tooltip._x = this._x;
tooltip._y = this._y;
tooltip.setSize(this.hit._width, this.hit._height);
tooltip.onMouseMove();
};
marker.onRollOut = (marker.onDragOut = function () {
tooltip.text = "";
});
}
function addDrag(marker) {
var oldDepth = 0;
var start_p = null;
marker.onPress = function () {
oldDepth = marker.getDepth();
start_p = new flash.geom.Point(marker._x, marker._y);
marker.swapDepths(200);
marker.startDrag(false, area._x, area._y, area._x + area._width, area._y + area._height);
};
marker.onRelease = function () {
marker.swapDepths(oldDepth);
marker.stopDrag();
var _local3 = getCenter(marker);
_this.localToGlobal(_local3);
var _local4 = null;
var _local1 = 0;
while (_local1 < keyLocation.length) {
var _local2 = keyLocation[_local1];
if (_local2.hit.hitTest(_local3.x, _local3.y, false)) {
_local4 = _local2.char_code;
break;
}
_local1++;
}
if ((_local4 == null) || (_local4 == 9)) {
marker._x = start_p.x;
marker._y = start_p.y;
} else {
var _local5 = {keyName:marker.keyName, keyCode:_local4};
_this.broadcastMessage("drop", _local5);
}
};
marker.onReleaseOutside = function () {
marker.swapDepths(oldDepth);
marker.stopDrag();
marker._x = start_p.x;
marker._y = start_p.y;
};
}
function drop(data) {
keys[data.keyName] = data.keyCode;
updateMarkers();
var _local1 = {keyName:marker.keyName, keyCode:dropKeyCode};
_this.broadcastMessage("changeKey", _local1);
}
function applyOverlap() {
var _local2 = {};
var _local3 = 0;
while (_local3 < markers.length) {
var _local4 = markers[_local3];
var _local5 = _local4.keyName;
var _local1 = keys[_local5];
if (_local2[_local1] == undefined) {
_local2[_local1] = 0;
}
_local4._x = _local4._x + _local2[_local1];
_local4._y = _local4._y + _local2[_local1];
_local2[_local1] = _local2[_local1] + 3;
_local3++;
}
}
function updateHilight(keyCode) {
var _local1 = 0;
while (_local1 < keyLocation.length) {
var _local2 = keyLocation[_local1];
_local2.hilight._visible = _local2.char_code == keyCode;
_local1++;
}
}
function getIcons() {
var _local1 = false;
for (var _local2 in icons) {
_local1 = true;
break;
}
return((_local1 ? (icons) : (useDefaultIcons())));
}
function useDefaultIcons() {
var _local1 = {talk:"swf\\_setKeys\\ok.png", ask:"swf\\_setKeys\\ask.png", ok:"swf\\_setKeys\\ok.png", cancel:"swf\\_setKeys\\cancel.png", menu:"swf\\_setKeys\\menu.png", up:"swf\\_setKeys\\up.png", down:"swf\\_setKeys\\down.png", left:"swf\\_setKeys\\left.png", right:"swf\\_setKeys\\right.png"};
return(_local1);
}
function getKeys() {
var _local1 = false;
for (var _local2 in keys) {
_local1 = true;
break;
}
return((_local1 ? (keys) : (RAM.keys)));
}
stop();
_this = this;
_global.nextDepth = function (this_mc, maxDepth) {
this_mc = (this_mc ? (this_mc) : _root);
var _local4 = 1;
var _local5 = (maxDepth ? (maxDepth) : 1048500);
for (var _local6 in this_mc) {
var _local2 = this_mc[_local6].getDepth();
if ((_local2 < _local5) && (_local2 >= _local4)) {
_local4 = _local2 + 1;
}
}
return(_local4);
};
AsBroadcaster.initialize(this);
_this.addListener(_this);
keyLocation = [];
markers = [];
keyboard = {};
update = updateMarkers;
icons = getIcons();
keys = getKeys();
onUnload = function () {
_this.removeListener(_this);
Key.removeListener(keyboard);
};
storeKeys();
enableTooltips();
updateMarkers();
addKeyPreview();
updateHilight();
keyboard.onKeyDown = function () {
var _local1 = Key.getCode();
updateHilight(_local1);
};
keyboard.onKeyUp = function () {
updateHilight();
};
changeKey = function () {
_parent.key_list.update();
};
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 27;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 112;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 113;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 114;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 115;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 116;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 117;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 118;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 119;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 120;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 122;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 123;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 192;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 49;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 50;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 51;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 52;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 53;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 54;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 55;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 56;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 57;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 48;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 189;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 187;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 8;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 81;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 87;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 69;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 82;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 84;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 89;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 85;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 73;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 79;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 80;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 219;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 221;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 220;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 65;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 83;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 68;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 70;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 71;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 72;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 74;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 75;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 76;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 186;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 222;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 90;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 88;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 67;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 86;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 66;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 78;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 77;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 188;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 190;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 191;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 16;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 13;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 20;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 16;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 17;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 32;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 17;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 45;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 36;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 33;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 46;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 35;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 34;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 37;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 40;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 39;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 38;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 97;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 100;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 103;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 144;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 98;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 101;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 104;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 111;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 99;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 102;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 105;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 106;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 13;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 107;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 109;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 96;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 110;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 1
//component parameters
onClipEvent (construct) {
char_code = 9;
}
Instance of Symbol 293 MovieClip "close_btn" in Symbol 571 MovieClip [set_keys] Frame 1
on (release) {
SOUND.play("sound\\cursor_cancel.mp3");
_parent.removeMovieClip();
}
Instance of Symbol 570 MovieClip [key_marker] in Symbol 571 MovieClip [set_keys] Frame 2
//component parameters
onClipEvent (construct) {
keyName = "";
icon = "";
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 2
//component parameters
onClipEvent (construct) {
char_code = 121;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 2
//component parameters
onClipEvent (construct) {
char_code = 18;
}
Instance of Symbol 569 MovieClip in Symbol 571 MovieClip [set_keys] Frame 2
//component parameters
onClipEvent (construct) {
char_code = 18;
}
Symbol 572 MovieClip Frame 1
stop();
Instance of Symbol 322 MovieClip [scroll] in Symbol 572 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
mode = "chase";
target = "player";
smoothness = 2;
}
Instance of Symbol 331 MovieClip [textbox_mc] in Symbol 572 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
text = "";
face = "";
background = "";
typeDelay = 1;
closeOnSpace = true;
closeOnClick = true;
skipKey = 16;
typingSound = "";
}
Instance of Symbol 322 MovieClip [scroll] in Symbol 572 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
mode = "chase";
target = "player";
smoothness = 0.2;
}
Instance of Symbol 548 MovieClip [swf\textbox.swf] in Symbol 572 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
text = "";
face = "";
background = "";
typeDelay = 1;
closeOnSpace = true;
closeOnClick = true;
skipKey = 16;
typingSound = "";
}
Instance of Symbol 157 MovieClip [imageLoader] in Symbol 572 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
file = "";
scaleContent = false;
enabled = true;
visible = true;
}
Instance of Symbol 571 MovieClip [set_keys] in Symbol 572 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
}