Frame 1
this.loaderMc._visible = false;
this.progressWidth = this.loaderMc.progressBarMc._width;
this.stepLoader = function () {
if ((this.getBytesLoaded() >= this.getBytesTotal()) && (this.getBytesTotal() > 1024)) {
delete this.onEnterFrame;
this.gotoAndStop("loaded");
} else {
var _local2 = this.getBytesLoaded() / this.getBytesTotal();
this.loaderMc.progressBarMc._width = this.progressWidth * _local2;
}
};
stepLoader();
Frame 2
stop();
this.loaderMc._visible = true;
this.onEnterFrame = function () {
this.stepLoader();
};
Instance of Symbol 32 MovieClip [Xray Connector] in Frame 4
//component parameters
onClipEvent (construct) {
classPackages = [];
classPackages[0] = "com";
classPackages[1] = "org";
classPackages[2] = "net";
classPackages[3] = "edu";
classPackages[4] = "gov";
classPackages[5] = "ch";
classPackages[6] = "mx";
classPackages[7] = "flash";
showFPS = false;
}
Frame 10
stop();
delete this.onEnterFrame;
_global.com.blitzagency.xray.Xray.initConnections();
var app = (new com.preloaded.scimus.launchpad.Main(_root));
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 2
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 2
stop();
Symbol 27 MovieClip [spinner] Frame 1
this.onEnterFrame = function () {
this._rotation = this._rotation + 15;
};
Symbol 28 MovieClip Frame 1
stop();
Symbol 1194 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab extends MovieClip
{
var onRollOver, onDragOver, onRollOut, onDragOut, tabber, screenType, id, isActive, enabled, gotoAndStop;
function Tab () {
super();
onRollOver = (onDragOver = onOver);
onRollOut = (onDragOut = onOut);
}
function init(t, sType, i) {
tabber = t;
screenType = sType;
id = i;
}
function set active(state) {
isActive = state;
enabled = !state;
if (state) {
(gotoAndStop("active"));// not popped
} else {
onOut();
}
//return(active);
}
function get active() {
return(isActive);
}
function onOver() {
if (!active) {
(gotoAndStop("over"));// not popped
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
}
function onOut() {
if (!active) {
(gotoAndStop("out"));// not popped
}
}
function onRelease() {
tabber.onTabSelect(screenType, id);
}
}
Symbol 1195 MovieClip [__Packages.com.preloaded.scimus.launchpad.Main] Frame 0
class com.preloaded.scimus.launchpad.Main
{
static var instance;
var $host, $connectionHandler, $launchDelegate, $ioHandler, $threadHandler, $engine, $screenHandler, $popupHandler, titleStripHostMc, $df, $currentLevelEndPopup;
function Main (host) {
com.preloaded.debug.Logger.__set__traceLevel(1);
Stage.align = "TL";
fscommand ("allowscale", false);
$host = ((host == undefined) ? this : (host));
instance = this;
var _local4 = new ContextMenu();
var _local8 = function () {
_root.getURL("http://www.preloaded.com", "_blank");
};
var _local12 = function () {
_root.getURL("http://www.cove.org/flade", "_blank");
};
var _local11 = function () {
_root.getURL("http://www.xfactorstudio.com/", "_blank");
};
var _local10 = function () {
_root.getURL("http://www.sciencemuseum.org.uk/launchpad/launchball/", "_blank");
};
var _local9 = new ContextMenuItem("Launchball", _local10);
_local4.customItems.push(_local9);
_local9 = new ContextMenuItem("Design and build by Preloaded\t|>|", _local8);
_local9.separatorBefore = true;
_local4.customItems.push(_local9);
_local9 = new ContextMenuItem("uses: flade (c) alec cove\t|>|", _local12);
_local9.separatorBefore = true;
_local4.customItems.push(_local9);
_local9 = new ContextMenuItem("uses: xpath (c) xfactorstudio\t|>|", _local11);
_local4.customItems.push(_local9);
_local4.hideBuiltInItems();
_root.menu = _local4;
com.preloaded.scimus.launchpad.Config.PRECALC_QUADOUT_10 = com.preloaded.animation.ExtendedTween.precalculateFunction(com.robertpenner.easing.Quad.easeOut, 10);
com.preloaded.scimus.launchpad.Config.PRECALC_QUADOUT_8 = com.preloaded.animation.ExtendedTween.precalculateFunction(com.robertpenner.easing.Quad.easeOut, 8);
if (_root.serverAddr != undefined) {
com.preloaded.scimus.launchpad.Config.SERVER_URL = _root.serverAddr;
}
$host._x = com.preloaded.scimus.launchpad.Config.SCREEN_MARGIN_HORZ;
$host._y = com.preloaded.scimus.launchpad.Config.SCREEN_MARGIN_VERT;
com.preloaded.lang.FrameDispatcher.init($host);
com.preloaded.sound.SoundManager.init(makeNewMovieClip("soundManager"));
com.preloaded.sound.SoundManager.addSound("ui_rollover_5.aiff", "nav_rollover");
com.preloaded.sound.SoundManager.addSound("ui_click_6.aiff", "nav_click");
com.preloaded.sound.SoundManager.addSound("ui_error_2.aiff", "nav_error");
com.preloaded.UI.MovieClipButton.__get__globalDispatcher().addEventListener("onRollOver", mx.utils.Delegate.create(this, onButtonRollOverGlobal));
com.preloaded.UI.MovieClipButton.__get__globalDispatcher().addEventListener("onRelease", mx.utils.Delegate.create(this, onButtonReleaseGlobal));
if (_root.serverURL != undefined) {
com.preloaded.scimus.launchpad.Config.SERVER_URL = _root.serverURL;
}
$connectionHandler = new com.preloaded.scimus.launchpad.ConnectionHandler(com.preloaded.scimus.launchpad.Config.SERVER_URL + com.preloaded.scimus.launchpad.Config.SERVICE_URL);
$connectionHandler.addEventListener("onLoad", mx.utils.Delegate.create(this, onConnectionHandlerLoaded));
$connectionHandler.addEventListener("onGetFactoidResponse", mx.utils.Delegate.create(this, onGetFactoidResponse));
$launchDelegate = mx.utils.Delegate.create(this, launchLevelEndPopup);
$ioHandler = new com.preloaded.scimus.launchpad.IOHandler();
$threadHandler = new com.preloaded.scimus.launchpad.ThreadHandler();
var _local7 = makeNewMovieClip("engine");
_local7.tabEnabled = false;
$engine = new com.preloaded.scimus.launchpad.Engine.EngineHandler(_local7);
var _local5 = makeNewMovieClip("screenHandler");
$screenHandler = new com.preloaded.scimus.launchpad.ui.ScreenHandler(_local5);
$screenHandler.addEventListener("onCreateLevelRelease", mx.utils.Delegate.create(this, onUICreateLevelSelected));
$screenHandler.addEventListener("onCnsItemEdit", mx.utils.Delegate.create(this, onUIEditLevelSelected));
$screenHandler.addEventListener("onCnsItemDelete", mx.utils.Delegate.create(this, onUIDeleteLevelSelected));
$screenHandler.addEventListener("onFavouriteDelete", mx.utils.Delegate.create(this, onUIDeleteFavouriteSelected));
$screenHandler.addEventListener("onFavouriteAdd", mx.utils.Delegate.create(this, onUIAddFavouriteSelected));
$screenHandler.addEventListener("onLevelSelected", mx.utils.Delegate.create(this, onUILevelSelected));
var _local6 = makeNewMovieClip("popups");
$popupHandler = new com.preloaded.scimus.launchpad.ui.PopupHandler(_local6);
_local5._x = (_local6._x = -$host._x);
_local5._y = (_local6._y = -$host._y);
$screenHandler.start();
titleStripHostMc = makeNewMovieClip("titleStripHost");
titleStripHostMc.tabEnabled = false;
_global.com.blitzagency.xray.Xray.initConnections();
}
function onConnectionHandlerLoaded() {
$connectionHandler.getPrefs();
$connectionHandler.addEventListener("onPrefsReceived", mx.utils.Delegate.create(this, onConnectionHandlerPrefsLoaded));
}
function onConnectionHandlerPrefsLoaded() {
$connectionHandler.getBlockInfo();
$connectionHandler.addEventListener("onBlockInfoReceived", mx.utils.Delegate.create(this, onConnectionHandlerBlockInfoReceived));
}
function onConnectionHandlerBlockInfoReceived() {
startUp();
}
function startUp() {
var _local3 = _root[com.preloaded.scimus.launchpad.Config.VAR_LEVEL_ID];
var _local4 = _root[com.preloaded.scimus.launchpad.Config.VAR_USER_CODE];
if (_local3 == undefined) {
$screenHandler.spawnStartupScreen();
} else {
if (_local4 != undefined) {
$connectionHandler.setLogin(_local4);
}
collectLevel(_local3);
}
clearRootLoader();
}
function clearRootLoader() {
_root.loaderMc._visible = false;
}
function collectLevel(id) {
$connectionHandler.getCustomLevel(id);
$connectionHandler.addEventListener("onGetCustomLevelResponse", mx.utils.Delegate.create(this, onGetCustomLevelResponse));
}
function onGetCustomLevelResponse(evt) {
var _local2 = new com.preloaded.scimus.launchpad.data.LevelObject(evt.xmlNode);
var _local3 = new Object();
_local3.data = _local2;
onUILevelSelected({item:_local3});
}
function onUICreateLevelSelected() {
$screenHandler.hide();
initEngine("sandbox");
}
function onUIEditLevelSelected(evt) {
var _local2 = evt.data;
com.preloaded.scimus.launchpad.ThreadHandler.__set__currentLevel(_local2);
var pth = (com.preloaded.scimus.launchpad.Config.SERVER_URL + _local2.xmlPath);
var ref = this;
var _local3 = function () {
ref.initEngine("sandbox", pth);
};
$screenHandler.hide(_local3);
}
function onUIDeleteLevelSelected(evt) {
var _local1 = evt.data;
com.preloaded.scimus.launchpad.ConnectionHandler.instance.deleteCustomLevel(_local1.guid);
}
function onUIDeleteFavouriteSelected(evt) {
var _local2 = evt.data;
if ($connectionHandler.loggedIn && (!$connectionHandler.isAnonymous)) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.deleteFavourite(_local2.guid);
}
}
function onUIAddFavouriteSelected(evt) {
var _local2 = evt.data;
if ($connectionHandler.loggedIn && (!$connectionHandler.isAnonymous)) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addFavorite(_local2.guid);
}
}
function onUILevelSelected(evt) {
onButtonReleaseGlobal();
$screenHandler.hide(mx.utils.Delegate.create(this, _onUILevelSelected));
var _local2 = evt.item.data;
com.preloaded.scimus.launchpad.ThreadHandler.__set__currentLevel(_local2);
}
function _onUILevelSelected() {
var _local2 = com.preloaded.scimus.launchpad.Config.SERVER_URL + com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().xmlPath;
initEngine("game", _local2);
}
function onGameUIExit(destination) {
if (com.preloaded.scimus.launchpad.Engine.EngineHandler.mode == "sandbox") {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExit();
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create($popupHandler, $popupHandler.hideCurrentPopup));
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, returnToUI));
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
} else {
returnToUI(destination);
}
}
function progressLevel() {
var _local2 = com.preloaded.scimus.launchpad.ThreadHandler.advanceLevel(com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.currentTime.value);
var _local4 = com.preloaded.scimus.launchpad.Engine.EngineHandler.mode;
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.destroy();
if (_local2 != null) {
var _local3 = com.preloaded.scimus.launchpad.Config.SERVER_URL + _local2.xmlPath;
initEngine("game", _local3);
} else {
returnToUI(_local4);
}
}
function returnToUI(destination) {
$df.stop();
$popupHandler.hideCurrentPopup();
if ((destination == undefined) || (String(destination) != destination)) {
destination = com.preloaded.scimus.launchpad.Engine.EngineHandler.mode;
}
if (destination == "game") {
if (com.preloaded.scimus.launchpad.ThreadHandler.currentThread == com.preloaded.scimus.launchpad.ConnectionHandler.receivedLevelsThread) {
destination = "sandbox";
}
if (com.preloaded.scimus.launchpad.ThreadHandler.currentThread == com.preloaded.scimus.launchpad.ConnectionHandler.customLevelsThread) {
destination = "sandbox";
}
if (com.preloaded.scimus.launchpad.ThreadHandler.currentThread == undefined) {
destination = "collection";
}
}
switch (destination) {
case "game" :
default :
switch (com.preloaded.scimus.launchpad.ThreadHandler.currentThread.title) {
case "Training" :
$screenHandler.spawnLevelsTrainingScreen();
break;
case "Beyond" :
case "Insane" :
case "Hard" :
$screenHandler.spawnLevelsAdvancedScreen();
break;
case "SCIM Picks" :
$screenHandler.spawnLevelsExtrasScreen();
break;
default :
$screenHandler.spawnLevelsHomeScreen();
}
break;
case "sandbox" :
$screenHandler.spawnCnsCreateScreen();
break;
case "collection" :
$screenHandler.spawnStartupScreen();
}
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.destroy();
}
function onLevelLoaded() {
if (com.preloaded.scimus.launchpad.Engine.EngineHandler.mode == "game") {
$popupHandler.hideCurrentPopup();
$engine.onLevelStart();
}
}
function onLevelStart(mode, xmlPath) {
$engine.onLevelStart(mode, xmlPath);
}
function onLevelContinue() {
if (((!$connectionHandler.loggedIn) || ($connectionHandler.isAnonymous)) && (!com.preloaded.scimus.launchpad.ui.Popups.PopupLoginPrompt.seen)) {
showSaveProgressPrompt();
} else {
progressLevel();
}
}
function showSaveProgressPrompt() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.PopupLoginPrompt("To save your progress, you need to create an account. Do this now?", "save");
_local2.emailPrompt = "To restore your progress in future you\nneed a secret code. Enter your email address to create one now.";
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(this, progressLevel));
_local2.onUserRegistered = mx.utils.Delegate.create(this, progressLevel);
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
}
function onLevelComplete(evt) {
$currentLevelEndPopup = new com.preloaded.scimus.launchpad.ui.Popups.PopupLevelComplete(evt.time, evt.blocksUsed);
$connectionHandler.getFactoid(chooseContentTag());
$df = com.preloaded.lang.DelayedFunctionCall.create($launchDelegate, 75);
com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__testButton().__set__active(false);
com.preloaded.scimus.launchpad.ThreadHandler.markCurrentLevelComplete(evt.time);
}
function onLevelFailed(evt) {
$currentLevelEndPopup = new com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFailed(evt.time, evt.blocksUsed);
$connectionHandler.getFactoid(chooseContentTag());
$df = com.preloaded.lang.DelayedFunctionCall.create($launchDelegate, 30);
com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__testButton().__set__active(false);
}
function onGetFactoidResponse(response) {
$currentLevelEndPopup.__set__content(response);
}
function launchLevelEndPopup() {
$currentLevelEndPopup.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onLevelContinue));
$currentLevelEndPopup.addEventListener("onReplayButtonRelease", mx.utils.Delegate.create(this, onLevelReplay));
$currentLevelEndPopup.addEventListener("onSaveButtonRelease", mx.utils.Delegate.create(this, showSaveProgressPrompt));
$popupHandler.showPopup($currentLevelEndPopup);
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(false);
$engine.run(false, false);
}
function onLevelReplay() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(true);
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.onLevelReplay();
com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__testButton().__set__active(true);
}
function chooseContentTag() {
var _local12 = com.preloaded.scimus.launchpad.IOHandler.currentInventoryListing;
var _local11 = com.preloaded.scimus.launchpad.IOHandler.currentBlockListing;
var _local6 = new Array();
var _local5;
var _local10 = 0;
for (var _local8 in com.preloaded.scimus.launchpad.IOHandler.currentInventoryListing) {
_local10++;
}
if (_local10 > 0) {
_local5 = _local12;
} else {
_local5 = _local11;
}
var _local9 = 0;
for (var _local8 in _local5) {
_local9++;
}
var _local1;
if (_local9 > 0) {
for (var _local8 in _local5) {
if (((_local8 != "BlockStart") && (_local8 != "BlockFinish")) && (_local8 != "BlockBomb")) {
_local6.push(_local8);
}
}
var _local2 = false;
var _local7 = 0;
while ((_local2 == false) && (_local7 < 20)) {
var _local3 = com.preloaded.UtilsArray.getRandomElement(_local6);
var _local4 = com.preloaded.scimus.launchpad.ConnectionHandler.blockInfo[_local3].tags;
_local1 = com.preloaded.UtilsArray.getRandomElement(_local4);
if (_local1 != undefined) {
for (var _local8 in com.preloaded.scimus.launchpad.Config.FACTOID_TAGS) {
if (_local1 == com.preloaded.scimus.launchpad.Config.FACTOID_TAGS[_local8]) {
_local2 = true;
}
}
}
_local7++;
}
if (_local1.length > 0) {
return(_local1);
}
}
return(com.preloaded.UtilsArray.getRandomElement(com.preloaded.scimus.launchpad.Config.FACTOID_TAGS));
}
function initEngine(mode, levelXMLPath) {
mode = ((mode == undefined) ? "game" : (mode));
$engine.init(mode);
switch (mode) {
case "game" :
$ioHandler.loadLevel(levelXMLPath, mx.utils.Delegate.create(this, onLevelLoaded));
break;
case "sandbox" :
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().setupSandboxInventory();
onLevelStart(mode, levelXMLPath);
}
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__set__active(true);
}
function makeNewMovieClip(name) {
return($host.createEmptyMovieClip(name, $host.getNextHighestDepth()));
}
function onButtonReleaseGlobal() {
com.preloaded.sound.SoundManager.playSound("nav_click", com.preloaded.scimus.launchpad.Config.NAV_SOUND_VOLUME);
}
function onButtonRollOverGlobal() {
com.preloaded.sound.SoundManager.stopSound("nav_rollover");
com.preloaded.sound.SoundManager.playSound("nav_rollover", com.preloaded.scimus.launchpad.Config.NAV_SOUND_VOLUME);
}
}
Symbol 1196 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.EngineHandler] Frame 0
class com.preloaded.scimus.launchpad.Engine.EngineHandler
{
static var instance, mode;
var $host, $active, $paused, $lastCollisionTime, $backgroundHandler, $gridHandler, $bgEffectsMask, bgEffectsLayer, $blockLayerMc, materialLayer, $fgEffectsMask, fgEffectsLayer, $interfaceHandler, $tickDelegate, $fladeContainer, $flade, $wipeHandler, $ball, $sandboxHandler, $df, $goalFailsafe, $bgloop, $levelStartTime, blockStart;
function EngineHandler (host) {
super(this);
$host = host;
}
function get mc() {
return($host);
}
function init(arg_mode) {
if ((instance == undefined) || (instance == null)) {
mode = arg_mode;
instance = this;
$active = false;
$paused = false;
$lastCollisionTime = 0;
initFlade();
$backgroundHandler = new com.preloaded.scimus.launchpad.Engine.BackgroundHandler(makeNewMovieClip("background"));
$gridHandler = new com.preloaded.scimus.launchpad.Engine.GridHandler(com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH, com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT, com.preloaded.scimus.launchpad.Config.GRID_SIZE);
$gridHandler.addEventListener("onBlockRollOver", mx.utils.Delegate.create(this, onBlockRollOver));
$gridHandler.addEventListener("onBlockRollOut", mx.utils.Delegate.create(this, onBlockRollOut));
$gridHandler.addEventListener("onBlockContact", mx.utils.Delegate.create(this, onBlockContact));
$gridHandler.addEventListener("onBlockAdd", mx.utils.Delegate.create(this, onBlockAdd));
var _local2 = makeNewMovieClip("bgEffectsLayer");
$bgEffectsMask = $host.attachMovie("blockUtil", "bgEffectsMask", $host.getNextHighestDepth());
bgEffectsLayer = new com.preloaded.scimus.launchpad.Engine.EffectsLayer(_local2);
_local2.setMask($bgEffectsMask);
$blockLayerMc = makeNewMovieClip("blockLayer");
materialLayer = new com.preloaded.scimus.launchpad.Engine.MaterialLayer(makeNewMovieClip("materialLayer"));
var _local3 = makeNewMovieClip("fgEffectsLayer");
$fgEffectsMask = $host.attachMovie("blockUtil", "fgEffectsMask", $host.getNextHighestDepth());
fgEffectsLayer = new com.preloaded.scimus.launchpad.Engine.EffectsLayer(_local3);
_local3.setMask($fgEffectsMask);
$fgEffectsMask._width = ($bgEffectsMask._width = com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH);
$fgEffectsMask._height = ($bgEffectsMask._height = com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT);
$interfaceHandler = new com.preloaded.scimus.launchpad.Engine.GameUI(makeNewMovieClip("interface"), com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH, com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT, com.preloaded.scimus.launchpad.Config.GRID_SIZE, mode);
$interfaceHandler.addEventListener("onTestButtonRelease", mx.utils.Delegate.create(this, onTestButtonRelease));
com.preloaded.sound.SoundManager.addSound("test.aif", "test");
com.preloaded.sound.SoundManager.addSound("stop.aif", "stop");
var ref = this;
$tickDelegate = function () {
ref._tick();
};
$host.onEnterFrame = $tickDelegate;
run(false, false);
$fladeContainer = makeNewMovieClip("fladeContainer");
$flade.__set__paintHost($fladeContainer);
$wipeHandler = new com.preloaded.scimus.launchpad.Engine.WipeHandler(makeNewMovieClip("wipeHandler"));
}
}
function destroy() {
run(false);
delete mode;
$flade.destroy();
delete $flade;
$backgroundHandler.destroy();
delete $backgroundHandler;
bgEffectsLayer.destroy();
delete bgEffectsLayer;
fgEffectsLayer.destroy();
delete fgEffectsLayer;
$bgEffectsMask.removeMovieClip();
$fgEffectsMask.removeMovieClip();
$blockLayerMc.removeMovieClip();
$ball.destroy();
delete $ball;
materialLayer.destroy();
$interfaceHandler.destroy();
delete $interfaceHandler;
$sandboxHandler.destroy();
$host.sandboxHandlerMc.removeMovieClip();
delete $sandboxHandler;
delete $host.onEnterFrame;
$fladeContainer.removeMovieClip();
com.preloaded.sound.SoundManager.removeSound("bgloop");
$wipeHandler.destroy();
delete $wipeHandler;
$gridHandler.destroy();
delete $gridHandler;
$df.stop();
delete $df;
$goalFailsafe.stop();
delete $goalFailsafe;
instance = null;
}
function initFlade() {
$flade = new org.cove.flade.DynamicsEngine();
$flade.setDamping(1);
$flade.setGravity(0, 0.3);
}
function onLoadLevel() {
$gridHandler.clearAllBlocks();
materialLayer.clear();
}
function onLevelStart(arg_mode, xmlPath) {
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.show();
com.preloaded.sound.SoundManager.removeSound("bgloop");
var _local3 = com.preloaded.lang.ArrayUtils.randomElement(new Array("bg1.aif", "bg2.aif", "bg3.aif"));
$bgloop = com.preloaded.sound.SoundManager.addSound(_local3, "bgloop");
$bgloop.__set___volume(0);
$bgloop.start(0, 99999);
$bgloop.fadeTo(15, 60);
if (arg_mode != undefined) {
mode = arg_mode;
}
if (mode == "sandbox") {
$sandboxHandler = new com.preloaded.scimus.launchpad.Engine.SandboxHandler(makeNewMovieClip("sandboxHandlerMc"));
$sandboxHandler.init(xmlPath, mx.utils.Delegate.create(this, _reveal));
}
if (mode == "game") {
if ((com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous || (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn)) && (!com.preloaded.scimus.launchpad.ui.Popups.PopupGameIntro.seen)) {
pause(true);
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.PopupGameIntro();
_local2.addEventListener("onMcRelease", mx.utils.Delegate.create(this, _introCallback));
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
} else {
_introCallback();
}
}
}
function _introCallback() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
$levelStartTime = getTimer();
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.updateTime(0);
pause(false);
run(false);
com.preloaded.scimus.launchpad.ThreadHandler.incrementCurrentPlayCount();
delete $df;
_reveal();
}
function _reveal() {
$interfaceHandler.show(20);
$wipeHandler.reveal(10);
}
function onLevelReplay() {
_introCallback();
}
function onLevelComplete() {
var _local2 = {type:"onLevelComplete", target:this, time:com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.currentTime.value, blocksUsed:com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().blocksUsed};
if (mode == "game") {
com.preloaded.scimus.launchpad.Main.instance.onLevelComplete(_local2);
pause(true);
} else {
run(false);
}
}
function onLevelFailed() {
var _local2 = {type:"onLevelComplete", target:this, time:com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.currentTime.value, blocksUsed:com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().blocksUsed};
if (mode == "game") {
com.preloaded.scimus.launchpad.Main.instance.onLevelFailed(_local2);
pause(true);
} else {
run(false);
}
}
function onTestButtonRelease() {
run(!$active, true);
}
function run(b, noise) {
if (b) {
$interfaceHandler.__get__testButton().__set__state("active");
if (noise) {
com.preloaded.sound.SoundManager.playSound("test", 50);
}
com.preloaded.scimus.launchpad.Engine.GameUI.instance.clearControls();
clearEffects();
com.preloaded.scimus.launchpad.Engine.Phenomena.LightBeam.resetCount();
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().presenceify();
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().initBlocks();
blockStart.spawn();
$backgroundHandler.showGrid(false);
} else {
$interfaceHandler.__get__testButton().__set__state("off");
$backgroundHandler.showGrid(true);
blockStart.reset();
$ball.destroy();
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().terminateBlocks();
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().removePresence();
if (noise) {
com.preloaded.sound.SoundManager.playSound("stop", 50);
}
}
$active = b;
var _local3;
if (b) {
var ref = this;
_local3 = function () {
ref.onClickCaught();
};
}
$interfaceHandler.catchClicks(b, _local3);
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(!b);
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__set__active(!b);
toggleTickFunction(b);
}
function onClickCaught() {
if (com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__testButton().__get__active()) {
run(false);
}
}
function toggleTickFunction(b) {
if (b) {
_tick = mx.utils.Delegate.create(this, tick);
} else {
_tick = mx.utils.Delegate.create(this, tickTimer);
}
}
function _tick() {
}
function tickTimer() {
var _local2 = getTimer() - $levelStartTime;
if (Math.floor(_local2 / 1000) > com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.currentTime.totalSeconds) {
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.updateTime(_local2);
}
}
function tick() {
$ball.update();
$flade.timeStep();
checkCollisions();
tickTimer();
}
function checkCollisions() {
var _local7 = com.preloaded.scimus.launchpad.Engine.Ball.instances;
for (var _local9 in _local7) {
var _local1 = _local7[_local9];
var _local4 = _local1.presence;
var _local6 = _local1.gridPos.x;
var _local5 = _local1.gridPos.y;
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getNeighbours(_local6, _local5);
_local2.push(com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(_local6, _local5));
for (var _local8 in _local2) {
_local2[_local8].checkCollision(_local1);
}
var _local3 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().edges;
for (var _local8 in _local3) {
_local4.checkCollision(_local3[_local8]);
}
}
}
function blockStartCallback() {
spawnBall();
}
function onBlockAdd(evt) {
}
function onBlockRollOver(evt) {
var _local2 = evt.block;
if (!$active) {
if (!_local2.__get__immobile()) {
_local2.onEditRollOver();
} else {
_local2.showImmobileIndicator();
}
}
}
function onBlockRollOut(evt) {
var _local2 = evt.block;
if (!$active) {
if (!_local2.__get__immobile()) {
_local2.onEditRollOut();
} else {
_local2.hideImmobileIndicator();
}
}
if ($interfaceHandler.__get__currentControl() == undefined) {
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().clearHelp();
}
}
function onBlockContact(evt) {
if (evt.block.type == "BlockBomb") {
onBombCollision(evt);
}
if (evt.block.isGoal) {
if ($df == undefined) {
var p = evt.particle;
var b = evt.block;
var ref = this;
var _local4 = function () {
ref.onGoalCollision(p, b);
};
var _local6 = p.curr.x - p.prev.x;
var _local5 = p.curr.y - p.prev.y;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local2 = 11 - Math.floor(_local7);
_local2 = com.preloaded.math.MathUtils.constrain(_local2, 0, 10);
if (_local2 > 0) {
$df = com.preloaded.lang.DelayedFunctionCall.create(_local4, _local2);
} else {
onGoalCollision(p, b);
}
if (_local2 > 1) {
$goalFailsafe = com.preloaded.lang.DelayedFunctionCall.create(_local4, 1);
}
$interfaceHandler.__get__testButton().__set__active(false);
} else {
$goalFailsafe.restart(1);
}
}
}
function onGoalCollisionFailsafe() {
$df.trigger();
}
function onBombCollision(evt) {
var _local4 = function () {
this.gotoAndStop(this._currentframe + 1);
};
var _local2 = fgEffectsLayer.attachMovie("mc.block.bomb");
_local2._x = evt.block.mc._x + com.preloaded.scimus.launchpad.Config.GFX_OFFSET;
_local2._y = evt.block.mc._y + com.preloaded.scimus.launchpad.Config.GFX_OFFSET;
_local2.onEnterFrame = _local4;
particleBoom(evt.particle);
if (mode == "game") {
onLevelFailed();
} else {
run(false);
}
}
function onGoalCollision(p, b) {
$goalFailsafe.stop();
delete $goalFailsafe;
$df.stop();
delete $df;
b.leave();
if (mode == "game") {
onLevelComplete();
destroyBall(p);
pause(true);
} else {
destroyBall(p);
run(false);
}
}
function particleBoom(p) {
for (var _local3 in com.preloaded.scimus.launchpad.Engine.Ball.instances) {
var _local1 = com.preloaded.scimus.launchpad.Engine.Ball.instances[_local3];
if (p == _local1.presence) {
_local1.boom();
}
}
}
function destroyBall(p) {
for (var _local3 in com.preloaded.scimus.launchpad.Engine.Ball.instances) {
var _local1 = com.preloaded.scimus.launchpad.Engine.Ball.instances[_local3];
if (p == _local1.presence) {
_local1.destroy();
}
}
}
function spawnBall() {
$ball = new com.preloaded.scimus.launchpad.Engine.Ball($host);
$ball.trailScale = 0.9;
$ball.spawn((blockStart.gridPos.x * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), (blockStart.gridPos.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2));
}
function pause(b) {
if (b) {
delete $host.onEnterFrame;
} else {
$host.onEnterFrame = $tickDelegate;
$tickDelegate.call();
}
$paused = b;
}
function get active() {
return($active);
}
function getNewContainer() {
var _local2 = $blockLayerMc.getNextHighestDepth();
var _local3 = $blockLayerMc.createEmptyMovieClip("container_" + _local2, _local2);
return(_local3);
}
function makeNewMovieClip(name) {
return($host.createEmptyMovieClip(name, $host.getNextHighestDepth()));
}
function clearEffects() {
bgEffectsLayer.clear();
fgEffectsLayer.clear();
}
function onKeyUp() {
switch (Key.getCode()) {
case 32 :
onTestButtonRelease();
break;
case 80 :
pause(!$paused);
break;
case 221 :
if ($paused) {
tick();
}
break;
case 70 :
$flade.paintSurfaces();
$blockLayerMc._alpha = (($blockLayerMc._alpha == 100) ? 20 : 100);
}
}
}
Symbol 1197 MovieClip [__Packages.com.preloaded.lang.DispatcherBase] Frame 0
class com.preloaded.lang.DispatcherBase
{
function DispatcherBase (target) {
if (target == undefined) {
target = this;
}
initialise(target);
reinit();
}
function initialise(target) {
mx.events.EventDispatcher.initialize(target);
}
function destroy() {
clearListeners();
}
function clearListeners() {
for (var _local2 in this) {
if (_local2.indexOf("__q_") > -1) {
delete this[_local2];
}
}
}
function listListeners() {
for (var _local2 in this) {
if (_local2.indexOf("__q_") > -1) {
}
}
}
function passthruEvent(evt) {
dispatchEvent(evt);
}
function addEventListener() {
}
function removeEventListener() {
}
function dispatchEvent() {
}
function reinit() {
addEventListener = _addEventListener;
}
function _addEventListener(event, handler) {
var _local2 = "__q_" + event;
if (this[_local2] == undefined) {
this[_local2] = new Array();
}
mx.events.EventDispatcher._removeEventListener(this[_local2], event, handler);
this[_local2].push(handler);
}
}
Symbol 1198 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 1199 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.GridHandler] Frame 0
class com.preloaded.scimus.launchpad.Engine.GridHandler extends com.preloaded.lang.DispatcherBase
{
static var $instance;
var $width, $height, $gridSpacing, gridWidth, gridHeight, $grid, edges, $lastCollisionTime, $edgeSounds, $mode, dispatchEvent;
function GridHandler (width, height, gridSpacing) {
super(this);
$width = width;
$height = height;
$gridSpacing = gridSpacing;
gridWidth = Math.floor(width / gridSpacing);
gridHeight = Math.floor(height / gridSpacing);
$grid = new Array();
var _local6 = 0;
while (_local6 < gridWidth) {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < gridHeight) {
_local4.push(null);
_local3++;
}
$grid.push(_local4);
_local6++;
}
var _local7 = new Array();
_local7.push(new org.cove.flade.surfaces.LineSurface(width, 0, 0, 0, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
_local7.push(new org.cove.flade.surfaces.LineSurface(0, 0, 0, height, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
_local7.push(new org.cove.flade.surfaces.LineSurface(0, height, width, height, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
_local7.push(new org.cove.flade.surfaces.LineSurface(width, height, width, 0, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
for (var _local10 in _local7) {
var _local5 = _local7[_local10];
_local5.setCollisionDepth(100);
org.cove.flade.DynamicsEngine.__get__instance().addSurface(_local5);
_local5.onContact = mx.utils.Delegate.create(this, _onEdgeContact);
}
edges = _local7;
$lastCollisionTime = 0;
$edgeSounds = [com.preloaded.sound.SoundManager.addSound("m1.aif", "m1.aif"), com.preloaded.sound.SoundManager.addSound("m2.aif", "m2.aif"), com.preloaded.sound.SoundManager.addSound("m3.aif", "m3.aif"), com.preloaded.sound.SoundManager.addSound("m4.aif", "m4.aif")];
$instance = this;
$mode = "game";
}
function onEdgeContact(p) {
var _local2 = com.preloaded.lang.ArrayUtils.randomElement($edgeSounds);
_local2.__set___pan(-100 + ((200 / com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH) * p.prev.x));
_local2.__set___volume(50);
_local2.start();
}
function _onEdgeContact() {
if ((getTimer() - $lastCollisionTime) > com.preloaded.scimus.launchpad.Config.COLLISION_TIME_THRESHOLD) {
onEdgeContact();
}
$lastCollisionTime = getTimer();
}
function addBlock(blockIn, x, y, setupMc) {
if ($grid[x][y] != null) {
var _local5 = popBlockAt(x, y);
}
if (blockIn.gridPos == undefined) {
blockIn.addEventListener("onRollOver", mx.utils.Delegate.create(this, onBlockRollOver));
blockIn.addEventListener("onRollOut", mx.utils.Delegate.create(this, onBlockRollOut));
blockIn.addEventListener("onTileContact", mx.utils.Delegate.create(this, onBlockContact));
}
$grid[x][y] = blockIn;
if ((setupMc == undefined) || (setupMc === true)) {
blockIn.gridPos = new flash.geom.Point(x, y);
blockIn.mc._x = x * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
blockIn.mc._y = y * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
blockIn.mc._visible = true;
blockIn.onPlace();
}
_local5.destroy();
dispatchEvent({type:"onBlockAdd", block:blockIn, target:this});
}
function set mode(str) {
$mode = str;
//return(mode);
}
function get mode() {
return($mode);
}
function onBlockRollOver(evt) {
if ($mode == "game") {
dispatchEvent({type:"onBlockRollOver", block:evt.target, target:this});
}
if ($mode == "remove") {
evt.target.mc.useHandCursor = true;
}
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().setHelp(com.preloaded.scimus.launchpad.ConnectionHandler.blockInfo[evt.target.type]);
}
function onBlockRollOut(evt) {
dispatchEvent({type:"onBlockRollOut", block:evt.target, target:this});
}
function onBlockContact(evt) {
dispatchEvent({type:"onBlockContact", block:evt.target, particle:evt.particle, target:this});
}
function getBlockAt(x, y) {
return($grid[x][y]);
}
function popBlockAt(x, y, callback) {
var _local2 = $grid[x][y];
if ((callback == undefined) || (callback === true)) {
_local2.onGridPop();
}
$grid[x][y] = null;
return(_local2);
}
function getColumnAt(x) {
return($grid[x]);
}
function getNeighbours(blockX, blockY) {
var _local4 = new Array($grid[blockX][blockY - 1], $grid[blockX - 1][blockY], $grid[blockX + 1][blockY], $grid[blockX][blockY + 1]);
return(_local4);
}
function getAllNeighbours(blockX, blockY) {
var _local4 = new Array($grid[blockX - 1][blockY - 1], $grid[blockX][blockY - 1], $grid[blockX + 1][blockY - 1], $grid[blockX - 1][blockY], $grid[blockX + 1][blockY], $grid[blockX - 1][blockY + 1], $grid[blockX][blockY + 1], $grid[blockX + 1][blockY + 1]);
return(_local4);
}
function presenceify() {
for (var _local5 in $grid) {
var _local3 = $grid[_local5];
for (var _local4 in _local3) {
var _local2 = _local3[_local4];
if (!_local2.removeFlag) {
_local2.presenceify();
}
}
}
}
function initBlocks() {
var _local4 = new Array();
for (var _local6 in $grid) {
var _local3 = $grid[_local6];
for (var _local5 in _local3) {
var _local2 = _local3[_local5];
if (!_local2.removeFlag) {
_local2.init();
_local4.push(_local2);
}
}
}
for (var _local5 in _local4) {
_local4[_local5].postInit();
}
}
function terminateBlocks() {
for (var _local5 in $grid) {
var _local3 = $grid[_local5];
for (var _local4 in _local3) {
var _local2 = _local3[_local4];
if (!_local2.removeFlag) {
_local2.terminate();
}
}
}
}
function removePresence() {
for (var _local5 in $grid) {
var _local3 = $grid[_local5];
for (var _local4 in _local3) {
var _local2 = _local3[_local4];
if (!_local2.removeFlag) {
_local2.removePresence();
}
}
}
}
function clearAllBlocks() {
for (var _local5 in $grid) {
var _local3 = $grid[_local5];
for (var _local4 in _local3) {
var _local2 = popBlockAt(_local5, _local4);
_local2.destroy();
$grid[_local5][_local4] = null;
}
}
com.preloaded.scimus.launchpad.Engine.MaterialLayer.instance.clear();
}
static function get instance() {
return($instance);
}
function get grid() {
return($grid);
}
static function gridToScreen(pt) {
return(new flash.geom.Point(pt.x * com.preloaded.scimus.launchpad.Config.GRID_SIZE, pt.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE));
}
function destroy() {
clearAllBlocks();
}
}
Symbol 1200 MovieClip [__Packages.org.cove.flade.surfaces.AbstractTile] Frame 0
class org.cove.flade.surfaces.AbstractTile
{
var center, verts, normal, isVisible, isActivated, coeffFric, dmc, coeffRest, __get__surfaceBounce, minX, maxX, minY, maxY;
function AbstractTile (cx, cy, friction, bounce) {
center = new org.cove.flade.util.Vector(cx, cy);
verts = new Array();
normal = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
isActivated = true;
coeffFric = ((friction == undefined) ? (org.cove.flade.DynamicsEngine.__get__instance().globalFriction) : (friction));
surfaceBounce = (((bounce == undefined) ? (org.cove.flade.DynamicsEngine.__get__instance().globalBounce) : (bounce)));
}
function initializeContainer() {
dmc.removeMovieClip();
dmc = org.cove.flade.DynamicsEngine.__get__instance().getNewContainer();
}
function destroy() {
dmc.clear();
dmc.removeMovieClip();
}
function setVisible(v) {
isVisible = v;
}
function set surfaceBounce(kfr) {
coeffRest = 1 + kfr;
//return(__get__surfaceBounce());
}
function setActiveState(a) {
isActivated = a;
}
function getActiveState() {
return(isActivated);
}
function createBoundingRect(rw, rh) {
var _local2 = center.y - (rh / 2);
var _local3 = center.y + (rh / 2);
var _local5 = center.x - (rw / 2);
var _local4 = center.x + (rw / 2);
verts.push(new org.cove.flade.util.Vector(_local4, _local3));
verts.push(new org.cove.flade.util.Vector(_local4, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local3));
setCardProjections();
}
function testIntervals(boxMin, boxMax, tileMin, tileMax) {
if (boxMax < tileMin) {
return(0);
}
if (tileMax < boxMin) {
return(0);
}
var _local2 = tileMax - boxMin;
var _local1 = tileMin - boxMax;
if (Math.abs(_local2) < Math.abs(_local1)) {
return(_local2);
}
return(_local1);
}
function setCardProjections() {
getCardXProjection();
getCardYProjection();
}
function getCardXProjection() {
minX = verts[0].x;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x < minX) {
minX = verts[_local2].x;
}
_local2++;
}
maxX = verts[0].x;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x > maxX) {
maxX = verts[_local2].x;
}
_local2++;
}
}
function getCardYProjection() {
minY = verts[0].y;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y < minY) {
minY = verts[_local2].y;
}
_local2++;
}
maxY = verts[0].y;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y > maxY) {
maxY = verts[_local2].y;
}
_local2++;
}
}
function onContact() {
}
function postContact() {
}
}
Symbol 1201 MovieClip [__Packages.org.cove.flade.util.Vector] Frame 0
class org.cove.flade.util.Vector
{
var x, y;
function Vector (px, py) {
x = px;
y = py;
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function plusNew(v) {
return(new org.cove.flade.util.Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function minusNew(v) {
return(new org.cove.flade.util.Vector(x - v.x, y - v.y));
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function multNew(s) {
return(new org.cove.flade.util.Vector(x * s, y * s));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
return(this);
}
function magnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function project(b) {
var _local5 = dot(b);
var _local4 = (b.x * b.x) + (b.y * b.y);
var _local3 = new org.cove.flade.util.Vector(0, 0);
_local3.x = (_local5 / _local4) * b.x;
_local3.y = (_local5 / _local4) * b.y;
return(_local3);
}
function toString() {
return((("Vector.toString: x=" + x) + ", y=") + y);
}
function rotate(tAngle) {
var _local4 = (Math.cos(tAngle) * x) - (Math.sin(tAngle) * y);
var _local3 = (Math.cos(tAngle) * y) + (Math.sin(tAngle) * x);
x = _local4;
y = _local3;
}
function round() {
x = Math.round(x);
y = Math.round(y);
}
function floor() {
x = Math.floor(x);
y = Math.floor(y);
}
function ceil() {
x = Math.ceil(x);
y = Math.ceil(y);
}
function clone() {
return(new org.cove.flade.util.Vector(x, y));
}
}
Symbol 1202 MovieClip [__Packages.org.cove.flade.DynamicsEngine] Frame 0
class org.cove.flade.DynamicsEngine
{
static var $instance, gravity, coeffDamp;
var primitives, surfaces, constraints, pointForces, $host, __get__paintHost, globalFriction, globalBounce;
function DynamicsEngine () {
if ($instance == undefined) {
primitives = new Array();
surfaces = new Array();
constraints = new Array();
pointForces = new Array();
gravity = new org.cove.flade.util.Vector(0, 1);
coeffDamp = 0.99;
$instance = this;
}
}
function set paintHost(mc) {
$host = mc;
//return(__get__paintHost());
}
function setSurfaceFriction(n) {
globalFriction = n;
}
function setSurfaceBounce(n) {
globalBounce = n;
}
function addPrimitive(p) {
primitives.push(p);
}
function removePrimitive(p) {
for (var _local3 in primitives) {
if (primitives[_local3] == p) {
primitives.splice(_local3, 1);
}
primitives[_local3].destroy();
}
}
function addSurface(s) {
surfaces.push(s);
}
function removeSurface(s) {
for (var _local3 in surfaces) {
if (surfaces[_local3] == s) {
surfaces.splice(_local3, 1);
}
}
}
function addPointForce(p) {
pointForces.push(p);
}
function removePointForce(p) {
for (var _local3 in pointForces) {
if (pointForces[_local3] == p) {
pointForces.splice(_local3, 1);
}
}
}
function addConstraint(c) {
constraints.push(c);
}
function paintSurfaces() {
var _local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].paint();
_local2++;
}
}
function paintPrimitives() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].paint();
_local2++;
}
}
function paintConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].paint();
_local2++;
}
}
function timeStep() {
verlet();
applyForces();
satisfyConstraints();
}
function setDamping(d) {
coeffDamp = d;
}
function setGravity(gx, gy) {
gravity.x = gx;
gravity.y = gy;
}
function verlet() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].verlet();
_local2++;
}
}
function applyForces() {
for (var _local3 in primitives) {
for (var _local2 in pointForces) {
pointForces[_local2].applyForceToParticle(primitives[_local3]);
}
}
}
function satisfyConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].resolve();
_local2++;
}
}
function checkCollisions() {
var _local4 = 0;
while (_local4 < surfaces.length) {
var _local3 = surfaces[_local4];
if (_local3.getActiveState()) {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].checkCollision(_local3);
_local2++;
}
}
_local4++;
}
}
static function get instance() {
return($instance);
}
function destroy() {
$instance = null;
delete $instance;
}
function getNewContainer() {
var _local2 = $host.getNextHighestDepth();
var _local3 = $host.createEmptyMovieClip("container_" + _local2, _local2);
return(_local3);
}
}
Symbol 1203 MovieClip [__Packages.org.cove.flade.primitives.Particle] Frame 0
class org.cove.flade.primitives.Particle extends mx.events.EventDispatcher
{
var init, curr, prev, temp, extents, bmin, bmax, mtd, isVisible, dmc, dispatchEvent;
function Particle (posX, posY) {
super(this);
init = new org.cove.flade.util.Vector(posX, posY);
curr = new org.cove.flade.util.Vector(posX, posY);
prev = new org.cove.flade.util.Vector(posX, posY);
temp = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(0, 0);
bmin = 0;
bmax = 0;
mtd = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
}
function initializeContainer() {
dmc.removeMovieClip();
dmc = org.cove.flade.DynamicsEngine.__get__instance().getNewContainer();
}
function destroy() {
dmc.clear();
dmc.removeMovieClip();
}
function setVisible(v) {
isVisible = v;
}
function verlet() {
temp.x = curr.x;
temp.y = curr.y;
curr.x = curr.x + ((org.cove.flade.DynamicsEngine.coeffDamp * (curr.x - prev.x)) + org.cove.flade.DynamicsEngine.gravity.x);
curr.y = curr.y + ((org.cove.flade.DynamicsEngine.coeffDamp * (curr.y - prev.y)) + org.cove.flade.DynamicsEngine.gravity.y);
prev.x = temp.x;
prev.y = temp.y;
}
function pin() {
curr.x = init.x;
curr.y = init.y;
prev.x = init.x;
prev.y = init.y;
}
function setPos(px, py) {
curr.x = px;
curr.y = py;
prev.x = px;
prev.y = py;
}
function getCardXProjection() {
bmin = curr.x - extents.x;
bmax = curr.x + extents.x;
}
function getCardYProjection() {
bmin = curr.y - extents.y;
bmax = curr.y + extents.y;
}
function getAxisProjection(axis) {
var _local5 = new org.cove.flade.util.Vector(Math.abs(axis.x), Math.abs(axis.y));
var _local2 = curr.dot(axis);
var _local3 = extents.dot(_local5);
bmin = _local2 - _local3;
bmax = _local2 + _local3;
}
function setMTD(depthX, depthY, depthN, surfNormal) {
var _local4 = Math.abs(depthX);
var _local3 = Math.abs(depthY);
var _local2 = Math.abs(depthN);
if ((_local4 < _local3) && (_local4 < _local2)) {
mtd.setTo(depthX, 0);
} else if ((_local3 < _local4) && (_local3 < _local2)) {
mtd.setTo(0, depthY);
} else if ((_local2 < _local4) && (_local2 < _local3)) {
mtd = surfNormal.multNew(depthN);
}
}
function setXYMTD(depthX, depthY) {
var _local3 = Math.abs(depthX);
var _local2 = Math.abs(depthY);
if (_local3 < _local2) {
mtd.setTo(depthX, 0);
} else {
mtd.setTo(0, depthY);
}
}
function resolveCollision(normal, surface) {
onCollision(surface);
var _local2 = curr.minusNew(prev);
var _local3 = normal.dot(_local2);
var _local9 = _local2.minusNew(normal.multNew(_local3));
var _local4 = _local9.multNew(surface.coeffFric);
var _local5 = normal.multNew(_local3 * surface.coeffRest);
var _local6 = _local5.plusNew(_local4);
var _local7 = _local2.minusNew(_local6);
curr.plus(mtd);
prev = curr.minusNew(_local7);
}
function paint() {
}
function checkCollision(surface) {
return(false);
}
function onCollision(s) {
dispatchEvent({type:"onCollision", target:this, surface:s});
}
}
Symbol 1204 MovieClip [__Packages.org.cove.flade.surfaces.Surface] Frame 0
interface org.cove.flade.surfaces.Surface
{
}
Symbol 1205 MovieClip [__Packages.org.cove.flade.primitives.CircleParticle] Frame 0
class org.cove.flade.primitives.CircleParticle extends org.cove.flade.primitives.Particle
{
var radius, contactRadius, extents, closestPoint, dmc, initializeContainer, curr;
function CircleParticle (px, py, r) {
super(px, py);
radius = r;
contactRadius = r;
extents = new org.cove.flade.util.Vector(r, r);
closestPoint = new org.cove.flade.util.Vector(0, 0);
}
function paint() {
if (dmc == undefined) {
initializeContainer();
}
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, curr.x, curr.y, radius);
}
function checkCollision(surface) {
return(surface.resolveCircleCollision(this));
}
}
Symbol 1206 MovieClip [__Packages.org.cove.flade.graphics.Graphics] Frame 0
class org.cove.flade.graphics.Graphics
{
function Graphics () {
}
static function paintLine(dmc, x0, y0, x1, y1) {
dmc.moveTo(x0, y0);
dmc.lineTo(x1, y1);
}
static function paintCircle(dmc, x, y, r) {
var mtp8r = (0.414213562373095 * r);
var msp4r = (0.707106781186547 * r);
if (dmc != undefined) {
with (dmc) {
moveTo(x + r, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo((-mtp8r) + x, r + y, (-msp4r) + x, msp4r + y);
curveTo((-r) + x, mtp8r + y, (-r) + x, y);
curveTo((-r) + x, (-mtp8r) + y, (-msp4r) + x, (-msp4r) + y);
curveTo((-mtp8r) + x, (-r) + y, x, (-r) + y);
curveTo(mtp8r + x, (-r) + y, msp4r + x, (-msp4r) + y);
curveTo(r + x, (-mtp8r) + y, r + x, y);
}
}
}
static function paintRectangle(dmc, x, y, w, h) {
var w2 = (w / 2);
var h2 = (h / 2);
with (dmc) {
moveTo(x - w2, y - h2);
lineTo(x + w2, y - h2);
lineTo(x + w2, y + h2);
lineTo(x - w2, y + h2);
lineTo(x - w2, y - h2);
}
}
}
Symbol 1207 MovieClip [__Packages.org.cove.flade.primitives.RectangleParticle] Frame 0
class org.cove.flade.primitives.RectangleParticle extends org.cove.flade.primitives.Particle
{
var width, height, vertex, extents, dmc, initializeContainer, isVisible, curr;
function RectangleParticle (px, py, w, h) {
super(px, py);
width = w;
height = h;
vertex = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(w / 2, h / 2);
}
function paint() {
if (dmc == undefined) {
initializeContainer();
}
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, curr.x, curr.y, width, height);
}
}
function checkCollision(surface) {
surface.resolveRectangleCollision(this);
}
}
Symbol 1208 MovieClip [__Packages.com.preloaded.scimus.launchpad.FladeExtensions.PointForce] Frame 0
class com.preloaded.scimus.launchpad.FladeExtensions.PointForce
{
var pos, strength;
function PointForce (x, y, s) {
pos = new org.cove.flade.util.Vector(x, y);
strength = s;
}
function applyForceToParticle(p) {
var _local2 = new org.cove.flade.util.Vector(pos.x - p.curr.x, pos.y - p.curr.y);
var _local4 = _local2.magnitude();
_local2.mult(strength / (_local4 * _local4));
p.curr.x = p.curr.x + _local2.x;
p.curr.y = p.curr.y + _local2.y;
}
}
Symbol 1209 MovieClip [__Packages.org.cove.flade.constraints.Constraint] Frame 0
interface org.cove.flade.constraints.Constraint
{
}
Symbol 1210 MovieClip [__Packages.org.cove.flade.surfaces.LineSurface] Frame 0
class org.cove.flade.surfaces.LineSurface extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var p1, p2, collNormal, dmc, initializeContainer, isVisible, onContact, faceNormal, collisionDepth, testIntervals, minY, maxY, minX, maxX, sideNormal, minS, maxS, minF, maxF, rise, run, sign, slope, invB, setCardProjections, p3, p4, verts;
function LineSurface (p1x, p1y, p2x, p2y, friction, bounce) {
super(0, 0, friction, bounce);
p1 = new org.cove.flade.util.Vector(p1x, p1y);
p2 = new org.cove.flade.util.Vector(p2x, p2y);
calcFaceNormal();
collNormal = new org.cove.flade.util.Vector(0, 0);
setCollisionDepth(10);
}
function paint(color) {
if (dmc == undefined) {
initializeContainer();
}
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, ((color == undefined) ? 65280 : (color)), 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, p1.x, p1.y, p2.x, p2.y);
}
}
function resolveCircleCollision(p) {
var _local2 = isCircleColliding(p);
if (_local2) {
onContact(p);
p.resolveCollision(faceNormal, this);
}
return(_local2);
}
function resolveRectangleCollision(p) {
if (isRectangleColliding(p)) {
onContact(p);
p.resolveCollision(collNormal, this);
}
}
function setCollisionDepth(d) {
collisionDepth = d;
precalculate();
}
function isCircleColliding(p) {
findClosestPoint(p.curr, p.closestPoint);
var _local3 = p.closestPoint.minusNew(p.curr);
_local3.normalize();
if (inequality(p.curr)) {
var _local5 = Math.abs(_local3.x);
_local3.x = ((faceNormal.x < 0) ? (_local5) : (-_local5));
_local3.y = Math.abs(_local3.y);
}
var _local4 = p.curr.plusNew(_local3.mult(p.radius));
if (segmentInequality(_local4)) {
if (_local4.distance(p.closestPoint) > collisionDepth) {
return(false);
}
var _local7 = _local4.x - p.closestPoint.x;
var _local6 = _local4.y - p.closestPoint.y;
p.mtd.setTo(-_local7, -_local6);
return(true);
}
return(false);
}
function isRectangleColliding(p) {
p.getCardYProjection();
var _local7 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local7 == 0) {
return(false);
}
p.getCardXProjection();
var _local8 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local8 == 0) {
return(false);
}
p.getAxisProjection(sideNormal);
var _local10 = testIntervals(p.bmin, p.bmax, minS, maxS);
if (_local10 == 0) {
return(false);
}
p.getAxisProjection(faceNormal);
var _local9 = testIntervals(p.bmin, p.bmax, minF, maxF);
if (_local9 == 0) {
return(false);
}
var _local4 = Math.abs(_local8);
var _local3 = Math.abs(_local7);
var _local6 = Math.abs(_local10);
var _local5 = Math.abs(_local9);
if (((_local4 <= _local3) && (_local4 <= _local6)) && (_local4 <= _local5)) {
p.mtd.setTo(_local8, 0);
collNormal.setTo(p.mtd.x / _local4, 0);
} else if (((_local3 <= _local4) && (_local3 <= _local6)) && (_local3 <= _local5)) {
p.mtd.setTo(0, _local7);
collNormal.setTo(0, p.mtd.y / _local3);
} else if (((_local5 <= _local4) && (_local5 <= _local3)) && (_local5 <= _local6)) {
p.mtd = faceNormal.multNew(_local9);
collNormal.copy(faceNormal);
} else if (((_local6 <= _local4) && (_local6 <= _local3)) && (_local6 <= _local5)) {
p.mtd = sideNormal.multNew(_local10);
collNormal.copy(sideNormal);
}
return(true);
}
function precalculate() {
rise = p2.y - p1.y;
run = p2.x - p1.x;
sign = ((run >= 0) ? 1 : -1);
slope = rise / run;
invB = 1 / ((run * run) + (rise * rise));
createRectangle();
calcSideNormal();
setCardProjections();
setAxisProjections();
}
function calcFaceNormal() {
faceNormal = new org.cove.flade.util.Vector(0, 0);
var _local3 = p2.x - p1.x;
var _local2 = p2.y - p1.y;
faceNormal.setTo(_local2, -_local3);
faceNormal.normalize();
}
function segmentInequality(toPoint) {
var _local2 = findU(toPoint);
var _local3 = inequality(toPoint);
return(((_local2 >= 0) && (_local2 <= 1)) && (_local3));
}
function inequality(toPoint) {
var _local2 = ((slope * (toPoint.x - p1.x)) + (p1.y - toPoint.y)) * sign;
return(_local2 <= 0);
}
function findClosestPoint(toPoint, returnVect) {
var _local2 = findU(toPoint);
if (_local2 <= 0) {
returnVect.copy(p1);
return(undefined);
}
if (_local2 >= 1) {
returnVect.copy(p2);
return(undefined);
}
var _local5 = p1.x + (_local2 * (p2.x - p1.x));
var _local4 = p1.y + (_local2 * (p2.y - p1.y));
returnVect.setTo(_local5, _local4);
}
function findU(p) {
var _local2 = ((p.x - p1.x) * run) + ((p.y - p1.y) * rise);
return(_local2 * invB);
}
function createRectangle() {
var _local5 = p2.x + ((-faceNormal.x) * collisionDepth);
var _local3 = p2.y + ((-faceNormal.y) * collisionDepth);
var _local4 = p1.x + ((-faceNormal.x) * collisionDepth);
var _local2 = p1.y + ((-faceNormal.y) * collisionDepth);
p3 = new org.cove.flade.util.Vector(_local5, _local3);
p4 = new org.cove.flade.util.Vector(_local4, _local2);
verts.push(p1);
verts.push(p2);
verts.push(p3);
verts.push(p4);
}
function setAxisProjections() {
var _local2;
minF = p2.dot(faceNormal);
maxF = p3.dot(faceNormal);
if (minF > maxF) {
_local2 = minF;
minF = maxF;
maxF = _local2;
}
minS = p1.dot(sideNormal);
maxS = p2.dot(sideNormal);
if (minS > maxS) {
_local2 = minS;
minS = maxS;
maxS = _local2;
}
}
function calcSideNormal() {
sideNormal = new org.cove.flade.util.Vector(0, 0);
var _local3 = p3.x - p2.x;
var _local2 = p3.y - p2.y;
sideNormal.setTo(_local2, -_local3);
sideNormal.normalize();
}
}
Symbol 1211 MovieClip [__Packages.com.preloaded.scimus.launchpad.Config] Frame 0
class com.preloaded.scimus.launchpad.Config
{
function Config () {
}
static var PLAYAREA_WIDTH = 680;
static var PLAYAREA_HEIGHT = 360;
static var GRID_SIZE = 40;
static var GRID_COLOUR = 1062991;
static var DEFAULT_FRICTION = 0.08;
static var DEFAULT_BOUNCE = 0.5;
static var COLLISION_TIME_THRESHOLD = 500;
static var GFX_OFFSET = 0;
static var PNG_OFFSET = 0;
static var XML_PATH = "xml/";
static var SCREEN_WIDTH = 744;
static var SCREEN_HEIGHT = 488;
static var SCREEN_MARGIN_HORZ = 31;
static var SCREEN_MARGIN_VERT = 47;
static var SERVER_URL = "http://www.sciencemuseum.org.uk";
static var SERVICE_URL = "/objectapi/launchpad.asmx?WSDL";
static var SOAP_AUTHCODE = "ilikehorsesmorethananyanimal";
static var INVENTORY_COLOUR = 16698633;
static var BACKGROUND_COLOUR = 1647160;
static var SOUND_OFFSET = 50;
static var SCREEN_COLOR_PLAY_HI = 8838144;
static var SCREEN_COLOR_PLAY_LO = 5012480;
static var SCREEN_COLOR_CREATE_HI = 40191;
static var SCREEN_COLOR_CREATE_LO = 24991;
static var FACTOID_TAGS = ["Air", "Electricity", "ForcesAndMotion", "Heat", "Ice", "Light", "Magnetism", "Materials", "Water"];
static var XML_CACHE_SIZE = 204800;
static var VAR_USER_CODE = "userCode";
static var VAR_LEVEL_ID = "collectLevel";
static var NAV_SOUND_VOLUME = 50;
}
Symbol 1212 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1213 MovieClip [__Packages.com.preloaded.sound.SoundManager] Frame 0
class com.preloaded.sound.SoundManager
{
static var $sounds, $depth, $mute, $globalSound, $host, $globalSoundAnimation;
function SoundManager () {
}
static function init(mc) {
$sounds = new Array();
$depth = 10;
$mute = false;
$globalSound = new Sound();
$host = mc;
}
static function addSound(lib, id) {
var _local2;
if ($sounds[id].sound == undefined) {
_local2 = new com.preloaded.sound.SoundWrapper($host.createEmptyMovieClip("sound_" + $depth, $depth++));
_local2.attachSound(lib);
$sounds[id] = _local2;
} else {
_local2 = $sounds[id];
}
_root.su = $sounds;
return(_local2);
}
static function removeSound(id) {
var _local1 = $sounds[id];
_local1.destroy();
$sounds[id] = null;
}
static function purge() {
for (var _local1 in $sounds) {
removeSound(_local1);
}
}
static function setVolForID(id, vol) {
for (var _local1 in $sounds) {
}
if ($sounds[id] != undefined) {
$sounds[id]._volume = vol;
}
}
static function setPanForID(id, pan) {
if ($sounds[id] != undefined) {
$sounds[id]._pan = pan;
}
}
static function playSound(id, vol, pan, loop) {
var _local1 = $sounds[id];
if ((_local1 != undefined) && (!$mute)) {
if (_local1.__get__playing()) {
_local1.stop();
}
if (vol != null) {
_local1.__set___volume(vol);
} else {
_local1.__set___volume(100);
}
if (pan != null) {
_local1.__set___pan(pan);
}
if (loop != null) {
_local1.start(0, loop);
} else {
_local1.start();
}
}
}
static function stopSound(id) {
if ($sounds[id] != undefined) {
$sounds[id].stop();
}
}
static function get mute() {
return($mute);
}
static function set mute(b) {
$globalSoundAnimation.stop();
if (b) {
$globalSoundAnimation = new mx.transitions.Tween(com.preloaded.sound.SoundManager, "_globalVolume", mx.transitions.easing.Regular.easeOut, _globalVolume, 0, 10, false);
} else {
$globalSoundAnimation = new mx.transitions.Tween(com.preloaded.sound.SoundManager, "_globalVolume", mx.transitions.easing.Regular.easeOut, _globalVolume, 100, 10, false);
}
$mute = b;
//return(mute);
}
static function get _globalVolume() {
return($globalSound.getVolume());
}
static function set _globalVolume(v) {
$globalSound.setVolume(v);
//return(_globalVolume);
}
static function get sounds() {
return($sounds);
}
}
Symbol 1214 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 1215 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 1216 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 1217 MovieClip [__Packages.com.preloaded.sound.SoundWrapper] Frame 0
class com.preloaded.sound.SoundWrapper
{
var $host, $sound, $playing, $volumeAnimation;
function SoundWrapper (host) {
$host = host;
$sound = new Sound(host);
$playing = false;
}
function attachSound(id) {
$sound.attachSound(id);
}
function fadeTo(vol, time) {
$volumeAnimation.stop();
$volumeAnimation = new mx.transitions.Tween(this, "_volume", mx.transitions.easing.Regular.easeOut, _volume, vol, time, false);
if (vol == 0) {
$volumeAnimation.onMotionFinished = mx.utils.Delegate.create(this, stop);
}
}
function set _volume(vol) {
$sound.setVolume(vol);
//return(_volume);
}
function get _volume() {
return($sound.getVolume());
}
function set _pan(pan) {
$sound.setPan(pan);
//return(_pan);
}
function get _pan() {
return($sound.getPan());
}
function start(offs, loop) {
if (!$playing) {
if (offs == undefined) {
offs = 0;
}
$sound.start(offs, loop);
$sound.onSoundComplete = mx.utils.Delegate.create(this, stop);
$playing = true;
}
}
function stop() {
$sound.stop();
$playing = false;
}
function destroy() {
$sound.stop();
$volumeAnimation.stop();
delete $sound;
delete $volumeAnimation;
}
function get sound() {
return($sound);
}
function get playing() {
return($playing);
}
}
Symbol 1218 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(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 var version = "1.1.0.52";
}
Symbol 1219 MovieClip [__Packages.com.preloaded.lang.ArrayUtils] Frame 0
class com.preloaded.lang.ArrayUtils
{
function ArrayUtils () {
}
static function randomElement(array) {
var _local1 = random(array.length);
return(array[_local1]);
}
static function shuffle(array) {
var _local1 = array.slice();
_local1.sort(function (a, b) {
return(random(2));
});
return(_local1);
}
static function removeDuplicates(array) {
var _local2 = array.slice();
var _local3 = 0;
while (_local3 < (_local2.length - 1)) {
var _local4 = _local2[_local3];
var _local1 = _local3 + 1;
while (_local1 < _local2.length) {
if (_local4 == _local2[_local1]) {
_local2.splice(_local1, 1);
}
_local1++;
}
_local3++;
}
return(_local2);
}
}
Symbol 1220 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockBase] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockBase extends com.preloaded.lang.DispatcherBase
{
var $host, type, $gfx, $friction, $bounce, $lastCollisionTime, $conductionMatrix, $chargeMatrix, saveMe, isMaterial, isGoal, removeFlag, $bounceSounds, $sfx, $chargePaths, pathIndices, $chargeIndicator, $connectionIndicator, $powerIndicator, $neighbours, gridPos, $rotation, $boltsMc, $immobile, $hitter, $removeGfx, $instantiator, dispatchEvent, $center, $control;
function BlockBase (host, blockType, gfxId, friction, bounce) {
super(this);
$host = host;
type = blockType;
immobile = (false);
makeHitter();
$gfx = host.attachMovie(gfxId, "gfx", $host.getNextHighestDepth());
$gfx._x = ($gfx._y = com.preloaded.scimus.launchpad.Config.GFX_OFFSET);
$host.cacheAsBitmap = true;
$friction = friction;
$bounce = bounce;
$lastCollisionTime = 0;
$conductionMatrix = new Array(0, 0, 0, 0, 0, 0);
$chargeMatrix = new Array(0, 0, 0, 0, 0, 0);
saveMe = true;
isMaterial = false;
isGoal = false;
removeFlag = false;
}
function showDebug() {
new Color($gfx).setRGB(16711680);
}
function loadBounceSounds(arrIds) {
$bounceSounds = new Array();
for (var _local4 in arrIds) {
var _local2 = arrIds[_local4];
$bounceSounds.push(com.preloaded.sound.SoundManager.addSound(_local2, _local2));
}
}
function playBounceSound() {
var _local2 = com.preloaded.lang.ArrayUtils.randomElement($bounceSounds);
_local2.__set___pan(-100 + ((200 / com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH) * $host._x));
_local2.__set___volume(70);
_local2.start();
}
function startSfx(loop, fade, vol, offset) {
if (loop == undefined) {
loop = true;
}
if (fade == undefined) {
fade = true;
}
if (vol == undefined) {
vol = 30;
}
if (offset == undefined) {
offset = 0;
}
$sfx.start(offset, (loop ? 9999 : 1));
$sfx.__set___volume(0);
if (fade) {
$sfx.fadeTo(vol, 60);
} else {
$sfx.__set___volume(vol);
}
$sfx.__set___pan(-100 + ((200 / com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH) * $host._x));
}
function stopSfx(fade) {
if ((fade === true) || (fade == undefined)) {
$sfx.fadeTo(0, 30);
} else {
$sfx.stop();
}
}
function applyCharge(energyType, strength, source) {
if ($conductionMatrix[energyType] > 0) {
$chargeMatrix[energyType] = strength;
if (strength > 0) {
showCharge(energyType, strength, source);
} else if (strength <= 0) {
hideCharge(energyType);
}
}
}
function initChargeArrays() {
$chargeMatrix = new Array(0, 0, 0, 0, 0, 0);
$chargePaths = new Array();
pathIndices = new Array(null, null, null, null, null, null);
}
function getChargePath(energyType, start) {
if ($chargePaths[energyType] == undefined) {
var _local10 = new Array();
var _local18 = new Array();
start = this;
var _local13 = 1;
var _local12 = new Array(start);
start.pathIndices[energyType] = _local13;
while (_local12.length > 0) {
_local13++;
var _local4 = new Array();
for (var _local17 in _local12) {
var _local5 = _local12[_local17];
var _local6 = true;
if (((energyType == 0) && (_local5.type == "BlockSwitch")) && (start.type != "BlockSwitch")) {
_local6 = false;
}
if ((energyType == 1) && (_local5.type == "BlockIce")) {
_local6 = false;
}
if (_local6) {
var _local7 = ((energyType == 0) ? (_local5.getAllNeighbours()) : (_local5.__get__neighbours()));
for (var _local14 in _local7) {
var _local2 = _local7[_local14];
var _local8 = _local2.__get__conductionMatrix();
if (_local8[energyType] > 0) {
if (_local2.pathIndices[energyType] == null) {
_local2.pathIndices[energyType] = _local13;
_local4.push(_local2);
}
}
}
}
}
for (var _local17 in _local4) {
var _local11 = _local4[_local17];
for (var _local15 in _local10) {
var _local9 = _local10[_local15];
if (_local11 == _local9) {
_local4.splice(Number(_local17), 1);
}
}
}
_local10 = _local10.concat(_local4);
_local12 = _local4;
}
$chargePaths[energyType] = _local10;
}
return($chargePaths[energyType]);
}
function transmitCharge(energyType, strength, start, apply) {
if (strength > 0) {
var _local3 = getChargePath(energyType, start);
} else {
var _local3 = $chargePaths[energyType];
}
if ((apply === true) || (apply == undefined)) {
applyCharge(energyType, strength);
}
for (var _local6 in _local3) {
var _local2 = _local3[_local6];
_local2.applyCharge(energyType, strength, this);
}
}
function getCharge(energyType) {
return($chargeMatrix[energyType]);
}
function showCharge(energyType, strength) {
switch (energyType) {
case 0 :
showElectricalCharge();
break;
case 1 :
$gfx.heatMc._alpha = com.robertpenner.easing.Quad.easeInOut(100 * strength, 0, 100, 100);
$gfx.heatMc._visible = true;
}
}
function hideCharge(energyType) {
switch (energyType) {
case 0 :
$chargeIndicator.removeMovieClip();
com.preloaded.sound.SoundManager.stopSound("electricity_loop");
delete $chargeIndicator;
break;
case 1 :
$gfx.heatMc._visible = false;
}
}
function showConnections() {
var _local3 = false;
for (var _local4 in neighbours) {
var _local2 = neighbours[_local4];
if (_local2.__get__conductionMatrix()[0] == 1) {
_local3 = true;
}
}
if (!_local3) {
$connectionIndicator.showInwardConnections();
$powerIndicator.show();
}
}
function get neighbours() {
$neighbours = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getNeighbours(gridPos.x, gridPos.y);
return($neighbours);
}
function getAllNeighbours() {
return(com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getAllNeighbours(gridPos.x, gridPos.y));
}
function hideConnections() {
$connectionIndicator.hideInwardConnections();
$powerIndicator.hide();
}
function onPlace() {
}
function onPick() {
delete $neighbours;
}
function onGridPop() {
}
function onRotate() {
rotate($rotation + 90);
}
function rotate(r) {
$rotation = r % 360;
$boltsMc._rotation = ($gfx._rotation = $rotation);
var _local4 = com.preloaded.math.MathUtils.degs2rads(($rotation - 180) + 45);
r = com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2;
r = Math.sqrt((r * r) + (r * r));
var _local3 = (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2) - 1;
$boltsMc._x = ($gfx._x = _local3 + (Math.cos(_local4) * r));
$boltsMc._y = ($gfx._y = _local3 + (Math.sin(_local4) * r));
}
function get rotation() {
return($rotation);
}
function set rotation(r) {
rotate(r);
//return(rotation);
}
function get immobile() {
return($immobile);
}
function set immobile(b) {
if (b) {
$boltsMc = $host.attachMovie("mc.effect.bolts", "bolts", $host.getNextHighestDepth());
$boltsMc._x = ($boltsMc._y = com.preloaded.scimus.launchpad.Config.GFX_OFFSET);
} else {
$boltsMc.removeMovieClip();
}
$hitter.useHandCursor = !b;
$immobile = b;
//return(immobile);
}
function makeHitter() {
$hitter = $host.attachMovie("blockUtil", "hitter", $host.getNextHighestDepth());
$hitter._width = ($hitter._height = com.preloaded.scimus.launchpad.Config.GRID_SIZE);
$hitter._alpha = 0;
$hitter.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$hitter.onRollOut = mx.utils.Delegate.create(this, onRollOut);
}
function toggleRemoveMode() {
$gfx._visible = !$gfx._visible;
removeFlag = !removeFlag;
if (!$gfx._visible) {
$removeGfx = new flash.display.BitmapData(com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE, true, 0);
var _local2 = new flash.geom.Rectangle(1, 1, com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE);
$removeGfx.copyPixels(instantiator.bitmap, _local2, new flash.geom.Point(0, 0));
$host.attachBitmap($removeGfx, $host.getNextHighestDepth());
} else {
$removeGfx.dispose();
}
}
function showInventoryGfx() {
$gfx.removeMovieClip();
$host.attachBitmap(instantiator.bitmap, $host.getNextHighestDepth());
}
function get instantiator() {
if ($instantiator.bitmap.width == undefined) {
return(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock(type));
}
return($instantiator);
}
function set instantiator(i) {
$instantiator = i;
//return(instantiator);
}
function onRollOver() {
dispatchEvent({type:"onRollOver", target:this});
}
function onRollOut() {
dispatchEvent({type:"onRollOut", target:this});
}
function onEditRollOver() {
}
function onEditRollOut() {
}
function onEditUpdate() {
}
function onEditClick() {
}
function showImmobileIndicator() {
}
function hideImmobileIndicator() {
}
function presenceify() {
initChargeArrays();
}
function init() {
}
function terminate() {
}
function removePresence() {
}
function onTileContact() {
playBounceSound();
}
function _onTileContact(p) {
if ((getTimer() - $lastCollisionTime) > com.preloaded.scimus.launchpad.Config.COLLISION_TIME_THRESHOLD) {
onTileContact();
}
$lastCollisionTime = getTimer();
dispatchEvent({type:"onTileContact", target:this, particle:p});
}
function getPts() {
return(new Array());
}
function get center() {
$center = new flash.geom.Point($host._x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), $host._y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2));
return($center);
}
function get mc() {
return($host);
}
function get gfx() {
return($gfx);
}
function destroy() {
$control.destroy();
$connectionIndicator.destroy();
$powerIndicator.destroy();
$removeGfx.dispose();
delete $control;
$hitter.removeMovieClip();
$gfx.removeMovieClip();
$sfx.destroy();
$chargeIndicator.removeMovieClip();
$host.removeMovieClip();
removePresence();
onDestroy();
}
function onDestroy() {
}
function get conductionMatrix() {
return($conductionMatrix);
}
function checkCollision(b) {
}
function showElectricalCharge() {
var sfx = com.preloaded.sound.SoundManager.addSound("electricity loop.aif", "electricity_loop");
sfx.start(0, 999999);
sfx.__set___volume(5);
$chargeIndicator.removeMovieClip();
$chargeIndicator = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.attachMovie("mc.effect.block.electricity");
$chargeIndicator._x = $host._x + com.preloaded.scimus.launchpad.Config.GFX_OFFSET;
$chargeIndicator._y = $host._y + com.preloaded.scimus.launchpad.Config.GFX_OFFSET;
if ($chargeIndicator != undefined) {
with ($chargeIndicator) {
tlMc._visible = (trMc._visible = (blMc._visible = (brMc._visible = (ttlConnectorMc._visible = (ttrConnectorMc._visible = (bblConnectorMc._visible = (bbrConnectorMc._visible = (ltlConnectorMc._visible = (rtrConnectorMc._visible = (lblConnectorMc._visible = (rbrConnectorMc._visible = false)))))))))));
}
}
for (var i in neighbours) {
var neighbour = $neighbours[i];
if (neighbour.__get__conductionMatrix()[0] > 0) {
if (neighbour.gridPos.y < gridPos.y) {
$chargeIndicator.topMc._visible = false;
} else if (neighbour.gridPos.y > gridPos.y) {
$chargeIndicator.bottomMc._visible = false;
}
if (neighbour.gridPos.x < gridPos.x) {
$chargeIndicator.leftMc._visible = false;
} else if (neighbour.gridPos.x > gridPos.x) {
$chargeIndicator.rightMc._visible = false;
}
}
}
if (!$chargeIndicator.topMc._visible) {
if ($chargeIndicator.leftMc._visible) {
$chargeIndicator.ltlConnectorMc._visible = true;
}
if ($chargeIndicator.rightMc._visible) {
$chargeIndicator.rtrConnectorMc._visible = true;
}
}
if (!$chargeIndicator.bottomMc._visible) {
if ($chargeIndicator.leftMc._visible) {
$chargeIndicator.lblConnectorMc._visible = true;
}
if ($chargeIndicator.rightMc._visible) {
$chargeIndicator.rbrConnectorMc._visible = true;
}
}
if (!$chargeIndicator.leftMc._visible) {
if ($chargeIndicator.topMc._visible) {
$chargeIndicator.ttlConnectorMc._visible = true;
}
if ($chargeIndicator.bottomMc._visible) {
$chargeIndicator.bblConnectorMc._visible = true;
}
}
if (!$chargeIndicator.rightMc._visible) {
if ($chargeIndicator.topMc._visible) {
$chargeIndicator.ttrConnectorMc._visible = true;
}
if ($chargeIndicator.bottomMc._visible) {
$chargeIndicator.bbrConnectorMc._visible = true;
}
}
if ($chargeIndicator.topMc._visible && ($chargeIndicator.leftMc._visible)) {
$chargeIndicator.tlMc._visible = true;
}
if ($chargeIndicator.topMc._visible && ($chargeIndicator.rightMc._visible)) {
$chargeIndicator.trMc._visible = true;
}
if ($chargeIndicator.bottomMc._visible && ($chargeIndicator.leftMc._visible)) {
$chargeIndicator.blMc._visible = true;
}
if ($chargeIndicator.bottomMc._visible && ($chargeIndicator.rightMc._visible)) {
$chargeIndicator.brMc._visible = true;
}
}
function get state() {
return(null);
}
function set state(s) {
//return(state);
}
}
Symbol 1221 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase extends com.preloaded.lang.DispatcherBase
{
var $host, bitmap, $quota, dispatchEvent, $helpTitle;
function InterfaceBlockBase (host, id) {
super(this);
$host = host;
bitmap = flash.display.BitmapData.loadBitmap(id);
$quota = -1;
}
function get quota() {
return($quota);
}
function set quota(n) {
$quota = n;
dispatchEvent({type:"onQuotaUpdate", target:this, quota:quota});
//return(quota);
}
function get helpTitle() {
var _local2 = $quota;
var _local3 = $helpTitle;
if (_local2 >= 0) {
_local3 = _local3 + ((" (" + ((_local2 > 0) ? (_local2.toString()) : "None")) + " left)");
}
return(_local3);
}
function set helpTitle(str) {
$helpTitle = str;
//return(helpTitle);
}
function onMouseDown() {
dispatchEvent({type:"onMouseDown", target:this});
}
function onMouseUp() {
dispatchEvent({type:"onMouseUp", target:this});
}
function instantiate(host) {
}
function get mc() {
return($host);
}
function destroy() {
bitmap.dispose();
delete bitmap;
}
}
Symbol 1222 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.InventoryGroup] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.InventoryGroup extends com.preloaded.lang.DispatcherBase
{
var $host, $items, $colour, $name, MARGIN, $holders, $holderHolder, $holderHolderMask, $holderBack, $presence, $open, $quotaMc, $currentItemListener, $arrowMc, dispatchEvent, $currentItem, $tweenQueue;
function InventoryGroup (host, name, colour) {
super(this);
$host = host;
$items = new Array();
$colour = colour;
$name = name;
MARGIN = 5;
$holders = new Array();
$holderHolder = $host.createEmptyMovieClip("holderHolder", $host.getNextHighestDepth());
$holderHolder._x = ($holderHolder._y = -com.preloaded.scimus.launchpad.Config.PNG_OFFSET);
$holderHolderMask = $host.attachMovie("blockUtil", "holderMask", $host.getNextHighestDepth());
$holderHolderMask._width = com.preloaded.scimus.launchpad.Config.GRID_SIZE + (com.preloaded.scimus.launchpad.Config.GFX_OFFSET * 2);
$holderHolderMask._height = 0;
$holderHolderMask._x = -com.preloaded.scimus.launchpad.Config.GFX_OFFSET;
$holderHolderMask._y = -9;
$holderBack = $holderHolder.attachMovie("mc.inventory.open.back", "back", $holderHolder.getNextHighestDepth());
$holderBack._alpha = 65;
$holderBack.onRollOut = mx.utils.Delegate.create(this, onBackRollOut);
$holderBack.onRollOver = mx.utils.Delegate.create(this, onBackRollOver);
$holderBack.blendMode = "multiply";
host.blendMode = "layer";
$holderHolder.blendMode = "layer";
$holderHolder.setMask($holderHolderMask);
$presence = $host.createEmptyMovieClip("presence", $host.getNextHighestDepth());
$presence._x = ($presence._y = -com.preloaded.scimus.launchpad.Config.GFX_OFFSET);
$presence.onRelease = mx.utils.Delegate.create(this, onPresenceRelease);
$presence.onDragOut = mx.utils.Delegate.create(this, onPresenceDragOut);
$presence.onRollOver = mx.utils.Delegate.create(this, onPresenceRollOver);
$presence.onRollOut = mx.utils.Delegate.create(this, onPresenceRollOut);
$open = false;
$quotaMc = $host.attachMovie("mc.inventory.quota", "quotaMc", $host.getNextHighestDepth());
$quotaMc._x = ($quotaMc._y = -com.preloaded.scimus.launchpad.Config.GFX_OFFSET);
$quotaMc.txtNum.textColor = com.preloaded.scimus.launchpad.Config.INVENTORY_COLOUR;
$currentItemListener = mx.utils.Delegate.create(this, onQuotaUpdate);
}
function addArrow() {
$arrowMc = $host.attachMovie("mc.inventory.arrow", "arrowMc", $host.getNextHighestDepth());
$arrowMc._x = (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2) - ($arrowMc._width / 2);
$arrowMc._y = -9;
new Color($arrowMc).setRGB($colour);
$arrowMc.onRelease = mx.utils.Delegate.create(this, onPresenceRelease);
}
function onPresenceRelease() {
dispatchEvent({type:"onInventoryGroupRelease", item:$currentItem, target:this});
}
function onPresenceRollOver(id) {
dispatchRollOverEvent($currentItem);
}
function onPresenceRollOut(id) {
dispatchItemRollOutEvent($currentItem);
dispatchRollOutEvent();
}
function onPresenceDragOut() {
if (com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__get__active()) {
if ($open) {
close();
}
dispatchSelectEvent();
}
}
function onHolderRelease(id) {
if (com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__get__active()) {
selectItem(id);
close();
}
}
function onHolderRollOver(id) {
dispatchRollOverEvent($items[id]);
}
function onHolderRollOut(id) {
dispatchItemRollOutEvent($items[id]);
dispatchRollOutEvent();
}
function onHolderDragOut(id) {
if (com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__get__active()) {
onHolderRelease(id);
dispatchSelectEvent();
}
}
function onBackRollOut() {
dispatchRollOutEvent();
}
function onBackRollOver() {
dispatchEvent({type:"onBackRollOver"});
}
function dispatchSelectEvent() {
dispatchEvent({type:"onGroupItemSelected", item:$currentItem, target:this});
}
function dispatchRollOverEvent(item) {
dispatchEvent({type:"onGroupItemRollOver", item:item, target:this});
}
function dispatchItemRollOutEvent(item) {
dispatchEvent({type:"onGroupItemRollOut", item:item, target:this});
}
function dispatchRollOutEvent() {
dispatchEvent({type:"onRollOut"});
}
function close() {
if ($open) {
$arrowMc.animMc.gotoAndPlay("close");
$tweenQueue.stop();
$tweenQueue = new com.preloaded.animation.TweenQueue(1);
var _local4 = 10;
var _local3 = 0;
while (_local3 < $holders.length) {
var _local2 = $holders[_local3];
$tweenQueue.addTween(new mx.transitions.Tween(_local2, "_y", com.robertpenner.easing.Back.easeIn, _local2._y, _local2._y - $holderBack._y, _local4, false));
_local3++;
}
$holderBack.tween.stop();
$tweenQueue.addTween(new mx.transitions.Tween($holderBack, "_y", com.robertpenner.easing.Back.easeIn, $holderBack._y, 0, _local4, false));
$tweenQueue.start();
$open = false;
dispatchEvent({type:"onGroupClose", target:this});
}
}
function open() {
if ((!$open) && ($items.length > 1)) {
$arrowMc.animMc.gotoAndPlay("open");
$tweenQueue.stop();
$tweenQueue = new com.preloaded.animation.TweenQueue(2);
$tweenQueue.addTween(new mx.transitions.Tween($holderBack, "_y", com.robertpenner.easing.Quint.easeOut, $holderBack._y, -(((com.preloaded.scimus.launchpad.Config.GRID_SIZE + MARGIN) * $items.length) + 10), 20, false));
for (var _local4 in $items) {
var _local3 = $items[_local4];
var _local2 = $holders[_local4];
_local2.attachBitmap(_local3.bitmap, 10);
$tweenQueue.addTween(new mx.transitions.Tween(_local2, "_y", com.robertpenner.easing.Quint.easeOut, _local2._y, -(((com.preloaded.scimus.launchpad.Config.GRID_SIZE + MARGIN) * (Number(_local4) + 1)) + 8), 20, false));
}
$tweenQueue.start();
$open = true;
dispatchEvent({type:"onGroupOpen", target:this});
}
}
function onQuotaUpdate(evt) {
updateQuota(evt.quota);
}
function updateQuota(n) {
if (n >= 0) {
$quotaMc.txtNum.text = n;
$quotaMc.greyoutMc._visible = ((n > 0) ? false : true);
} else {
$quotaMc._visible = false;
}
}
function selectItem(id, noise) {
var _local2 = $items[id];
$presence.blank._alpha = 0;
$presence.attachBitmap(_local2.bitmap, 10);
$currentItem.removeEventListener($currentItemListener);
_local2.addEventListener("onQuotaUpdate", $currentItemListener);
updateQuota(_local2.__get__quota());
$currentItem = _local2;
}
function addItem(item) {
item.group = this;
$items.push(item);
addHolder();
var _local2 = $items.length - 1;
selectItem(_local2, false);
if ($items.length == 2) {
addArrow();
}
return(_local2);
}
function addHolder() {
var _local2 = $holderHolder.createEmptyMovieClip("holder_" + $holders.length, $holderHolder.getNextHighestDepth());
_local2.master = this;
_local2.id = $holders.length;
_local2.onRelease = function () {
this.master.onHolderRelease(this.id);
};
_local2.onRollOver = function () {
this.master.onHolderRollOver(this.id);
};
_local2.onRollOut = function () {
this.master.onHolderRollOut(this.id);
};
_local2.onDragOut = function () {
this.master.onHolderDragOut(this.id);
};
$holders.push(_local2);
var _local3 = com.preloaded.scimus.launchpad.Config.GRID_SIZE + (MARGIN * 2);
$holderHolderMask._height = $holderHolderMask._height + _local3;
$holderHolderMask._y = $holderHolderMask._y - _local3;
}
function destroy() {
for (var _local2 in $items) {
$items[_local2].destroy();
$items[_local2] = null;
}
delete $items;
$host.removeMovieClip();
}
function get host() {
return($host);
}
function get isOpen() {
return($open);
}
}
Symbol 1223 MovieClip [__Packages.com.preloaded.animation.TweenQueue] Frame 0
class com.preloaded.animation.TweenQueue extends com.preloaded.lang.DispatcherBase
{
var $queue, $ptr, $pause, $fcount, dispatchEvent, $limpetId;
function TweenQueue (pause) {
super(this);
$queue = new Array();
$ptr = -1;
if (pause != undefined) {
$pause = pause;
$fcount = $pause;
}
}
function tick() {
$fcount++;
if ($fcount >= $pause) {
processNextTween();
$fcount = 0;
}
}
function addTween(tween) {
$queue.push(tween);
tween.onMotionFinished = mx.utils.Delegate.create(this, onTweenComplete);
tween.stop();
}
function processNextTween() {
var _local2 = $queue[++$ptr];
_local2.resume();
}
function onTweenComplete() {
$completeTweens++;
if ($completeTweens >= $queue.length) {
dispatchEvent({type:"onQueueComplete", target:this});
stop();
}
if ($pause == undefined) {
processNextTween();
}
}
function start() {
$completeTweens = 0;
processNextTween();
if ($pause != undefined) {
$limpetId = com.preloaded.lang.FrameDispatcher.addLimpet(mx.utils.Delegate.create(this, tick));
}
}
function stop() {
for (var _local3 in $queue) {
var _local2 = $queue[_local3];
_local2.stop();
}
if ($limpetId != undefined) {
com.preloaded.lang.FrameDispatcher.killLimpet($limpetId);
}
}
function resume() {
$queue[$ptr].resume();
if ($pause != undefined) {
$limpetId = com.preloaded.lang.FrameDispatcher.addLimpet(mx.utils.Delegate.create(this, tick));
}
}
function destroy() {
stop();
delete $queue;
}
var $completeTweens = 0;
}
Symbol 1224 MovieClip [__Packages.com.preloaded.lang.FrameDispatcher] Frame 0
class com.preloaded.lang.FrameDispatcher extends com.preloaded.lang.DispatcherBase
{
static var $instance, $host, $limpets, $limpetCount;
var dispatchEvent;
function FrameDispatcher (host) {
super(this);
$instance = this;
$host = host;
$limpets = new Object();
$limpetCount = 0;
host.onEnterFrame = mx.utils.Delegate.create(this, tick);
}
static function init(host) {
if ($instance == undefined) {
$instance = new com.preloaded.lang.FrameDispatcher(host);
}
}
function tick() {
dispatchEvent({type:"onEnterFrame", target:this});
for (var _local2 in $limpets) {
$limpets[_local2].call();
}
}
static function addLimpet(limpet) {
if ($instance == undefined) {
} else {
$limpets[$limpetCount++] = limpet;
return($limpetCount - 1);
}
}
static function killLimpet(id) {
delete $limpets[id];
}
}
Symbol 1225 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.Inventory] Frame 0
class com.preloaded.scimus.launchpad.Engine.Inventory extends mx.events.EventDispatcher
{
static var $instance;
var $host, $groups, $contextHelp, $clickCatcher, $depth, _clickLimpet, $active, dispatchEvent, currentItem;
function Inventory (host) {
super(this);
$instance = this;
$host = host;
$groups = new Array();
$contextHelp = new com.preloaded.scimus.launchpad.Engine.ContextHelp(host);
$contextHelp.__get__mc()._x = 240;
$contextHelp.__get__mc()._y = -6;
$contextHelp.setTitle("Information");
$contextHelp.setBody("Move your mouse over a block to display information about it in this area or minimize it.");
$clickCatcher = $host.attachMovie("blockUtil", "clickCatcher", 1048574);
$clickCatcher._x = ($clickCatcher._y = -18);
$clickCatcher._width = com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
$clickCatcher._height = com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT;
$clickCatcher._alpha = 75;
new Color($clickCatcher).setRGB(0);
$clickCatcher.onRollOver = function () {
var _local1 = null;
};
$clickCatcher.onRelease = mx.utils.Delegate.create(this, onClickCaught);
$clickCatcher.useHandCursor = false;
$depth = 1048573 /* 0x0FFFFD */;
active = (true);
}
function onClickCaught() {
_clickLimpet.call();
}
function createGroup(name, colour) {
var _local2 = new com.preloaded.scimus.launchpad.Engine.UIElements.InventoryGroup($host.createEmptyMovieClip("grp_" + name, $depth--), name, colour);
_local2.__get__host()._x = (com.preloaded.scimus.launchpad.Config.GRID_SIZE + 4) * $groups.length;
_local2.addEventListener("onGroupItemSelected", mx.utils.Delegate.create(this, onGroupItemSelected));
_local2.addEventListener("onGroupItemRollOver", mx.utils.Delegate.create(this, onGroupItemRollOver));
_local2.addEventListener("onGroupItemRollOut", mx.utils.Delegate.create(this, onGroupItemRollOut));
_local2.addEventListener("onBackRollOver", mx.utils.Delegate.create(this, onGroupRollOver));
_local2.addEventListener("onRollOut", mx.utils.Delegate.create(this, onGroupRollOut));
_local2.addEventListener("onGroupOpen", mx.utils.Delegate.create(this, onGroupOpen));
_local2.addEventListener("onGroupClose", mx.utils.Delegate.create(this, onGroupClose));
_local2.addEventListener("onInventoryGroupRelease", mx.utils.Delegate.create(this, onGroupRelease));
$groups.push(_local2);
return(_local2);
}
function clear() {
for (var _local2 in $groups) {
$groups[_local2].destroy();
$groups[_local2] = null;
}
delete $groups;
$groups = new Array();
}
function set active(b) {
if ((com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__get__mode() != "remove") || ((com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__get__mode() == "remove") && (!b))) {
if (!b) {
for (var _local2 in $groups) {
$groups[_local2].close();
}
}
$active = b;
$clickCatcher._visible = !b;
}
//return(active);
}
function get active() {
return($active);
}
function onGroupRelease(evt) {
if ($active) {
var _local3 = evt.target;
if (_local3.__get__isOpen()) {
_local3.close();
} else {
for (var _local4 in $groups) {
var _local2 = $groups[_local4];
if (_local2 != _local3) {
_local2.close();
}
}
_local3.open();
}
}
}
function onGroupItemSelected(evt) {
if ($active) {
for (var _local2 in $groups) {
$groups[_local2].close();
}
dispatchEvent({type:"onInventoryItemPress", target:this, item:evt.item});
currentItem = evt.item;
setHelp(currentItem.__get__helpTitle(), currentItem.helpBody);
onGroupRollOut();
}
}
function setHelp(arg_one, body) {
if (typeof(arg_one) == "string") {
$contextHelp.setTitle(arg_one);
$contextHelp.setBody(body);
} else if (typeof(arg_one) == "object") {
$contextHelp.setTitle(arg_one.title);
$contextHelp.setBody(arg_one.copy);
}
}
function clearHelp() {
$contextHelp.setTitle("");
$contextHelp.setBody("");
}
function onGroupItemRollOver(evt) {
var _local2 = evt.item;
setHelp(_local2.__get__helpTitle(), _local2.helpBody);
onGroupRollOver();
}
function onGroupItemRollOut() {
clearHelp();
}
function onGroupRollOver(evt) {
dispatchEvent({type:"onRollOver"});
}
function onGroupRollOut() {
dispatchEvent({type:"onRollOut"});
}
function onGroupOpen(evt) {
if ($active) {
com.preloaded.scimus.launchpad.Engine.GameUI.instance.catchClicks(true);
}
}
function onGroupClose(evt) {
com.preloaded.scimus.launchpad.Engine.GameUI.instance.catchClicks(false);
}
static function get instance() {
return($instance);
}
function get mc() {
return($host);
}
function destroy() {
for (var _local2 in $groups) {
$groups[_local2].destroy();
}
$clickCatcher.removeMovieClip();
$host.removeMovieClip();
}
function setupSandboxInventory() {
clear();
var _local2 = createGroup("materials", com.preloaded.scimus.launchpad.Config.INVENTORY_COLOUR);
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockBomb"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockIce"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockIron"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockLeftCurve"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockLeft"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockSquare"));
_local2 = createGroup("machines", com.preloaded.scimus.launchpad.Config.INVENTORY_COLOUR);
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockTreacle"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockFoam"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockElectromagnet"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockMagnet"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockSeesaw"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockSpring"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockRubber"));
_local2 = createGroup("generators", com.preloaded.scimus.launchpad.Config.INVENTORY_COLOUR);
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockGate"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockEscalator"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockConveyor"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockTesla"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockSwitch"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockBattery"));
_local2 = createGroup("appliances", com.preloaded.scimus.launchpad.Config.INVENTORY_COLOUR);
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockBlowtorch"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockSolar"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockLens"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockMirror"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockTorch"));
_local2 = createGroup("manipulators", com.preloaded.scimus.launchpad.Config.INVENTORY_COLOUR);
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockPeltonWheel"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockSteamTurbine"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockWater"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockTurbine"));
_local2.addItem(com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock("BlockFan"));
}
}
Symbol 1226 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.ContextHelp] Frame 0
class com.preloaded.scimus.launchpad.Engine.ContextHelp
{
static var $instance;
var $host, $mc;
function ContextHelp (host) {
$host = host;
$mc = host.attachMovie("mc.inventory.contextHelp", "contextHelp", host.getNextHighestDepth());
}
function clear() {
$mc._visible = false;
}
function setTitle(title) {
$mc._visible = true;
$mc.txtTitle.htmlText = ((title == undefined) ? "" : (title));
}
function setBody(body) {
$mc._visible = true;
$mc.txtBody.htmlText = ((body == undefined) ? "" : (body));
}
function get mc() {
return($mc);
}
function get instance() {
return($instance);
}
}
Symbol 1227 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.GameUI] Frame 0
class com.preloaded.scimus.launchpad.Engine.GameUI extends com.preloaded.lang.DispatcherBase
{
static var instance, inventory;
var $host, $gridInterface, $controlLayer, $clickCatcher, $testButton, titleStrip, $tween, _clickLimpet, $currentControl, dispatchEvent;
function GameUI (host, width, height, gridSpacing, mode) {
super(this);
instance = this;
$host = host;
$gridInterface = new com.preloaded.scimus.launchpad.Engine.GridInterface(host.createEmptyMovieClip("gridMc", $host.getNextHighestDepth()), width, height, gridSpacing);
$controlLayer = host.createEmptyMovieClip("controlLayer", host.getNextHighestDepth());
$clickCatcher = host.attachMovie("blockUtil", "clickCatcher", host.getNextHighestDepth());
$clickCatcher._width = com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
$clickCatcher._height = com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT;
$clickCatcher.onRollOver = function () {
var _local1 = null;
};
$clickCatcher.onPress = mx.utils.Delegate.create(this, onClickCaught);
$clickCatcher.useHandCursor = false;
$clickCatcher._alpha = 0;
catchClicks(false);
inventory = new com.preloaded.scimus.launchpad.Engine.Inventory(host.createEmptyMovieClip("inventoryMc", $host.getNextHighestDepth()));
inventory.__get__mc()._y = height + 18;
inventory._clickLimpet = mx.utils.Delegate.create(this, onClickCaught);
inventory.addEventListener("onInventoryItemPress", mx.utils.Delegate.create(this, onInventoryItemPress));
inventory.addEventListener("onRollOver", mx.utils.Delegate.create(this, onInventoryRollOver));
inventory.addEventListener("onRollOut", mx.utils.Delegate.create(this, onInventoryRollOut));
$testButton = new com.preloaded.scimus.launchpad.Engine.UIElements.TestButton(host);
$testButton.__get__mc()._y = inventory.__get__mc()._y - 6;
$testButton.__get__mc()._x = (com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH - $testButton.__get__mc()._width) - (com.preloaded.scimus.launchpad.Config.SCREEN_MARGIN_HORZ * 2);
$testButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onTestButtonRelease));
if (mode == "game") {
titleStrip = new com.preloaded.scimus.launchpad.Engine.UIElements.TitleStrip(com.preloaded.scimus.launchpad.Main.instance.titleStripHostMc.attachMovie("mc.ui.titleStrip", "titleStripMc", 10));
titleStrip.title = com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().title;
} else {
titleStrip = new com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripSandbox(com.preloaded.scimus.launchpad.Main.instance.titleStripHostMc.attachMovie("mc.ui.titleStrip.sandbox", "titleStripMc", 10));
titleStrip.stage = 0;
}
$host._visible = false;
}
function show(t) {
$host._visible = true;
titleStrip.show(t - 2);
$tween = new mx.transitions.Tween($host, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, t + 2, false);
}
function destroy() {
super.destroy();
$clickCatcher.removeMovieClip();
inventory.destroy();
$testButton.destroy();
titleStrip.destroy();
$gridInterface.destroy();
$host.removeMovieClip();
}
function onClickCaught() {
_clickLimpet.call();
delete _clickLimpet;
}
function catchClicks(b, limpet) {
$clickCatcher._visible = b;
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(!b);
_clickLimpet = limpet;
}
function clearControls() {
removeCurrentControl();
}
function spawnControl(control, x, y, r) {
removeCurrentControl();
control.host = $controlLayer;
control.show(x, y, r);
control.addEventListener("onRollOut", mx.utils.Delegate.create(this, onControlRollOut));
control.addEventListener("onHidden", mx.utils.Delegate.create(this, onControlHidden));
$currentControl = control;
}
function attachMovie(linkage) {
var _local2 = $controlLayer.getNextHighestDepth();
var _local3 = $controlLayer.attachMovie(linkage, "clip_" + _local2, _local2);
return(_local3);
}
function onControlRollOut(evt) {
var _local1 = evt.target;
_local1.hide();
inventory.clearHelp();
}
function get currentControl() {
return($currentControl);
}
function removeCurrentControl() {
$currentControl.destroy();
}
function onControlHidden() {
delete $currentControl;
}
function get testButton() {
return($testButton);
}
function onTestButtonRelease() {
dispatchEvent({type:"onTestButtonRelease", target:this, button:$testButton});
}
function onInventoryRollOver() {
catchClicks(true);
}
function get active() {
return(!$clickCatcher._visible);
}
function onInventoryRollOut() {
catchClicks(false);
}
function onInventoryItemPress(evt) {
var _local2 = evt.item;
if (_local2.__get__quota() != 0) {
$gridInterface.setHilite(_local2.bitmap);
var _local3 = _local2.instantiate(com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.getNewContainer());
_local3.__set__instantiator(_local2);
_local3.__get__mc()._visible = false;
$gridInterface.__set__currentBlock(_local3);
_local2.__set__quota((_local2.__get__quota()-1));
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().blocksUsed++;
}
}
}
Symbol 1228 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.GridInterface] Frame 0
class com.preloaded.scimus.launchpad.Engine.GridInterface extends com.preloaded.lang.DispatcherBase
{
static var $instance;
var $host, $width, $height, $gridSpacing, $fillColour, $blitter, $floaterMatrix, $floaterTransform, hilitePos, gridPos, $lastRect, $mouseOffset, $hilitePosTarget, $hiliteBlocked, blocksUsed, $mode, $active, $hilite, $currentBlock, __get__mode, __get__currentBlock;
function GridInterface (host, width, height, gridSpacing) {
super(this);
$instance = this;
$host = host;
$width = width;
$height = height;
$gridSpacing = gridSpacing;
$fillColour = 0;
$blitter = new flash.display.BitmapData(width, height, true, $fillColour);
$host.attachBitmap($blitter, 10);
$floaterMatrix = new flash.geom.Matrix(1, 0, 0, 1, 0, 0);
$floaterTransform = new flash.geom.ColorTransform(1, 1, 1, 0.3, 0, 0, 0, 0);
$host.useHandCursor = false;
$host.onMouseMove = mx.utils.Delegate.create(this, update);
$host.onMouseDown = mx.utils.Delegate.create(this, onMouseDown);
$host.onMouseUp = mx.utils.Delegate.create(this, onMouseUp);
hilitePos = new flash.geom.Point();
gridPos = new flash.geom.Point();
$lastRect = new flash.geom.Rectangle();
var _local3 = $gridSpacing / 2;
$mouseOffset = new flash.geom.Point(_local3, _local3);
$hilitePosTarget = new flash.geom.Point();
active = (true);
resetHilite();
$hiliteBlocked = new flash.display.BitmapData(com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE, true, 0);
blocksUsed = 0;
$mode = "game";
}
function destroy() {
$blitter.dispose();
$host.removeMovieClip();
delete $host.onMouseDown;
delete $host.onMouseUp;
delete $host.onMouseMove;
super.destroy();
}
function set active(b) {
$active = b;
$blitter.fillRect($blitter.rectangle, 16711680);
//return(active);
}
function get active() {
return($active);
}
function update() {
if ($active) {
$blitter.fillRect($lastRect, $fillColour);
gridPos.x = Math.round(($host._xmouse - $mouseOffset.x) / $gridSpacing);
gridPos.y = Math.round(($host._ymouse - $mouseOffset.y) / $gridSpacing);
hilitePos.x = gridPos.x * $gridSpacing;
hilitePos.y = gridPos.y * $gridSpacing;
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x, gridPos.y);
if (_local2.__get__immobile() == true) {
$blitter.copyPixels($hiliteBlocked, $hiliteBlocked.rectangle, hilitePos);
} else {
$blitter.copyPixels($hilite, $hilite.rectangle, hilitePos);
$currentBlock.onEditUpdate(gridPos.x, gridPos.y);
}
$lastRect = $hilite.rectangle;
$lastRect.offsetPoint(hilitePos);
if (com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__currentControl() != undefined) {
com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__currentControl().checkHitter();
}
}
}
function set mode(str) {
$mode = str;
//return(__get__mode());
}
function onMouseDown() {
if ($active) {
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x, gridPos.y);
if ((_local2 != undefined) && (_local2.__get__immobile() == false)) {
if ((_local2 == com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__currentControl().parent) || (com.preloaded.scimus.launchpad.Engine.GameUI.instance.__get__currentControl() == undefined)) {
if ($mode == "game") {
$currentBlock = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().popBlockAt(gridPos.x, gridPos.y);
$currentBlock.removePresence();
$currentBlock.onPick();
$currentBlock.onEditRollOut();
setHilite($currentBlock.__get__mc());
com.preloaded.scimus.launchpad.Engine.GameUI.instance.removeCurrentControl();
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.clearEffects();
} else if ($mode == "remove") {
var _local3 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x, gridPos.y);
if ((_local3.type != "BlockStart") && (_local3.type != "BlockFinish")) {
_local3.toggleRemoveMode();
}
}
}
}
}
}
function setHilite(ref) {
$hilite.draw(ref, $floaterMatrix, $floaterTransform);
}
function set currentBlock(block) {
$currentBlock = block;
//return(__get__currentBlock());
}
function onMouseUp() {
if ($active) {
if ($currentBlock != undefined) {
var _local3 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x, gridPos.y);
if (((gridPos.x == $currentBlock.gridPos.x) && (gridPos.y == $currentBlock.gridPos.y)) && (!$currentBlock.__get__immobile())) {
$currentBlock.onEditClick();
}
if ($currentBlock != _local3) {
var _local2 = (_local3 != undefined) && ($currentBlock != _local3);
if (($currentBlock.type == "BlockGate") && (_local3.type == "BlockGateSegment")) {
_local2 = false;
}
var _local4 = (((gridPos.x >= 0) && (gridPos.y >= 0)) && (gridPos.x < com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridWidth)) && (gridPos.y < com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridHeight);
if ($currentBlock.type == "BlockSeesaw") {
if ((gridPos.x + 1) > (com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridWidth - 1)) {
gridPos.x = gridPos.x - 1;
}
_local2 = _local2 || (com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x + 1, gridPos.y).__get__immobile());
}
if (_local4 && (!_local2)) {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().addBlock($currentBlock, gridPos.x, gridPos.y);
} else if (((_local4 && (_local2)) && ($currentBlock.gridPos != undefined)) || ((!_local4) && (($currentBlock.type == "BlockStart") || ($currentBlock.type == "BlockFinish")))) {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().addBlock($currentBlock, $currentBlock.gridPos.x, $currentBlock.gridPos.y);
} else {
$currentBlock.__get__instantiator().__set__quota(($currentBlock.__get__instantiator().__get__quota()+1));
$currentBlock.destroy();
blocksUsed--;
}
}
}
}
delete $currentBlock;
$currentBlock = null;
resetHilite();
}
function resetHilite() {
$blitter.fillRect($lastRect, $fillColour);
$hilite = new flash.display.BitmapData($gridSpacing, $gridSpacing, true, 0);
}
function onBlockRemoved() {
}
static function get instance() {
return($instance);
}
}
Symbol 1229 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.TestButton] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.TestButton extends com.preloaded.lang.DispatcherBase
{
var $host, $mc, $state, $active, __get__state, dispatchEvent;
function TestButton (host) {
super(this);
$host = host;
$mc = $host.attachMovie("mc.interface.button.test", "testButton", $host.getNextHighestDepth());
enableActions();
$mc.blendMode = "layer";
$state = "off";
$active = true;
}
function enableActions() {
$mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
}
function disableActions() {
delete $mc.onRollOver;
delete $mc.onRollOut;
delete $mc.onRelease;
}
function set active(b) {
if (b) {
enableActions();
if ($mc.hitTest(_root._xmouse, _root._ymouse)) {
onRollOver();
}
$mc._alpha = 100;
} else {
onRollOut();
disableActions();
$mc._alpha = 50;
}
$active = b;
//return(active);
}
function get active() {
return($active);
}
function set state(st) {
$state = st;
if ($mc.hitTest(_root._xmouse, _root._ymouse)) {
onRollOver();
} else {
onRollOut();
}
//return(__get__state());
}
function onRollOver() {
$mc.gotoAndStop($state + "_over");
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
function onRollOut() {
$mc.gotoAndStop($state + "_out");
}
function onPress() {
$mc.gotoAndStop($state + "_down");
}
function onRelease() {
onRollOver();
dispatchEvent({type:"onRelease", target:this});
}
function get mc() {
return($mc);
}
}
Symbol 1230 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.ControlBase] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.ControlBase extends com.preloaded.lang.DispatcherBase
{
var $showing, $mc, host, dispatchEvent;
function ControlBase (host) {
super(this);
$showing = false;
}
function initMc(linkage) {
$mc = host.attachMovie(linkage, "control", host.getNextHighestDepth());
$mc._visible = false;
$mc.hitterMc._alpha = 20;
$mc.hitterMc.onRollOut = mx.utils.Delegate.create(this, onHitterRollOut);
$mc.hitterMc.onRollOver = mx.utils.Delegate.create(this, onHitterRollOver);
$mc.hitterMc.onPress = mx.utils.Delegate.create(this, onHitterPress);
}
function onHitterRelease() {
dispatchEvent({type:"onRelease", target:this});
}
function onHitterPress() {
dispatchEvent({type:"onHitterPress", target:this});
}
function onButtonRelease() {
dispatchEvent({type:"onButtonRelease", target:this});
}
function onHitterRollOver() {
dispatchEvent({type:"onRollOver", target:this});
}
function onHitterRollOut() {
var _local3 = $mc.hitterMc.hitTest(_root._xmouse, _root._ymouse);
if (!_local3) {
dispatchEvent({type:"onRollOut", target:this});
}
}
function checkHitter() {
onHitterRollOut();
}
function show() {
$mc._visible = true;
$showing = true;
}
function hide() {
destroy();
$showing = false;
dispatchEvent({type:"onHidden", target:this});
}
function destroy() {
$mc.removeMovieClip();
}
function get mc() {
return($mc);
}
}
Symbol 1231 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase extends com.preloaded.lang.DispatcherBase
{
var mc, $muteButton, $exitButton, $tween;
function TitleStripBase (arg_mc) {
super(this);
mc = arg_mc;
$muteButton = new com.preloaded.scimus.launchpad.Engine.UIElements.MuteButton(mc.muteButtonMc);
$muteButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onMuteButtonRelease));
$exitButton = new com.preloaded.UI.MovieClipButton(mc.exitButtonMc, "over", "out");
$exitButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onExitButtonRelease));
mc._visible = false;
mc._y = -27;
mc._x = -1;
}
function show(t) {
mc._visible = true;
$tween.stop();
$tween = new mx.transitions.Tween(mc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, t, false);
}
function onMuteButtonRelease() {
com.preloaded.sound.SoundManager.__set__mute(!com.preloaded.sound.SoundManager.__get__mute());
}
function onExitButtonRelease() {
com.preloaded.scimus.launchpad.Main.instance.onGameUIExit();
}
function destroy() {
$tween.stop();
delete $tween;
super.destroy();
$exitButton.destroy();
$muteButton.destroy();
delete $exitButton;
delete $muteButton;
mc.removeMovieClip();
}
}
Symbol 1232 MovieClip [__Packages.com.preloaded.UI.MovieClipButton] Frame 0
class com.preloaded.UI.MovieClipButton
{
static var _globalDispatcher;
var $mc, $id, $active, $selected, $state, $outFrame, $overFrame, $downFrame, $inactiveFrame, $txtLabel, $fmt, dispatchGlobalEvents, $label, _align, dispatchEvent, $threadId, __get__selected, __get___visible, $showing;
function MovieClipButton (mc, overFrame, outFrame, downFrame, inactiveFrame, id, label) {
mx.events.EventDispatcher.initialize(this);
initGlobalDispatcher();
$mc = mc;
$id = id;
$active = true;
$selected = false;
$state = "out";
$mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.onRollOut = ($mc.onReleaseOutside = mx.utils.Delegate.create(this, onRollOut));
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
$mc.onReleaseOutside = mx.utils.Delegate.create(this, onReleaseOutside);
$mc.onPress = mx.utils.Delegate.create(this, onPress);
$outFrame = outFrame;
$overFrame = overFrame;
$downFrame = downFrame;
$inactiveFrame = inactiveFrame;
for (var _local2 in $mc) {
if ($mc[_local2] instanceof TextField) {
$txtLabel = $mc[_local2];
$fmt = $txtLabel.getTextFormat();
}
}
resetLabel(label);
dispatchGlobalEvents = true;
}
function enable(b) {
if (b != $active) {
if (b) {
$active = b;
}
if (b && ($mc.hitTest(_root._xmouse, _root._ymouse))) {
onRollOver();
}
if (!b) {
if ($inactiveFrame != undefined) {
$mc.gotoAndStop($inactiveFrame);
} else {
onRollOut();
}
}
$mc.useHandCursor = ($active = b);
}
}
function resetLabel(label) {
if ($txtLabel == undefined) {
for (var _local2 in $mc) {
if ($mc[_local2] instanceof TextField) {
$txtLabel = $mc[_local2];
}
}
}
if (label != undefined) {
$label = label;
}
$fmt = $txtLabel.getTextFormat();
$fmt.align = _align;
$txtLabel.setTextFormat($fmt);
$txtLabel.setNewTextFormat($fmt);
$txtLabel.text = $label;
}
function _dispatchEvent(evt) {
dispatchEvent(evt);
if (dispatchGlobalEvents) {
_globalDispatcher.dispatchEvent(evt);
}
}
function onRollOver() {
if ($active) {
$mc.gotoAndPlay($overFrame);
resetLabel();
_dispatchEvent({type:"onRollOver", target:this, id:$id});
$state = "over";
}
}
function onRollOut() {
if ($active) {
if (!$selected) {
$mc.gotoAndPlay($outFrame);
}
resetLabel();
_dispatchEvent({type:"onRollOut", target:this, id:$id});
$state = "out";
}
}
function onPress() {
if ($active) {
if ($downFrame != undefined) {
$mc.gotoAndPlay($downFrame);
}
resetLabel();
_dispatchEvent({type:"onPress", target:this, id:$id});
$threadId = com.preloaded.lang.Threads.ThreadManager.addThread(mx.utils.Delegate.create(this, isDown));
}
}
function onRelease() {
if ($active) {
destroyThread();
_dispatchEvent({type:"onRelease", target:this, id:$id});
}
}
function destroyThread() {
com.preloaded.lang.Threads.ThreadManager.removeThread($threadId);
delete $threadId;
}
function onReleaseOutside() {
if ($active) {
destroyThread();
_dispatchEvent({type:"onReleaseOutside", target:this, id:$id});
}
}
function isDown() {
dispatchEvent({type:"isDown", target:this, id:$id});
}
function get _isDown() {
return($threadId != undefined);
}
function set selected(b) {
if ((!b) && ($selected)) {
$mc.gotoAndPlay($outFrame);
}
if (b && ($state != "over")) {
$mc.gotoAndPlay($overFrame);
}
$selected = b;
//return(__get__selected());
}
function get mc() {
return($mc);
}
function get id() {
return($id);
}
function set _visible(b) {
$mc._visible = b;
//return(__get___visible());
}
function show(time) {
enable(true);
if ((!$showing) || ($showing == undefined)) {
$mc._visible = true;
if (time > 0) {
$mc.tween.stop();
$mc.tween = new mx.transitions.Tween($mc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc._alpha, 100, time, false);
} else {
$mc._alpha = 100;
}
$showing = true;
}
}
function hide(time) {
enable(false);
if ($showing || ($showing == undefined)) {
if (time > 0) {
$mc.tween.stop();
$mc.tween = new mx.transitions.Tween($mc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc._alpha, 0, time, false);
$mc.tween.onMotionComplete = mx.utils.Delegate.create(this, onHideComplete);
} else {
onHideComplete();
}
$showing = false;
}
}
function onHideComplete() {
$mc._visible = false;
_dispatchEvent({type:"onHideComplete", target:this, id:$id});
}
function setTextAlign(align) {
_align = align;
$fmt.align = align;
$txtLabel.setTextFormat($fmt);
$txtLabel.setNewTextFormat($fmt);
}
function setFontSize(val) {
$fmt.size = val;
$txtLabel.setTextFormat($fmt);
$txtLabel.setNewTextFormat($fmt);
}
function destroy() {
com.preloaded.lang.Threads.ThreadManager.removeThread($threadId);
$mc.removeMovieClip();
}
static function initGlobalDispatcher() {
if (_globalDispatcher == undefined) {
_globalDispatcher = new Object();
mx.events.EventDispatcher.initialize(_globalDispatcher);
}
}
static function get globalDispatcher() {
initGlobalDispatcher();
return(_globalDispatcher);
}
}
Symbol 1233 MovieClip [__Packages.com.preloaded.lang.Threads.ThreadManager] Frame 0
class com.preloaded.lang.Threads.ThreadManager
{
static var $initialised, $threads, $host, $paused;
var __get__pause;
function ThreadManager () {
}
static function addThread(fn) {
if (!$initialised) {
init();
}
var _local1 = (getTimer() * Math.random()) + $threads.length;
$threads.push({func:fn, id:_local1});
return(_local1);
}
static function removeThread(id) {
for (var _local2 in $threads) {
if ($threads[_local2].id == id) {
$threads.splice(parseInt(_local2), 1);
}
}
}
static function init() {
$threads = new Array();
$host = _root.createEmptyMovieClip("threadHost", _root.getNextHighestDepth());
$paused = false;
$host.onEnterFrame = tick;
$initialised = true;
}
function set pause(p) {
$paused = p;
//return(__get__pause());
}
static function tick() {
if (!$paused) {
for (var _local1 in $threads) {
$threads[_local1].func.call();
}
}
}
}
Symbol 1234 MovieClip [__Packages.com.robertpenner.easing.Quad] Frame 0
class com.robertpenner.easing.Quad
{
function Quad () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(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);
}
}
Symbol 1235 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.MuteButton] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.MuteButton extends com.preloaded.lang.DispatcherBase
{
var $mc, $state, dispatchEvent;
function MuteButton (mc) {
super(this);
$mc = mc;
$state = "on";
toggle();
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
$mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
onRollOut();
}
function onRelease() {
toggle();
dispatchEvent({type:"onRelease"});
}
function onRollOver() {
$mc.gotoAndStop($state + "_over");
}
function onRollOut() {
$mc.gotoAndStop($state + "_out");
}
function toggle() {
$state = (($state == "on") ? "off" : "on");
if ($mc.hitTest(_root._xmouse, _root._ymouse)) {
onRollOver();
} else {
onRollOut();
}
}
}
Symbol 1236 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.TitleStrip] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.TitleStrip extends com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase
{
var $helpButton, mc, $popupLaunched, __get__title, currentTime;
function TitleStrip (arg_mc) {
super(arg_mc);
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance = this;
$helpButton = new com.preloaded.UI.MovieClipButton(mc.helpButtonMc, "over", "out");
$helpButton.addEventListener("onRelease", mx.utils.Delegate.create(this, launchHintPopup));
$helpButton.__set___visible(((com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().hintText.length > 0) ? true : false));
$popupLaunched = false;
}
function set title(t) {
mc.txtTitle.htmlText = t;
//return(__get__title());
}
function updateTime(time) {
currentTime = new com.preloaded.data.TimeValues(time);
mc.txtTimer.text = (((com.preloaded.UtilsString.padNumber(currentTime.hours) + ":") + com.preloaded.UtilsString.padNumber(currentTime.mins)) + ":") + com.preloaded.UtilsString.padNumber(currentTime.secs);
if ((com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().hintTimeOut != undefined) && (com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().hintTimeOut > 0)) {
if ((currentTime.mins >= com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().hintTimeOut) && (!$popupLaunched)) {
launchAskPopup();
}
}
}
function launchAskPopup() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.PopupHintAsk(com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().hintTimeOut);
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onYesButtonRelease", mx.utils.Delegate.create(this, onHintRequested));
_local2.addEventListener("onNoButtonRelease", mx.utils.Delegate.create(this, onHintDismissed));
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.pause(true);
$popupLaunched = true;
}
function onHintRequested() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchHintPopup));
}
function launchHintPopup() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.PopupHint(com.preloaded.scimus.launchpad.ThreadHandler.__get__currentLevel().hintText);
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onHintDismissed));
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.pause(true);
}
function onHintDismissed() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.pause(false);
}
function destroy() {
super.destroy();
$helpButton.destroy();
}
}
Symbol 1237 MovieClip [__Packages.com.preloaded.data.TimeValues] Frame 0
class com.preloaded.data.TimeValues
{
var totalSeconds, secs, totalMinutes, mins, hours, value;
function TimeValues (n) {
totalSeconds = Math.floor(n / 1000);
secs = totalSeconds % 60;
totalMinutes = Math.floor(totalSeconds / 60);
mins = totalMinutes % 60;
hours = Math.floor(totalMinutes / 60);
value = n;
}
}
Symbol 1238 MovieClip [__Packages.com.preloaded.scimus.launchpad.ThreadHandler] Frame 0
class com.preloaded.scimus.launchpad.ThreadHandler
{
static var instance, currentThread, threadPointer, $currentLevel;
function ThreadHandler () {
instance = this;
}
static function set currentLevel(lvl) {
currentThread = lvl.parentThread;
threadPointer = lvl.threadPosn;
$currentLevel = lvl;
//return(currentLevel);
}
static function get currentLevel() {
return($currentLevel);
}
static function advanceLevel(time) {
if (((threadPointer < currentThread.levels.length) && (currentThread != com.preloaded.scimus.launchpad.ConnectionHandler.customLevelsThread)) && (currentThread != com.preloaded.scimus.launchpad.ConnectionHandler.receivedLevelsThread)) {
threadPointer++;
if (threadPointer < currentThread.levels.length) {
var _local1 = currentThread.levels[threadPointer];
currentLevel = (_local1);
return(_local1);
}
return(null);
}
return(null);
}
static function markCurrentLevelComplete(time) {
if ((time < currentLevel.bestTimeUser) || (currentLevel.bestTimeUser <= 0)) {
currentLevel.bestTimeUser = time;
}
currentLevel.isComplete = true;
incrementCurrentPlayCount();
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn && (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous)) {
var _local1 = 0;
while (_local1 <= threadPointer) {
var _local2 = currentThread.levels[_local1];
com.preloaded.scimus.launchpad.ConnectionHandler.instance.levelCompleted(_local2.guid, _local2.bestTimeUser);
_local1++;
}
}
}
static function incrementCurrentPlayCount() {
currentLevel.playCount++;
}
}
Symbol 1239 MovieClip [__Packages.com.preloaded.scimus.launchpad.data.ThreadObject] Frame 0
class com.preloaded.scimus.launchpad.data.ThreadObject
{
var guid, title, listOrder, levels;
function ThreadObject (xmlNode) {
guid = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "guid")[0];
title = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "title")[0];
listOrder = com.xfactorstudio.xml.xpath.XPath.selectNodesAsNumber(xmlNode, "listOrder")[0];
levels = new Array();
var _local4 = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(xmlNode, "levels");
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
var _local3 = new com.preloaded.scimus.launchpad.data.LevelObject(_local4.childNodes[_local2]);
_local3.threadPosn = Number(_local2);
_local3.parentThread = this;
levels.push(_local3);
_local2++;
}
}
}
Symbol 1240 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPath] Frame 0
class com.xfactorstudio.xml.xpath.XPath
{
function XPath () {
}
static function selectNodes(context, path) {
var _local1 = new com.xfactorstudio.xml.xpath.types.Query(path);
return(_local1.execute([context]));
}
static function selectSingleNode(context, path) {
return(selectNodes(context, path)[0]);
}
static function selectNodesAsString(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0];
_local1++;
}
return(_local2);
}
static function selectNodesAsNumber(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0]);
_local1++;
}
return(_local2);
}
static function selectNodesAsBoolean(context, path) {
var _local3 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local3[_local1])[0];
_local3[_local1] = (((_local2.toUpperCase() == "TRUE") || (Number(_local2) == 1)) ? true : false);
_local1++;
}
return(_local3);
}
static function getNamedNodes(axis, name) {
var _local2 = new Array();
switch (name) {
case "*" :
var _local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 1) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "text()" :
_local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 3) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "node()" :
_local3 = 0;
while (_local3 < axis.length) {
_local2.push(axis[_local3]);
_local3++;
}
break;
default :
if (name.indexOf(":*") != -1) {
var _local5 = name.split(":*")[0];
_local3 = 0;
while (_local3 < axis.length) {
if (prefix(axis[_local3]) == _local5) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else if (name.indexOf("*:") != -1) {
var _local6 = name.split("*:")[1];
_local3 = 0;
while (_local3 < axis.length) {
if (localName(axis[_local3]) == _local6) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else {
_local3 = 0;
for(;;){
if (_local3 >= axis.length) {
break;
}
if (axis[_local3].nodeName == name) {
_local2.push(axis[_local3]);
}
_local3++;
};
}
}
return(_local2);
}
static function getDocumentElement(context) {
while (context.parentNode != null) {
context = context.parentNode;
}
if (context.firstChild.nodeName == null) {
return(context.firstChild.nextSibling);
}
return(context.firstChild);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function prefix(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[0]) : null));
}
static function localName(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[1]) : (node.nodeName)));
}
static function getXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + ("/" + _local2[_local1].nodeName);
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
static function getAbsoluteXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + (((("/" + _local2[_local1].nodeName) + "[") + com.xfactorstudio.xml.xpath.types.Predicate.getIndexOfType(_local2[_local1])) + "]");
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
}
Symbol 1241 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.QueryPart] Frame 0
class com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes, parentNode, nodeValue;
function QueryPart () {
childNodes = new Array();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone(obj) {
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2].nodeValue != null) {
obj.parentNode = parentNode;
obj.nodeValue = nodeValue;
obj.nodeName = nodeName;
obj.childNodes.push(childNodes[_local2].clone());
} else {
obj.childNodes.push(childNodes[_local2]);
}
_local2++;
}
}
function toString(tabs) {
if (tabs == null) {
tabs = "\t";
}
var _local3 = new Array();
_local3.push(newline);
_local3.push(tabs);
_local3.push("<");
_local3.push(nodeName);
_local3.push(">");
if (nodeValue != null) {
_local3.push(nodeValue);
}
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2] instanceof Array) {
_local3.push((((newline + tabs) + "\t<nodeset>") + childNodes[_local2]) + "</nodset>");
} else {
_local3.push(childNodes[_local2].toString(tabs + "\t"));
}
_local2++;
}
if (childNodes.length > 0) {
_local3.push(newline);
_local3.push(tabs);
}
_local3.push("</");
_local3.push(nodeName);
_local3.push(">");
return(_local3.join(""));
}
function execute(context) {
}
var nodeName = "querypart";
}
Symbol 1242 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Query] Frame 0
class com.xfactorstudio.xml.xpath.types.Query extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var currentChild, nodeName, pathString, childNodes;
function Query (query) {
super();
com.xfactorstudio.xml.xpath.XPathFunctions.registerDefaultFunctions();
currentChild = this;
nodeName = "query";
pathString = query;
var _local3 = new com.xfactorstudio.xml.xpath.XPathLexer();
_local3.handler = this;
var _local4 = getTimer();
var _local5;
_local3.parse(pathString);
}
function onFunctionStart(name) {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Func(name));
}
function onComma() {
}
function onGroupStart() {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Group());
}
function onGroupEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Group)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onFunctionEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Func)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onIdentifier(name) {
if (name == ".") {
onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
onAxis(com.xfactorstudio.xml.xpath.Axes.CHILD);
} else {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Identifier(name));
}
}
function onAxis(axis) {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Axis(axis));
}
function onPredicateStart() {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Predicate());
}
function onPredicateEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Predicate)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onOperator(type) {
onNotPath();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Operator(type));
}
function onLitteral(litteral) {
onNotPath();
currentChild.appendChild(litteral);
}
function onNumber(num) {
onNotPath();
currentChild.appendChild(num);
}
function onPathPart() {
if (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Path)) {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Path());
}
}
function onNotPath() {
if (currentChild instanceof com.xfactorstudio.xml.xpath.types.Path) {
currentChild = currentChild.parentNode;
}
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Query();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local8 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local3 = 0;
while (_local3 < childNodes.length) {
_local8.appendChild(childNodes[_local3]);
_local3++;
}
var _local7 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
var _local5 = _local8.clone();
var _local4 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2]);
if (_local4 instanceof Array) {
_local7 = _local7.concat(com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2], context));
} else {
_local7.push(_local4);
}
_local2++;
}
return(_local7);
}
}
Symbol 1243 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathFunctions] Frame 0
class com.xfactorstudio.xml.xpath.XPathFunctions
{
function XPathFunctions () {
}
static function registerFunction(id, func) {
if (Tokens[id] == null) {
Functions.push(func);
Tokens[id] = Functions.length - 1;
} else {
throw new Error(("XPath Error: The function identifier (" + Tokens[id]) + ") is already in use");
}
}
static function registerDefaultFunctions() {
if (!defaultFunctionsInited) {
registerFunction("last", last);
registerFunction("position", position);
registerFunction("count", count);
registerFunction("id", id);
registerFunction("name", name);
registerFunction("string", string);
registerFunction("concat", concat);
registerFunction("starts-with", startsWith);
registerFunction("contains", contains);
registerFunction("substring-before", substringBefore);
registerFunction("substring-after", substringAfter);
registerFunction("substring", substring);
registerFunction("string-length", stringLength);
registerFunction("normalize-space", normalizeSpace);
registerFunction("translate", translate);
registerFunction("boolean", boolean);
registerFunction("not", Not);
registerFunction("true", True);
registerFunction("false", False);
registerFunction("lang", lang);
registerFunction("number", number);
registerFunction("sum", sum);
registerFunction("floor", floor);
registerFunction("ceiling", ceiling);
registerFunction("round", round);
registerFunction("local-name", localName);
registerFunction("namespaceURI", namespaceURI);
defaultFunctionsInited = true;
}
}
static function getFunction(i) {
return(Functions[i]);
}
static function last(args, context, nodeSet) {
return(Number(nodeSet.length));
}
static function position(args, context, nodeSet) {
return(com.xfactorstudio.xml.xpath.XPath.getChildIndex(context));
}
static function count(args, context, nodeSet) {
return(args[0].length);
}
static function id(args, context, nodeSet) {
}
static function name(args, context, nodeSet) {
var _local1 = ((args.length == 0) ? (context) : (args[0][0]));
return(_local1.nodeName);
}
static function localName(args, context, nodeSet) {
var _local2 = ((args.length == 0) ? (context) : (args[0][0]));
var _local1 = _local2.nodeName.split(":");
return(((_local1.length > 1) ? (_local1[1]) : (_local1[0])));
}
static function namespaceURI(args, context, nodeSet) {
var _local4 = ((args.length == 0) ? (context) : (args[0][0]));
var _local3 = _local4.nodeName.split(":")[0];
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.namespace(_local4);
var _local1 = 0;
while (_local1 < _local2.length) {
if (localName([[_local2[_local1]]]) == _local3) {
return(_local2[_local1].nodeValue);
}
_local1++;
}
}
static function toString(args) {
if (args instanceof Array) {
args = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0]).join("");
}
return(String(args));
}
static function string(args, context, nodeSet) {
return(toString(args[0]));
}
static function concat(args, context, nodeSet) {
var _local1 = 0;
while (_local1 < args.length) {
args[_local1] = toString(args[_local1]);
_local1++;
}
return(args.join(""));
}
static function startsWith(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].substr(0, args[1].length) == args[1]) ? true : false));
}
static function contains(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].indexOf(args[1]) != -1) ? true : false));
}
static function substringBefore(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(0, args[0].indexOf(args[1])));
}
static function substringAfter(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[0].indexOf(args[1]) + args[1].length, args[0].length));
}
static function substring(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[1] - 1, Math.min(args[2], args[0].length)));
}
static function stringLength(args, context, nodeSet) {
args = toString(args[0]);
return(((args != null) ? (args.length) : (com.xfactorstudio.xml.xpath.XPathAxes.stringValue(context).length)));
}
static function normalizeSpace(args, context, nodeSet) {
args = toString(args[0]);
var _local1;
var _local3;
_local1 = 0;
while (_local1 < args.length) {
if (args.charCodeAt(_local1) < 33) {
_local3 = _local1;
while (args.charCodeAt(_local3) < 33) {
_local3++;
}
if (_local3 > (_local1 + 1)) {
args = args.split(args.substr(_local1, _local3 - _local1)).join(" ");
}
}
_local1++;
}
_local1 = 0;
while (args.charCodeAt(_local1) < 33) {
_local1++;
}
args = args.substr(_local1, args.length);
_local1 = args.length - 1;
while (args.charCodeAt(_local1) < 33) {
_local1--;
}
args = args.substr(0, _local1 + 1);
return(args);
}
static function translate(args, context, nodeSet) {
var _local3 = toString(args[0]);
var _local4 = toString(args[1]);
var _local2 = toString(args[2]);
return(_local3.split(_local4).join(_local2));
}
static function toNumber(args) {
if (args instanceof Array) {
args = toString(args);
}
switch (typeof(args)) {
case "string" :
return(Number(args));
case "boolean" :
return((args ? 1 : 0));
}
return(Number(args.toString()));
}
static function number(args, context, nodeSet) {
return(toNumber(args[0]));
}
static function sum(args, context, nodeSet) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < args[0].length) {
_local3 = _local3 + Number(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0][_local1])[0]);
_local1++;
}
return(_local3);
}
static function floor(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.floor(Number(args[0])));
}
static function ceiling(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.ceil(Number(args[0])));
}
static function round(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.round(Number(args[0])));
}
static function toBoolean(args) {
return(boolean([args]));
}
static function boolean(args, context, nodeSet) {
args = args[0];
if (args instanceof Array) {
return(((args.length > 0) ? true : false));
}
switch (typeof(args)) {
case "number" :
return(((args != 0) ? true : false));
case "string" :
return(((args.length > 0) ? true : false));
}
return(args);
}
static function Not(args, context, nodeSet) {
args = args[0];
if ((args == "false") || (args == false)) {
return(true);
}
return(false);
}
static function True(args, context, nodeSet) {
return(true);
}
static function False(args, context, nodeSet) {
return(false);
}
static function lang(args, context, nodeSet) {
return(((com.xfactorstudio.xml.xpath.XPath.getNamedNodes(com.xfactorstudio.xml.xpath.XPathAxes.attribute(context), "*:lang")[0].toString() == args[0].toString()) ? true : false));
}
static var Tokens = new Object();
static var Names = [];
static var Functions = [];
static var defaultFunctionsInited = false;
}
Symbol 1244 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxes] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxes
{
function XPathAxes () {
}
static function ancestor(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.parentNode , _local1 != null) {
if (_local1.nodeName != null) {
_local2.push(_local1);
}
}
_local2.reverse();
return(_local2);
}
static function namespace(contextNode) {
var _local4;
var _local3;
var _local5;
var _local12 = contextNode.parentNode;
if (_local12 != null) {
_local3 = namespace(_local12);
} else {
_local3 = new Array();
var _local13 = {parentNode:contextNode, nodeName:"xmlns:xml", nodeType:5, nodeValue:"http://www.w3.org/XML/1998/namespace", toString:function () {
return(this.nodeValue);
}};
_local3.push(_local13);
}
for (var _local11 in contextNode.attributes) {
if (_local11.substr(0, 5) == "xmlns") {
_local4 = {parentNode:contextNode, nodeName:_local11, nodeType:5, nodeValue:contextNode.attributes[_local11], toString:function () {
return(this.nodeValue);
}};
_local5 = -1;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].nodeName == _local4.nodeName) {
_local5 = _local2;
break;
}
_local2++;
}
if (_local5 != -1) {
if (_local4.nodeValue == "") {
_local3.splice(_local5, 1);
} else {
_local3[_local5] = _local4;
}
} else if (_local4.nodeValue != "") {
_local3.push(_local4);
}
}
}
return(_local3);
}
static function ancestorOrSelf(contextNode) {
var _local1 = ancestor(contextNode);
_local1.push(contextNode);
return(_local1);
}
static function attribute(contextNode) {
var _local7 = new Array();
for (var _local8 in contextNode.attributes) {
_local7.push({parentNode:contextNode, nodeName:_local8, nodeType:5, nodeValue:contextNode.attributes[_local8], toString:function () {
return(this.nodeValue);
}});
}
return(_local7);
}
static function child(contextNode) {
return(contextNode.childNodes);
}
static function stringValue(contextNode) {
var _local5 = contextNode.childNodes;
var _local4 = new Array();
var _local3;
switch (contextNode.nodeType) {
case 1 :
_local3 = new Array();
var _local1 = 0;
while (_local1 < contextNode.childNodes.length) {
switch (contextNode.childNodes[_local1].nodeType) {
case 3 :
_local3.push(contextNode.childNodes[_local1].nodeValue);
break;
case 1 :
_local3.push(stringValue(contextNode.childNodes[_local1]));
}
_local1++;
}
_local4.push(_local3.join(""));
break;
case 3 :
case 5 :
_local4.push(contextNode.nodeValue);
}
return(_local4);
}
static function descendant(contextNode) {
var _local4 = contextNode;
var _local5 = new Array();
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
if (_local4.childNodes[_local2].nodeType == 1) {
_local5.push(_local4.childNodes[_local2]);
var _local3 = descendant(_local4.childNodes[_local2]);
var _local1 = 0;
while (_local1 < _local3.length) {
_local5.push(_local3[_local1]);
_local1++;
}
}
_local2++;
}
return(_local5);
}
static function descendantOrSelf(contextNode) {
var _local1 = descendant(contextNode);
_local1.splice(0, 0, contextNode);
return(_local1);
}
static function following(contextNode) {
var _local6 = new Array();
var _local9 = followingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local9.length) {
var _local4 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
_local6.push(_local4[_local3]);
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local8.length) {
var _local5 = followingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = descendantOrSelf(_local5[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
return(_local6);
}
static function followingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.nextSibling , _local1 != null) {
_local2.push(_local1);
}
return(_local2);
}
static function parent(contextNode) {
return(new Array(contextNode.parentNode));
}
static function preceding(contextNode) {
var _local6 = new Array();
var _local9 = precedingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local8.length) {
var _local4 = precedingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = descendantOrSelf(_local4[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local9.length) {
var _local5 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
_local6.push(_local5[_local3]);
_local3++;
}
_local7++;
}
return(_local6);
}
static function precedingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.previousSibling , _local1 != null) {
_local2.push(_local1);
}
_local2.reverse();
return(_local2);
}
static function self(contextNode) {
return([contextNode]);
}
static function root(contextNode) {
while (contextNode.parentNode != null) {
contextNode = contextNode.parentNode;
}
return([contextNode.firstChild]);
}
}
Symbol 1245 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathLexer] Frame 0
class com.xfactorstudio.xml.xpath.XPathLexer
{
var functionNames, axisNames, operatorNames, path, tokenizer, lastToken, handler, lastOpenPeran;
function XPathLexer (path) {
functionNames = com.xfactorstudio.xml.xpath.XPathFunctions.Tokens;
axisNames = new com.xfactorstudio.xml.xpath.XPathAxisNames();
operatorNames = new com.xfactorstudio.xml.xpath.XPathPredicateOperator();
}
function parse(path) {
this.path = path;
tokenizer = new com.xfactorstudio.xml.xpath.Tokenizer(this.path);
var _local2;
while (tokenizer.hasMoreChars()) {
_local2 = tokenizer.nextToken();
switch (_local2.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
onSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER :
onIdentifier(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
onAt();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
onOperator(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.INTEGER :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE :
onNumber(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT :
onDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT :
onDoubleDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
onDoubleSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.EOF :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
onLeftBracket(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
onLeftParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LITERAL :
onLitteral(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET :
onRightBracket();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN :
onRightParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
if (tokenizer.LA(1) == ":") {
_local2.type = com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER;
_local2.text = _local2.text + tokenizer.nextToken().text;
_local2.text = _local2.text + tokenizer.nextToken().text;
onIdentifier(_local2);
} else {
onStar();
break;
}
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.SKIP :
}
lastToken = _local2;
}
}
function onSlash(t) {
switch (lastTokenType) {
case IDENTIFIER :
case PREDICATEEND :
case AXIS :
lastTokenType = OPERATOR;
break;
default :
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ROOT);
lastTokenType = AXIS;
}
}
function onStar() {
switch (lastToken.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
handler.onOperator("*");
break;
default :
handler.onIdentifier("*");
}
}
function onAt() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE);
lastTokenType = AXIS;
}
function onDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
lastTokenType = AXIS;
}
function onDoubleDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.PARENT);
lastTokenType = AXIS;
}
function onDoubleSlash(t) {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF);
lastTokenType = AXIS;
}
function onNumber(t) {
handler.onNumber(Number(t.text));
lastTokenType = NUMBER;
}
function onIdentifier(t) {
var _local2 = t.text;
if (tokenizer.LA(1) == "(") {
switch (t.text) {
case "node" :
case "text" :
handler.onIdentifier(t.text + "()");
lastTokenType = IDENTIFIER;
tokenizer.nextToken();
tokenizer.nextToken();
return(undefined);
}
handler.onFunctionStart(functionNames[t.text]);
lastTokenType = FUNCTIONSTART;
lastOpenPeran = FUNCTIONSTART;
tokenizer.nextToken();
return(undefined);
}
if (tokenizer.LA(1) == ":") {
if (tokenizer.LA(2) == ":") {
_local2 = _local2 + tokenizer.nextToken().text;
handler.onAxis(axisNames[_local2]);
lastTokenType = AXIS;
return(undefined);
}
_local2 = _local2 + tokenizer.nextToken().text;
_local2 = _local2 + tokenizer.nextToken().text;
}
switch (lastTokenType) {
case AXIS :
case PREDICATESTART :
case GROUPSTART :
case FUNCTIONSTART :
case OPERATOR :
case -1 :
handler.onIdentifier(_local2);
lastTokenType = IDENTIFIER;
break;
}
}
function onRightParen() {
switch (lastOpenPeran) {
case GROUPSTART :
handler.onGroupEnd();
lastTokenType = GROUPEND;
break;
case FUNCTIONSTART :
handler.onFunctionEnd();
lastTokenType = FUNCTIONEND;
}
}
function onLeftParen() {
handler.onGroupStart();
lastTokenType = GROUPSTART;
lastOpenPeran = GROUPSTART;
}
function onLitteral(t) {
handler.onLitteral(t.text);
lastTokenType = LITTERAL;
}
function onLeftBracket(t) {
handler.onPredicateStart();
lastTokenType = PREDICATESTART;
}
function onRightBracket(t) {
handler.onPredicateEnd();
lastTokenType = PREDICATEEND;
}
function onOperator(t) {
handler.onOperator(operatorNames[t.text]);
lastTokenType = OPERATOR;
}
var lastTokenType = -1;
var inFunction = 0;
var inGroup = 0;
var inPredicate = 0;
static var AXIS = 0;
static var PREDICATESTART = 1;
static var PREDICATEEND = 2;
static var IDENTIFIER = 3;
static var FUNCTIONSTART = 4;
static var FUNCTIONEND = 5;
static var OPERATOR = 6;
static var COMMA = 7;
static var GROUPSTART = 8;
static var GROUPEND = 9;
static var NUMBER = 10;
static var LITTERAL = 11;
}
Symbol 1246 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxisNames] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxisNames
{
var ancestor::, ancestor-or-self::, attribute::, @, child::, descendant::, descendant-or-self::, //, following::, following-sibling::, parent::, .., preceding::, preceding-sibling::, self::, namespace::;
function XPathAxisNames () {
ancestor:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR;
ancestor-or-self:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR_OR_SELF;
attribute:: = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
@ = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
child:: = com.xfactorstudio.xml.xpath.Axes.CHILD;
descendant:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT;
descendant-or-self:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
// = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
following:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING;
following-sibling:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING_SIBLING;
parent:: = com.xfactorstudio.xml.xpath.Axes.PARENT;
.. = com.xfactorstudio.xml.xpath.Axes.PARENT;
preceding:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING;
preceding-sibling:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING_SIBLING;
self:: = com.xfactorstudio.xml.xpath.Axes.SELF;
this["."] = com.xfactorstudio.xml.xpath.Axes.SELF;
namespace:: = com.xfactorstudio.xml.xpath.Axes.NAMESPACE;
}
}
Symbol 1247 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Axes] Frame 0
class com.xfactorstudio.xml.xpath.Axes
{
function Axes () {
}
static function getName(index) {
switch (index) {
case 0 :
return("root");
case 1 :
return("ancestor");
case 2 :
return("ancestorOrSelf");
case 3 :
return("attribute");
case 4 :
return("child");
case 5 :
return("descendant");
case 6 :
return("descendantOrSelf");
case 7 :
return("following");
case 8 :
return("followingSibling");
case 9 :
return("parent");
case 10 :
return("preceding");
case 11 :
return("precedingSibling");
case 12 :
return("self");
case 13 :
return("namespace");
}
}
static var ROOT = 0;
static var ANCESTOR = 1;
static var ANCESTOR_OR_SELF = 2;
static var ATTRIBUTE = 3;
static var CHILD = 4;
static var DECENDANT = 5;
static var DECENDANT_OR_SELF = 6;
static var FOLLOWING = 7;
static var FOLLOWING_SIBLING = 8;
static var PARENT = 9;
static var PRECEDING = 10;
static var PRECEDING_SIBLING = 11;
static var SELF = 12;
static var NAMESPACE = 13;
}
Symbol 1248 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathPredicateOperator] Frame 0
class com.xfactorstudio.xml.xpath.XPathPredicateOperator
{
var +, -, =, !, >, <, !=, >=, <=, *, mod, div, and, or, |;
function XPathPredicateOperator () {
+ = 200;
- = 201;
= = 202;
! = 203;
> = 204;
< = 205;
!= = 206;
>= = 207;
<= = 208;
* = 209;
mod = 210;
div = 211;
and = 212;
or = 213;
| = 214;
}
}
Symbol 1249 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Tokenizer] Frame 0
class com.xfactorstudio.xml.xpath.Tokenizer
{
var xpath, currentPosition, endPosition;
function Tokenizer (xpath) {
setXPath(xpath);
}
function setXPath(xpath) {
this.xpath = xpath;
currentPosition = 0;
endPosition = xpath.length;
}
function nextToken() {
var _local2 = null;
do {
_local2 = null;
switch (LA(1)) {
case "$" :
_local2 = dollar();
break;
case "\"" :
case "'" :
_local2 = literal();
break;
case "/" :
_local2 = slashes();
break;
case "," :
_local2 = comma();
break;
case "(" :
_local2 = leftParen();
break;
case ")" :
_local2 = rightParen();
break;
case "[" :
_local2 = leftBracket();
break;
case "]" :
_local2 = rightBracket();
break;
case "+" :
_local2 = plus();
break;
case "-" :
_local2 = minus();
break;
case "<" :
case ">" :
_local2 = relationalOperator();
break;
case "=" :
_local2 = equals();
break;
case "!" :
if (LA(2) == "=") {
_local2 = notEquals();
} else {
_local2 = Not();
}
break;
case "|" :
_local2 = pipe();
break;
case "@" :
_local2 = at();
break;
case ":" :
if (LA(2) == ":") {
_local2 = doubleColon();
} else {
_local2 = colon();
}
break;
case "*" :
_local2 = star();
break;
case "." :
switch (LA(2)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
default :
_local2 = dots();
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
case " " :
case "\t" :
case newline :
case "\r" :
_local2 = whitespace();
break;
default :
if (!isIdentifierStartChar(LA(1))) {
break;
}
_local2 = identifierOrOperatorName();
}
if (_local2 == null) {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.EOF, text:xpath.substring(currentPosition, endPosition)};
}
} while (_local2.type == com.xfactorstudio.xml.xpath.TokenTypes.SKIP);
previousToken = _local2;
return(_local2);
}
function identifierOrOperatorName() {
var _local2 = null;
if (previousToken != null) {
switch (previousToken.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
_local2 = identifier();
break;
default :
_local2 = operatorName();
}
} else {
_local2 = identifier();
}
return(_local2);
}
function identifier() {
var _local2 = null;
var _local3 = currentPosition;
while (hasMoreChars()) {
if (isIdentifierChar(LA(1))) {
consume();
} else {
break;
}
}
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER, text:xpath.substring(_local3, currentPosition)};
return(_local2);
}
function operatorName() {
var _local2 = null;
switch (LA(1)) {
case "a" :
_local2 = And();
break;
case "o" :
_local2 = Or();
break;
case "m" :
_local2 = mod();
break;
case "d" :
_local2 = div();
}
return(_local2);
}
function mod() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.MOD, text:"mod"};
consume();
consume();
consume();
return(_local2);
}
function div() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DIV, text:xpath.substring(currentPosition, currentPosition + 3)};
consume();
consume();
consume();
return(_local2);
}
function And() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.AND, text:"and"};
consume();
consume();
consume();
return(_local2);
}
function Or() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.OR, text:"or"};
consume();
consume();
return(_local2);
}
function numberTok() {
var _local5 = currentPosition;
var _local2 = true;
var _local3 = true;
while (_local3) {
switch (LA(1)) {
case "." :
if (_local2) {
_local2 = false;
consume();
} else {
break;
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
consume();
break;
default :
_local3 = false;
}
}
var _local4 = null;
if (_local2) {
_local4 = {type:com.xfactorstudio.xml.xpath.TokenTypes.INTEGER, text:xpath.substring(_local5, currentPosition)};
} else {
_local4 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE, text:xpath.substring(_local5, currentPosition)};
}
return(_local4);
}
function whitespace() {
consume();
while (hasMoreChars()) {
switch (LA(1)) {
case " " :
case "\t" :
case newline :
case "\r" :
consume();
continue;//outer level
}
return({type:com.xfactorstudio.xml.xpath.TokenTypes.SKIP, text:xpath.substring(0, 0)});
}
}
function comma() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.COMMA, text:","};
consume();
return(_local2);
}
function equals() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.EQUALS, text:"="};
consume();
return(_local2);
}
function minus() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.MINUS, text:"-"};
consume();
return(_local2);
}
function plus() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.PLUS, text:"+"};
consume();
return(_local2);
}
function dollar() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR, text:"$"};
consume();
return(_local2);
}
function pipe() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.PIPE, text:"|"};
consume();
return(_local2);
}
function at() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.AT, text:"@"};
consume();
return(_local2);
}
function colon() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.COLON, text:":"};
consume();
return(_local2);
}
function doubleColon() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON, text:"::"};
consume();
consume();
return(_local2);
}
function Not() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.NOT, text:"!"};
consume();
return(_local2);
}
function notEquals() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS, text:"!="};
consume();
consume();
return(_local2);
}
function relationalOperator() {
var _local2 = null;
switch (LA(1)) {
case "<" :
if (LA(2) == "=") {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS, text:"<="};
consume();
} else {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN, text:"<"};
}
consume();
break;
case ">" :
if (LA(2) == "=") {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS, text:">="};
consume();
} else {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN, text:">"};
}
consume();
}
return(_local2);
}
function star() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.STAR, text:"*"};
consume();
return(_local2);
}
function literal() {
var _local2 = null;
var _local5 = LA(1);
consume();
var _local6 = currentPosition;
while ((_local2 == null) && (hasMoreChars())) {
if (LA(1) == _local5) {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LITERAL, text:xpath.substring(_local6, currentPosition)};
}
consume();
}
return(_local2);
}
function dots() {
var _local2 = null;
switch (LA(2)) {
case "." :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT, text:".."};
consume();
consume();
break;
default :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOT, text:"."};
consume();
}
return(_local2);
}
function leftBracket() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET, text:"["};
consume();
return(_local2);
}
function rightBracket() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET, text:"]"};
consume();
return(_local2);
}
function leftParen() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN, text:"("};
consume();
return(_local2);
}
function rightParen() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN, text:")"};
consume();
return(_local2);
}
function slashes() {
var _local2 = null;
switch (LA(2)) {
case "/" :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH, text:"//"};
consume();
consume();
break;
default :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.SLASH, text:"/"};
consume();
}
return(_local2);
}
function LA(i) {
return(xpath.charAt(currentPosition + (i - 1)));
}
function consume() {
currentPosition++;
}
function hasMoreChars() {
return(currentPosition < endPosition);
}
function isIdentifierChar(c) {
return(isUnicodeIdentifierPart(c));
}
function isIdentifierStartChar(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(c) != -1);
}
static function isUnicodeIdentifierPart(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".indexOf(c) != -1);
}
static function isNumber(c) {
return(!isNaN(c));
}
var previousToken = null;
}
Symbol 1250 MovieClip [__Packages.com.xfactorstudio.xml.xpath.TokenTypes] Frame 0
class com.xfactorstudio.xml.xpath.TokenTypes
{
function TokenTypes () {
}
static function getName(i) {
switch (i) {
case AND :
return("AND");
case AT :
return("AT");
case COLON :
return("COLON");
case COMMA :
return("COMMA");
case DIV :
return("DIV");
case DOLLAR :
return("DOLLAR");
case DOT :
return("DOT");
case DOT_DOT :
return("DOT_DOT");
case DOUBLE :
return("DOUBLE");
case DOUBLE_COLON :
return("DOUBLE_COLON");
case DOUBLE_SLASH :
return("DOUBLE_SLASH");
case EOF :
return("EOF");
case EQUALS :
return("EQUALS");
case GREATER_THAN :
return("GREATER_THAN");
case GREATER_THAN_EQUALS :
return("GREATER_THAN_EQUALS");
case IDENTIFIER :
return("IDENTIFIER");
case INTEGER :
return("INTEGER");
case LEFT_BRACKET :
return("LEFT_BRACKET");
case LEFT_PAREN :
return("LEFT_PAREN");
case LESS_THAN :
return("LESS_THAN");
case LESS_THAN_EQUALS :
return("LESS_THAN_EQUALS");
case LITERAL :
return("LITERAL");
case MINUS :
return("MINUS");
case MOD :
return("MOD");
case NOT :
return("NOT");
case NOT_EQUALS :
return("NOT_EQUALS");
case OR :
return("OR");
case PIPE :
return("PIPE");
case PLUS :
return("PLUS");
case RIGHT_BRACKET :
return("RIGHT_BRACKET");
case RIGHT_PAREN :
return("RIGHT_PAREN");
case SKIP :
return("SKIP");
case SLASH :
return("SLASH");
case STAR :
return("STAR");
}
}
static var LEFT_PAREN = 1;
static var RIGHT_PAREN = 2;
static var LEFT_BRACKET = 3;
static var RIGHT_BRACKET = 4;
static var PLUS = 5;
static var MINUS = 6;
static var LESS_THAN = 7;
static var LESS_THAN_EQUALS = 8;
static var GREATER_THAN = 9;
static var GREATER_THAN_EQUALS = 10;
static var SLASH = 11;
static var DOUBLE_SLASH = 12;
static var DOT = 13;
static var DOT_DOT = 14;
static var IDENTIFIER = 15;
static var AT = 16;
static var PIPE = 17;
static var COLON = 18;
static var DOUBLE_COLON = 19;
static var STAR = 20;
static var EQUALS = 21;
static var NOT_EQUALS = 22;
static var NOT = 23;
static var DIV = 24;
static var MOD = 25;
static var DOLLAR = 26;
static var LITERAL = 27;
static var AND = 28;
static var OR = 29;
static var INTEGER = 30;
static var DOUBLE = 31;
static var COMMA = 32;
static var SKIP = -2;
static var EOF = -1;
}
Symbol 1251 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Token] Frame 0
class com.xfactorstudio.xml.xpath.Token
{
var tokenType, parseText, tokenBegin, tokenEnd;
function Token (tokenType, parseText, tokenBegin, tokenEnd) {
setTokenType(tokenType);
setParseText(parseText);
setTokenBegin(tokenBegin);
setTokenEnd(tokenEnd);
}
function setTokenType(tokenType) {
this.tokenType = tokenType;
}
function getTokenType() {
return(tokenType);
}
function setParseText(parseText) {
this.parseText = parseText;
}
function getTokenText() {
return(parseText.substring(getTokenBegin(), getTokenEnd()));
}
function setTokenBegin(tokenBegin) {
this.tokenBegin = tokenBegin;
}
function getTokenBegin() {
return(tokenBegin);
}
function setTokenEnd(tokenEnd) {
this.tokenEnd = tokenEnd;
}
function getTokenEnd() {
return(tokenEnd);
}
function toString() {
return(((("[ (" + com.xfactorstudio.xml.xpath.TokenTypes.getName(tokenType)) + ") (") + getTokenText()) + ")");
}
}
Symbol 1252 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Func] Frame 0
class com.xfactorstudio.xml.xpath.types.Func extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode, childNodes;
function Func (name) {
super();
nodeValue = name;
}
function register() {
parentNode.hasFunctions = true;
}
function clone() {
var _local3 = new com.xfactorstudio.xml.xpath.types.Func(nodeValue);
super.clone(_local3);
return(_local3);
}
function execute(context, axis) {
var _local2 = 0;
while (_local2 < childNodes.length) {
switch (typeof(childNodes[_local2])) {
case "string" :
case "boolean" :
case "number" :
break;
default :
childNodes[_local2] = childNodes[_local2].execute(context);
}
_local2++;
}
return(com.xfactorstudio.xml.xpath.XPathFunctions.getFunction(nodeValue).call(this, childNodes, context[0], axis));
}
var nodeName = "function";
}
Symbol 1253 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Group] Frame 0
class com.xfactorstudio.xml.xpath.types.Group extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Group () {
super();
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Group();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local7;
var _local5 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local2 = 0;
while (_local2 < childNodes.length) {
_local5.appendChild(childNodes[_local2]);
_local2++;
}
var _local8 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local4 = _local5.clone();
_local7 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local4, context[_local3]);
_local3++;
}
return(_local7);
}
var nodeName = "group";
}
Symbol 1254 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Predicate] Frame 0
class com.xfactorstudio.xml.xpath.types.Predicate extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Predicate () {
super();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
child.register();
return(childNodes[childNodes.length - 1]);
}
function execute(context) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local5 = clone();
var _local2 = evaluate(_local5, context[_local3], context);
if (typeof(_local2) == "number") {
_local2 = _local2 == getChildIndex(context[_local3]);
} else {
_local2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(_local2);
}
if (_local2) {
_local6.push(context[_local3]);
}
_local3++;
}
return(_local6);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Predicate();
super.clone(_local2);
return(_local2);
}
static function staticEvaluate(test, contextNode, axis) {
solveGroups(test, contextNode);
solveFunctions(test, contextNode, axis);
solvePaths(test, contextNode);
solveUnions(test, contextNode);
solveMultiplicativeExpressions(test, contextNode);
solveAdditiveExpressions(test, contextNode);
solveRelationalExpressions(test, contextNode);
solveEqualityExpressions(test, contextNode);
solveLogicalAndExpressions(test, contextNode);
solveLogicalOrExpressions(test, contextNode);
return(test.childNodes[0]);
}
function evaluate(test, contextNode, axis) {
if (hasGroups) {
solveGroups(test, contextNode);
}
if (hasFunctions) {
solveFunctions(test, contextNode, axis);
}
if (hasPaths) {
solvePaths(test, contextNode);
}
if (hasUnions) {
solveUnions(test, contextNode);
}
if (hasMultiplicativeExpressions) {
solveMultiplicativeExpressions(test, contextNode);
}
if (hasAdditiveExpressions) {
solveAdditiveExpressions(test, contextNode);
}
if (hasRelationalExpressions) {
solveRelationalExpressions(test, contextNode);
}
if (hasEqualityExpressions) {
solveEqualityExpressions(test, contextNode);
}
if (hasLogicalAndExpressions) {
solveLogicalAndExpressions(test, contextNode);
}
if (hasLogicalOrExpressions) {
solveLogicalOrExpressions(test, contextNode);
}
return(test.childNodes[0]);
}
static function solveEqualityExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
test.childNodes.splice(_local1 - 1, 3, isEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
test.childNodes.splice(_local1 - 1, 3, isNotEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveMultiplicativeExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) * Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MOD :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) % Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.DIV :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) / Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveAdditiveExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.PLUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) + Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MINUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) - Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalAndExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.AND) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) && (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalOrExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.OR) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) || (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveRelationalExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
test.childNodes.splice(_local1 - 1, 3, isGreaterThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
test.childNodes.splice(_local1 - 1, 3, isLessThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isGreaterThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isLessThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solvePaths(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Path) {
test.childNodes[_local1] = test.childNodes[_local1].execute([contextNode]);
}
_local1++;
}
}
static function solveUnions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.UNION) {
test.childNodes[_local1 - 1] = test.childNodes[_local1 - 1].concat(test.childNodes[_local1 + 1]);
test.childNodes[_local1 - 1].sort(sortByIndexFunction);
test.childNodes.splice(_local1 - 1, 3, test.childNodes[_local1 - 1]);
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveGroups(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Group) {
var _local3 = test.childNodes[_local1].execute([contextNode]);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function solveFunctions(test, contextNode, axis) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Func) {
var _local3 = test.childNodes[_local1].execute([contextNode], axis);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function sortByIndexFunction(a, b) {
var _local3 = getDocumentOrder(a);
var _local2 = getDocumentOrder(b);
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local2[_local1] == null) {
return(1);
}
if (_local3[_local1] > _local2[_local1]) {
return(1);
}
if (_local3[_local1] < _local2[_local1]) {
return(-1);
}
_local1++;
}
if (_local2.length > _local3.length) {
return(-1);
}
return(0);
}
static function isEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 == _local1.val2);
}
static function isNotEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 != _local1.val2);
}
static function isGreaterThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 > _local1.val2);
}
static function isLessThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 < _local1.val2);
}
static function isGreaterThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 >= _local1.val2);
}
static function isLessThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 <= _local1.val2);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function getDocumentOrder(kid) {
var _local2 = [];
while (kid.parentNode != null) {
_local2.push(getIndex(kid));
kid = kid.parentNode;
}
return(_local2.reverse());
}
static function getIndex(kid) {
var _local3 = kid.parentNode.childNodes;
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2++;
if (_local3[_local1] === kid) {
return(_local2);
}
_local1++;
}
return(0);
}
static function getIndexOfType(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
if (_local2[_local1] === kid) {
return(_local3);
}
}
_local1++;
}
return(0);
}
static function convertForComparison(val1, val2) {
var _local2;
var _local1;
_local2 = typeof(val1);
_local1 = typeof(val2);
if ((_local2 == "boolean") || (_local1 == "boolean")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "number") || (_local1 == "number")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "string") || (_local1 == "string")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val2);
return({val1:val1, val2:val2});
}
return({val1:val1, val2:val2});
}
static function isTrue(test) {
return(com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(test));
}
var nodeName = "predicate";
var hasGroups = false;
var hasPaths = false;
var hasFunctions = false;
var hasUnions = false;
var hasAdditiveExpressions = false;
var hasMultiplicativeExpressions = false;
var hasRelationalExpressions = false;
var hasEqualityExpressions = false;
var hasLogicalAndExpressions = false;
var hasLogicalOrExpressions = false;
}
Symbol 1255 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Operator] Frame 0
class com.xfactorstudio.xml.xpath.types.Operator extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode;
function Operator (type) {
super();
nodeValue = type;
}
function register() {
switch (nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
parentNode.hasEqualityExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
case com.xfactorstudio.xml.xpath.Operators.MOD :
case com.xfactorstudio.xml.xpath.Operators.DIV :
parentNode.hasMultiplicativeExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.PLUS :
case com.xfactorstudio.xml.xpath.Operators.MINUS :
parentNode.hasAdditiveExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.AND :
parentNode.hasLogicalAndExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.OR :
parentNode.hasLogicalOrExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
parentNode.hasRelationalExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.UNION :
parentNode.hasUnions = true;
}
}
function clone() {
return(this);
}
var nodeName = "operator";
}
Symbol 1256 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Operators] Frame 0
class com.xfactorstudio.xml.xpath.Operators
{
function Operators () {
}
static var PLUS = 200;
static var MINUS = 201;
static var EQUALS = 202;
static var NOT = 203;
static var GREATER_THAN = 204;
static var LESS_THAN = 205;
static var NOT_EQUALS = 206;
static var GREATER_THAN_OR_EQUAL_TO = 207;
static var LESS_THAN_OR_EQUAL_TO = 208;
static var MULTIPLY = 209;
static var MOD = 210;
static var DIV = 211;
static var AND = 212;
static var OR = 213;
static var UNION = 214;
}
Symbol 1257 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Path] Frame 0
class com.xfactorstudio.xml.xpath.types.Path extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var parentNode, childNodes;
function Path () {
super();
}
function register() {
parentNode.hasPaths = true;
}
function appendChild(child) {
if ((childNodes.length == 0) && (child.nodeValue == com.xfactorstudio.xml.xpath.Axes.SELF)) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
if (((!(childNodes[childNodes.length - 1] instanceof com.xfactorstudio.xml.xpath.types.Axis)) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Axis))) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Predicate))) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Path();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local2 = 0;
while (_local2 < childNodes.length) {
context = childNodes[_local2].execute(context);
_local2++;
}
return(context);
}
var nodeName = "path";
}
Symbol 1258 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Axis] Frame 0
class com.xfactorstudio.xml.xpath.types.Axis extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Axis (axis) {
super();
nodeValue = axis;
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Axis();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
_local3 = _local3.concat(com.xfactorstudio.xml.xpath.XPathAxes[com.xfactorstudio.xml.xpath.Axes.getName(Number(nodeValue))].call(this, context[_local2]));
_local2++;
}
return(_local3);
}
var nodeName = "axis";
}
Symbol 1259 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Identifier] Frame 0
class com.xfactorstudio.xml.xpath.types.Identifier extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Identifier (name) {
super();
nodeValue = name;
}
function execute(context) {
var _local2 = com.xfactorstudio.xml.xpath.XPath.getNamedNodes(context, nodeValue);
return(_local2);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Identifier();
super.clone(_local2);
return(_local2);
}
var nodeName = "identifier";
}
Symbol 1260 MovieClip [__Packages.com.preloaded.scimus.launchpad.data.LevelObject] Frame 0
class com.preloaded.scimus.launchpad.data.LevelObject extends Object
{
var guid, title, xmlPath, thumbnailPath, bestTimeGlobal, bestTimeUser, author, creationDate, playCount, hintText, hintTimeOut, isComplete;
function LevelObject (xmlNode) {
super();
guid = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "guid")[0];
title = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "title")[0];
xmlPath = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "xmlpath")[0];
thumbnailPath = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "thumbnailPath")[0];
bestTimeGlobal = com.xfactorstudio.xml.xpath.XPath.selectNodesAsNumber(xmlNode, "bestTimeGlobal")[0];
bestTimeUser = com.xfactorstudio.xml.xpath.XPath.selectNodesAsNumber(xmlNode, "bestTimeUser")[0];
author = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "author")[0];
creationDate = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "creationDate")[0];
playCount = com.xfactorstudio.xml.xpath.XPath.selectNodesAsNumber(xmlNode, "playCount")[0];
hintText = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "hintText")[0];
hintTimeOut = com.xfactorstudio.xml.xpath.XPath.selectNodesAsNumber(xmlNode, "hintTimeOut")[0];
isComplete = ((com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "isComplete")[0] == "true") ? true : false);
}
}
Symbol 1261 MovieClip [__Packages.com.preloaded.scimus.launchpad.ConnectionHandler] Frame 0
class com.preloaded.scimus.launchpad.ConnectionHandler extends mx.events.EventDispatcher
{
static var instance, prefs, blockInfo, threads, customLevelsThread, receivedLevelsThread, extraLevelsThread, favouriteLevelsThread, sandboxLevelsThread;
var $service, loggedIn, dispatchEvent, userCode, isAnonymous, $getLevelsCall, $getExtraLevelsCall, $getSandboxLevelsCall, $getCustomLevelsCall, $getReceivedLevelsCall, $getCustomLevelCall;
function ConnectionHandler (url) {
super(this);
SoapHeaderFix.Install();
$service = new mx.services.WebService(url);
$service.onFault = mx.utils.Delegate.create(this, onFault);
$service.onLoad = mx.utils.Delegate.create(this, onLoad);
var _local3 = new XML(("<AuthHeader xmlns=\"http://www.sciencemuseum.org.uk/launchpad\"><AuthorisationCode>" + com.preloaded.scimus.launchpad.Config.SOAP_AUTHCODE) + "</AuthorisationCode></AuthHeader>");
$service.AddPersistentSOAPHeader(_local3);
loggedIn = false;
instance = this;
}
function getPrefs() {
var _local2 = $service.GetApplicationPreferences();
_local2.onResult = mx.utils.Delegate.create(this, onPrefsRecieved);
}
function onPrefsRecieved(result) {
prefs = result;
prefs.defaultthreads = unPackArray(prefs.defaultthreads.xmlNodes);
dispatchEvent({type:"onPrefsReceived", target:this});
}
function getBlockInfo() {
var _local2 = $service.GetAllBlocks();
_local2.onResult = mx.utils.Delegate.create(this, onBlockInfoReceived);
}
function onBlockInfoReceived(result) {
blockInfo = new Array();
for (var _local4 in result.blocks.xmlNodes) {
var _local2 = new com.preloaded.scimus.launchpad.data.BlockInfoObject(result.blocks.xmlNodes[_local4]);
blockInfo[_local2.name] = _local2;
}
dispatchEvent({type:"onBlockInfoReceived", target:this});
}
function doLogin(passcode) {
var _local2 = $service.LoginUser(passcode);
_local2.onResult = mx.utils.Delegate.create(this, onLoginResponse);
userCode = passcode;
}
function doAnonymousLogin() {
isAnonymous = true;
userCode = prefs.anonymoususername;
loggedIn = true;
dispatchEvent({type:"onLoginResponse", response:true});
}
function setLogin(str) {
userCode = str;
loggedIn = true;
isAnonymous = false;
}
function onLoginResponse(response) {
loggedIn = response;
dispatchEvent({type:"onLoginResponse", response:response});
}
function logout() {
delete threads;
delete customLevelsThread;
delete receivedLevelsThread;
delete extraLevelsThread;
delete favouriteLevelsThread;
loggedIn = false;
isAnonymous = false;
delete userCode;
}
function registerNewUser(email) {
var _local2 = $service.RegisterNewUser(email);
_local2.onResult = mx.utils.Delegate.create(this, registerNewUserResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function registerNewUserResponse(response) {
loggedIn = true;
userCode = response;
isAnonymous = false;
customLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject();
receivedLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject();
favouriteLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject();
var _local3 = _root[com.preloaded.scimus.launchpad.Config.VAR_LEVEL_ID];
if (_local3 == undefined) {
dispatchEvent({type:"onRegisterNewUserResponse", response:response});
} else {
addReceivedLevel(_local3);
}
}
function addReceivedLevel(guid) {
var _local2 = $service.AddReceivedLevel(guid, userCode);
_local2.onResult = mx.utils.Delegate.create(this, addReceivedLevelResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function addReceivedLevelResponse(response) {
dispatchEvent({type:"onAddReceivedLevelResponse", response:response});
dispatchEvent({type:"onRegisterNewUserResponse", response:userCode});
}
function getLevels() {
$getLevelsCall = $service.GetLevels(userCode);
$getLevelsCall.onResult = mx.utils.Delegate.create(this, getLevelsResponse);
}
function getLevelsResponse(response) {
var _local5 = $getLevelsCall.response.firstChild;
var _local3 = mx.xpath.XPathAPI.selectNodeList(_local5, "/soap:Envelope/soap:Body/GetLevelsResponse/GetLevelsResult/threads/*");
threads = new Array();
for (var _local4 in _local3) {
var _local2 = new com.preloaded.scimus.launchpad.data.ThreadObject(_local3[_local4]);
threads[_local2.title] = _local2;
}
favouriteLevelsThread = threads["Favorite Levels"];
sandboxLevelsThread = threads[prefs.sandboxthreadname];
extraLevelsThread = threads[prefs.scimthreadname];
receivedLevelsThread = threads["Received Levels"];
customLevelsThread = threads["Custom Levels"];
dispatchEvent({type:"onGetLevelsResponse", response:response});
}
function getExtraLevels() {
$getExtraLevelsCall = $service.GetSCIMLevels(userCode);
$getExtraLevelsCall.onResult = mx.utils.Delegate.create(this, getExtraLevelsResponse);
}
function getExtraLevelsResponse(response) {
if (response != undefined) {
var _local3 = $getExtraLevelsCall.response.firstChild;
var _local2 = mx.xpath.XPathAPI.selectSingleNode(_local3, "/soap:Envelope/soap:Body/GetSCIMLevelsResponse/GetSCIMLevelsResult");
extraLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject(_local2);
}
dispatchEvent({type:"onGetExtraLevelsResponse", response:response});
delete $getExtraLevelsCall;
}
function getSandboxLevels() {
$getSandboxLevelsCall = $service.GetSandboxLevels("sect744rode");
$getSandboxLevelsCall.onResult = mx.utils.Delegate.create(this, getSandboxLevelsResponse);
}
function getSandboxLevelsResponse(response) {
if (response != undefined) {
var _local3 = $getSandboxLevelsCall.response.firstChild;
var _local2 = mx.xpath.XPathAPI.selectSingleNode(_local3, "/soap:Envelope/soap:Body/GetSandboxLevelsResponse/GetSandboxLevelsResult");
sandboxLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject(_local2);
}
dispatchEvent({type:"onGetSandboxLevelsResponse", response:response});
delete $getSandboxLevelsCall;
}
function getCustomLevels() {
if (!isAnonymous) {
$getCustomLevelsCall = $service.GetCustomLevelsThread(userCode);
$getCustomLevelsCall.onResult = mx.utils.Delegate.create(this, getCustomLevelsResponse);
} else {
getCustomLevelsResponse();
}
}
function getCustomLevelsResponse(response) {
if (response != undefined) {
var _local3 = $getCustomLevelsCall.response.firstChild;
var _local2 = mx.xpath.XPathAPI.selectSingleNode(_local3, "/soap:Envelope/soap:Body/GetCustomLevelsThreadResponse/GetCustomLevelsThreadResult");
customLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject(_local2);
}
dispatchEvent({type:"onGetCustomLevelsResponse", response:response});
delete $getCustomLevelsCall;
}
function getReceivedLevels() {
if (!isAnonymous) {
$getReceivedLevelsCall = $service.GetReceivedLevelsThread(userCode);
$getReceivedLevelsCall.onResult = mx.utils.Delegate.create(this, onGetReceivedLevelsResponse);
} else {
onGetReceivedLevelsResponse();
}
}
function onGetReceivedLevelsResponse(response) {
var _local3 = $getReceivedLevelsCall.response.firstChild;
var _local2 = mx.xpath.XPathAPI.selectSingleNode(_local3, "/soap:Envelope/soap:Body/GetReceivedLevelsThreadResponse/GetReceivedLevelsThreadResult");
receivedLevelsThread = new com.preloaded.scimus.launchpad.data.ThreadObject(_local2);
dispatchEvent({type:"onGetReceivedLevelsResponse", response:response});
delete $getReceivedLevelsCall;
}
function getCustomLevel(guid) {
$getCustomLevelCall = $service.GetCustomLevel(guid, prefs.anonymoususername);
$getCustomLevelCall.onResult = mx.utils.Delegate.create(this, onGetCustomLevelResponse);
}
function onGetCustomLevelResponse(response) {
var _local3 = $getCustomLevelCall.response.firstChild;
var _local2 = mx.xpath.XPathAPI.selectSingleNode(_local3, "/soap:Envelope/soap:Body/GetCustomLevelResponse/GetCustomLevelResult");
dispatchEvent({type:"onGetCustomLevelResponse", response:response, xmlNode:_local2});
}
function levelCompleted(guid, time) {
var _local2 = $service.LevelCompleted(guid, userCode, time);
_local2.onResult = mx.utils.Delegate.create(this, onLevelCompletedResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function onLevelCompletedResponse(response) {
dumpResult(response);
dispatchEvent({type:"onLevelCompletedResponse", response:response});
}
function saveLevel(xml, title, name) {
if (loggedIn && (!isAnonymous)) {
if (typeof(xml) != "string") {
xml = xml.toString();
}
var _local2 = $service.CreateCustomLevel(title, xml, userCode, name);
_local2.onResult = mx.utils.Delegate.create(this, saveLevelResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
}
function saveLevelResponse(response) {
dispatchEvent({type:"onLevelSaved", response:response});
}
function deleteCustomLevel(id) {
var _local2 = $service.DeleteCustomLevel(id, userCode);
_local2.onResult = mx.utils.Delegate.create(this, deleteCustomLevelResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function deleteCustomLevelResponse(response) {
dispatchEvent({type:"onLevelDeleted", response:response});
}
function sendLevelToFriend(lvl, email, yname, fname) {
var _local2 = $service.SendLevelToFriend(lvl.guid, userCode, email, yname, fname);
_local2.onResult = mx.utils.Delegate.create(this, sendLevelToFriendResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function sendLevelToFriendResponse(response) {
dispatchEvent({type:"onSendLevelToFriendResponse", response:response});
}
function resendCode(email) {
var _local2 = $service.ResendAccessCode(email);
_local2.onResult = mx.utils.Delegate.create(this, resendCodeResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function resendCodeResponse(response) {
dumpResult(response);
dispatchEvent({type:"onResendCodeResponse", response:response});
}
function deleteFavourite(id) {
var _local2 = $service.RemoveFavorite(id, userCode);
_local2.onResult = mx.utils.Delegate.create(this, deleteFavouriteResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function deleteFavouriteResponse(response) {
dispatchEvent({type:"onFavouriteDeleted", response:response});
}
function addFavorite(id) {
var _local2 = $service.AddFavorite(id, userCode);
_local2.onResult = mx.utils.Delegate.create(this, addFavouriteResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function addFavouriteResponse(response) {
dispatchEvent({type:"onFavouriteAdded", response:response});
}
function getFactoid(tag) {
var _local2 = $service.GetFactoid(tag);
_local2.onResult = mx.utils.Delegate.create(this, getFactoidResponse);
_local2.onFault = mx.utils.Delegate.create(this, onFault);
}
function getFactoidResponse(response) {
dispatchEvent({type:"onGetFactoidResponse", response:response});
}
static function unPackArray(arrNodes) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < arrNodes.length) {
_local3.push(arrNodes[_local1].firstChild.nodeValue);
_local1++;
}
return(_local3);
}
function onLoad() {
dispatchEvent({type:"onLoad"});
}
function onFault(report) {
var _local3 = "FAULT: ConnectionHandler.onFault\n";
for (var _local4 in report) {
_local3 = _local3 + (((("FAULT:\t" + _local4) + ": ") + report[_local4]) + newline);
}
com.preloaded.scimus.launchpad.ui.PopupHandler.showError(_local3);
dispatchEvent({type:"onFault", fault:report});
}
function dumpResult(result) {
var _local2 = "ConnectionHandler.dumpResult...\n";
_local2 = _local2 + (("DUMP: result=" + result) + newline);
for (var _local3 in result) {
_local2 = _local2 + (((("\tDUMP:" + _local3) + ": ") + result[_local3]) + newline);
}
}
function flushCustomLevels() {
delete customLevelsThread;
}
}
Symbol 1262 MovieClip [__Packages.mx.services.WebService] Frame 0
class mx.services.WebService
{
var _name, _portName, _description, _proxyURI, _endpointReplacementURI, _timeout, gotWSDL, stub, __resolve;
function WebService (wsdlLocation, logObj, proxyURI, endpointProxyURI, serviceName, portName) {
mx.services.Namespace.setup();
_name = serviceName;
_portName = portName;
_description = null;
_proxyURI = proxyURI;
_endpointReplacementURI = endpointProxyURI;
_timeout = -1;
gotWSDL = false;
stub = new mx.services.WebServiceProxy(this, wsdlLocation, logObj);
__resolve = function (methodName) {
return(function () {
return(this.stub.invokeOperation(methodName, arguments));
});
};
}
function getCall(operationName) {
return(stub.getCall(operationName));
}
function onLoad(wsdl) {
}
function onFault(fault) {
}
}
Symbol 1263 MovieClip [__Packages.mx.services.WebServiceProxy] Frame 0
class mx.services.WebServiceProxy
{
var log, service, wsdlURI, wsdl, _servicePortMappings, activePort, waitingOps, callQueue;
function WebServiceProxy (webservice, wsdlLocation, logObj) {
log = logObj;
log.logInfo("Creating stub for " + wsdlLocation, mx.services.Log.VERBOSE);
service = webservice;
var _local3;
if (_local3 == undefined) {
_local3 = service._proxyURI;
}
if (_local3 != undefined) {
wsdlLocation = (buildURL(_local3) + "?target=") + escape(wsdlLocation);
}
wsdlURI = buildURL(wsdlLocation);
var _local2 = new mx.services.Log(log.level, "WSDL");
_local2._parentLog = log;
_local2.onLog = function (txt) {
this._parentLog.onLog(txt);
};
wsdl = new mx.services.WSDL(wsdlURI, this, _local2);
wsdl.onLoad = function () {
this.serviceProxy.onWSDL();
};
log.logInfo("Created stub for " + wsdlURI, mx.services.Log.VERBOSE);
}
function buildURL(url) {
var _local2 = url;
if ((url.indexOf("http://") == -1) && (url.indexOf("https://") == -1)) {
var _local4 = _root._url.indexOf("/", 8);
if (_local4 != -1) {
_local2 = _root._url.substring(0, _local4) + url;
}
}
return(_local2);
}
function onWSDL() {
var _local12 = wsdl.fault;
if (_local12 == undefined) {
var _local8 = new Object();
var _local10 = wsdl.services;
var _local7 = 0;
var _local5 = null;
var _local6 = null;
for (var _local9 in _local10) {
var _local4 = new Object();
var _local3 = wsdl.services[_local9].ports;
for (var _local11 in _local3) {
var _local2 = createCallsFromPort(_local3[_local11]);
_local4[_local11] = _local2;
if (_local5 == undefined) {
_local5 = _local11;
_local6 = _local9;
}
_local7++;
}
_local8[_local9] = _local4;
}
_servicePortMappings = _local8;
var _local9 = service._name;
var _local11 = service._portName;
if ((_local9 == undefined) && (_local11 == undefined)) {
if (_local7 == 1) {
_local9 = _local6;
_local11 = _local5;
} else if (_local7 == 0) {
_local12 = new mx.services.SOAPFault("WSDL.NoPorts", "There are no valid services/ports in the WSDL file!");
} else {
_local12 = new mx.services.SOAPFault("WSDL.MultiplePorts", "There are multiple possible ports in the WSDL file; please specify a service name and port name!");
}
}
if (_local12 == undefined) {
if (_local9 == undefined) {
_local9 = _local6;
}
if (_local11 == undefined) {
_local11 = _local5;
}
var _local13 = setPort(_local11, _local9);
if (_local13 == undefined) {
return(undefined);
}
log.logInfo((("Set active port in service stub: " + _local9) + " : ") + _local11, mx.services.Log.VERBOSE);
service.gotWSDL = true;
service.onLoad.call(service, wsdl.document);
}
}
if (_local12 != undefined) {
service.onFault.call(service, _local12);
log.logDebug("Service stub found fault upon receiving WSDL: " + _local12.faultstring);
}
service.__resolve = function (operationName) {
var callback = (new mx.services.PendingCall());
callback.genSingleConcurrencyFault = function () {
clearInterval(this.timerID);
var _local2 = new mx.services.SOAPFault("Client.NoSuchMethod", ("Couldn't find method '" + operationName) + "' in service!");
this.__handleFault(_local2);
this.onFault(_local2);
};
callback.timerID = setInterval(function () {
callback.genSingleConcurrencyFault();
}, 50);
return(callback);
};
unEnqueueCalls(_local12);
}
function setPort(portName, serviceName) {
var _local4 = ((serviceName == undefined) ? (service._name) : (serviceName));
var service = _servicePortMappings[_local4];
if (service == undefined) {
service.onFault(new mx.services.SOAPFault("Client.NoSuchService", ("Couldn't find service '" + _local4) + "'"));
return(undefined);
}
var _local3 = _servicePortMappings[_local4][portName];
if (_local3 == undefined) {
service.onFault(new mx.services.SOAPFault("Client.NoSuchPort", ((("Couldn't find a matching port (service = '" + _local4) + "', port = '") + portName) + "')"));
return(undefined);
}
for (var _local5 in activePort) {
service[_local5] = undefined;
}
for (var _local5 in _local3) {
service[_local5] = function () {
return(this.stub.invokeOperation(arguments.callee.name, arguments));
};
service[_local5].name = _local5;
}
activePort = _local3;
service._name = _local4;
service._description = _servicePortMappings[_local4].description;
return(activePort);
}
function createCallsFromPort(wsdlPort) {
var _local17 = new Object();
var _local20 = wsdlPort.binding;
var _local19 = _local20.portType;
var _local16 = _local19.operations;
var _local13 = wsdlPort.endpointURI;
if (service._endpointReplacementURI != undefined) {
var _local21 = _local13.indexOf("/", 7);
_local13 = service._endpointReplacementURI + _local13.substring(_local21);
}
var _local23;
var _local18 = wsdl.schemas;
var _local14 = service._proxyURI;
if (_local14 != undefined) {
_local14 = buildURL(_local14);
}
var _local15 = waitingOps;
var _local4;
for (_local4 in _local16) {
var _local3 = _local16[_local4];
var _local8 = _local3.actionURI;
var _local12 = _local3.style;
var _local6 = _local3.inputEncoding;
var _local9 = _local6.use;
var _local10 = _local6.namespaceURI;
var _local11 = _local6.encodingStyle;
var _local5 = new mx.services.Log(log.level, "SOAP");
_local5._parentLog = log;
_local5.onLog = function (txt) {
this._parentLog.onLog(txt);
};
var _local7 = _local13;
if (_local14 != undefined) {
_local7 = (((_local14 + "?transport=SoapHttp&action=") + escape(_local8)) + "&target=") + escape(_local13);
}
var _local2 = _local15[_local4];
if (_local2 != undefined) {
delete _local15[_local4];
} else {
_local2 = new mx.services.SOAPCall(_local4);
}
_local2.targetNamespace = _local10;
_local2.endpointURI = _local7;
_local2.log = _local5;
_local2.operationStyle = _local12;
_local2.useStyle = _local9;
_local2.encodingStyle = _local11;
_local2.actionURI = _local8;
_local2.schemaContext = _local18;
_local2.wsdlOperation = _local3;
if (_local3.description != undefined) {
_local2.description = _local3.description;
}
_local17[_local4] = _local2;
log.logInfo("Made SOAPCall for operation " + _local4, mx.services.Log.BRIEF);
}
return(_local17);
}
function invokeOperation(operationName, args) {
var _local2;
if (wsdl.fault != undefined) {
if (wsdl.fault.faultcode == mx.services.SOAPConstants.DISCONNECTED_FAULT_CODE) {
_local2 = enqueueCall(operationName, args);
} else {
service.onFault.call(service, wsdl.fault);
}
} else if ((wsdl.rootWSDL.xmlDoc == undefined) || (!wsdl.rootWSDL.xmlDoc.loaded)) {
_local2 = enqueueCall(operationName, args);
log.logInfo("Queing call " + operationName);
} else {
_local2 = invokeCall(operationName, args);
if (_local2 == undefined) {
var _local5 = new mx.services.SOAPFault("Client.NoSuchMethod", ("Couldn't find method '" + operationName) + "' in service!");
service.onFault.call(service, _local5);
return(undefined);
}
log.logInfo("Invoking call " + operationName);
}
return(_local2);
}
function getCall(operationName) {
if ((wsdl.rootWSDL.xmlDoc != undefined) && (wsdl.rootWSDL.xmlDoc.loaded)) {
return(activePort[operationName]);
}
var _local2 = waitingOps;
if (_local2 == undefined) {
_local2 = new Object();
waitingOps = _local2;
}
var _local3 = _local2[operationName];
if (_local3 == undefined) {
_local3 = new mx.services.SOAPCall(operationName);
_local2[operationName] = _local3;
}
return(_local3);
}
function invokeCall(operationName, parameters) {
var _local2 = activePort[operationName];
if (_local2 == undefined) {
return(undefined);
}
if (service._timeout != -1) {
_local2.timeout = service._timeout;
}
var _local3 = _local2.asyncInvoke(parameters, "onLoad");
return(_local3);
}
function enqueueCall(operationName, args) {
if (callQueue == undefined) {
callQueue = new Array();
}
var _local2 = new Object();
_local2.operationName = operationName;
_local2.args = args;
_local2.cancel = function () {
this.cancelled = true;
};
callQueue.push(_local2);
return(_local2);
}
function unEnqueueCalls(fault) {
var _local7 = waitingOps;
if (_local7 != undefined) {
for (var _local10 in _local7) {
var _local6 = _local7[_local10];
if (fault != undefined) {
_local6.onFault(fault);
continue;
}
var _local3 = activePort[_local10];
if (_local3 == undefined) {
_local6.onFault(new mx.services.SOAPFault("Client.NoSuchMethod", ("Couldn't find method '" + _local10) + "' in service!"));
continue;
}
}
}
var _local8 = callQueue;
if (_local8 != undefined) {
var _local9 = _local8.length;
var _local4 = 0;
while (_local4 < _local9) {
var _local2 = _local8[_local4];
if (_local2.cancelled) {
} else if (fault != undefined) {
log.logInfo("Faulting previously queued call " + _local2.operationName);
_local2.onFault(fault);
} else {
log.logInfo("Invoking previously queued call " + _local2.operationName);
var _local3 = invokeCall(_local2.operationName, _local2.args);
if (_local3 == undefined) {
fault = new mx.services.SOAPFault("Client.NoSuchMethod", ("Couldn't find method '" + _local2.operationName) + "' in service!");
_local2.onFault(fault);
return(undefined);
}
_local3.originalPromise = _local2;
_local2.myCall = _local3.myCall;
_local3.timerObj = _local2.timerObj;
_local3.onResult = function (result, response) {
this.originalPromise.request = this.request;
this.originalPromise.response = this.response;
this.originalPromise.onResult(result, response);
};
_local3.onFault = function (fault) {
this.originalPromise.request = this.request;
this.originalPromise.response = this.response;
this.originalPromise.onFault(fault);
};
_local3.__handleResult = function (result, response) {
this.originalPromise.request = this.request;
this.originalPromise.response = this.response;
this.originalPromise.__handleResult(result, response);
};
_local3.__handleFault = function (fault) {
this.originalPromise.request = this.request;
this.originalPromise.response = this.response;
this.originalPromise.__handleFault(fault);
};
_local3.onHeaders = function (headers, response) {
this.originalPromise.request = this.request;
this.originalPromise.response = this.response;
this.originalPromise.onHeaders(headers, response);
};
}
_local4++;
}
}
}
}
Symbol 1264 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
if (level <= this.level) {
if (level == DEBUG) {
onLog((((getDateString() + " [DEBUG] ") + name) + ": ") + msg);
} else {
onLog((((getDateString() + " [INFO] ") + name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 1265 MovieClip [__Packages.mx.services.WSDL] Frame 0
class mx.services.WSDL
{
var log, serviceProxy, wsdlURI, wsdlDocs, constants, schemas, unresolvedImports, document, startTime, fault, targetNamespace, rootWSDL, onLoad, services;
function WSDL (wsdlURI, serviceProxy, logObj, wsdlVersion) {
log = logObj;
log.logInfo("Creating WSDL object for " + wsdlURI, mx.services.Log.VERBOSE);
this.serviceProxy = serviceProxy;
this.wsdlURI = wsdlURI;
wsdlDocs = new Object();
var _local4 = ((wsdlVersion == undefined) ? 0 : (wsdlVersion));
constants = mx.services.WSDLConstants.getConstants(_local4);
var _local3 = new mx.services.Log(log.level, "XMLSchema");
_local3._parentLog = log;
_local3.onLog = function (txt) {
this._parentLog.onLog(txt);
};
schemas = new mx.services.SchemaContext(_local3);
mx.services.SchemaContext.RegisterStandardTypes(schemas);
unresolvedImports = 1;
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.wsdl = this;
_local2.location = wsdlURI;
_local2.isRootWSDL = true;
document = _local2;
startTime = new Date();
fetchDocument(_local2);
log.logInfo("Successfully created WSDL object", mx.services.Log.VERBOSE);
}
function fetchDocument(document) {
document.onData = function (src) {
if (src != undefined) {
var _local3 = new Date();
this.wsdl.log.logInfo("Received WSDL document from the remote service", mx.services.Log.VERBOSE);
this.parseXML(src);
this.loaded = true;
var _local2 = Math.round(new Date() - _local3);
this.wsdl.log.logInfo(("Parsed WSDL XML [" + _local2) + " millis]", mx.services.Log.VERBOSE);
}
this.wsdl.parseDocument(this);
delete this.wsdl;
};
document.load(document.location, "GET");
}
function parseDocument(document) {
if (!document.loaded) {
fault = new mx.services.SOAPFault(mx.services.SOAPConstants.DISCONNECTED_FAULT_CODE, "Could not load WSDL", ("Unable to load WSDL, if currently online, please verify the URI and/or format of the WSDL (" + wsdlURI) + ")");
log.logDebug("Unable to receive WSDL file");
} else {
unresolvedImports--;
processImports(document);
}
if ((unresolvedImports == 0) || (fault != undefined)) {
parseCompleted();
}
}
function buildURL(locationURL, contextURL) {
if ((locationURL.substr(0, 7) == "http://") || (locationURL.substr(0, 8) == "https://")) {
return(locationURL);
}
var _local3 = contextURL.lastIndexOf("/");
contextURL = contextURL.substr(0, _local3 + 1);
return(contextURL + locationURL);
}
function processImports(document) {
var _local12 = document.firstChild;
var _local13 = constants;
var _local15 = _local12.getQName();
if (!_local15.equals(_local13.definitionsQName)) {
if (_local15.localPart == "schema") {
schemas.registerSchemaNode(_local12);
return(undefined);
}
fault = new mx.services.SOAPFault("Server", "Faulty WSDL format", "Definitions must be the first element in a WSDL document");
var _local7 = document.firstChild;
if (_local7.nodeName == "soapenv:Envelope") {
_local7 = _local7.firstChild;
if (_local7.nodeName == "soapenv:Body") {
_local7 = _local7.firstChild;
if (_local7.nodeName == "soapenv:Fault") {
var _local11;
var _local10;
var _local9;
var _local2 = _local7.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "faultcode") {
_local11 = _local2.firstChild;
} else if (_local2.nodeName == "faultstring") {
_local10 = _local2.firstChild;
} else if (_local2.nodeName == "detail") {
_local9 = _local2.firstChild;
}
_local2 = _local2.nextSibling;
}
fault = new mx.services.SOAPFault(_local11, _local10, _local9);
}
}
}
return(undefined);
}
var _local16 = _local12.attributes.targetNamespace;
var _local14 = new mx.services.WSDLDocument(document, this);
wsdlDocs[_local16] = _local14;
if (document.isRootWSDL) {
targetNamespace = _local16;
rootWSDL = _local14;
}
var _local5 = _local12.getElementsByQName(_local13.importQName);
if (_local5 != undefined) {
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = _local5[_local3].attributes.location;
_local4 = buildURL(_local4, document.location);
var _local6 = _local5[_local3].attributes.namespace;
importDocument(_local4, _local6);
_local3++;
}
}
}
function importDocument(location, namespaceURI) {
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.wsdl = this;
_local2.namespace = namespaceURI;
_local2.location = location;
unresolvedImports++;
fetchDocument(_local2);
}
function parseCompleted() {
if (fault == undefined) {
parseServices();
}
if (fault == undefined) {
var _local2 = Math.floor(new Date() - startTime);
}
onLoad();
}
function parseServices() {
log.logDebug("Parsing definitions");
var _local6 = constants;
var _local3 = rootWSDL.serviceElements;
if (_local3 == undefined) {
fault = new mx.services.SOAPFault("Server.NoServicesInWSDL", "Could not load WSDL", ("No <wsdl:service> elements found in WSDL at " + wsdlURI) + ".");
log.logDebug("No <service> elements in WSDL file");
return(undefined);
}
var _local4 = new Object();
for (var _local5 in _local3) {
var _local2 = parseService(_local3[_local5]);
_local4[_local2.name] = _local2;
}
services = _local4;
log.logDebug("Completed WSDL parsing");
}
function parseSchemas(typesNode) {
log.logDebug("Parsing schemas");
var _local3 = typesNode.childNodes;
var _local4 = _local3.length;
var _local2 = 0;
while (_local2 < _local4) {
schemas.registerSchemaNode(_local3[_local2]);
_local2++;
}
log.logDebug("Done parsing schemas.");
}
function parseService(serviceElement) {
log.logDebug("Parsing service: " + serviceElement.nodeName);
var _local11 = new Object();
_local11.ports = new Object();
var _local8 = constants;
_local11.name = serviceElement.attributes.name;
var _local12 = serviceElement.childNodes;
var _local13 = _local12.length;
var _local7 = 0;
while ((_local7 < _local13) && (fault == undefined)) {
var _local2 = _local12[_local7];
var _local9 = _local2.getQName();
if (_local9.equals(_local8.documentationQName)) {
_local11.description = _local2.firstChild;
} else if (_local9.equals(_local8.portQName)) {
var _local4 = new Object();
var _local3 = 0;
while (_local3 < _local2.childNodes.length) {
var _local5 = _local2.childNodes[_local3];
var _local6 = _local5.getQName();
if (_local6.equals(_local8.soapAddressQName)) {
_local4.endpointURI = _local5.attributes.location;
break;
}
_local3++;
}
if (_local4.endpointURI != undefined) {
_local4.name = _local2.attributes.name;
var _local10 = _local2.getQNameFromString(_local2.attributes.binding);
_local4.binding = parseBinding(_local10);
_local11.ports[_local4.name] = _local4;
}
}
_local7++;
}
return(_local11);
}
function parseBinding(bindingName) {
log.logDebug("Parsing binding: " + bindingName);
var _local10 = new Object();
var _local4 = constants;
var _local25 = wsdlDocs[bindingName.namespaceURI];
if (_local25 == undefined) {
fault = new mx.services.SOAPFault("WSDL.UnrecognizedNamespace", ("The WSDL parser had no registered document for the namespace '" + bindingName.namespaceURI) + "'");
return(undefined);
}
var _local19 = _local25.getBindingElement(bindingName.localPart);
if (_local19 == undefined) {
fault = new mx.services.SOAPFault("WSDL.UnrecognizedBindingName", ((("The WSDL parser couldn't find a binding named '" + bindingName.localPart) + "' in namespace '") + bindingName.namespaceURI) + "'");
return(undefined);
}
var _local26 = _local19.getQNameFromString(_local19.attributes.type);
_local10.portType = parsePortType(_local26);
if (fault != undefined) {
return(undefined);
}
var _local23 = _local19.childNodes;
var _local24 = _local23.length;
var _local13 = 0;
while (_local13 < _local24) {
var _local11 = _local23[_local13];
var _local17 = _local11.getQName();
if (_local17.equals(_local4.soapBindingQName)) {
_local10.style = _local11.attributes.style;
if (_local10.style == undefined) {
_local10.style = mx.services.WSDLConstants.DEFAULT_STYLE;
}
_local10.transport = _local11.attributes.transport;
} else if (_local17.equals(_local4.operationQName)) {
var _local20 = _local11.attributes.name;
var _local6 = _local10.portType.operations[_local20];
var _local14 = _local11.childNodes;
var _local18 = _local14.length;
var _local5 = 0;
while (_local5 < _local18) {
var _local3 = _local14[_local5];
var _local7 = _local3.getQName();
if (_local7.equals(_local4.soapOperationQName)) {
var _local12 = _local3.attributes.soapAction;
_local6.actionURI = _local12;
var _local9 = _local3.attributes.style;
if (_local9 == undefined) {
_local9 = _local10.style;
}
_local6.style = _local9;
} else if (_local7.equals(_local4.inputQName)) {
var _local8 = _local3.getElementsByQName(_local4.soapBodyQName)[0];
var _local2 = new Object();
_local2.use = _local8.attributes.use;
_local2.namespaceURI = _local8.attributes.namespace;
if (_local2.namespaceURI == undefined) {
_local2.namespaceURI = targetNamespace;
}
_local2.encodingStyle = _local8.attributes.encodingStyle;
_local6.inputEncoding = _local2;
} else if (_local7.equals(_local4.outputQName)) {
var _local8 = _local3.getElementsByQName(_local4.soapBodyQName)[0];
var _local2 = new Object();
_local2.use = _local8.attributes.use;
_local2.namespaceURI = _local8.attributes.namespace;
if (_local2.namespaceURI == undefined) {
_local2.namespaceURI = targetNamespace;
}
_local2.encodingStyle = _local8.attributes.encodingStyle;
_local6.outputEncoding = _local2;
}
_local5++;
}
}
_local13++;
}
var _local21 = document.getElementsByQName(_local4.bindingQName);
var _local15 = 0;
while (_local15 < _local21.length) {
_local19 = _local21[_local15];
var _local16 = _local19.attributes.name;
if (bindingName != _local16) {
} else {
_local10.name = _local16;
}
_local15++;
}
return(_local10);
}
function parsePortType(portTypeName, document) {
log.logDebug("Parsing portType: " + portTypeName);
var _local19 = wsdlDocs[portTypeName.namespaceURI];
if (_local19 == undefined) {
fault = new mx.services.SOAPFault("WSDL.UnrecognizedNamespace", ("The WSDL parser had no registered document for the namespace '" + portTypeName.namespaceURI) + "'");
return(undefined);
}
var _local18 = _local19.getPortTypeElement(portTypeName.localPart);
if (_local18 == undefined) {
fault = new mx.services.SOAPFault("WSDL.UnrecognizedPortTypeName", ((("The WSDL parser couldn't find a portType named '" + portTypeName.localPart) + "' in namespace '") + portTypeName.namespaceURI) + "'");
return(undefined);
}
var _local13 = new Object();
var _local7 = constants;
_local13.name = _local18.attributes.name;
_local13.operations = new Object();
var _local14 = _local18.getElementsByQName(_local7.operationQName);
var _local15 = _local14.length;
var _local9 = 0;
while (_local9 < _local15) {
var _local11 = _local14[_local9];
var _local2 = new mx.services.WSDLOperation(_local11.attributes.name, this, document);
var _local10 = _local11.childNodes;
var _local12 = _local10.length;
var _local5 = 0;
while (_local5 < _local12) {
var _local3 = _local10[_local5];
var _local4 = _local3.getQName();
if (_local4.equals(_local7.documentationQName)) {
_local2.documentation = _local3.childNodes[0];
} else {
var _local8 = _local3.attributes.message;
var _local6 = _local3.getQNameFromString(_local8);
if (_local4.equals(_local7.inputQName)) {
_local2.inputMessage = _local6;
} else if (_local4.equals(_local7.outputQName)) {
_local2.outputMessage = _local6;
}
}
_local5++;
}
if (_local13.operations[_local2.name] != undefined) {
fault = new mx.services.SOAPFault("WSDL.OverloadedOperation", ("The WSDL contains an overloaded operation (" + _local2.name) + ") - we do not currently support this usage.");
return(undefined);
}
_local13.operations[_local2.name] = _local2;
_local9++;
}
return(_local13);
}
function parseMessage(messageName, operationName, mode, document) {
log.logDebug("Parsing message: " + messageName);
var _local22 = wsdlDocs[messageName.namespaceURI];
if (_local22 == undefined) {
fault = new mx.services.SOAPFault("WSDL.UnrecognizedNamespace", ("The WSDL parser had no registered document for the namespace '" + messageName.namespaceURI) + "'");
return(undefined);
}
var _local21 = _local22.getMessageElement(messageName.localPart);
if (_local21 == undefined) {
fault = new mx.services.SOAPFault("WSDL.UnrecognizedMessageName", ((("The WSDL parser couldn't find a message named '" + messageName.localPart) + "' in namespace '") + messageName.namespaceURI) + "'");
return(undefined);
}
var _local23 = constants;
var _local3 = new Object();
_local3.name = _local21.attributes.name;
if (_local3.name == undefined) {
if (mode == mx.services.SOAPConstants.MODE_IN) {
_local3.name = operationName + "Request";
} else {
_local3.name == (operationName + "Response");
}
}
log.logDebug("Message name is " + _local3.name);
var _local18 = _local21.getElementsByQName(_local23.parameterQName);
var _local16 = _local18.length;
_local3.parameters = new Array();
var _local8 = 0;
while (_local8 < _local16) {
var _local5 = _local18[_local8];
var _local14 = _local5.attributes.name;
var _local2;
var _local12;
if (_local5.attributes.element != undefined) {
var _local10 = _local5.attributes.element;
var _local13 = _local5.getQNameFromString(_local10);
var _local7 = schemas.getElementByQName(_local13);
if (schemas.fault != undefined) {
fault = schemas.fault;
return(undefined);
}
if (_local7 == undefined) {
fault = new mx.services.SOAPFault("WSDL.BadElement", ("Element " + _local10) + " not resolvable");
return(undefined);
}
_local2 = _local7.schemaType;
_local12 = _local13;
if ((_local16 == 1) && (operationName == _local13.localPart)) {
for (var _local17 in _local2.partTypes) {
var _local4 = _local2.partTypes[_local17];
var _local6 = new mx.services.QName(_local17, _local4.namespace);
var _local15 = new mx.services.SOAPParameter(_local17, _local4.schemaType, mode, _local6);
_local3.parameters.push(_local15);
_local3.targetNamespace = _local13.namespaceURI;
}
_local3.isWrapped = true;
if (_local7.form == "qualified") {
_local3.isQualified = true;
}
break;
}
} else {
var _local9 = _local5.attributes.type;
var _local13 = _local5.getQNameFromString(_local9);
_local2 = schemas.getTypeByQName(_local13);
if (schemas.fault != undefined) {
fault = schemas.fault;
return(undefined);
}
if (_local2 == undefined) {
fault = new mx.services.SOAPFault("WSDL.BadType", ("Type " + _local9) + " not resolvable");
return(undefined);
}
}
var _local15 = new mx.services.SOAPParameter(_local14, _local2, mode, _local12);
_local3.parameters.push(_local15);
_local8++;
}
return(_local3);
}
}
Symbol 1266 MovieClip [__Packages.mx.services.WSDLConstants] Frame 0
class mx.services.WSDLConstants
{
function WSDLConstants () {
}
static function getConstants(versionNumber) {
var _local1 = new Object();
_local1.definitionsQName = new mx.services.QName("definitions", WSDL_URI);
_local1.typesQName = new mx.services.QName("types", WSDL_URI);
_local1.messageQName = new mx.services.QName("message", WSDL_URI);
_local1.portTypeQName = new mx.services.QName("portType", WSDL_URI);
_local1.bindingQName = new mx.services.QName("binding", WSDL_URI);
_local1.serviceQName = new mx.services.QName("service", WSDL_URI);
_local1.importQName = new mx.services.QName("import", WSDL_URI);
_local1.documentationQName = new mx.services.QName("documentation", WSDL_URI);
_local1.portQName = new mx.services.QName("port", WSDL_URI);
_local1.soapAddressQName = new mx.services.QName("address", WSDL_SOAP_URI);
_local1.bindingQName = new mx.services.QName("binding", WSDL_URI);
_local1.soapBindingQName = new mx.services.QName("binding", WSDL_SOAP_URI);
_local1.operationQName = new mx.services.QName("operation", WSDL_URI);
_local1.soapOperationQName = new mx.services.QName("operation", WSDL_SOAP_URI);
_local1.documentationQName = new mx.services.QName("documentation", WSDL_URI);
_local1.soapBodyQName = new mx.services.QName("body", WSDL_SOAP_URI);
_local1.inputQName = new mx.services.QName("input", WSDL_URI);
_local1.outputQName = new mx.services.QName("output", WSDL_URI);
_local1.parameterQName = new mx.services.QName("part", WSDL_URI);
return(_local1);
}
static var WSDL_URI = "http://schemas.xmlsoap.org/wsdl/";
static var WSDL_SOAP_URI = "http://schemas.xmlsoap.org/wsdl/soap/";
static var SOAP_ENVELOPE_URI = "http://schemas.xmlsoap.org/soap/envelope/";
static var SOAP_ENCODING_URI = "http://schemas.xmlsoap.org/wsdl/soap/encoding/";
static var HTTP_WSDL_URI = "http://schemas.xmlsoap.org/wsdl/http/";
static var HTTP_SOAP_URI = "http://schemas.xmlsoap.org/soap/http";
static var MACROMEDIA_SOAP_URI = "http://www.macromedia.com/soap/";
static var DEFAULT_STYLE = "document";
}
Symbol 1267 MovieClip [__Packages.mx.services.QName] Frame 0
class mx.services.QName
{
var localPart, namespaceURI;
function QName (localPart, namespaceURI) {
this.localPart = ((localPart == undefined) ? "" : (localPart));
this.namespaceURI = ((namespaceURI == undefined) ? "" : (namespaceURI));
}
function equals(qname) {
return((namespaceURI == qname.namespaceURI) && (localPart == qname.localPart));
}
}
Symbol 1268 MovieClip [__Packages.mx.services.SchemaContext] Frame 0
class mx.services.SchemaContext
{
var log, schemas, schemaVersion, unresolvedImports;
function SchemaContext (logObj) {
log = logObj;
schemas = new Object();
}
static function RegisterSchemaTypes(schemaObj, schemaVersion) {
var _local1 = schemaVersion.xsdURI;
schemaObj.registerType(new mx.services.DataType("boolean", mx.services.DataType.BOOLEAN_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("string", mx.services.DataType.STRING_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("decimal", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("integer", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("negativeInteger", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("nonNegativeInteger", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("positiveInteger", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("nonPositiveInteger", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("long", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("int", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("short", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("byte", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("unsignedLong", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("unsignedInt", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("unsignedShort", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("unsignedByte", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("float", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("double", mx.services.DataType.NUMBER_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("date", mx.services.DataType.DATE_TYPE, _local1));
var _local3 = new mx.services.DataType("dateTime", mx.services.DataType.DATE_TYPE, _local1);
schemaVersion.dateTimeType = _local3;
schemaObj.registerType(_local3);
schemaObj.registerType(new mx.services.DataType("time", mx.services.DataType.DATE_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("base64Binary", mx.services.DataType.OBJECT_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("hexBinary", mx.services.DataType.OBJECT_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("token", mx.services.DataType.STRING_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("normalizedString", mx.services.DataType.STRING_TYPE, _local1));
schemaObj.registerType(new mx.services.DataType("anyType", mx.services.DataType.ANY_TYPE, _local1));
if (_local1 == mx.services.SchemaVersion.XSD_URI_1999) {
schemaObj.registerType(new mx.services.DataType("timeInstant", mx.services.DataType.DATE_TYPE, _local1));
}
}
static function RegisterStandardTypes(schemaObj) {
RegisterSchemaTypes(schemaObj, mx.services.SchemaVersion.getSchemaVersion(mx.services.SchemaVersion.XSD_URI_1999));
RegisterSchemaTypes(schemaObj, mx.services.SchemaVersion.getSchemaVersion(mx.services.SchemaVersion.XSD_URI_2000));
RegisterSchemaTypes(schemaObj, mx.services.SchemaVersion.getSchemaVersion(mx.services.SchemaVersion.XSD_URI_2001));
schemaObj.registerType(new mx.services.DataType("string", mx.services.DataType.STRING_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("int", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("integer", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("long", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("short", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("byte", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("decimal", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("float", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("base64", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("double", mx.services.DataType.NUMBER_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
schemaObj.registerType(new mx.services.DataType("boolean", mx.services.DataType.BOOLEAN_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI));
var _local2 = new mx.services.DataType("Array", mx.services.DataType.ARRAY_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI);
_local2.arrayType = new mx.services.DataType("any", mx.services.DataType.ANY_TYPE, mx.services.SchemaVersion.SOAP_ENCODING_URI);
_local2.arrayDimensions = 1;
_local2.isEncodedArray = true;
_local2.itemElement = new mx.services.QName("item");
schemaObj.registerType(_local2);
schemaObj.registerType(new mx.services.DataType("Map", mx.services.DataType.MAP_TYPE, mx.services.SchemaVersion.APACHESOAP_URI));
schemaObj.registerType(new mx.services.DataType("RowSet", mx.services.DataType.ROWSET_TYPE, mx.services.SchemaVersion.APACHESOAP_URI));
schemaObj.registerType(new mx.services.DataType("QueryBean", mx.services.DataType.QBEAN_TYPE, mx.services.SchemaVersion.CF_RPC_URI));
}
function registerSchemaNode(rootElement, document) {
var _local4 = rootElement.getQName();
if (_local4.localPart != "schema") {
return(undefined);
}
var _local2 = mx.services.SchemaVersion.getSchemaVersion(_local4.namespaceURI);
if (_local2 == undefined) {
return(undefined);
}
schemaVersion = _local2;
if (rootElement.getQName().equals(_local2.schemaQName)) {
var _local5 = rootElement.attributes.targetNamespace;
processImports(rootElement, _local2, document);
return(registerNamespace(_local5, rootElement));
}
}
function processImports(rootElement, schemaVersion, document) {
var _local4 = rootElement.getElementsByQName(schemaVersion.importQName);
if (_local4 != undefined) {
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3].attributes.schemaLocation;
if (_local2 != undefined) {
_local2 = buildURL(_local2, document.location);
var _local5 = _local4[_local3].attributes.namespace;
importDocument(_local2, _local5);
}
_local3++;
}
}
}
function importDocument(location, namespaceURI) {
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.schemaContext = this;
_local2.namespace = namespaceURI;
_local2.location = location;
unresolvedImports++;
fetchDocument(_local2);
}
function fetchDocument(document) {
document.onData = function (src) {
if (src == undefined) {
this.fault = new mx.services.SOAPFault(mx.services.SOAPConstants.DISCONNECTED_FAULT_CODE, "Could not load imported schema", ("Unable to load schema, if currently online, please verify the URI and/or format of the schema at (" + this.schemaURI) + ")");
this.log.logDebug("Unable to receive WSDL file");
} else {
this.unresolvedImports--;
this.registerSchemaNode(document.firstChild, document);
}
};
document.load(document.location, "GET");
}
function buildURL(locationURL, contextURL) {
if ((locationURL.substr(0, 7) == "http://") || (locationURL.substr(0, 8) == "https://")) {
return(locationURL);
}
var _local3 = contextURL.lastIndexOf("/");
contextURL = contextURL.substr(0, _local3 + 1);
return(contextURL + locationURL);
}
function registerNamespace(namespaceURI, rootElement) {
log.logInfo("Registering schema namespace: " + namespaceURI, mx.services.Log.VERBOSE);
if (schemas[namespaceURI] != undefined) {
log.logInfo("Duplicate namespace!");
return(undefined);
}
var _local2 = new mx.services.Schema(namespaceURI, rootElement, this);
schemas[namespaceURI] = _local2;
var _local4 = rootElement.attributes.elementFormDefault;
if ((_local4 != undefined) && (_local4 == "qualified")) {
_local2.elementFormDefault = "qualified";
}
return(_local2);
}
function registerType(dtype) {
var _local4 = dtype.namespaceURI;
var _local2 = schemas[_local4];
if (_local2 == undefined) {
_local2 = registerNamespace(_local4);
}
if (_local2.types[dtype.name] == undefined) {
_local2.types[dtype.name] = dtype;
}
}
function registerElement(elemObj) {
var _local4 = elemObj.namespaceURI;
var _local2 = schemas[_local4];
if (_local2 == undefined) {
_local2 = registerNamespace(_local4);
}
if (elemObj.form == undefined) {
elemObj.form = _local2.elementFormDefault;
}
_local2.elements[elemObj.name] = elemObj;
}
function getElementByQName(elQName) {
var _local3 = schemas[elQName.namespaceURI];
if (_local3 != undefined) {
var _local2 = _local3.elements[elQName.localPart];
if (_local2 == undefined) {
_local2 = _local3.parseElement(elQName.localPart);
if (_local2 == undefined) {
}
}
return(_local2);
}
}
function getTypeByQName(typeQName) {
var _local13 = schemas[typeQName.namespaceURI];
if (_local13 != undefined) {
var _local11 = typeQName.localPart;
var _local14 = _local11.indexOf("[");
if (_local14 != -1) {
var _local15 = _local11.substring(0, _local14);
var _local9 = getTypeByQName(new mx.services.QName(_local15, typeQName.namespaceURI));
var _local4 = _local11.substring(_local14);
var _local2 = 0;
while (_local2 != -1) {
var _local6 = new Array();
_local2++;
var _local3 = _local4.indexOf(",", _local2);
while (_local3 != -1) {
var _local8 = Number(_local4.substring(_local2, _local3));
_local6.push(_local8);
_local2 = _local3 + 1;
_local3 = _local4.indexOf(",", _local2);
}
var _local7 = _local4.indexOf("]", _local2);
if (_local7 == -1) {
}
if (_local7 == _local2) {
_local6.push(-1);
} else {
var _local10 = Number(_local4.substring(_local2, _local7));
_local6.push(_local10);
}
var _local5 = new mx.services.DataType(_local9.name, mx.services.DataType.ARRAY_TYPE, _local9.namespaceURI);
_local5.isEncodedArray = true;
_local5.arrayType = _local9;
_local5.itemElement = new mx.services.QName("item");
_local5.dimensions = _local6;
_local9 = _local5;
_local2 = _local4.indexOf("[", _local7);
}
return(_local9);
}
var _local12 = _local13.types[_local11];
if (_local12 != undefined) {
return(_local12);
}
_local12 = _local13.parseType(_local11);
if (_local12 == undefined) {
}
return(_local12);
}
}
function getType(qualifiedName, node) {
var _local4 = "";
var _local5 = qualifiedName;
var _local2 = qualifiedName.indexOf(":");
if (_local2 != -1) {
_local4 = qualifiedName.substring(0, _local2);
_local5 = qualifiedName.substring(_local2 + 1);
}
var _local6 = node.getNamespaceForPrefix(_local4);
return(getTypeByQName(_local5, _local6, node));
}
}
Symbol 1269 MovieClip [__Packages.mx.services.DataType] Frame 0
class mx.services.DataType
{
var name, typeType, namespaceURI, qname, isAnonymous, deserializer;
function DataType (name, typeType, xmlns, deserializer) {
this.name = name;
this.typeType = ((typeType == undefined) ? (OBJECT_TYPE) : (typeType));
namespaceURI = ((xmlns == undefined) ? (mx.services.SchemaVersion.XML_SCHEMA_URI) : (xmlns));
qname = new mx.services.QName(this.name, namespaceURI);
isAnonymous = false;
this.deserializer = deserializer;
}
static var NUMBER_TYPE = 0;
static var STRING_TYPE = 1;
static var OBJECT_TYPE = 2;
static var DATE_TYPE = 3;
static var BOOLEAN_TYPE = 4;
static var XML_TYPE = 5;
static var ARRAY_TYPE = 6;
static var MAP_TYPE = 7;
static var ANY_TYPE = 8;
static var COLL_TYPE = 10;
static var ROWSET_TYPE = 11;
static var QBEAN_TYPE = 12;
static var objectType = new mx.services.DataType("", OBJECT_TYPE, "");
}
Symbol 1270 MovieClip [__Packages.mx.services.SchemaVersion] Frame 0
class mx.services.SchemaVersion
{
static var version2001, version2000, version1999;
var xsdURI, xsiURI, schemaQName, allQName, complexTypeQName, elementTypeQName, importQName, simpleTypeQName, complexContentQName, sequenceQName, simpleContentQName, restrictionQName, attributeQName, extensionQName, nilQName;
function SchemaVersion (xsdURI, xsiURI) {
this.xsdURI = xsdURI;
this.xsiURI = xsiURI;
schemaQName = new mx.services.QName("schema", xsdURI);
allQName = new mx.services.QName("all", xsdURI);
complexTypeQName = new mx.services.QName("complexType", xsdURI);
elementTypeQName = new mx.services.QName("element", xsdURI);
importQName = new mx.services.QName("import", xsdURI);
simpleTypeQName = new mx.services.QName("simpleType", xsdURI);
complexContentQName = new mx.services.QName("complexContent", xsdURI);
sequenceQName = new mx.services.QName("sequence", xsdURI);
simpleContentQName = new mx.services.QName("simpleContent", xsdURI);
restrictionQName = new mx.services.QName("restriction", xsdURI);
attributeQName = new mx.services.QName("attribute", xsdURI);
extensionQName = new mx.services.QName("extension", xsdURI);
var _local3 = "nil";
if (xsdURI == XSD_URI_1999) {
_local3 = "null";
}
nilQName = new mx.services.QName(_local3, xsiURI);
}
static function getSchemaVersion(xsdURI) {
if (xsdURI == XSD_URI_2001) {
if (version2001 == undefined) {
version2001 = new mx.services.SchemaVersion(XSD_URI_2001, XSI_URI_2001);
}
return(version2001);
}
if (xsdURI == XSD_URI_2000) {
if (version2000 == undefined) {
version2000 = new mx.services.SchemaVersion(XSD_URI_2000, XSI_URI_2000);
}
return(version2000);
}
if (xsdURI == XSD_URI_1999) {
if (version1999 == undefined) {
version1999 = new mx.services.SchemaVersion(XSD_URI_1999, XSI_URI_1999);
}
return(version1999);
}
}
static var XML_SCHEMA_URI = "http://www.w3.org/2001/XMLSchema";
static var SOAP_ENCODING_URI = "http://schemas.xmlsoap.org/soap/encoding/";
static var XSD_URI_1999 = "http://www.w3.org/1999/XMLSchema";
static var XSD_URI_2000 = "http://www.w3.org/2000/10/XMLSchema";
static var XSD_URI_2001 = "http://www.w3.org/2001/XMLSchema";
static var XSI_URI_1999 = "http://www.w3.org/1999/XMLSchema-instance";
static var XSI_URI_2000 = "http://www.w3.org/2000/10/XMLSchema-instance";
static var XSI_URI_2001 = "http://www.w3.org/2001/XMLSchema-instance";
static var APACHESOAP_URI = "http://xml.apache.org/xml-soap";
static var CF_RPC_URI = "http://rpc.xml.coldfusion";
}
Symbol 1271 MovieClip [__Packages.mx.services.SOAPFault] Frame 0
class mx.services.SOAPFault
{
var faultcode, faultstring, detail, element, faultNamespaceURI, faultactor;
function SOAPFault (fcode, fstring, detail, element, faultNS, faultactor) {
faultcode = fcode;
faultstring = fstring;
this.detail = detail;
this.element = element;
faultNamespaceURI = faultNS;
this.faultactor = faultactor;
}
}
Symbol 1272 MovieClip [__Packages.mx.services.SOAPConstants] Frame 0
class mx.services.SOAPConstants
{
static var soap11Constants, soap12Constants;
var contentType, ENVELOPE_URI, ENCODING_URI, envelopeQName, headerQName, bodyQName, faultQName, actorQName, soapencArrayQName, soapencArrayTypeQName, soapencRefQName;
function SOAPConstants () {
}
static function getConstants(versionNumber) {
if (versionNumber < 2) {
if (soap11Constants == undefined) {
soap11Constants = new mx.services.SOAPConstants();
soap11Constants.setSOAP11();
}
return(soap11Constants);
}
if (soap12Constants == undefined) {
soap12Constants = new mx.services.SOAPConstants();
soap12Constants.setSOAP12();
}
return(soap12Constants);
}
function setSOAP11() {
contentType = "text/xml; charset=utf-8";
ENVELOPE_URI = "http://schemas.xmlsoap.org/soap/envelope/";
ENCODING_URI = "http://schemas.xmlsoap.org/soap/encoding/";
setupConstants();
}
function setSOAP12() {
contentType = "application/soap+xml; charset=utf-8";
ENVELOPE_URI = "http://www.w3.org/2002/12/soap-envelope";
ENCODING_URI = "http://www.w3.org/2002/12/soap-encoding";
setupConstants();
}
function setupConstants() {
envelopeQName = new mx.services.QName("Envelope", ENVELOPE_URI);
headerQName = new mx.services.QName("Header", ENVELOPE_URI);
bodyQName = new mx.services.QName("Body", ENVELOPE_URI);
faultQName = new mx.services.QName("Fault", ENVELOPE_URI);
actorQName = new mx.services.QName("Actor", ENVELOPE_URI);
soapencArrayQName = new mx.services.QName("Array", ENCODING_URI);
soapencArrayTypeQName = new mx.services.QName("arrayType", ENCODING_URI);
soapencRefQName = new mx.services.QName("multiRef", ENCODING_URI);
}
static var DEFAULT_VERSION = 0;
static var XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r";
static var RPC_STYLE = "rpc";
static var DOC_STYLE = "document";
static var WRAPPED_STYLE = "wrapped";
static var USE_ENCODED = "encoded";
static var USE_LITERAL = "literal";
static var DEFAULT_OPERATION_STYLE = RPC_STYLE;
static var DEFAULT_USE = USE_ENCODED;
static var SOAP_ENV_PREFIX = "SOAP-ENV";
static var SOAP_ENC_PREFIX = "soapenc";
static var XML_SCHEMA_PREFIX = "xsd";
static var XML_SCHEMA_INSTANCE_PREFIX = "xsi";
static var XML_SCHEMA_URI = "http://www.w3.org/2001/XMLSchema";
static var XML_SCHEMA_INSTANCE_URI = "http://www.w3.org/2001/XMLSchema-instance";
static var SCHEMA_INSTANCE_TYPE = XML_SCHEMA_INSTANCE_PREFIX + ":type";
static var ARRAY_PQNAME = SOAP_ENC_PREFIX + ":Array";
static var ARRAY_TYPE_PQNAME = SOAP_ENC_PREFIX + ":arrayType";
static var MODE_IN = 0;
static var MODE_OUT = 1;
static var MODE_INOUT = 2;
static var DISCONNECTED_FAULT_CODE = "Client.Disconnected";
}
Symbol 1273 MovieClip [__Packages.mx.services.Schema] Frame 0
class mx.services.Schema
{
var targetNamespace, rootElement, context, schemaVersion, types, elements, elementFormDefault;
function Schema (targetNamespace, rootElement, schemaContext) {
this.targetNamespace = targetNamespace;
this.rootElement = rootElement;
context = schemaContext;
schemaVersion = schemaContext.schemaVersion;
types = new Object();
elements = new Object();
}
static function getSchemas(xmlDocument) {
var _local1 = new Array();
return(_local1);
}
function registerType(dtype) {
if (types[dtype.name] == undefined) {
types[dtype.name] = dtype;
}
}
function registerElement(elementObj) {
elements[elementObj.name] = elementObj;
}
function parseType(localPart) {
var _local2 = rootElement.getElementsByReferencedName(localPart, schemaVersion.complexTypeQName)[0];
if (_local2 != undefined) {
return(parseComplexType(_local2));
}
_local2 = rootElement.getElementsByReferencedName(localPart, schemaVersion.simpleTypeQName)[0];
if (_local2 != undefined) {
return(parseSimpleType(_local2));
}
}
function parseElement(name) {
var _local3 = rootElement.getElementsByReferencedName(name, schemaVersion.elementTypeQName)[0];
if (_local3 != undefined) {
var _local2 = parseElementDecl(_local3);
registerElement(_local2);
return(_local2);
}
}
function parseComplexType(typeNode, isAnonymous) {
var _local4 = new mx.services.DataType();
var _local8 = typeNode.attributes.name;
if (!isAnonymous) {
_local4.name = _local8;
_local4.namespaceURI = targetNamespace;
_local4.qname = new mx.services.QName(_local8, targetNamespace);
registerType(_local4);
} else {
_local4.isAnonymous = true;
}
var _local6 = typeNode.childNodes;
var _local7 = _local6.length;
var _local5 = 0;
while ((_local5 < _local7) && (context.fault == undefined)) {
var _local2 = _local6[_local5];
var _local3 = _local2.getQName();
if (_local3.equals(schemaVersion.allQName)) {
parseAll(_local2, _local4);
} else if (_local3.equals(schemaVersion.complexContentQName)) {
parseComplexContent(_local2, _local4);
} else if (_local3.equals(schemaVersion.simpleContentQName)) {
parseSimpleContent(_local2, _local4);
} else if (_local3.equals(schemaVersion.sequenceQName)) {
parseSequence(_local2, _local4);
} else if (_local3.equals(schemaVersion.attributeQName)) {
parseAttribute(_local2, _local4);
}
_local5++;
}
typeNode.parsed = 1;
return(_local4);
}
function parseSimpleType(typeNode, isAnonymous) {
var _local8 = new mx.services.DataType();
var _local11 = typeNode.attributes.name;
if (!isAnonymous) {
_local8.name = _local11;
_local8.namespaceURI = targetNamespace;
_local8.qname = new mx.services.QName(_local11, targetNamespace);
registerType(_local8);
} else {
_local8.isAnonymous = true;
}
var _local9 = typeNode.childNodes;
var _local10 = _local9.length;
var _local3 = 0;
while (_local3 < _local10) {
var _local2 = _local9[_local3];
var _local4 = _local2.getQName();
if (_local4.equals(schemaVersion.restrictionQName)) {
var _local5 = _local2.attributes.base;
var _local6 = _local2.getQNameFromString(_local5);
var _local7 = context.getTypeByQName(_local6);
_local8.typeType = _local7.typeType;
}
_local3++;
}
typeNode.parsed = 1;
return(_local8);
}
function parseAll(allNode, typeObj) {
return(parseSequence(allNode, typeObj));
}
function parseElementDecl(elementNode) {
var _local2 = new mx.services.ElementDecl();
var _local6;
if (elementNode.attributes.ref != undefined) {
var _local11 = elementNode.attributes.ref;
var _local9 = elementNode.getQNameFromString(_local11);
var _local5 = context.getElementByQName(_local9);
_local2.name = _local5.name;
_local2.schemaType = _local5.schemaType;
_local2.form = _local5.form;
_local2.namespace = _local5.namespace;
_local2.minOccurs = elementNode.attributes.minOccurs;
_local2.maxOccurs = elementNode.attributes.maxOccurs;
return(_local2);
}
var _local12 = elementNode.attributes.name;
_local2.name = _local12;
if (elementNode.attributes.type != undefined) {
var _local10 = elementNode.getQNameFromString(elementNode.attributes.type, true);
_local6 = context.getTypeByQName(_local10);
} else {
var _local8 = elementNode.getElementsByQName(schemaVersion.complexTypeQName)[0];
if (_local8 != null) {
_local6 = parseComplexType(_local8, true);
} else {
var _local7 = elementNode.getElementsByQName(schemaVersion.simpleTypeQName)[0];
if (_local7 != null) {
_local6 = parseSimpleType(_local7, true);
}
}
}
_local2.schemaType = _local6;
_local2.minOccurs = elementNode.attributes.minOccurs;
_local2.maxOccurs = elementNode.attributes.maxOccurs;
var _local4 = elementNode.attributes.form;
if (_local4 == undefined) {
_local4 = elementFormDefault;
}
_local2.form = _local4;
if (_local4 == "qualified") {
_local2.namespace = targetNamespace;
} else {
_local2.namespace = "";
}
return(_local2);
}
function parseAttribute(attrNode, typeObj) {
var _local3 = attrNode.attributes.name;
var _local6 = new Object();
_local6.name = _local3;
var _local4 = attrNode.attributes.type;
if (_local4 != undefined) {
var _local7 = attrNode.getQNameFromString(_local4, true);
var _local5 = context.getTypeByQName(_local7);
if (_local5 != undefined) {
if (typeObj.partTypes == undefined) {
typeObj.partTypes = new Object();
}
var _local2 = new Object();
_local2.isAttribute = true;
_local2.schemaType = _local5;
typeObj.partTypes[_local3] = _local2;
}
}
}
function parseSequence(sequenceNode, dtype) {
var _local9 = sequenceNode.childNodes;
var _local8 = _local9.length;
var _local5 = _local8 - 1;
while (_local5 > -1) {
var _local7 = _local9[_local5];
var _local2 = parseElementDecl(_local7);
var _local4 = _local2;
if ((_local8 == 1) && (_local2.maxOccurs == "unbounded")) {
dtype.name = "array";
dtype.typeType = mx.services.DataType.ARRAY_TYPE;
dtype.arrayType = _local4.schemaType;
dtype.itemElement = new mx.services.QName(_local2.name, _local2.namespace);
} else {
if (_local2.maxOccurs == "unbounded") {
var _local6 = new mx.services.DataType("array", mx.services.DataType.ARRAY_TYPE);
_local6.arrayType = _local4.schemaType;
_local4 = _local6;
_local4.itemElement = new mx.services.QName(_local2.name, _local2.namespace);
}
if (dtype.partTypes == undefined) {
dtype.partTypes = new Object();
}
dtype.partTypes[_local2.name] = _local4;
}
_local5--;
}
return(dtype);
}
function parseSimpleContent(contentNode, typeObj) {
var _local5 = contentNode.firstChild;
if (!_local5.getQName().equals(schemaVersion.extensionQName)) {
return(undefined);
}
var _local6 = _local5.attributes.base;
var _local7 = _local5.getQNameFromString(_local6, true);
var _local8 = context.getTypeByQName(_local7);
if (typeObj.partTypes == undefined) {
typeObj.partTypes = new Object();
}
typeObj.simpleValue = _local8;
var _local3 = _local5.childNodes;
var _local2 = 0;
while (_local2 < _local3.length) {
parseAttribute(_local3[_local2], typeObj);
_local2++;
}
}
function parseComplexContent(contentNode, typeObj) {
var _local6 = contentNode.childNodes;
var _local7 = _local6.length;
var _local3 = 0;
while ((_local3 < _local7) && (context.fault == undefined)) {
var _local2 = _local6[_local3];
var _local4 = _local2.getQName();
if (_local4.equals(schemaVersion.restrictionQName)) {
return(parseRestriction(_local2, typeObj));
}
if (_local4.equals(schemaVersion.extensionQName)) {
return(parseExtension(_local2, typeObj));
}
_local3++;
}
}
function parseExtension(extensionNode, typeObj) {
var _local11 = extensionNode.attributes.base;
var _local12 = extensionNode.getQNameFromString(_local11);
var _local5 = context.getTypeByQName(_local12);
typeObj.typeType = _local5.typeType;
typeObj.partTypes = new Object();
for (var _local9 in _local5.partTypes) {
typeObj.partTypes[_local9] = _local5.partTypes[_local9];
}
var _local7 = extensionNode.childNodes;
var _local8 = _local7.length;
var _local2 = 0;
while ((_local2 < _local8) && (context.fault == undefined)) {
var _local3 = _local7[_local2];
var _local4 = _local3.getQName();
if (_local4.equals(schemaVersion.sequenceQName)) {
return(parseSequence(_local3, typeObj));
}
_local2++;
}
}
function parseRestriction(restrictionNode, derivedType) {
var _local13 = restrictionNode.attributes.base;
var _local14 = restrictionNode.getQNameFromString(_local13);
var _local12 = context.getTypeByQName(_local14);
derivedType.name = "derived" + _local12.name;
derivedType.typeType = _local12.typeType;
derivedType.namespaceURI = _local12.namespaceURI;
if (_local12.typeType == mx.services.DataType.ARRAY_TYPE) {
derivedType.isEncodedArray = _local12.isEncodedArray;
derivedType.itemElement = _local12.itemElement;
}
var _local10 = restrictionNode.getElementsByQName(schemaVersion.attributeQName);
var _local9 = 0;
while (_local9 < _local10.length) {
var _local5 = _local10[_local9];
var _local7 = _local5.attributes.ref;
if (_local7.indexOf(":") != -1) {
_local7 = _local7.substring(_local7.indexOf(":") + 1);
}
for (var _local11 in _local5.attributes) {
var _local2 = _local11;
if (_local2.indexOf(":") != -1) {
_local2 = _local2.substring(_local2.indexOf(":") + 1);
}
if (_local2 == _local7) {
var _local6 = _local5.attributes[_local11];
var _local8 = _local5.getQNameFromString(_local6, true);
var _local3 = context.getTypeByQName(_local8);
if (_local3 != undefined) {
derivedType[_local2] = _local3[_local2];
derivedType.name = _local3.name;
derivedType.qname = _local3.qname;
derivedType.namespaceURI = _local3.namespaceURI;
} else {
derivedType[_local2] = _local6;
}
}
}
_local9++;
}
return(derivedType);
}
}
Symbol 1274 MovieClip [__Packages.mx.services.ElementDecl] Frame 0
class mx.services.ElementDecl
{
function ElementDecl () {
}
}
Symbol 1275 MovieClip [__Packages.mx.services.WSDLDocument] Frame 0
class mx.services.WSDLDocument
{
var xmlDoc, targetNamespace, bindingElements, portTypeElements, messageElements, serviceElements;
function WSDLDocument (document, wsdl) {
xmlDoc = document;
var _local8 = document.firstChild;
var _local6 = wsdl.constants;
var _local9 = _local8.getQName();
if (!_local9.equals(_local6.definitionsQName)) {
wsdl.fault = new mx.services.SOAPFault("Server", "Faulty WSDL format", "Definitions must be the first element in a WSDL document");
return;
}
targetNamespace = _local8.attributes.targetNamespace;
bindingElements = new Object();
portTypeElements = new Object();
messageElements = new Object();
serviceElements = new Object();
var _local3 = _local8.childNodes;
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = _local3[_local2].getQName();
var _local5 = _local3[_local2].attributes.name;
if (_local4.equals(_local6.bindingQName)) {
bindingElements[_local5] = _local3[_local2];
} else if (_local4.equals(_local6.portTypeQName)) {
portTypeElements[_local5] = _local3[_local2];
} else if (_local4.equals(_local6.messageQName)) {
messageElements[_local5] = _local3[_local2];
} else if (_local4.equals(_local6.serviceQName)) {
serviceElements[_local5] = _local3[_local2];
} else if (_local4.equals(_local6.typesQName)) {
wsdl.parseSchemas(_local3[_local2]);
}
_local2++;
}
}
function getBindingElement(name) {
return(bindingElements[name]);
}
function getMessageElement(name) {
return(messageElements[name]);
}
function getPortTypeElement(name) {
return(portTypeElements[name]);
}
function getServiceElement(name) {
return(serviceElements[name]);
}
}
Symbol 1276 MovieClip [__Packages.mx.services.WSDLOperation] Frame 0
class mx.services.WSDLOperation
{
var name, wsdl, document, input, inputMessage, output, outputMessage;
function WSDLOperation (name, wsdl, document) {
this.name = name;
this.wsdl = wsdl;
this.document = document;
}
function parseMessages() {
var _local2 = wsdl;
input = _local2.parseMessage(inputMessage, name, mx.services.SOAPConstants.MODE_IN, document);
output = _local2.parseMessage(outputMessage, name, mx.services.SOAPConstants.MODE_OUT, document);
}
}
Symbol 1277 MovieClip [__Packages.mx.services.SOAPParameter] Frame 0
class mx.services.SOAPParameter
{
var name, schemaType, mode, qname;
function SOAPParameter (name, schemaType, mode, qname) {
this.name = name;
this.schemaType = schemaType;
this.mode = ((mode == undefined) ? (mx.services.SOAPConstants.MODE_IN) : (mode));
this.qname = qname;
}
}
Symbol 1278 MovieClip [__Packages.mx.services.PendingCall] Frame 0
class mx.services.PendingCall
{
var myCall, soapConstants, log, timeoutFunc, timerID, request, requestHeaders, _multiRefs, fault, response, __handleFault, onFault, responseHeaders, onHeaders, onResult, __handleResult, bodyNode, onHeader;
function PendingCall (myCall) {
this.myCall = myCall;
soapConstants = myCall.soapConstants;
log = myCall.log;
doLazyDecoding = myCall.doLazyDecoding;
doDecoding = myCall.doDecoding;
}
function setTimeout(timeoutMS) {
timeoutFunc = function () {
clearInterval(this.timerID);
this.timerID = undefined;
var _local2 = new mx.services.SOAPFault("Timeout", ("Timeout while calling method " + this.myCall.operationName) + "!");
this.onFault(_local2);
};
timerID = setInterval(this, "timeoutFunc", timeoutMS);
}
function cancel() {
if (timerID != undefined) {
clearInterval(timerID);
}
cancelled = true;
}
function encode() {
log.logInfo("Encoding SOAPCall request", mx.services.Log.VERBOSE);
encodeHTTPRequest();
encodeSOAPEnvelope();
}
function encodeHTTPRequest() {
log.logDebug("Creating HTTP request object");
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.contentType = soapConstants.contentType;
_local2.xmlDecl = mx.services.SOAPConstants.XML_DECLARATION;
_local2.addRequestHeader("SOAPAction", ("\"" + myCall.actionURI) + "\"");
request = _local2;
}
function encodeSOAPEnvelope() {
log.logDebug("Encoding SOAP request envelope");
var _local3 = request;
var _local4 = myCall.schemaVersion;
var _local5 = soapConstants.envelopeQName;
var _local2 = _local3.createElement((mx.services.SOAPConstants.SOAP_ENV_PREFIX + ":") + _local5.localPart);
_local2.attributes["xmlns:" + mx.services.SOAPConstants.SOAP_ENV_PREFIX] = soapConstants.ENVELOPE_URI;
_local2.attributes["xmlns:" + mx.services.SOAPConstants.XML_SCHEMA_PREFIX] = _local4.xsdURI;
_local2.attributes["xmlns:" + mx.services.SOAPConstants.XML_SCHEMA_INSTANCE_PREFIX] = _local4.xsiURI;
_local3.appendChild(_local2);
_local3.soapEnvelope = _local2;
encodeSOAPHeader();
encodeSOAPBody();
}
function encodeSOAPHeader() {
var _local7 = request;
var _local6 = request.soapEnvelope;
var _local3 = requestHeaders;
if (_local3.length > 0) {
var _local4 = _local7.createElement((mx.services.SOAPConstants.SOAP_ENV_PREFIX + ":") + soapConstants.headerQName.localPart);
_local6.appendChild(_local4);
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
_local4.appendChild(_local3[_local2].element);
_local2++;
}
}
}
function encodeSOAPBody() {
log.logDebug("Encoding SOAP request body");
var _local2 = request;
var _local3 = myCall;
var _local5 = _local3.operationName;
var _local7 = _local3.targetNamespace;
var _local6 = _local3.soapConstants;
var _local9 = _local2.soapEnvelope;
_local2.soapEnvelope = null;
var _local8 = _local6.bodyQName;
var _local4 = _local2.createElement((mx.services.SOAPConstants.SOAP_ENV_PREFIX + ":") + _local8.localPart);
_local9.appendChild(_local4);
if (!_local3.useLiteralBody) {
if (_local3.operationStyle != mx.services.SOAPConstants.DOC_STYLE) {
if ((_local3.operationStyle == mx.services.SOAPConstants.WRAPPED_STYLE) && (_local3.elementFormQualified)) {
_local2.soapOperation = _local2.createElement(_local5);
_local2.soapOperation.attributes.xmlns = _local7;
} else {
var _local10 = getStringFromQName(_local4, new mx.services.QName(_local5, _local7));
_local2.soapOperation = _local2.createElement(_local10);
if (_local3.useStyle == mx.services.SOAPConstants.USE_ENCODED) {
_local2.soapOperation.attributes[mx.services.SOAPConstants.SOAP_ENV_PREFIX + ":encodingStyle"] = _local6.ENCODING_URI;
}
}
_local4.appendChild(_local2.soapOperation);
} else {
_local2.soapOperation = _local4;
}
}
}
function addHeader(headerElement) {
log.logDebug("Adding header: " + headerElement.nodeName);
if (requestHeaders == undefined) {
requestHeaders = new Array();
}
requestHeaders.push(new mx.services.SOAPHeader(headerElement));
}
function getOrCreatePrefix(node, namespaceURI, preferredPrefix) {
if ((namespaceURI == undefined) || (namespaceURI == "")) {
var _local5 = node.getNamespaceForPrefix("");
if ((_local5 != undefined) && (_local5 != "")) {
node.attributes.xmlns = "";
node.registerNamespace("", "");
}
return("");
}
var _local2 = node.getPrefixForNamespace(namespaceURI);
var _local6 = false;
if (_local2 == undefined) {
if (preferredPrefix == undefined) {
request.nscount++;
_local2 = "ns" + request.nscount;
} else {
_local2 = preferredPrefix;
}
_local6 = true;
}
if (_local6) {
if (_local2 != "") {
node.attributes["xmlns:" + _local2] = namespaceURI;
} else {
node.attributes.xmlns = namespaceURI;
}
node.registerPrefix(_local2, namespaceURI);
}
return(_local2);
}
function getStringFromQName(node, qname) {
var _local2 = getOrCreatePrefix(node, qname.namespaceURI);
if (_local2 != "") {
return((_local2 + ":") + qname.localPart);
}
return(qname.localPart);
}
function encodeParam(paramName, paramType, parentNode, qname) {
var _local2;
var _local4 = request;
var _local12 = mx.services.SOAPConstants.SCHEMA_INSTANCE_TYPE;
if (paramType.typeType == mx.services.DataType.ARRAY_TYPE) {
if (myCall.useStyle == mx.services.SOAPConstants.USE_ENCODED) {
_local2 = _local4.createElement((mx.services.SOAPConstants.SOAP_ENC_PREFIX + ":") + paramName);
_local2.attributes["xmlns:" + mx.services.SOAPConstants.SOAP_ENC_PREFIX] = soapConstants.ENCODING_URI;
parentNode.appendChild(_local2);
_local2.nodeName = paramName;
var _local6 = paramType.arrayType;
var _local8 = mx.services.SOAPConstants.ARRAY_TYPE_PQNAME;
var _local11 = getOrCreatePrefix(_local2, _local6.namespaceURI);
_local2.attributes[_local8] = (_local11 + ":") + _local6.name;
} else {
_local2 = _local4.createElement(paramName);
parentNode.appendChild(_local2);
if (qname != undefined) {
_local2.nodeName = getStringFromQName(_local2, qname);
}
}
} else if (myCall.useStyle == mx.services.SOAPConstants.USE_ENCODED) {
var _local9 = getStringFromQName(parentNode, new mx.services.QName(paramName, paramType.namespaceURI));
_local2 = _local4.createElement(_local9);
parentNode.appendChild(_local2);
_local2.nodeName = paramName;
} else {
_local2 = _local4.createElement(paramName);
parentNode.appendChild(_local2);
if (qname != undefined) {
_local2.nodeName = getStringFromQName(_local2, qname);
}
}
return(_local2);
}
function encodeParamValue(valueObj, valueType, elementNode, document) {
var _local28 = mx.services.SOAPConstants.SCHEMA_INSTANCE_TYPE;
if (valueType.typeType == mx.services.DataType.ARRAY_TYPE) {
var _local20 = valueType.arrayType;
var _local19 = valueObj.length;
if ((myCall.useStyle == mx.services.SOAPConstants.USE_ENCODED) && (valueType.isEncodedArray == true)) {
var _local11 = valueType;
var _local4 = "";
var _local21 = true;
while (_local11.typeType == mx.services.DataType.ARRAY_TYPE) {
var _local3 = _local11.dimensions;
if (_local3.length > 1) {
var _local9 = 0;
while (_local9 < _local3.length) {
if (_local9 > 0) {
_local4 = _local4 + ",";
}
_local4 = _local4 + _local3[_local9];
_local9++;
}
} else if (_local21) {
_local4 = _local4 + (("[" + _local19) + "]");
_local21 = false;
} else {
_local4 = _local4 + "[]";
}
_local11 = _local11.arrayType;
}
elementNode.attributes[mx.services.SOAPConstants.ARRAY_TYPE_PQNAME] = getStringFromQName(elementNode, valueType.qname) + _local4;
elementNode.attributes[_local28] = mx.services.SOAPConstants.ARRAY_PQNAME;
}
var _local9 = 0;
while (_local9 < _local19) {
var _local18 = getStringFromQName(elementNode, valueType.itemElement);
var _local13 = document.createElement(_local18);
var _local22 = elementNode.getPrefixForNamespace(_local20.namespaceURI);
elementNode.appendChild(_local13);
encodeParamValue(valueObj[_local9], _local20, _local13, document);
_local9++;
}
return(undefined);
}
if (myCall.useStyle == mx.services.SOAPConstants.USE_ENCODED) {
var _local26;
var _local29 = true;
if (valueType == undefined) {
valueType = valueObj.__dataType;
}
if ((valueType == undefined) || (valueType.typeType == mx.services.DataType.ANY_TYPE)) {
var _local27 = typeof(valueObj);
var _local25;
if (_local27 == "number") {
_local25 = "double";
} else if (_local27 == "object") {
if (valueObj instanceof Date) {
_local25 = "dateTime";
valueType = myCall.schemaVersion.dateTimeType;
} else {
valueType = mx.services.DataType.objectType;
_local29 = false;
}
} else {
_local25 = "string";
}
var _local30 = getOrCreatePrefix(elementNode, myCall.schemaVersion.xsdURI);
_local26 = (_local30 + ":") + _local25;
} else if (!valueType.isAnonymous) {
var _local30 = getOrCreatePrefix(elementNode, valueType.namespaceURI);
_local26 = (_local30 + ":") + valueType.name;
}
if (_local29 && (_local26 != undefined)) {
elementNode.attributes[_local28] = _local26;
}
}
if (valueType.typeType == mx.services.DataType.MAP_TYPE) {
encodeMap(valueObj, elementNode, document);
} else {
if (valueType.partTypes != undefined) {
for (var _local24 in valueType.partTypes) {
var _local6 = valueType.partTypes[_local24];
var _local8 = valueObj[_local24];
var _local17 = new mx.services.QName(_local24, _local6.namespace);
if (_local6.isAttribute) {
elementNode.attributes[_local24] = _local8;
} else {
var _local16 = encodeParam(_local24, _local6.schemaType, elementNode, _local17);
if (_local8 != undefined) {
encodeParamValue(_local8, _local6.schemaType, _local16, document);
}
}
}
if (valueType.simpleValue != undefined) {
var _local33 = document.createTextNode(valueObj._value);
elementNode.appendChild(_local33);
}
return(undefined);
}
if (valueType.typeType == mx.services.DataType.DATE_TYPE) {
var _local34 = encodeDate(valueObj, valueType);
var _local31 = document.createTextNode(_local34);
elementNode.appendChild(_local31);
return(undefined);
}
if (valueType.typeType == mx.services.DataType.OBJECT_TYPE) {
for (var _local23 in valueObj) {
var _local14 = valueObj[_local23];
var _local12 = _local14.__dataType;
var _local15 = encodeParam(_local23, _local12, elementNode);
encodeParamValue(_local14, _local12, _local15, document);
}
return(undefined);
}
var _local32 = document.createTextNode(valueObj.toString());
elementNode.appendChild(_local32);
}
}
function setupBodyXML(bodyXML) {
request.appendChild(bodyXML);
}
function setupParams(inputParams) {
var _local9 = myCall.parameters;
var _local10 = _local9.length;
var _local3 = 0;
while (_local3 < _local10) {
var _local2 = _local9[_local3];
var _local4 = _local2.schemaType;
var _local6;
if (_local2.mode != mx.services.SOAPConstants.MODE_OUT) {
var _local8 = encodeParam(_local2.name, _local4, request.soapOperation, _local2.qname);
if (inputParams instanceof Array) {
_local6 = inputParams[_local3];
} else {
_local6 = inputParams[_local2.name];
}
var _local5 = _local4.schemaType;
if (_local5 == undefined) {
_local5 = _local4;
}
encodeParamValue(_local6, _local5, _local8, request);
}
_local3++;
}
request.soapOperation = null;
_multiRefs = null;
}
function encodeMap(obj, mapNode, document) {
for (var _local8 in obj) {
var _local2 = document.createElement("item");
var _local4 = document.createElement("key");
_local2.appendChild(_local4);
encodeParamValue(_local8, undefined, _local4, document);
var _local5 = document.createElement("value");
_local2.appendChild(_local5);
encodeParamValue(obj[_local8], undefined, _local5, document);
mapNode.appendChild(_local2);
}
}
function encodeDate(rawDate, dateType) {
var _local1 = new String();
if ((dateType.name == "dateTime") || (dateType.name == "date")) {
_local1 = _local1.concat(rawDate.getUTCFullYear(), "-");
var _local2 = rawDate.getUTCMonth() + 1;
if (_local2 < 10) {
_local1 = _local1.concat("0");
}
_local1 = _local1.concat(_local2, "-");
_local2 = rawDate.getUTCDate();
if (_local2 < 10) {
_local1 = _local1.concat("0");
}
_local1 = _local1.concat(_local2);
}
if (dateType.name == "dateTime") {
_local1 = _local1.concat("T");
}
if ((dateType.name == "dateTime") || (dateType.name == "time")) {
var _local2 = rawDate.getUTCHours();
if (_local2 < 10) {
_local1 = _local1.concat("0");
}
_local1 = _local1.concat(_local2, ":");
_local2 = rawDate.getUTCMinutes();
if (_local2 < 10) {
_local1 = _local1.concat("0");
}
_local1 = _local1.concat(_local2, ":");
_local2 = rawDate.getUTCSeconds();
if (_local2 < 10) {
_local1 = _local1.concat("0");
}
_local1 = _local1.concat(_local2, ".");
_local2 = rawDate.getUTCMilliseconds();
if (_local2 < 10) {
_local1 = _local1.concat("00");
} else if (_local2 < 100) {
_local1 = _local1.concat("0");
}
_local1 = _local1.concat(_local2);
}
_local1 = _local1.concat("Z");
return(_local1);
}
function decode(assert, response, callbackMethod) {
log.logInfo("Decoding SOAPCall response", mx.services.Log.VERBOSE);
var _local4;
if (!assert) {
var _local3 = new mx.services.SOAPFault();
_local3.faultcode = "Server.Connection";
_local3.faultstring = "Unable to connect to endpoint: " + myCall.endpointURI;
_local3.faultactor = myCall.targetNamespace;
fault = _local3;
log.logDebug("No response received from remote service");
} else {
_local4 = decodeSOAPEnvelope(response);
if (log.level > mx.services.Log.BRIEF) {
this.response._decodeTimeMark = new Date();
this.response._decodeTime = Math.round(this.response._decodeTimeMark - this.response._parseTimeMark);
log.logInfo(("Decoded SOAP response into result [" + this.response._decodeTime) + " millis]");
}
}
if (fault != undefined) {
__handleFault(fault);
onFault(fault, response);
myCall.onFault(fault, response);
} else {
if (responseHeaders != undefined) {
onHeaders(responseHeaders, response);
}
onResult(_local4, response);
myCall.onResult(_local4, response);
__handleResult(_local4);
}
this[callbackMethod](_local4, response);
}
function decodeSOAPEnvelope(response) {
log.logDebug("Decoding SOAP response envelope");
var _local4;
var _local11 = soapConstants;
var _local7 = response.firstChild;
if (_local7.getNamespaceURI() != soapConstants.ENVELOPE_URI) {
var _local12 = new mx.services.SOAPFault();
_local12.faultcode = "VersionMismatch";
_local12.faultstring = (("Request implements version: " + soapConstants.ENVELOPE_URI) + " Response implements version ") + _local7.getNamespaceURI();
fault = _local12;
} else {
var _local13 = _local7.getPrefixForNamespace(_local11.ENVELOPE_URI);
var _local10 = _local7.getPrefixForNamespace(myCall.schemaVersion.xsiURI);
var _local14 = _local7.getPrefixForNamespace(myCall.schemaVersion.xsdURI);
var _local6 = new mx.services.PrefixedQName(_local13, _local11.headerQName);
var _local8 = new mx.services.PrefixedQName(_local13, _local11.bodyQName);
var _local15 = new mx.services.PrefixedQName(_local13, _local11.faultQName);
var _local5 = _local7.childNodes;
var _local9 = _local5.length;
var _local3 = 0;
while (_local3 < _local9) {
var _local2 = _local5[_local3];
if (_local2.nodeName == _local6.qualifiedName) {
responseHeaders = decodeSOAPHeaders(_local2);
} else if ((fault == undefined) && (_local2.nodeName == _local8.qualifiedName)) {
bodyNode = _local2;
if (doDecoding) {
_local4 = decodeSOAPBody(_local2, _local10);
} else {
_local4 = _local2.childNodes;
}
}
_local3++;
}
}
return(_local4);
}
function decodeSOAPHeaders(headerNode) {
log.logDebug("Decoding SOAP response headers");
var _local6 = new Array();
var _local7 = headerNode.childNodes;
var _local8 = _local7.length;
var _local4 = 0;
while (_local4 < _local8) {
var _local2 = _local7[_local4];
var _local5 = _local2.attributes.mustUnderstand;
if (_local5 == "1") {
if (typeof(onHeader) != "function") {
var _local3 = new mx.services.SOAPFault();
_local3.faultcode = "MustUnderstand";
_local3.faultstring = "No callback for header " + _local2.nodeName;
fault = _local3;
break;
}
}
_local6.push(_local2);
_local4++;
}
return(_local6);
}
function decodeSOAPBody(bodyNode, xsiPrefix) {
log.logDebug("Decoding SOAP response body");
var _local6;
var _local8 = bodyNode.childNodes[0];
if (_local8.getLocalName() == soapConstants.faultQName.localPart) {
fault = decodeSOAPFault(_local8);
} else if (myCall.useStyle == mx.services.SOAPConstants.USE_ENCODED) {
var _local9 = _local8.childNodes;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local3 = _local9[_local2];
var _local7 = getOutputParameter(_local2);
var _local4 = decodeResultNode(_local3, _local7.schemaType);
_local7.value = _local4;
if (_local2 == 0) {
_local6 = _local4;
}
_local2++;
}
} else {
var _local7 = getOutputParameterByQName(_local8.getQName());
if (myCall.operationStyle == mx.services.SOAPConstants.WRAPPED_STYLE) {
for (var _local11 in _local7.schemaType.partTypes) {
var _local5 = _local7.schemaType.partTypes[_local11];
var _local4 = decodeResultNode(_local8.childNodes[0], _local5.schemaType);
_local6 = _local4;
}
} else {
_local6 = decodeResultNode(_local8, _local7.schemaType);
_local7.value = _local6;
}
}
return(_local6);
}
function decodeResultNode(resultNode, schemaType, preExistingResult) {
var _local5;
var _local17 = resultNode.attributes.href;
if (_local17 != undefined) {
resultNode = decodeRef(bodyNode, _local17);
if (resultNode == undefined) {
}
}
var _local13 = myCall.schemaVersion;
for (var _local15 in resultNode.attributes) {
var _local10 = resultNode.getQNameFromString(_local15);
if (_local13.nilQName.equals(_local10)) {
var _local7 = resultNode.attributes[_local15];
if ((_local7 == "true") || (_local7 == "1")) {
return(null);
}
}
}
if ((schemaType == undefined) || (schemaType.typeType == mx.services.DataType.ANY_TYPE)) {
schemaType = getTypeFromNode(resultNode);
}
if (schemaType.typeType == mx.services.DataType.ARRAY_TYPE) {
_local5 = decodeArrayNode(resultNode, schemaType.arrayType);
} else if (schemaType.typeType == mx.services.DataType.COLL_TYPE) {
_local5 = decodeCollectionNode(resultNode, schemaType.arrayType, preExistingResult);
} else if (schemaType.typeType == mx.services.DataType.XML_TYPE) {
_local5 = resultNode;
} else if (schemaType.typeType == mx.services.DataType.MAP_TYPE) {
_local5 = decodeMap(resultNode);
} else if (schemaType.typeType == mx.services.DataType.ROWSET_TYPE) {
_local5 = decodeRowSet(resultNode);
} else if (schemaType.typeType == mx.services.DataType.QBEAN_TYPE) {
_local5 = decodeQueryBean(resultNode);
} else if (schemaType.partTypes != undefined) {
_local5 = new Object();
var _local2;
for (_local2 in schemaType.partTypes) {
if (schemaType.partTypes[_local2].isAttribute) {
_local5[_local2] = resultNode.attributes[_local2];
}
}
if (schemaType.simpleValue == undefined) {
var _local12 = resultNode.childNodes;
_local2 = 0;
while (_local2 < _local12.length) {
var _local8 = _local12[_local2];
var _local6 = _local8.getLocalName();
var _local9 = schemaType.partTypes[_local6];
if (_local9 == undefined) {
}
var _local11 = _local5[_local6];
_local5[_local6] = decodeResultNode(_local8, _local9.schemaType, _local11);
_local2++;
}
} else {
_local5._value = decodeResultNode(resultNode, schemaType.simpleValue);
}
} else if (resultNode.childNodes.length == 0) {
if (schemaType.typeType == mx.services.DataType.STRING_TYPE) {
_local5 = "";
} else {
_local5 = null;
}
} else if ((resultNode.childNodes.length == 1) && (resultNode.childNodes[0].nodeType == 3)) {
var _local14 = resultNode.childNodes[0];
var _local18 = schemaType.typeType;
if (schemaType.typeType == mx.services.DataType.BOOLEAN_TYPE) {
var _local16 = _local14.nodeValue;
if ((_local16.toLowerCase() == "true") || (_local16 == "1")) {
_local5 = true;
} else {
_local5 = false;
}
} else if (schemaType.typeType == mx.services.DataType.DATE_TYPE) {
_local5 = decodeDate(_local14.nodeValue);
} else if (schemaType.typeType == mx.services.DataType.NUMBER_TYPE) {
_local5 = Number(_local14.nodeValue);
} else {
_local5 = _local14.nodeValue;
}
} else {
_local5 = resultNode;
}
return(_local5);
}
function decodeRef(rootNode, id) {
id = id.substring(1);
if (_multiRefs == null) {
_multiRefs = new Object();
var _local5 = rootNode.childNodes;
var _local6 = _local5.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = _local5[_local2];
var _local4 = _local3.attributes.id;
if (_local4 != undefined) {
_multiRefs[_local4] = _local3;
}
_local2++;
}
}
return(_multiRefs[id]);
}
function decodeArrayNode(node, arrayType) {
return(((myCall.useStyle == mx.services.SOAPConstants.USE_LITERAL) ? (decodeLiteralArrayNode(node, arrayType)) : (decodeSOAPArrayNode(node, arrayType))));
}
function decodeLiteralArrayNode(node, arrayType) {
if (doLazyDecoding) {
return(new mx.services.ArrayProxy(node.childNodes, this, arrayType));
}
var _local4 = new Array();
var _local3 = node.childNodes;
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
_local4.push(decodeResultNode(_local3[_local2], arrayType));
_local2++;
}
return(_local4);
}
function decodeCollectionNode(node, arrayType, arrayObj) {
if (arrayObj == undefined) {
arrayObj = new Array();
}
arrayObj.push(decodeResultNode(node, arrayType));
return(arrayObj);
}
function decodeSOAPArrayNode(node, arrayType) {
var _local9 = new Array();
var _local4 = node.getAttributeByQName(soapConstants.soapencArrayTypeQName);
if (_local4 == undefined) {
var _local7 = decodeLiteralArrayNode(node, arrayType);
return(_local7);
}
var _local2 = myCall.schemaContext.getTypeByQName(node.getQNameFromString(_local4));
if (_local2 != undefined) {
arrayType = _local2;
}
var _local6 = new Array(1);
_local6[0] = 0;
var _local8 = decodeArrayContents(node.childNodes, _local6, arrayType.dimensions, 0, arrayType);
return(_local8);
}
function decodeArrayContents(arrayMemberNodes, linearIdxHolder, dimensions, dimensionIdx, arrayType) {
var _local4 = dimensions[dimensionIdx];
var _local3 = new Array();
if (dimensionIdx == (dimensions.length - 1)) {
var _local2 = 0;
while (_local2 < _local4) {
_local3[_local2] = decodeResultNode(arrayMemberNodes[linearIdxHolder[0]++], arrayType.arrayType);
_local2++;
}
} else {
var _local2 = 0;
while (_local2 < _local4) {
_local3[_local2] = decodeArrayContents(arrayMemberNodes, linearIdxHolder, dimensions, dimensionIdx + 1, arrayType.arrayType);
_local2++;
}
}
return(_local3);
}
function decodeRowSet(rowSetNode) {
var _local10 = new Array();
var _local7 = new Array();
var _local6 = new Array();
var _local9 = rowSetNode.childNodes[0].childNodes;
var _local12 = _local9.length;
var _local2 = 0;
while (_local2 < _local12) {
var _local3 = _local9[_local2];
var _local5 = _local3.attributes.type;
if (_local5 == undefined) {
return(undefined);
}
var _local4 = _local3.getQNameFromString(_local5);
if (_local4 == undefined) {
return(undefined);
}
_local7[_local2] = myCall.schemaContext.getTypeByQName(_local4);
_local6[_local2] = _local3.childNodes[0].nodeValue;
_local2++;
}
var _local8 = rowSetNode.childNodes[1].childNodes;
var _local11 = _local8.length;
if (doLazyDecoding) {
return(new mx.services.RowSetProxy(this, _local8, _local7, _local6));
}
_local2 = 0;
while (_local2 < _local11) {
_local10[_local2] = decodeRowSetItem(_local8[_local2], _local7, _local6);
_local2++;
}
return(_local10);
}
function decodeQueryBean(beanNode) {
var _local10 = new Array();
var _local4 = new Array();
var _local9 = beanNode.getElementsByLocalName("columnList")[0];
if (_local9 == undefined) {
return(undefined);
}
var _local11 = _local9.childNodes.length;
var _local3 = 0;
while (_local3 < _local11) {
var _local7 = _local9.childNodes[_local3];
_local4[_local3] = _local7.childNodes[0].nodeValue;
_local3++;
}
var _local12 = beanNode.getElementsByLocalName("data")[0];
if (_local12 == undefined) {
return(undefined);
}
var _local8 = decodeSOAPArrayNode(_local12);
_local3 = 0;
while (_local3 < _local8.length) {
var _local6 = _local8[_local3];
var _local5 = new Object();
var _local2 = 0;
while (_local2 < _local4.length) {
_local5[_local4[_local2]] = _local6[_local2];
_local2++;
}
_local10[_local3] = _local5;
_local3++;
}
return(_local10);
}
function decodeRowSetItem(itemNode, types, fields) {
var _local6 = itemNode.childNodes;
var _local4 = new Object();
var _local5 = types.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local6[_local2];
_local4[fields[_local2]] = decodeResultNode(_local3, types[_local2]);
_local2++;
}
return(_local4);
}
function decodeMap(node) {
var _local9 = new Object();
var _local8 = node.childNodes;
var _local5 = 0;
while (_local5 < _local8.length) {
var _local4 = _local8[_local5].childNodes;
var _local6;
var _local7;
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3];
if (_local2.nodeName == "key") {
_local6 = decodeResultNode(_local2);
} else if (_local2.nodeName == "value") {
_local7 = decodeResultNode(_local2);
}
_local3++;
}
_local9[_local6] = _local7;
_local5++;
}
return(_local9);
}
function getTypeFromNode(node) {
var _local3 = node.attributes["xsi:type"];
if (_local3 == undefined) {
return(undefined);
}
var _local2 = node.getQNameFromString(_local3);
if (_local2 == undefined) {
return(undefined);
}
return(myCall.schemaContext.getTypeByQName(_local2));
}
function decodeDate(rawValue) {
var _local4;
var _local2;
var _local1;
var _local8 = rawValue.indexOf("T");
var _local14 = rawValue.indexOf(":");
var _local15 = rawValue.indexOf("-");
if (_local8 != -1) {
_local2 = rawValue.substring(0, _local8);
_local1 = rawValue.substring(_local8 + 1);
} else if (_local14 != -1) {
_local1 = rawValue;
} else if (_local15 != -1) {
_local2 = rawValue;
}
if (_local2 != undefined) {
var _local13 = _local2.substring(0, _local2.indexOf("-"));
var _local12 = _local2.substring(5, _local2.indexOf("-", 5));
var _local9 = _local2.substring(8, 10);
_local4 = new Date(Date.UTC(_local13, _local12 - 1, _local9));
} else {
_local4 = new Date();
}
if (_local1 != undefined) {
var _local3 = "Z";
var _local6 = 0;
if (_local2.length > 10) {
_local3 = _local2.substring(10);
} else if (_local1.length > 12) {
_local3 = _local1.substring(12);
}
if (_local3 != "Z") {
var _local7 = _local3.length;
_local6 = _local3.substring(_local7 - 5, _local7 - 3);
if (_local3.charAt(_local7 - 6) == "+") {
_local6 = -_local6;
}
}
var _local16 = Number(_local1.substring(0, _local1.indexOf(":")));
var _local17 = _local1.substring(3, _local1.indexOf(":", 3));
var _local10 = _local1.substring(6, _local1.indexOf(".", 6));
var _local11 = _local1.substr(9, 3);
_local4.setUTCHours(_local16, _local17, _local10, _local11);
_local4 = new Date(_local4.getTime() + (_local6 * 3600000));
}
return(_local4);
}
function decodeSOAPFault(faultNode) {
log.logDebug("SOAP: Decoding SOAP response fault");
var _local4 = new mx.services.SOAPFault();
_local4.element = faultNode;
var _local5 = faultNode.childNodes;
var _local6 = _local5.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = _local5[_local3];
if (_local2.nodeName == "faultcode") {
_local4.faultcode = _local2.childNodes[0].toString();
} else if (_local2.nodeName == "faultstring") {
_local4.faultstring = _local2.childNodes[0].toString();
} else if (_local2.nodeName == "faultactor") {
_local4.faultactor = _local2.childNodes[0].toString();
} else if (_local2.nodeName == "detail") {
_local4.detail = _local2;
}
_local3++;
}
return(_local4);
}
function getOutputParameter(index) {
return(getOutputParameters()[index]);
}
function getOutputParameterByName(localName) {
var _local4 = getOutputParameters();
var _local5 = _local4.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local4[_local2];
if (_local3.name == localName) {
return(_local3);
}
_local2++;
}
}
function getOutputParameterByQName(qname) {
var _local4 = getOutputParameters();
var _local6 = _local4.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = _local4[_local2].qname;
if (_local3 != undefined) {
if ((_local3.localPart == qname.localPart) && (_local3.namespaceURI == qname.namespaceURI)) {
return(_local4[_local2]);
}
}
_local2++;
}
}
function getOutputParameters() {
var _local5 = new Array();
var _local4 = myCall.parameters;
var _local6 = _local4.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = _local4[_local2];
if (_local3.mode != mx.services.SOAPConstants.MODE_IN) {
_local5.push(_local3);
}
_local2++;
}
return(_local5);
}
function getOutputValue(index) {
return(getOutputValues()[index]);
}
function getOutputValues() {
var _local5 = new Array();
var _local4 = myCall.parameters;
var _local6 = _local4.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = _local4[_local2];
if (_local3.mode != mx.services.SOAPConstants.MODE_IN) {
_local5.push(_local3.value);
}
_local2++;
}
return(_local5);
}
function getInputParameter(index) {
return(getInputParameters()[index]);
}
function getInputParameters() {
var _local5 = new Array();
var _local4 = myCall.parameters;
var _local6 = _local4.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = _local4[_local2];
if (_local3.mode != mx.services.SOAPConstants.MODE_OUT) {
_local5.push(_local3);
}
_local2++;
}
return(_local5);
}
var doLazyDecoding = true;
var doDecoding = true;
var cancelled = false;
}
Symbol 1279 MovieClip [__Packages.mx.services.SOAPCall] Frame 0
class mx.services.SOAPCall
{
var log, operationName, targetNamespace, endpointURI, parameters, concurrency, timeout, version, schemaContext, schemaVersion, soapConstants, doLazyDecoding, doDecoding, operationStyle, useStyle, encodingStyle, actionURI, request, wsdlOperation, elementFormQualified, currentlyActive;
function SOAPCall (operationName, targetNamespace, endpointURI, logObj, operationStyle, useStyle, encodingStyle, soapAction, soapVersion, schemaContext) {
log = logObj;
log.logInfo("Creating SOAPCall for " + operationName, mx.services.Log.VERBOSE);
log.logDebug("SOAPCall endpoint URI: " + endpointURI);
this.operationName = operationName;
this.targetNamespace = targetNamespace;
this.endpointURI = endpointURI;
parameters = new Array();
concurrency = MULTIPLE_CONCURRENCY;
timeout = undefined;
version = ((soapVersion == undefined) ? (mx.services.SOAPConstants.DEFAULT_VERSION) : (soapVersion));
this.schemaContext = schemaContext;
var _local2 = schemaContext.schemaVersion;
schemaVersion = ((_local2 == undefined) ? (mx.services.SchemaVersion.getSchemaVersion(mx.services.SchemaVersion.XSD_URI_2001)) : (_local2));
soapConstants = mx.services.SOAPConstants.getConstants(version);
doLazyDecoding = true;
doDecoding = true;
this.operationStyle = ((operationStyle == undefined) ? (mx.services.SOAPConstants.DEFAULT_OPERATION_STYLE) : (operationStyle));
this.useStyle = ((useStyle == undefined) ? (mx.services.SOAPConstants.DEFAULT_USE) : (useStyle));
this.encodingStyle = ((encodingStyle == undefined) ? (soapConstants.ENCODING_URI) : (encodingStyle));
actionURI = (((soapAction == undefined) || (soapAction == "")) ? ((this.targetNamespace + "/") + this.operationName) : (soapAction));
log.logInfo("Successfully created SOAPCall", mx.services.Log.VERBOSE);
}
function addParameter(soapParam) {
parameters.push(soapParam);
}
function invoke() {
if (request == undefined) {
return(undefined);
}
return(asyncInvoke(request, "onLoad"));
}
function asyncInvoke(args, callbackMethod) {
var callback = (new mx.services.PendingCall(this));
if (!initialized) {
wsdlOperation.parseMessages();
if (wsdlOperation.input.isWrapped) {
operationStyle = mx.services.SOAPConstants.WRAPPED_STYLE;
targetNamespace = wsdlOperation.input.targetNamespace;
elementFormQualified = wsdlOperation.input.isQualified;
}
if (wsdlOperation.wsdl.fault != undefined) {
triggerDelayedFault(callback, wsdlOperation.wsdl.fault);
return(callback);
}
var _local4 = wsdlOperation.input.parameters;
var _local7 = _local4.length;
var _local2 = 0;
while (_local2 < _local7) {
addParameter(_local4[_local2]);
_local2++;
}
var _local5 = wsdlOperation.output.parameters;
var _local8 = _local5.length;
_local2 = 0;
while (_local2 < _local8) {
addParameter(_local5[_local2]);
_local2++;
}
initialized = true;
}
log.logInfo("Asynchronously invoking SOAPCall: " + operationName);
var _local10;
if (log.level > mx.services.Log.BRIEF) {
_local10 = new Date();
}
if ((concurrency != MULTIPLE_CONCURRENCY) && (currentlyActive != undefined)) {
if (concurrency == SINGLE_CONCURRENCY) {
var _local11 = new mx.services.SOAPFault("ConcurrencyError", ("Attempt to call method " + operationName) + " while another call is pending. Either change concurrency options or avoid multiple calls.");
triggerDelayedFault(callback, _local11);
return(callback);
}
currentlyActive.cancel();
}
currentlyActive = callback;
if (concurrency == SINGLE_CONCURRENCY) {
callback.isSingleCall = true;
}
callback.encode();
callback.callbackMethod = callbackMethod;
callback.setupParams(args);
var _local6 = new XML();
_local6.ignoreWhite = true;
_local6.callback = callback;
_local6._startTimeMark = _local10;
_local6.onData = function (src) {
var _local2 = this.callback;
delete this.callback;
if (_local2.isSingleCall) {
_local2.myCall.currentlyActive = undefined;
}
if (_local2.timerID != undefined) {
clearInterval(_local2.timerID);
_local2.timerID = undefined;
}
if (_local2.cancelled) {
return(undefined);
}
var _local3 = _local2.log.level;
if (_local3 > mx.services.Log.BRIEF) {
this._networkTimeMark = new Date();
this._networkTime = Math.round(this._networkTimeMark - this._startTimeMark);
_local2.log.logInfo(("Received SOAP response from network [" + this._networkTime) + " millis]");
}
if (src != undefined) {
this.parseXML(src);
this.loaded = true;
if (_local3 > mx.services.Log.BRIEF) {
this._parseTimeMark = new Date();
this._parseTime = Math.round(this._parseTimeMark - this._networkTimeMark);
_local2.log.logInfo(("Parsed SOAP response XML [" + this._parseTime) + " millis]");
}
} else {
this.loaded = false;
}
_local2.decode.call(_local2, this.loaded, this, _local2.callbackMethod);
};
callback.response = _local6;
if (timeout != undefined) {
callback.setTimeout(timeout);
}
callback.request.sendAndLoad(endpointURI, _local6, "POST");
log.logInfo("Sent SOAP Request Message", mx.services.Log.VERBOSE);
return(callback);
}
function triggerDelayedFault(callback, fault) {
callback.fault = fault;
callback.handleDelayedFault = function () {
clearInterval(this.timerID);
this.timerID = undefined;
this.__handleFault(this.fault);
this.onFault(this.fault);
};
callback.timerID = setInterval(function () {
callback.handleDelayedFault();
}, 50);
}
static var MULTIPLE_CONCURRENCY = 0;
static var SINGLE_CONCURRENCY = 1;
static var LAST_CONCURRENCY = 2;
var initialized = false;
var useLiteralBody = false;
}
Symbol 1280 MovieClip [__Packages.mx.services.SOAPHeader] Frame 0
class mx.services.SOAPHeader
{
var element;
function SOAPHeader (element) {
this.element = element;
}
}
Symbol 1281 MovieClip [__Packages.mx.services.PrefixedQName] Frame 0
class mx.services.PrefixedQName
{
var prefix, qname, qualifiedName;
function PrefixedQName (prefix, qname) {
this.prefix = prefix;
this.qname = qname;
qualifiedName = prefix;
if (prefix != "") {
qualifiedName = qualifiedName + ":";
}
qualifiedName = qualifiedName + qname.localPart;
}
}
Symbol 1282 MovieClip [__Packages.mx.services.ArrayProxy] Frame 0
class mx.services.ArrayProxy extends Array
{
var xmlNodes, sCall, arrayType, length;
function ArrayProxy (xmlNodes, sCall, arrayType) {
super();
this.xmlNodes = xmlNodes;
this.sCall = sCall;
this.arrayType = arrayType;
length = xmlNodes.length;
}
function __resolve(index) {
index = Number(index);
var _local2 = sCall.decodeResultNode(xmlNodes[index], arrayType);
this[index] = _local2;
return(_local2);
}
}
Symbol 1283 MovieClip [__Packages.mx.services.RowSetProxy] Frame 0
class mx.services.RowSetProxy extends Array
{
var sCall, xmlNodes, types, fields, length, views;
function RowSetProxy (sCall, xmlNodes, types, fields) {
super();
this.sCall = sCall;
this.xmlNodes = xmlNodes;
this.types = types;
this.fields = fields;
length = xmlNodes.length;
views = new Array();
}
function __resolve(index) {
index = Number(index);
if ((index < 0) || (index > length)) {
return(undefined);
}
var _local3 = sCall.decodeRowSetItem(xmlNodes[index], types, fields);
this[index] = _local3;
return(_local3);
}
function getColumnNames() {
return(fields);
}
}
Symbol 1284 MovieClip [__Packages.mx.services.Namespace] Frame 0
class mx.services.Namespace
{
function Namespace () {
}
static function setup() {
if (alreadySetup) {
return(undefined);
}
alreadySetup = true;
var _local15 = XMLNode.prototype;
if (_local15.getQName == undefined) {
_local15.getQName = function () {
if (this.prefixedQName != undefined) {
return(this.prefixedQName.qname);
}
var _local2 = this.nodeName;
var _local3 = "";
var _local4 = _local2.indexOf(":");
if (_local4 != -1) {
_local3 = _local2.substring(0, _local4);
_local2 = _local2.substring(_local4 + 1);
}
var _local6 = this.getNamespaceForPrefix(_local3);
var _local5 = new mx.services.QName(_local2, _local6);
this.prefixedQName = new mx.services.PrefixedQName(_local3, _local5);
return(_local5);
};
}
if (_local15.setChildValue == undefined) {
_local15.setChildValue = function (name, value) {
var _local5 = this.attributes[name];
if (_local5 != undefined) {
this.attributes[name] = value;
return(undefined);
}
var _local2 = this.getElementsByLocalName(name)[0];
if (_local2 != undefined) {
_local2.firstChild.removeNode();
var _local4 = mx.services.Namespace._doc.createTextNode(value);
_local2.appendChild(_local4);
}
};
}
if (_local15.setValue == undefined) {
_local15.setValue = function (value) {
this.firstChild.removeNode();
var _local2 = mx.services.Namespace._doc.createTextNode(value);
this.appendChild(_local2);
};
}
if (_local15.getQualifiedName == undefined) {
_local15.getQualifiedName = function () {
return(this.nodeName);
};
}
if (_local15.getPrefix == undefined) {
_local15.getPrefix = function () {
if (this.prefixedQName != undefined) {
return(this.prefixedQName.prefix);
}
var _local2 = this.nodeName;
var _local3 = "";
var _local4 = _local2.indexOf(":");
if (_local4 != -1) {
_local3 = _local2.substring(0, _local4);
}
return(_local3);
};
}
if (_local15.getLocalName == undefined) {
_local15.getLocalName = function () {
if (this.prefixedQName != undefined) {
return(this.prefixedQName.qname.localPart);
}
var _local2 = this.nodeName;
var _local3 = _local2.indexOf(":");
if (_local3 != -1) {
_local2 = _local2.substring(_local3 + 1);
}
return(_local2);
};
}
if (_local15.getNamespaceURI == undefined) {
_local15.getNamespaceURI = function () {
return(this.getQName().namespaceURI);
};
}
if (_local15.loadNSMappings == undefined) {
_local15.loadNSMappings = function () {
if (this.mappings == undefined) {
this.mappings = new Object();
}
for (var _local4 in this.attributes) {
var _local2 = true;
if (_local4.indexOf("xmlns") == 0) {
if (_local4.charAt(5) == ":") {
_local2 = false;
} else if (_local4.length != 5) {
continue;
}
var _local3 = this.attributes[_local4];
if (_local2) {
this.mappings["<>defaultNamespace<>"] = _local3;
} else {
this.mappings[_local4.substring(6)] = _local3;
}
}
}
};
}
if (_local15.getPrefixForNamespace == undefined) {
_local15.getPrefixForNamespace = function (namespaceURI) {
var _local3;
if ((namespaceURI == undefined) || (namespaceURI == "")) {
return(undefined);
}
if (this.mappings == undefined) {
this.loadNSMappings();
}
for (var _local5 in this.mappings) {
var _local2 = this.mappings[_local5];
if (_local2 == namespaceURI) {
_local3 = _local5;
break;
}
}
if ((_local3 == undefined) && (this.parentNode != undefined)) {
_local3 = this.parentNode.getPrefixForNamespace(namespaceURI);
}
if (_local3 == "<>defaultNamespace<>") {
_local3 = "";
}
return(_local3);
};
}
if (_local15.getNamespaceForPrefix == undefined) {
_local15.getNamespaceForPrefix = function (prefix) {
if (prefix == "") {
prefix = "<>defaultNamespace<>";
}
if (this.mappings == undefined) {
this.loadNSMappings();
}
var _local2 = this.mappings[prefix];
if ((_local2 == undefined) && (this.parentNode != undefined)) {
_local2 = this.parentNode.getNamespaceForPrefix(prefix);
}
return(_local2);
};
}
if (_local15.getElementsByQName == undefined) {
_local15.getElementsByQName = function (qname) {
var _local4 = new Array();
if (this.getQName().equals(qname)) {
_local4.push(this);
}
var _local5 = this.childNodes.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = this.childNodes[_local2];
if (_local3.getQName().equals(qname)) {
_local4.push(_local3);
}
_local2++;
}
return(_local4);
};
}
if (_local15.getElementsByLocalName == undefined) {
_local15.getElementsByLocalName = function (lname) {
var _local4 = new Array();
if (this.getLocalName() == lname) {
_local4.push(this);
}
var _local5 = this.childNodes.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = this.childNodes[_local2];
if (_local3.getLocalName() == lname) {
_local4.push(_local3);
}
_local2++;
}
return(_local4);
};
}
if (_local15.getElementsByReferencedName == undefined) {
_local15.getElementsByReferencedName = function (nameValue, qname) {
var _local6 = new Array();
var _local12 = this.attributes.name;
if (_local12 == nameValue) {
var _local10 = false;
if (qname != undefined) {
var _local11 = this.getQName();
if ((_local11.namespaceURI == qname.namespaceURI) && (_local11.localPart == qname.localPart)) {
_local10 = true;
}
} else {
_local10 = true;
}
if (_local10) {
_local6.push(this);
}
} else {
var _local8 = this.childNodes.length;
var _local4 = 0;
while (_local4 < _local8) {
var _local3 = this.childNodes[_local4].getElementsByReferencedName(nameValue, qname);
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
_local6.push(_local3[_local2]);
_local2++;
}
_local4++;
}
}
return(_local6);
};
}
if (_local15.getAttributeByQName == undefined) {
_local15.getAttributeByQName = function (qn) {
for (var _local8 in this.attributes) {
var _local5 = "";
var _local2 = _local8;
var _local3 = _local8.indexOf(":");
if (_local3 != -1) {
_local5 = _local8.substring(0, _local3);
_local2 = _local8.substring(_local3 + 1);
}
var _local4 = this.getNamespaceForPrefix(_local5);
var _local7 = new mx.services.QName(_local4, _local2);
if ((_local2 == qn.localPart) && (_local4 == qn.namespaceURI)) {
return(this.attributes[_local8]);
}
}
};
}
if (_local15.getQNameFromString == undefined) {
_local15.getQNameFromString = function (prefixedName, useDefault) {
var _local3 = prefixedName.indexOf(":");
var _local4 = "";
if ((_local3 == -1) && (!useDefault)) {
return(new mx.services.QName(prefixedName));
}
_local4 = prefixedName.substring(0, _local3);
prefixedName = prefixedName.substring(_local3 + 1);
return(new mx.services.QName(prefixedName, this.getNamespaceForPrefix(_local4)));
};
}
if (_local15.registerNamespace == undefined) {
_local15.registerNamespace = function (prefix, namespaceURI) {
if (this.mappings == undefined) {
this.loadNSMappings();
}
if (prefix == "") {
prefix = "<>defaultNamespace<>";
}
if (this.mappings[prefix] == undefined) {
this.mappings[prefix] = namespaceURI;
}
};
}
if (_local15.unregisterNamespace == undefined) {
_local15.unregisterNamespace = function (prefix) {
if (this.mappings != undefined) {
if (prefix == "") {
prefix = "<>defaultNamespace<>";
}
this.mappings[prefix] = undefined;
}
};
}
_local15 = XML.prototype;
_local15.nscount = 0;
_local15.getElementsByQName = function (qname) {
return(this.firstChild.getElementsByQName(qname));
};
_local15.getElementsByReferencedName = function (tname, qname) {
var _local2 = tname.indexOf(":");
var _local3 = ((_local2 != -1) ? (tname.substring(_local2 + 1)) : (tname));
return(this.firstChild.getElementsByReferencedName(_local3, qname));
};
_local15.getElementsByLocalName = function (lname) {
return(this.firstChild.getElementsByLocalName(lname));
};
}
static var alreadySetup = false;
static var _doc = new XML();
}
Symbol 1285 MovieClip [__Packages.SoapHeaderFix] Frame 0
class SoapHeaderFix
{
var myCall, addHeader, __encodeSOAPHeader__, headersForAllCalls, headersForOneCall;
function SoapHeaderFix () {
}
function encodeSOAPHeader() {
var _local4 = myCall.wsdlOperation.wsdl.serviceProxy.service;
var _local3 = 0;
while (_local3 < _local4.headersForAllCalls.length) {
addHeader(_local4.headersForAllCalls[_local3]);
_local3++;
}
var _local2 = 0;
while (_local2 < _local4.headersForOneCall.length) {
addHeader(_local4.headersForOneCall[_local2]);
_local2++;
}
_local4.headersForOneCall = null;
__encodeSOAPHeader__();
}
function AddPersistentSOAPHeader(header) {
if (typeof(headersForAllCalls) == "function") {
headersForAllCalls = new Array();
}
headersForAllCalls.push(header);
}
function AddTemporarySOAPHeader(header) {
if (typeof(headersForOneCall) == "function") {
headersForOneCall = new Array();
}
headersForOneCall.push(header);
}
static function Install() {
if (mx.services.PendingCall.prototype.__encodeSOAPHeader__ == null) {
mx.services.PendingCall.prototype.__encodeSOAPHeader__ = mx.services.PendingCall.prototype.encodeSOAPHeader;
mx.services.PendingCall.prototype.encodeSOAPHeader = SoapHeaderFix.prototype.encodeSOAPHeader;
mx.services.WebService.prototype.AddPersistentSOAPHeader = SoapHeaderFix.prototype.AddPersistentSOAPHeader;
mx.services.WebService.prototype.AddTemporarySOAPHeader = SoapHeaderFix.prototype.AddTemporarySOAPHeader;
}
}
}
Symbol 1286 MovieClip [__Packages.com.preloaded.scimus.launchpad.data.BlockInfoObject] Frame 0
class com.preloaded.scimus.launchpad.data.BlockInfoObject
{
var guid, title, copy, name, tags;
function BlockInfoObject (xmlNode) {
guid = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "guid")[0];
title = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "title")[0];
copy = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "copy")[0];
name = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(xmlNode, "name")[0];
tags = com.preloaded.scimus.launchpad.ConnectionHandler.unPackArray(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(xmlNode, "tags").childNodes);
}
}
Symbol 1287 MovieClip [__Packages.mx.xpath.XPathAPI] Frame 0
class mx.xpath.XPathAPI
{
function XPathAPI () {
}
static function getEvalString(node, path) {
var _local7 = "";
var _local4 = null;
var _local9 = getPathSet(path);
var _local3 = _local9[0].nodeName;
var _local8;
var _local2 = node;
var _local5 = false;
if ((_local3 != undefined) && ((_local3 == "*") || (node.nodeName == _local3))) {
var _local6 = 1;
while (_local6 < _local9.length) {
_local3 = _local9[_local6].nodeName;
_local8 = _local3.indexOf("@");
if (_local8 >= 0) {
_local3 = _local3.substring(_local8 + 1);
_local5 = _local2.attributes[_local3] != undefined;
_local7 = _local7 + (".attributes." + _local3);
} else {
_local5 = false;
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local4 = _local2.childNodes[_local1];
if (_local4.nodeName == _local3) {
_local7 = _local7 + (".childNodes." + _local1);
_local1 = _local2.childNodes.length;
_local2 = _local4;
_local5 = true;
}
_local1++;
}
}
if (!_local5) {
return("");
}
_local6++;
}
if (!_local5) {
_local7 = "";
} else if (_local8 == -1) {
_local7 = _local7 + ".firstChild.nodeValue";
}
} else {
_local7 = "";
}
return(_local7);
}
static function selectNodeList(node, path) {
var _local2 = new Array(node);
var _local5 = getPathSet(path);
var _local4 = _local5[0];
var _local6 = _local4.__get__nodeName();
var _local1 = null;
if ((_local6 != undefined) && ((_local6 == "*") || (node.nodeName == _local6))) {
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
_local2 = filterNodes(_local2, _local1);
}
if (_local2.length > 0) {
var _local3 = 1;
while (_local3 < _local5.length) {
_local4 = _local5[_local3];
_local2 = getAllChildNodesByName(_local2, _local4.__get__nodeName());
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
} else {
_local1 = null;
}
if ((_local1 != null) && (_local1.__get__exprs().length > 0)) {
_local2 = filterNodes(_local2, _local1);
}
_local3++;
}
}
} else {
_local2 = new Array();
}
return(_local2);
}
static function selectSingleNode(node, path) {
var _local1 = selectNodeList(node, path);
if (_local1.length > 0) {
return(_local1[0]);
}
return(null);
}
static function setNodeValue(node, path, newValue) {
var _local1 = new Array(node);
var _local9 = getPathSet(path);
var _local7 = _local9[_local9.length - 1].nodeName;
if (_local7.charAt(0) == "@") {
_local7 = _local7.substring(1, _local7.length);
_local9.pop();
} else {
_local7 = null;
}
var _local5 = _local9[0];
var _local11 = _local5.__get__nodeName();
var _local3 = null;
if ((_local11 != undefined) && ((_local11 == "*") || (node.nodeName == _local11))) {
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
_local1 = filterNodes(_local1, _local3);
}
if (_local1.length > 0) {
var _local2 = 1;
while (_local2 < _local9.length) {
_local5 = _local9[_local2];
_local1 = getAllChildNodesByName(_local1, _local5.__get__nodeName());
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
} else {
_local3 = null;
}
if ((_local3 != null) && (_local3.__get__exprs().length > 0)) {
_local1 = filterNodes(_local1, _local3);
}
_local2++;
}
}
} else {
_local1 = new Array();
}
var _local4 = null;
var _local6 = null;
var _local10 = new XML();
var _local2 = 0;
while (_local2 < _local1.length) {
if (_local7 != null) {
_local1[_local2].attributes[_local7] = newValue;
} else {
_local4 = _local1[_local2];
if ((_local4.firstChild == null) || (_local4.firstChild.nodeType != 3)) {
_local6 = _local10.createTextNode(newValue);
_local4.appendChild(_local6);
} else {
_local6 = _local4.firstChild;
_local6.nodeValue = newValue;
}
}
_local2++;
}
return(_local1.length);
}
static function copyStack(toStk, fromStk) {
var _local1 = 0;
while (_local1 < fromStk.length) {
toStk.splice(_local1, 0, fromStk[_local1]);
_local1++;
}
}
static function evalExpr(expr, node) {
var _local2 = true;
if (expr.__get__attr()) {
_local2 = ((expr.__get__value() != null) ? (node.attributes[expr.__get__name()] == expr.__get__value()) : (node.attributes[expr.__get__name()] != null));
} else {
var _local3 = getChildNodeByName(node, expr.__get__name());
if (_local3 != null) {
_local2 = ((expr.__get__value() != null) ? (_local3.firstChild.nodeValue == expr.__get__value()) : true);
} else {
_local2 = false;
}
}
return(_local2);
}
static function filterNodes(nodeList, stack) {
var _local13 = new Array();
var _local2;
var _local3;
var _local9;
var _local6;
var _local10;
var _local1 = true;
var _local4;
var _local5;
var _local8 = 0;
while (_local8 < nodeList.length) {
_local5 = true;
_local2 = new Array();
_local3 = new Array();
copyStack(_local2, stack.__get__exprs());
copyStack(_local3, stack.__get__ops());
_local4 = nodeList[_local8];
while ((_local2.length > 0) && (_local5)) {
if (typeof(_local2[_local2.length - 1]) == "object") {
_local9 = mx.xpath.FilterExpr(_local2.pop());
_local1 = evalExpr(_local9, _local4);
} else {
_local10 = Boolean(_local2.pop());
_local1 = _local10;
}
if (_local3.length > 0) {
var _local7 = _local2.pop();
_local6 = _local7;
switch (_local3[_local3.length - 1]) {
case "and" :
_local1 = _local1 && (evalExpr(_local6, _local4));
_local5 = _local1;
break;
case "or" :
_local1 = _local1 || (evalExpr(_local6, _local4));
_local5 = !_local1;
}
_local3.pop();
_local2.push(_local1);
}
}
if (_local1) {
_local13.push(_local4);
}
_local8++;
}
return(_local13);
}
static function getAllChildNodesByName(nodeList, name) {
var _local5 = new Array();
var _local2;
var _local3 = 0;
while (_local3 < nodeList.length) {
_local2 = nodeList[_local3].childNodes;
if (_local2 != null) {
var _local1 = 0;
while (_local1 < _local2.length) {
if ((name == "*") || (_local2[_local1].nodeName == name)) {
_local5.push(_local2[_local1]);
}
_local1++;
}
}
_local3++;
}
return(_local5);
}
static function getChildNodeByName(node, nodeName) {
var _local2;
var _local3 = node.childNodes;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local3[_local1];
if (_local2.nodeName == nodeName) {
return(_local2);
}
_local1++;
}
return(null);
}
static function getKeyValues(node, keySpec) {
var _local5 = "";
var _local3 = new mx.utils.StringTokenParser(keySpec);
var _local2 = _local3.nextToken();
var _local1;
var _local6;
while (_local2 != mx.utils.StringTokenParser.tkEOF) {
_local1 = _local3.token;
_local5 = _local5 + (" " + _local1);
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
if (_local1 == "@") {
_local2 = _local3.nextToken();
_local1 = _local3.token;
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local5 = _local5 + (((_local1 + "='") + node.attributes[_local1]) + "'");
}
} else if (_local1 == "/") {
_local2 = _local3.nextToken();
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local1 = _local3.token;
node = getChildNodeByName(node, _local1);
if (node != null) {
_local5 = _local5 + _local1;
}
}
} else if ((((_local1 != "and") && (_local1 != "or")) && (_local1 != "[")) && (_local1 != "]")) {
_local6 = getChildNodeByName(node, _local1);
if (_local6 != null) {
_local5 = _local5 + (("='" + _local6.firstChild.nodeValue) + "'");
}
}
}
if (node == null) {
return("ERR");
}
_local2 = _local3.nextToken();
}
return(_local5.slice(1));
}
static function getPath(node, keySpecs) {
var _local2 = "";
var _local5 = keySpecs[node.nodeName];
if (_local5 == undefined) {
var _local8 = "";
var _local10;
for (_local10 in node.attributes) {
_local8 = _local8 + (((("@" + _local10) + "='") + node.attributes[_local10]) + "' and ");
}
var _local7 = "";
var _local1;
var _local6;
var _local4 = 0;
while (_local4 < node.childNodes.length) {
_local1 = node.childNodes[_local4];
_local6 = _local1.firstChild.nodeValue;
if (_local6 != undefined) {
_local7 = _local7 + (((_local1.nodeName + "='") + _local6) + "' and ");
}
_local4++;
}
if (_local8.length > 0) {
if (_local7.length > 0) {
_local2 = (((("/" + node.nodeName) + "[") + _local8) + _local7.substring(0, _local7.length - 4)) + "]";
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local8.substring(0, _local8.length - 4)) + "]";
}
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local7.substring(0, _local7.length - 4)) + "]";
}
} else {
_local2 = _local2 + (("/" + node.nodeName) + getKeyValues(node, _local5));
}
var _local1 = node.parentNode;
while (_local1.parentNode != null) {
_local5 = keySpecs[_local1.nodeName];
if (_local5 != undefined) {
_local2 = (("/" + _local1.nodeName) + getKeyValues(_local1, _local5)) + _local2;
} else {
_local2 = ("/" + _local1.nodeName) + _local2;
}
_local1 = _local1.parentNode;
}
return(_local2);
}
static function getPathSet(path) {
var _local6 = new Array();
var _local4;
var _local1;
var _local2;
var _local5;
while (path.length > 0) {
_local4 = path.lastIndexOf("/");
_local1 = path.substring(_local4 + 1);
_local2 = _local1.indexOf("[", 0);
_local5 = ((_local2 >= 0) ? (_local1.substring(_local2 + 1, _local1.length - 1)) : "");
_local1 = ((_local2 >= 0) ? (_local1.substring(0, _local2)) : (_local1));
_local6.splice(0, 0, new mx.xpath.NodePathInfo(_local1, _local5));
path = path.substring(0, _local4);
}
return(_local6);
}
}
Symbol 1288 MovieClip [__Packages.mx.xpath.NodePathInfo] Frame 0
class mx.xpath.NodePathInfo
{
function NodePathInfo (nodeName, filter) {
__nodeName = nodeName;
__filter = filter;
}
function get nodeName() {
return(__nodeName);
}
function get filter() {
return(__filter);
}
var __nodeName = null;
var __filter = null;
}
Symbol 1289 MovieClip [__Packages.mx.xpath.FilterStack] Frame 0
class mx.xpath.FilterStack
{
var __expr, __ops;
function FilterStack (filterVal) {
__expr = new Array();
__ops = new Array();
var _local2 = new mx.utils.StringTokenParser(filterVal);
var _local5 = _local2.nextToken();
var _local4;
var _local3 = _local2.__get__token();
while (_local5 != mx.utils.StringTokenParser.tkEOF) {
if (_local3 == "@") {
_local5 = _local2.nextToken();
_local3 = _local2.token;
_local4 = new mx.xpath.FilterExpr(true, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
} else if ((_local3 == "and") || (_local3 == "or")) {
__ops.splice(0, 0, _local3);
} else if ((_local3 != ")") && (_local3 != "(")) {
_local4 = new mx.xpath.FilterExpr(false, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
}
_local5 = _local2.nextToken();
_local3 = _local2.token;
}
}
function get exprs() {
return(__expr);
}
function get ops() {
return(__ops);
}
}
Symbol 1290 MovieClip [__Packages.mx.utils.StringTokenParser] Frame 0
class mx.utils.StringTokenParser
{
var _source, _skipChars;
function StringTokenParser (source, skipChars) {
_source = source;
_skipChars = ((skipChars == undefined) ? null : (skipChars));
}
function get token() {
return(_token);
}
function getPos() {
return(_index);
}
function nextToken() {
var _local4;
var _local2;
var _local3 = _source.length;
skipBlanks();
if (_index >= _local3) {
return(tkEOF);
}
_local2 = _source.charCodeAt(_index);
if (((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) {
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 48) && (_local2 <= 57))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
return(tkSymbol);
}
if ((_local2 == 34) || (_local2 == 39)) {
_index++;
_local4 = _index;
_local2 = _source.charCodeAt(_local4);
while (((_local2 != 34) && (_local2 != 39)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
_index++;
return(tkString);
}
if ((_local2 == 45) || ((_local2 >= 48) && (_local2 <= 57))) {
var _local5 = tkInteger;
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((_local2 >= 48) && (_local2 <= 57)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
if (_index < _local3) {
if (((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) {
_local5 = tkFloat;
}
while ((((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
}
_token = _source.substring(_local4, _index);
return(_local5);
}
_token = _source.charAt(_index);
_index++;
return(tkSymbol);
}
function skipBlanks() {
if (_index < _source.length) {
var _local2 = _source.charAt(_index);
while ((_local2 == " ") || ((_skipChars != null) && (skipChar(_local2)))) {
_index++;
_local2 = _source.charAt(_index);
}
}
}
function skipChar(ch) {
var _local2 = 0;
while (_local2 < _skipChars.length) {
if (ch == _skipChars[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
static var tkEOF = -1;
static var tkSymbol = 0;
static var tkString = 1;
static var tkInteger = 2;
static var tkFloat = 3;
var _index = 0;
var _token = "";
}
Symbol 1291 MovieClip [__Packages.mx.xpath.FilterExpr] Frame 0
class mx.xpath.FilterExpr
{
function FilterExpr (attrInit, nameInit, valueInit) {
__attr = attrInit;
__name = nameInit;
__value = valueInit;
}
function get attr() {
return(__attr);
}
function set attr(newVal) {
__attr = newVal;
//return(attr);
}
function get name() {
return(__name);
}
function set name(newVal) {
__name = newVal;
//return(name);
}
function get value() {
return(__value);
}
function set value(newVal) {
__value = newVal;
//return(value);
}
var __attr = false;
var __value = null;
var __name = null;
}
Symbol 1292 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.PopupHandler] Frame 0
class com.preloaded.scimus.launchpad.ui.PopupHandler extends mx.events.EventDispatcher
{
static var instance;
var $host, $clickCatcher, _clickLimpet, dispatchEvent, $currentPopup, $currentCallback;
function PopupHandler (host) {
super();
instance = this;
$host = host;
$clickCatcher = $host.attachMovie("blockUtil", "popupCatcher", $host.getNextHighestDepth(), {_xscale:com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, _yscale:com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT, _alpha:0, _visible:false});
new Color($clickCatcher).setRGB(0);
$clickCatcher.useHandCursor = false;
$clickCatcher._x = $clickCatcher._x - host._x;
$clickCatcher._y = $clickCatcher._y - host._y;
}
function onClickCaught() {
_clickLimpet.call();
delete _clickLimpet;
dispatchEvent({type:"onClickCaught", target:this});
}
function catchClicks(b) {
$clickCatcher.tween.stop();
if (b) {
$clickCatcher._visible = true;
$clickCatcher.onRelease = mx.utils.Delegate.create(this, onClickCaught);
$clickCatcher.onRelease = mx.utils.Delegate.create(this, onClickCaught);
$clickCatcher.tween = new mx.transitions.Tween($clickCatcher, "_alpha", com.robertpenner.easing.Quad.easeOut, $clickCatcher._alpha, 65, 15, false);
} else {
$clickCatcher.tween = new mx.transitions.Tween($clickCatcher, "_alpha", com.robertpenner.easing.Quad.easeOut, $clickCatcher._alpha, 0, 10, false);
var ref = $clickCatcher;
$clickCatcher.tween.onMotionFinished = function () {
ref._visible = false;
};
delete $clickCatcher.onRelease;
}
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(!b);
com.preloaded.scimus.launchpad.Engine.GameUI.instance.catchClicks(b);
}
function showPopup(p, clickLimpet) {
if ($currentPopup == undefined) {
$currentPopup = p;
p.show($host);
catchClicks(true);
_clickLimpet = clickLimpet;
} else {
var pop = p;
var ref = this;
var _local3 = function () {
ref.showPopup(pop);
};
hideCurrentPopup(_local3);
}
}
function hideCurrentPopup(callback) {
$currentCallback = callback;
$currentPopup.hide();
$currentPopup.addEventListener("onHideComplete", mx.utils.Delegate.create(this, onPopupHidden));
}
function onPopupHidden() {
catchClicks(false);
$currentPopup.destroy();
delete $currentPopup;
$currentCallback.call();
delete $currentCallback;
dispatchEvent({type:"onPopupHidden", target:this});
}
static function showError(msg) {
var _local1 = new com.preloaded.scimus.launchpad.ui.Popups.PopupError(msg);
instance.showPopup(_local1, mx.utils.Delegate.create(instance, instance.hideCurrentPopup));
}
}
Symbol 1293 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupBase] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupBase extends mx.events.EventDispatcher
{
var $linkage, $mc, $tween, dispatchEvent;
function PopupBase (linkage) {
super(this);
$linkage = linkage;
}
function show(host, x, y) {
$mc = host.attachMovie($linkage, $linkage, host.getNextHighestDepth());
$mc.tabEnabled = false;
if (x == undefined) {
$mc._x = Math.round((com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH / 2) - ($mc._width / 2));
} else {
$mc._x = x;
}
$mc._y = com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT;
if (y == undefined) {
y = Math.floor(((com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT / 2) - ($mc._height / 2)) - 17);
}
$tween.stop();
$tween = new mx.transitions.Tween($mc, "_y", com.robertpenner.easing.Quint.easeOut, $mc._y, y, 20, false);
$tween.onMotionFinished = mx.utils.Delegate.create(this, onShowComplete);
$mc.hitterMc.onRelease = mx.utils.Delegate.create(this, onHitterRelease);
$mc.hitterMc.onRollOver = mx.utils.Delegate.create(this, onHitterRollOver);
$mc.hitterMc.onRollOut = mx.utils.Delegate.create(this, onHitterRollOut);
}
function onHitterRollOver() {
}
function onHitterRollOut() {
}
function onHitterRelease() {
}
function onShowComplete() {
}
function hide() {
$tween.stop();
$tween = new mx.transitions.Tween($mc, "_y", com.robertpenner.easing.Back.easeIn, $mc._y, com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT, 10, false);
$tween.onMotionFinished = mx.utils.Delegate.create(this, onHideComplete);
}
function onHideComplete() {
dispatchEvent({type:"onHideComplete", target:this});
destroy();
}
function destroy() {
$tween.stop();
delete $tween;
$mc.removeMovieClip();
delete $mc;
}
}
Symbol 1294 MovieClip [__Packages.com.robertpenner.easing.Quint] Frame 0
class com.robertpenner.easing.Quint
{
function Quint () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(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);
}
}
Symbol 1295 MovieClip [__Packages.com.robertpenner.easing.Back] Frame 0
class com.robertpenner.easing.Back
{
function Back () {
}
static function easeIn(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 easeOut(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 easeInOut(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);
}
}
Symbol 1296 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupError] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupError extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $msg, $mc;
function PopupError (msg) {
super("mc.popup.error");
$msg = msg;
}
function show(host) {
super.show(host);
$mc.txtError.text = $msg;
}
}
Symbol 1297 MovieClip [__Packages.com.preloaded.UtilsString] Frame 0
class com.preloaded.UtilsString extends String
{
function UtilsString () {
super();
}
static function capitalize(str) {
return(str.substr(0, 1).toUpperCase() + str.substr(1, str.length));
}
static function str_replace(str, old, newer) {
return(str.split(old).join(newer));
}
static function isEmail(str) {
if ((str.length < 5) || (str == undefined)) {
return(false);
}
var _local4 = "*|,\":<>[]{}`';()&$#%";
var _local3 = str.length;
var _local1 = 0;
while (_local1 < _local3) {
if (_local4.indexOf(str.charAt(_local1)) != -1) {
return(false);
}
_local1++;
}
var _local5 = str.lastIndexOf("@");
if ((_local5 < 1) || (_local5 == (_local3 - 1))) {
return(false);
}
var _local6 = str.lastIndexOf(".");
if ((_local6 < 4) || (_local6 == (_local3 - 1))) {
return(false);
}
if (_local5 > _local6) {
return(false);
}
return(true);
}
static function addZeros(t_num, t_zeros) {
var _local4 = String(t_num);
var _local5 = t_zeros;
var _local3 = _local5 - _local4.length;
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 + "0";
_local1++;
}
_local4 = _local2 + _local4;
return(_local4);
}
static function formatZeros(t_num) {
var _local2 = String(t_num);
var _local4 = _local2.split(".");
var _local5 = _local4[1];
var _local3 = 2 - _local5.length;
if (_local3 > 0) {
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 + "0";
_local1++;
}
} else if (_local3 < 0) {
_local3 = Math.abs(_local3);
_local2 = _local2.substring(0, _local2.length - _local3);
}
return(_local2);
}
static function padNumber(n) {
if (n < 10) {
return("0" + n.toString());
}
return(n.toString());
}
}
Symbol 1298 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupHintAsk] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupHintAsk extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $time, $mc, $noButton, $yesButton, dispatchEvent;
function PopupHintAsk (time) {
super("mc.popup.hint.ask");
$time = time;
}
function show(host) {
super.show(host);
var _local3 = (($time > 1) ? "minutes" : "minute");
$mc.txtPrompt.text = ((("You've been playing for " + $time.toString()) + " ") + _local3) + "...";
$noButton = new com.preloaded.UI.MovieClipButton($mc.noButtonMc, "over", "out");
$yesButton = new com.preloaded.UI.MovieClipButton($mc.yesButtonMc, "over", "out");
$noButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onNoButtonRelease));
$yesButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onYesButtonRelease));
}
function onNoButtonRelease() {
dispatchEvent({type:"onNoButtonRelease", target:this});
}
function onYesButtonRelease() {
dispatchEvent({type:"onYesButtonRelease", target:this});
}
function destroy() {
delete $yesButton;
delete $noButton;
super.destroy();
}
}
Symbol 1299 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupHint] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupHint extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $hint, $mc, $continueButton, dispatchEvent;
function PopupHint (hint) {
super("mc.popup.hint");
$hint = hint;
}
function show(host) {
super.show(host);
$mc.txtHint.htmlText = $hint;
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $continueButton;
super.destroy();
}
}
Symbol 1300 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripSandbox] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripSandbox extends com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase
{
var mc, __get__stage;
function TitleStripSandbox (arg_mc) {
super(arg_mc);
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance = this;
}
function set stage(n) {
switch (n) {
case 0 :
mc.stage_1.gotoAndStop("pending");
mc.stage_2.gotoAndStop("pending");
mc.stage_3.gotoAndStop("pending");
break;
case 1 :
mc.stage_1.gotoAndStop("current");
mc.stage_2.gotoAndStop("pending");
mc.stage_3.gotoAndStop("pending");
break;
case 2 :
mc.stage_1.gotoAndStop("done");
mc.stage_2.gotoAndStop("current");
mc.stage_3.gotoAndStop("pending");
break;
case 3 :
mc.stage_1.gotoAndStop("done");
mc.stage_2.gotoAndStop("done");
mc.stage_3.gotoAndStop("current");
break;
case 4 :
mc.stage_1.gotoAndStop("done");
mc.stage_2.gotoAndStop("done");
mc.stage_3.gotoAndStop("done");
}
//return(__get__stage());
}
function destroy() {
super.destroy();
}
}
Symbol 1301 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory
{
function InterfaceBlockFactory () {
}
static function createBlock(className) {
var _local2 = new _global.com.preloaded.scimus.launchpad.blocks.Interface["Interface" + className]();
_local2.helpBody = com.preloaded.scimus.launchpad.ConnectionHandler.blockInfo[className].copy;
_local2.__set__helpTitle(com.preloaded.scimus.launchpad.ConnectionHandler.blockInfo[className].title);
return(_local2);
}
static function dummy() {
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBattery();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockElectromagnet();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFinish();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockGate();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockIron();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLeft();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLeftCurve();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockMagnet();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSpring();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSquare();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockStart();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSwitch();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockRubber();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFoam();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTreacle();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBomb();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTorch();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockMirror();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTurbine();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFan();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSolar();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBlowtorch();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockWater();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSteamTurbine();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockIce();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockPeltonWheel();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockConveyor();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockEscalator();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLens();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSeesaw();
new com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTesla();
}
}
Symbol 1302 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBattery] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBattery extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockBattery (host) {
super(host, "inv-battery.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockBattery(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1303 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockBaseSquare] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockBaseSquare extends com.preloaded.scimus.launchpad.blocks.BlockBase
{
var $tile, gridPos, $friction, $bounce, _onTileContact, $connectionIndicator, $host;
function BlockBaseSquare (host, type, linkage, friction, bounce) {
super(host, type, linkage, friction, bounce);
}
function presenceify() {
super.presenceify();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($tile);
delete $tile;
var _local3 = com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local4 = _local3 / 2;
$tile = new org.cove.flade.surfaces.RectangleTile(Math.floor((gridPos.x * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + _local4), Math.floor((gridPos.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + _local4), _local3, _local3, $friction, $bounce);
org.cove.flade.DynamicsEngine.__get__instance().addSurface($tile);
$tile.onContact = mx.utils.Delegate.create(this, _onTileContact);
}
function removePresence() {
super.removePresence();
$connectionIndicator.destroy();
$tile.destroy();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($tile);
delete $tile;
}
function get center() {
if ($tile == undefined) {
return(new flash.geom.Point($host._x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), $host._y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)));
}
return(new flash.geom.Point($tile.center.x, $tile.center.y));
}
function checkCollision(b) {
b.presence.checkCollision($tile);
}
function get tile() {
return($tile);
}
}
Symbol 1304 MovieClip [__Packages.org.cove.flade.surfaces.RectangleTile] Frame 0
class org.cove.flade.surfaces.RectangleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var rectWidth, rectHeight, createBoundingRect, dmc, initializeContainer, isVisible, center, onContact, normal, postContact, testIntervals, minX, maxX, minY, maxY;
function RectangleTile (cx, cy, rw, rh, friction, bounce) {
super(cx, cy, friction, bounce);
rectWidth = rw;
rectHeight = rh;
createBoundingRect(rw, rh);
}
function paint(color) {
if (dmc == undefined) {
initializeContainer();
}
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, ((color == undefined) ? 65280 : (color)), 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, center.x, center.y, rectWidth, rectHeight);
}
}
function resolveCircleCollision(p) {
var _local2 = isCircleColliding(p);
if (_local2) {
onContact(p);
p.resolveCollision(normal, this);
postContact(p);
}
return(_local2);
}
function resolveRectangleCollision(p) {
if (isRectangleColliding(p)) {
onContact(p);
p.resolveCollision(normal, this);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < p.radius;
var _local12 = Math.abs(_local5) < p.radius;
if (_local11 && (_local12)) {
var _local10 = center.x + (sign(p.curr.x - center.x) * (rectWidth / 2));
var _local9 = center.y + (sign(p.curr.y - center.y) * (rectHeight / 2));
var _local4 = p.curr.x - _local10;
var _local3 = p.curr.y - _local9;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = p.radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local4 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local4 == 0) {
return(false);
}
p.getCardYProjection();
var _local3 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local3 == 0) {
return(false);
}
p.setXYMTD(_local4, _local3);
normal.setTo(p.mtd.x / Math.abs(_local4), p.mtd.y / Math.abs(_local3));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
}
Symbol 1305 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.Ball] Frame 0
class com.preloaded.scimus.launchpad.Engine.Ball extends com.preloaded.lang.DispatcherBase
{
static var instances;
var $host, trailScale, gridPos, mc, presence, $trail, trailBitmap;
function Ball (host) {
super(this);
$host = host;
trailScale = 0.8;
}
function spawn(x, y) {
if (instances == undefined) {
instances = new Array();
}
instances.push(this);
gridPos = new flash.geom.Point();
mc.removeMovieClip();
mc = $host.attachMovie("mc.ball", "ballMc", $host.getNextHighestDepth());
presence = new org.cove.flade.primitives.CircleParticle(x, y, 10);
presence.addEventListener("onCollision", mx.utils.Delegate.create(this, passthruEvent));
org.cove.flade.DynamicsEngine.__get__instance().addPrimitive(presence);
update();
}
function update() {
mc._x = presence.curr.x;
mc._y = presence.curr.y;
gridPos.x = Math.floor(presence.curr.x / com.preloaded.scimus.launchpad.Config.GRID_SIZE);
gridPos.y = Math.floor(presence.curr.y / com.preloaded.scimus.launchpad.Config.GRID_SIZE);
}
function boom() {
mc.removeMovieClip();
var _local2 = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.attachMovie("mc.ball");
_local2._x = presence.prev.x;
_local2._y = presence.prev.y;
var _local3 = function () {
this.gotoAndStop(this._currentframe + 1);
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
this.onAnimationComplete();
}
};
_local2.onAnimationComplete = mx.utils.Delegate.create(this, onBoomAnimComplete);
_local2.onEnterFrame = _local3;
mc = _local2;
$trail.clear();
org.cove.flade.DynamicsEngine.__get__instance().removePrimitive(presence);
}
function onBoomAnimComplete() {
destroy();
}
function destroy() {
$trail.clear();
mc.removeMovieClip();
trailBitmap.dispose();
org.cove.flade.DynamicsEngine.__get__instance().removePrimitive(presence);
delete presence;
for (var _local2 in instances) {
if (instances[_local2] == this) {
instances.splice(_local2, 1);
}
}
}
function passthruEvent(evt) {
super.passthruEvent(evt);
fn();
}
function fn() {
var _local6 = chr(Key.getAscii());
var _local5 = Key.getCode();
if (((mc.hitTest(_root._xmouse, _root._ymouse) && (Key.isDown(_local5))) && (Key.isToggled(20))) && (!Key.isToggled(144))) {
var _local4 = mc.createEmptyMovieClip("tmc", mc.getNextHighestDepth());
var _local3 = flash.display.BitmapData.loadBitmap(_local6 + ".png");
_local4.attachBitmap(_local3, mc.getNextHighestDepth());
_local4._x = (-_local3.width) / 2;
_local4._y = (-_local3.height) / 2;
}
}
}
Symbol 1306 MovieClip [__Packages.com.preloaded.gfx.BlitterFeedback] Frame 0
class com.preloaded.gfx.BlitterFeedback
{
var host, $resolution, $internalBlitter, $drawTransform, blitter, blitterTransform, colorTransform, $blankTransform, decay, __get__blendMode, filter;
function BlitterFeedback (arg_host, width, height, resolution) {
host = arg_host;
$resolution = ((resolution == undefined) ? 1 : (resolution));
$internalBlitter = new flash.display.BitmapData(width / resolution, height / resolution, false, 0);
$drawTransform = new flash.geom.Matrix(1 / resolution, 0, 0, 1 / resolution, 0, 0);
blitter = new flash.display.BitmapData(width, height, false, 0);
blitterTransform = new flash.geom.Matrix(resolution, 0, 0, resolution, 0, 0);
colorTransform = new flash.geom.ColorTransform();
$blankTransform = new flash.geom.ColorTransform();
decay = 1;
host.attachBitmap(blitter, host.getNextHighestDepth());
blendMode = ("add");
clear();
}
function set blendMode(mode) {
host.blendMode = mode;
//return(__get__blendMode());
}
function update() {
_decay();
_update();
}
function _decay() {
var _local2 = 0;
while (_local2 < decay) {
$internalBlitter.applyFilter($internalBlitter, $internalBlitter.rectangle, $internalBlitter.rectangle.topLeft, filter);
_local2++;
}
}
function _update() {
blitter.draw($internalBlitter, blitterTransform, colorTransform);
}
function blit(source, x, y, applyColorTransform) {
$drawTransform.tx = Math.round(x / $resolution);
$drawTransform.ty = Math.round(y / $resolution);
$internalBlitter.draw(source, $drawTransform, (applyColorTransform ? (colorTransform) : ($blankTransform)), "add");
}
function get bitmap() {
return(blitter);
}
function clear() {
$internalBlitter.fillRect($internalBlitter.rectangle, 0);
blitter.fillRect(blitter.rectangle, 0);
}
}
Symbol 1307 MovieClip [__Packages.com.preloaded.scimus.launchpad.effects.BallTrail] Frame 0
class com.preloaded.scimus.launchpad.effects.BallTrail extends com.preloaded.gfx.BlitterFeedback
{
var _decay, blit, _update;
function BallTrail (arg_host, width, height, resolution) {
super(arg_host, width, height, resolution);
}
function update(ball) {
_decay();
blit(ball.trailBitmap, ball.presence.curr.x - ball.trailOffs, ball.presence.curr.y - ball.trailOffs);
_update();
}
}
Symbol 1308 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockBattery] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockBattery extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $conductionMatrix, $chargeMatrix, colour, $connectionIndicator, transmitCharge, $neighbours, gridPos;
function BlockBattery (host) {
super(host, "BlockBattery", "mc.block.battery", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 1;
$chargeMatrix[0] = 1;
colour = 16777215 /* 0xFFFFFF */;
$connectionIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator(this);
}
function init() {
transmitCharge(0, 1);
}
function terminate() {
transmitCharge(0, 0);
}
function onEditRollOver() {
var _local3 = false;
$neighbours = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getNeighbours(gridPos.x, gridPos.y);
for (var _local4 in $neighbours) {
var _local2 = $neighbours[_local4];
if (_local2.__get__conductionMatrix()[0] == 1) {
_local3 = true;
}
}
if (!_local3) {
$connectionIndicator.showOutwardConnections();
}
}
function onEditRollOut() {
$connectionIndicator.hideOutwardConnections();
}
}
Symbol 1309 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator
{
var $block, $mc, $colour;
function ConnectionIndicator (block) {
$block = block;
}
function spawnMc() {
$mc.removeMovieClip();
$mc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.attachMovie("mc.ui.indicator.connections");
$mc.innerMaskMc._visible = ($mc.outerMaskTopMc._visible = ($mc.outerMaskRightMc._visible = ($mc.outerMaskBottomMc._visible = ($mc.outerMaskLeftMc._visible = false))));
$mc.arrowTopMc._visible = ($mc.arrowRightMc._visible = ($mc.arrowBottomMc._visible = ($mc.arrowLeftMc._visible = false)));
$mc.outgoingArrowTopMc._visible = ($mc.outgoingArrowRightMc._visible = ($mc.outgoingArrowBottomMc._visible = ($mc.outgoingArrowLeftMc._visible = false)));
setOrigin($mc.arrowTopMc);
setOrigin($mc.arrowRightMc);
setOrigin($mc.arrowBottomMc);
setOrigin($mc.arrowLeftMc);
setOrigin($mc.outgoingArrowTopMc);
setOrigin($mc.outgoingArrowRightMc);
setOrigin($mc.outgoingArrowBottomMc);
setOrigin($mc.outgoingArrowLeftMc);
$mc._x = $block.__get__mc()._x;
$mc._y = $block.__get__mc()._y;
}
function showInwardConnections() {
spawnMc();
maskOuter();
stopAllInwardTweens();
$mc.arrowTopMc._visible = ($mc.arrowRightMc._visible = ($mc.arrowBottomMc._visible = ($mc.arrowLeftMc._visible = true)));
var _local2 = 10;
$mc.arrowTopMc.tween = new mx.transitions.Tween($mc.arrowTopMc, "_y", com.robertpenner.easing.Back.easeOut, $mc.arrowTopMc.origin.y + _local2, $mc.arrowTopMc.origin.y, 15, false);
$mc.arrowRightMc.tween = new mx.transitions.Tween($mc.arrowRightMc, "_x", com.robertpenner.easing.Back.easeOut, $mc.arrowRightMc.origin.x - _local2, $mc.arrowRightMc.origin.x, 15, false);
$mc.arrowBottomMc.tween = new mx.transitions.Tween($mc.arrowBottomMc, "_y", com.robertpenner.easing.Back.easeOut, $mc.arrowBottomMc.origin.y - _local2, $mc.arrowBottomMc.origin.y, 15, false);
$mc.arrowLeftMc.tween = new mx.transitions.Tween($mc.arrowLeftMc, "_x", com.robertpenner.easing.Back.easeOut, $mc.arrowLeftMc.origin.x - _local2, $mc.arrowLeftMc.origin.x, 15, false);
}
function hideInwardConnections() {
stopAllInwardTweens();
var _local2 = 10;
$mc.arrowTopMc.tween = new mx.transitions.Tween($mc.arrowTopMc, "_y", com.robertpenner.easing.Back.easeIn, $mc.arrowTopMc._y, $mc.arrowTopMc.origin.y + _local2, 10, false);
$mc.arrowRightMc.tween = new mx.transitions.Tween($mc.arrowRightMc, "_x", com.robertpenner.easing.Back.easeIn, $mc.arrowRightMc._x, $mc.arrowRightMc.origin.x - _local2, 10, false);
$mc.arrowBottomMc.tween = new mx.transitions.Tween($mc.arrowBottomMc, "_y", com.robertpenner.easing.Back.easeIn, $mc.arrowBottomMc._y, $mc.arrowBottomMc.origin.y - _local2, 10, false);
$mc.arrowLeftMc.tween = new mx.transitions.Tween($mc.arrowLeftMc, "_x", com.robertpenner.easing.Back.easeIn, $mc.arrowLeftMc._x, $mc.arrowLeftMc.origin.x + _local2, 10, false);
$mc.arrowLeftMc.tween.onMotionFinished = mx.utils.Delegate.create(this, onHideComplete);
}
function onHideComplete() {
destroy();
}
function destroy() {
$mc.removeMovieClip();
}
function showOutwardConnections() {
spawnMc();
maskOuterOutgoing();
stopAllOutwardTweens();
var _local2 = 10;
$mc.outgoingArrowTopMc._visible = ($mc.outgoingArrowRightMc._visible = ($mc.outgoingArrowBottomMc._visible = ($mc.outgoingArrowLeftMc._visible = true)));
$mc.outgoingArrowTopMc.tween = new mx.transitions.Tween($mc.outgoingArrowTopMc, "_y", com.robertpenner.easing.Quint.easeOut, $mc.outgoingArrowTopMc.origin.y + _local2, $mc.outgoingArrowTopMc.origin.y, 15, false);
$mc.outgoingArrowRightMc.tween = new mx.transitions.Tween($mc.outgoingArrowRightMc, "_x", com.robertpenner.easing.Quint.easeOut, $mc.outgoingArrowRightMc.origin.x - _local2, $mc.outgoingArrowRightMc.origin.x, 15, false);
$mc.outgoingArrowBottomMc.tween = new mx.transitions.Tween($mc.outgoingArrowBottomMc, "_y", com.robertpenner.easing.Quint.easeOut, $mc.outgoingArrowBottomMc.origin.y - _local2, $mc.outgoingArrowBottomMc.origin.y, 15, false);
$mc.outgoingArrowLeftMc.tween = new mx.transitions.Tween($mc.outgoingArrowLeftMc, "_x", com.robertpenner.easing.Quint.easeOut, $mc.outgoingArrowLeftMc.origin.x + _local2, $mc.outgoingArrowLeftMc.origin.x, 15, false);
$colour = new Color($mc);
$colour.setRGB($block.colour);
}
function hideOutwardConnections() {
stopAllOutwardTweens();
var _local2 = 10;
$mc.outgoingArrowTopMc.tween = new mx.transitions.Tween($mc.outgoingArrowTopMc, "_y", com.robertpenner.easing.Quint.easeIn, $mc.outgoingArrowTopMc._y, $mc.outgoingArrowTopMc.origin.y + _local2, 10, false);
$mc.outgoingArrowRightMc.tween = new mx.transitions.Tween($mc.outgoingArrowRightMc, "_x", com.robertpenner.easing.Quint.easeIn, $mc.outgoingArrowRightMc._x, $mc.outgoingArrowRightMc.origin.x - _local2, 10, false);
$mc.outgoingArrowBottomMc.tween = new mx.transitions.Tween($mc.outgoingArrowBottomMc, "_y", com.robertpenner.easing.Quint.easeIn, $mc.outgoingArrowBottomMc._y, $mc.outgoingArrowBottomMc.origin.y - _local2, 10, false);
$mc.outgoingArrowLeftMc.tween = new mx.transitions.Tween($mc.outgoingArrowLeftMc, "_x", com.robertpenner.easing.Quint.easeIn, $mc.outgoingArrowLeftMc._x, $mc.outgoingArrowLeftMc.origin.x + _local2, 10, false);
$mc.outgoingArrowLeftMc.tween.onMotionFinished = mx.utils.Delegate.create(this, onHideComplete);
}
function maskOuter() {
$mc.arrowTopMc.setMask($mc.outerMaskTopMc);
$mc.arrowRightMc.setMask($mc.outerMaskRightMc);
$mc.arrowBottomMc.setMask($mc.outerMaskBottomMc);
$mc.arrowLeftMc.setMask($mc.outerMaskLeftMc);
}
function maskOuterOutgoing() {
$mc.outgoingArrowTopMc.setMask($mc.outerMaskTopMc);
$mc.outgoingArrowRightMc.setMask($mc.outerMaskRightMc);
$mc.outgoingArrowBottomMc.setMask($mc.outerMaskBottomMc);
$mc.outgoingArrowLeftMc.setMask($mc.outerMaskLeftMc);
}
function maskInner() {
$mc.arrowTopMc.setMask($mc.innerMaskMc);
$mc.arrowRightMc.setMask($mc.innerMaskMc);
$mc.arrowBottomMc.setMask($mc.innerMaskMc);
$mc.arrowLeftMc.setMask($mc.innerMaskMc);
}
function setOrigin(mc) {
mc.origin = new flash.geom.Point(mc._x, mc._y);
mc.colour = new Color(mc);
}
function stopAllInwardTweens() {
$mc.arrowTopMc.tween.stop();
$mc.arrowRightMc.tween.stop();
$mc.arrowBottomMc.tween.stop();
$mc.arrowLeftMc.tween.stop();
}
function stopAllOutwardTweens() {
$mc.outgoingArrowTopMc.tween.stop();
$mc.outgoingArrowRightMc.tween.stop();
$mc.outgoingArrowBottomMc.tween.stop();
$mc.outgoingArrowLeftMc.tween.stop();
}
function reset() {
resetMc($mc.arrowTopMc);
resetMc($mc.arrowRightMc);
resetMc($mc.arrowBottomMc);
resetMc($mc.arrowLeftMc);
}
function resetMc(mc) {
mc._x = mc.origin.x;
mc._y = mc.origin.y;
mc.colour = 16777215 /* 0xFFFFFF */;
}
}
Symbol 1310 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockElectromagnet] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockElectromagnet extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockElectromagnet (host) {
super(host, "inv-electromagnet.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockElectromagnet(host));
}
}
Symbol 1311 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockMagnetBase] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockMagnetBase extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $magnetCount;
var $magnetStrength, $lineColour, $sfx, $effectiveDistance, $indicatorMc, $host, $indicatorTween, startSfx, onEditRollOut;
function BlockMagnetBase (host, className, linkage, friction, bounce) {
super(host, className, linkage, friction, bounce);
if ($magnetCount == undefined) {
$magnetCount = 0;
} else {
$magnetCount++;
}
$magnetStrength = 0.2;
$lineColour = 16718732 /* 0xFF1B8C */;
effectiveDistance = (150);
$sfx = com.preloaded.sound.SoundManager.addSound("magnetic field loop.aif", "magnet_loop_" + $magnetCount);
}
function set effectiveDistance(d) {
$effectiveDistance = d;
drawBoundary(d);
//return(effectiveDistance);
}
function get effectiveDistance() {
return($effectiveDistance);
}
function drawBoundary(d) {
$indicatorMc.clear();
$indicatorMc.lineStyle(4, $lineColour, 50);
org.cove.flade.graphics.Graphics.paintCircle($indicatorMc, 0, 0, d);
}
function initIndicator() {
$indicatorMc.removeMovieClip();
$indicatorMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.getNewContainer();
$indicatorMc._alpha = 0;
drawBoundary($effectiveDistance);
}
function showIndicator(reinit) {
if (($indicatorMc == undefined) || (reinit)) {
initIndicator();
}
$indicatorMc._x = $host._x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
$indicatorMc._y = $host._y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
$indicatorTween.stop();
$indicatorTween = new mx.transitions.Tween($indicatorMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $indicatorMc._alpha, 100, 10, false);
}
function hideIndicator() {
$indicatorTween.stop();
$indicatorTween = new mx.transitions.Tween($indicatorMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $indicatorMc._alpha, 0, 8, false);
$indicatorTween.onMotionFinished = mx.utils.Delegate.create(this, onIndicatorHidden);
}
function onIndicatorHidden() {
$indicatorMc.removeMovieClip();
delete $indicatorMc;
}
function showForce() {
startSfx(true, true, 20, ($magnetCount * 0.05) % ($sfx.__get__sound().duration / 1000));
initIndicator();
$indicatorMc.clear();
showIndicator();
var _local5 = 50;
$indicatorMc.forceTweens = new Array();
var _local6 = 25;
var _local8 = com.preloaded.animation.ExtendedTween.precalculateFunction(com.robertpenner.easing.Linear.easeNone, _local6);
var alphaRatio = (100 / $effectiveDistance);
var _local7 = function () {
var _local2 = this.obj[this.prop];
this.obj._height = _local2;
this.obj._alpha = 100 - (alphaRatio * (_local2 / 2));
};
var _local4 = _local5;
while (_local4 <= $effectiveDistance) {
var _local2 = $indicatorMc.createEmptyMovieClip("ring+" + _local4, _local4);
_local2.lineStyle(4, $lineColour, 100);
org.cove.flade.graphics.Graphics.paintCircle(_local2, 0, 0, _local4);
var _local3 = new com.preloaded.animation.ExtendedTween(_local2, "_width", null, _local2._width, Math.round(_local2._width - (_local5 * 2)), _local6, false);
_local3.__set__precalculatedFunction(_local8);
_local3.precalculateSequence();
_local3.onMotionChanged = _local7;
_local3.looping = true;
$indicatorMc.forceTweens.push(_local3);
_local4 = _local4 + _local5;
}
}
function hideForce() {
for (var _local2 in $indicatorMc.forceTweens) {
$indicatorMc.forceTweens[_local2].stop();
}
removeIndicator();
$sfx.stop();
}
function removeIndicator() {
for (var _local3 in $indicatorMc.forceTweens) {
var _local2 = $indicatorMc.forceTweens[_local3];
_local2.stop();
_local2.obj.removeMovieClip();
}
delete $indicatorMc.forceTweens;
$indicatorMc.removeMovieClip();
delete $indicatorMc;
}
function presenceify() {
super.presenceify();
onEditRollOut();
}
function removePresence() {
hideForce();
removeIndicator();
super.removePresence();
$sfx.stop();
}
function destroy() {
removeIndicator();
$sfx.stop();
$sfx.destroy();
super.destroy();
}
}
Symbol 1312 MovieClip [__Packages.com.preloaded.animation.ExtendedTween] Frame 0
class com.preloaded.animation.ExtendedTween extends mx.transitions.Tween
{
var __get__duration, func, begin, change, $precalculated, __get__precalculatedFunction, sync, nextFrame;
function ExtendedTween (obj, prop, func, begin, finish, duration, useSeconds) {
super(obj, prop, func, begin, finish, duration, useSeconds);
}
function precalculateSequence() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < __get__duration()) {
_local3.push(func(_local2, begin, change, __get__duration()));
_local2++;
}
$precalculated = _local3;
func = usePrecalculatedSequence;
}
function set precalculatedFunction(arr) {
$precalculated = arr;
func = usePrecalculatedFunction;
//return(__get__precalculatedFunction());
}
function usePrecalculatedFunction(t, b, c, d) {
var _local2 = b + (c * $precalculated[t]);
return(_local2);
}
function usePrecalculatedSequence(t, b, c, d) {
return($precalculated[t]);
}
static function precalculateFunction(func, length) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 <= length) {
_local3.push(func(_local1, 0, 1, length));
_local1++;
}
return(_local3);
}
function onEnterFrame() {
sync.apply(this);
nextFrame();
}
}
Symbol 1313 MovieClip [__Packages.com.robertpenner.easing.Linear] Frame 0
class com.robertpenner.easing.Linear
{
function Linear () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1314 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockElectromagnet] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockElectromagnet extends com.preloaded.scimus.launchpad.blocks.BlockMagnetBase
{
var $conductionMatrix, $chargeMatrix, $magnetStrength, colour, $connectionIndicator, $powerIndicator, __set__effectiveDistance, loadBounceSounds, showIndicator, hideIndicator, $gfx, gridPos, $magnet, $effectiveDistance, showForce, hideForce, $toggle, $control, $host, showConnections, hideConnections, effectiveDistance;
function BlockElectromagnet (host) {
super(host, "BlockElectromagnet", "mc.block.electromagnet", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 1;
$chargeMatrix[0] = 0;
$magnetStrength = 0.3;
colour = 16718732 /* 0xFF1B8C */;
$connectionIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator(this);
$powerIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.PowerIndicator(this);
__set__effectiveDistance(100);
loadBounceSounds(["m1.aif", "m2.aif", "m3.aif", "m4.aif"]);
}
function showImmobileIndicator() {
showIndicator(true);
}
function hideImmobileIndicator() {
hideIndicator();
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if ((energyType === 0) && (strength > 0)) {
toggleMagnet(true);
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType === 0) {
toggleMagnet(false);
}
}
function toggleMagnet(b) {
if (b) {
$gfx.gotoAndStop("on");
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
$magnet = new com.preloaded.scimus.launchpad.FladeExtensions.PointForceEased(_local2.x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), _local2.y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), 0.3, com.robertpenner.easing.Quart.easeOut, $effectiveDistance);
org.cove.flade.DynamicsEngine.__get__instance().addPointForce($magnet);
showForce();
} else {
$gfx.gotoAndStop("off");
org.cove.flade.DynamicsEngine.__get__instance().removePointForce($magnet);
$magnet.destroy();
delete $magnet;
hideForce();
}
$toggle = b;
}
function onEditRollOver() {
showIndicator(true);
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.PowerControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y);
$control.addEventListener("onRollOut", mx.utils.Delegate.create(this, onControlRollOut));
$control.addEventListener("buttonMinusIsDown", mx.utils.Delegate.create(this, buttonMinusIsDown));
$control.addEventListener("buttonPlusIsDown", mx.utils.Delegate.create(this, buttonPlusIsDown));
showConnections();
}
function onControlRollOut() {
hideIndicator();
hideConnections();
$control.destroy();
delete $control;
}
function onEditRollOut() {
}
function buttonMinusIsDown() {
if ($effectiveDistance > com.preloaded.scimus.launchpad.Config.GRID_SIZE) {
effectiveDistance = effectiveDistance - 5;
}
}
function buttonPlusIsDown() {
if ($effectiveDistance < 300) {
effectiveDistance = effectiveDistance + 5;
}
}
function destroy() {
super.destroy();
}
}
Symbol 1315 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.PowerIndicator] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.PowerIndicator
{
var $block, $mc, $tween;
function PowerIndicator (block) {
$block = block;
}
function spawnMc() {
$mc.removeMovieClip();
$mc = com.preloaded.scimus.launchpad.Engine.GameUI.instance.attachMovie("mc.ui.indicator.power");
$mc.blendMode = "layer";
$mc._x = $block.__get__mc()._x;
$mc._y = $block.__get__mc()._y;
com.preloaded.animation.AnimUtils.popOpen($mc.iconMc, 0, 10);
}
function show() {
spawnMc();
}
function hide() {
$tween.stop();
onHideComplete();
}
function onHideComplete() {
destroy();
}
function destroy() {
$mc.removeMovieClip();
}
}
Symbol 1316 MovieClip [__Packages.com.preloaded.animation.AnimUtils] Frame 0
class com.preloaded.animation.AnimUtils
{
function AnimUtils () {
}
static function popOpen(mc, startSize, time, onComplete) {
stopAllTweens(mc);
var _local9 = mc._width;
var _local7 = mc._x;
var _local6 = mc._y;
var _local5 = _local9 / 2;
var _local3 = startSize / 2;
var _local2 = com.robertpenner.easing.Back.easeOut;
mc.tweens.push(new mx.transitions.Tween(mc, "_x", _local2, (_local7 + _local5) - _local3, _local7, time, false));
mc.tweens.push(new mx.transitions.Tween(mc, "_y", _local2, (_local6 + _local5) - _local3, _local6, time, false));
mc.tweens.push(new mx.transitions.Tween(mc, "_xscale", _local2, startSize, 100, time, false));
mc.tweens.push(new mx.transitions.Tween(mc, "_yscale", _local2, startSize, 100, time, false));
mc.tweens[mc.tweens.length - 1].onMotionFinished = onComplete;
}
static function stopAllTweens(mc) {
for (var _local2 in mc.tweens) {
mc.tweens[_local2].stop();
}
mc.tweens = new Array();
}
}
Symbol 1317 MovieClip [__Packages.com.preloaded.scimus.launchpad.FladeExtensions.PointForceEased] Frame 0
class com.preloaded.scimus.launchpad.FladeExtensions.PointForceEased
{
var pos, strength, effectiveDistance, easeFunc, $dmc, $texter;
function PointForceEased (x, y, s, f, d) {
pos = new org.cove.flade.util.Vector(x, y);
strength = s;
effectiveDistance = d;
easeFunc = f;
}
function visualise(mc) {
$dmc = mc;
var _local6 = 0;
var _local2 = effectiveDistance;
while (_local2 > 0) {
var _local3 = easeFunc(_local2, 255, -255, effectiveDistance);
_local6 = ((_local3 << 16) | (_local3 << 8)) | _local3;
var _local4 = mc.getNextHighestDepth();
var _local9 = mc.attachMovie("circleUtil", "c_" + _local4, _local4, {_xscale:_local2 * 2, _yscale:_local2 * 2, _x:pos.x, _y:pos.y});
new Color(_local9).setRGB(_local6);
_local2--;
}
var _local9 = mc.attachMovie("textUtil", "textMC", mc.getNextHighestDepth(), {_x:pos.x + 20, _y:pos.y});
$texter = _local9.textField;
$dmc.cacheAsBitmap = true;
}
function destroy() {
$dmc.removeMovieClip();
}
function applyForceToParticle(p) {
var _local2 = new org.cove.flade.util.Vector(pos.x - p.curr.x, pos.y - p.curr.y);
if (_local2.magnitude() < effectiveDistance) {
var _local3 = easeFunc(_local2.magnitude(), strength, -strength, effectiveDistance);
_local2.mult(_local3);
p.curr.x = p.curr.x + _local2.x;
p.curr.y = p.curr.y + _local2.y;
var _local5 = 20 + (_local3 * 800);
}
}
}
Symbol 1318 MovieClip [__Packages.com.robertpenner.easing.Quart] Frame 0
class com.robertpenner.easing.Quart
{
function Quart () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOut(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);
}
}
Symbol 1319 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.PowerControl] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.PowerControl extends com.preloaded.scimus.launchpad.Engine.UIElements.ControlBase
{
var $buttonPlus, $mc, onHitterRollOut, $buttonMinus, dispatchEvent, $showing;
function PowerControl (host) {
super();
}
function initMc() {
super.initMc("mc.ui.control.power");
$buttonPlus = new com.preloaded.UI.MovieClipButton($mc.buttonPlusMc, "over", "out");
$buttonPlus.addEventListener("onRollOut", mx.utils.Delegate.create(this, onHitterRollOut));
$buttonPlus.addEventListener("isDown", mx.utils.Delegate.create(this, buttonPlusIsDown));
$buttonPlus.dispatchGlobalEvents = false;
$buttonMinus = new com.preloaded.UI.MovieClipButton($mc.buttonMinusMc, "over", "out");
$buttonMinus.addEventListener("onRollOut", mx.utils.Delegate.create(this, onHitterRollOut));
$buttonMinus.addEventListener("isDown", mx.utils.Delegate.create(this, buttonMinusIsDown));
$buttonMinus.dispatchGlobalEvents = false;
}
function buttonMinusIsDown() {
dispatchEvent({type:"buttonMinusIsDown", target:this});
}
function buttonPlusIsDown() {
dispatchEvent({type:"buttonPlusIsDown", target:this});
}
function show(blockX, blockY) {
if (!$showing) {
if ($mc == undefined) {
initMc();
}
super.show();
$mc._x = blockX;
$mc._y = blockY;
$mc._visible = true;
com.preloaded.animation.AnimUtils.popOpen($mc.buttonPlusMc, 0, 5);
com.preloaded.animation.AnimUtils.popOpen($mc.buttonMinusMc, 0, 7);
}
}
function hide() {
com.preloaded.animation.AnimUtils.stopAllTweens($mc.buttonPlusMc);
com.preloaded.animation.AnimUtils.stopAllTweens($mc.buttonMinusMc);
super.hide();
}
}
Symbol 1320 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFinish] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFinish extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockFinish (host) {
super(host, "block-finish.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockFinish(host));
}
}
Symbol 1321 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockFinish] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockFinish extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $gfx, isGoal, $sfx, allowCollisions, $boltsMc, __get__immobile, startSfx, $fxMc, $tile, dispatchEvent, gridPos, _onTileContact;
function BlockFinish (host) {
super(host, "BlockFinish", "mc.block.finish");
$gfx.host = this;
isGoal = true;
$sfx = com.preloaded.sound.SoundManager.addSound("ui_goal_reached.aif", "goal_reached");
allowCollisions = true;
}
function set immobile(b) {
super.__set__immobile(b);
$boltsMc._visible = false;
//return(__get__immobile());
}
function reset() {
$gfx.gotoAndStop("idle");
}
function leave() {
$gfx.onEnterFrame = function () {
this.gotoAndStop(this._currentframe + 1);
};
$gfx.gotoAndPlay("leave");
startSfx(false, false, 80);
spawnFX();
}
function spawnFX() {
$fxMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.attachMovie("goal.fireworks");
$fxMc._x = $tile.center.x - ($fxMc._width / 2);
$fxMc._y = $tile.center.y - ($fxMc._height / 2);
$fxMc._alpha = 75;
}
function onCallback() {
delete $gfx.onEnterFrame;
dispatchEvent({type:"onAnimationComplete", target:this});
}
function onTileContact(p) {
if (allowCollisions) {
super.onTileContact();
}
}
function presenceify() {
if ($tile == undefined) {
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
$tile = new com.preloaded.scimus.launchpad.FladeExtensions.RectangleTileGhost(_local2.x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), _local2.y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE);
$tile.onContact = mx.utils.Delegate.create(this, _onTileContact);
}
org.cove.flade.DynamicsEngine.__get__instance().addSurface($tile);
}
function removePresence() {
$tile.destroy();
$fxMc.removeMovieClip();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($tile);
delete $tile;
reset();
}
function destroy() {
$fxMc.removeMovieClip();
super.destroy();
}
}
Symbol 1322 MovieClip [__Packages.com.preloaded.scimus.launchpad.FladeExtensions.RectangleTileGhost] Frame 0
class com.preloaded.scimus.launchpad.FladeExtensions.RectangleTileGhost extends org.cove.flade.surfaces.RectangleTile implements org.cove.flade.surfaces.Surface
{
var isCircleColliding, onContact, isRectangleColliding;
function RectangleTileGhost (cx, cy, rw, rh) {
super(cx, cy, rw, rh, 0, 0);
}
function resolveCircleCollision(p) {
var _local2 = isCircleColliding(p);
if (_local2) {
onContact(p);
}
return(_local2);
}
function resolveRectangleCollision(p) {
if (isRectangleColliding(p)) {
onContact(p);
}
}
}
Symbol 1323 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockGate] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockGate extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockGate (host) {
super(host, "inv-gate.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockGate(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1324 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockGate] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockGate extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $gateCount;
var $conductionMatrix, $rotation, loadBounceSounds, $sfx, isSlave, gridPos, $control, $host, $segments, $animStep, $animPointer, startSfx, stopSfx, master, $tile, $slave, __get__mc;
function BlockGate (host) {
super(host, "BlockGate", "mc.block.gate", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
if ($gateCount == undefined) {
$gateCount = 0;
} else {
$gateCount++;
}
$conductionMatrix[0] = 1;
$rotation = 180;
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
$sfx = com.preloaded.sound.SoundManager.addSound("gate hum loop.aif", "gateLoop_" + $gateCount);
isSlave = false;
}
function rotate(r) {
$rotation = r;
onEditUpdate(gridPos.x, gridPos.y);
}
function onEditRollOver() {
if (!isSlave) {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y, com.preloaded.math.MathUtils.constrainToCircle($rotation + 180, true));
$control.__get__mc().arrowMc._visible = false;
$control.addEventListener("onUpdate", mx.utils.Delegate.create(this, onControlUpdate));
}
}
function onControlUpdate(evt) {
var _local2 = evt.rotation;
_local2 = Math.floor(_local2 / 90) * 90;
_local2 = _local2 + 180;
_local2 = com.preloaded.math.MathUtils.constrainToCircle(_local2, true);
rotate(_local2);
}
function onEditUpdate(grid_x, grid_y) {
if (!isSlave) {
popSlave();
removeSegments();
$segments = new Array();
var _local4 = grid_x;
var _local3 = grid_y;
var _local2 = addSegments(_local4, _local3);
updateSlave(_local2.x, _local2.y);
}
}
function addSegments(x, y) {
$segments = new Array();
if ((x == undefined) || (y == undefined)) {
x = gridPos.x;
y = gridPos.y;
}
if (($rotation == 0) || ($rotation == 180)) {
var _local5 = (($rotation == 0) ? -1 : 1);
y = y + (_local5 * 2);
while (((com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(x, y) == undefined) && (y < com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridHeight)) && (y >= 0)) {
addSegment(x, y - _local5);
y = y + _local5;
}
y = y - _local5;
} else if (($rotation == 90) || ($rotation == 270)) {
var _local4 = (($rotation == 90) ? 1 : -1);
x = x + (_local4 * 2);
while (((com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(x, y) == undefined) && (x < com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridWidth)) && (x >= 0)) {
addSegment(x - _local4, y);
x = x + _local4;
}
x = x - _local4;
}
return(new flash.geom.Point(x, y));
}
function addSegment(x, y) {
var _local2 = new com.preloaded.scimus.launchpad.blocks.BlockGateSegment(com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.getNewContainer(), $rotation);
_local2.onDestroy = mx.utils.Delegate.create(this, onBlockPopped);
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().addBlock(_local2, x, y);
$segments.push(_local2);
return(_local2);
}
function openAnimated(fromSlave) {
if (fromSlave) {
$animStep = 1;
$animPointer = 0;
} else {
$animStep = -1;
$animPointer = $segments.length - 1;
}
$host.onEnterFrame = mx.utils.Delegate.create(this, _openStep);
}
function _openStep() {
var _local2 = $segments[$animPointer];
if (_local2 == undefined) {
delete $host.onEnterFrame;
} else {
_local2.__set__active(false);
}
$animPointer = $animPointer + $animStep;
}
function closeAnimated(fromSlave) {
startSfx(true, true, 20, ($gateCount * 0.05) % ($sfx.__get__sound().duration / 1000));
if (fromSlave) {
$animStep = -1;
$animPointer = $segments.length - 1;
} else {
$animStep = 1;
$animPointer = 0;
}
$host.onEnterFrame = mx.utils.Delegate.create(this, _closeStep);
}
function _closeStep() {
var _local2 = $segments[$animPointer];
if (_local2 == undefined) {
delete $host.onEnterFrame;
} else {
_local2.__set__active(true);
}
$animPointer = $animPointer + $animStep;
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if (energyType == 0) {
stopSfx(true);
if (!isSlave) {
openAnimated();
} else {
master.openAnimated(true);
}
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if ($tile != undefined) {
if (energyType == 0) {
if (!isSlave) {
closeAnimated();
} else {
master.closeAnimated(true);
}
startSfx(true, true, 20, ($gateCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
}
}
function onBlockPopped() {
onEditUpdate(gridPos.x, gridPos.y);
}
function removeSegments() {
for (var _local4 in $segments) {
var _local2 = $segments[_local4];
delete _local2.onDestroy;
var _local3 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(_local2.gridPos.x, _local2.gridPos.y);
if (_local3.type == "BlockGateSegment") {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().popBlockAt(_local2.gridPos.x, _local2.gridPos.y, false);
delete _local2.onDestroy;
_local2.destroy();
}
}
delete $segments;
}
function updateSlave(x, y) {
if (($slave == undefined) || (com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt($slave.gridPos.x, $slave.gridPos.y).type != "BlockGate")) {
delete $slave.onDestroy;
$slave.destroy();
var _local2 = new com.preloaded.scimus.launchpad.blocks.BlockGate(com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.getNewContainer());
_local2.isSlave = true;
_local2.master = this;
$slave = _local2;
$slave.onDestroy = mx.utils.Delegate.create(this, onBlockPopped);
$slave.saveMe = false;
$slave.__set__immobile(true);
}
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().addBlock($slave, x, y);
}
function popSlave() {
delete $slave.onDestroy;
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt($slave.gridPos.x, $slave.gridPos.y);
if (_local2.type == "BlockGate") {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().popBlockAt($slave.gridPos.x, $slave.gridPos.y, false);
}
}
function presenceify() {
__get__mc()._alpha = 100;
super.presenceify();
startSfx(true, true, 20, ($gateCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
function removePresence() {
if (isSlave) {
__get__mc()._alpha = 50;
}
stopSfx(true);
super.removePresence();
delete $host.onEnterFrame;
onEditUpdate();
}
function destroy() {
onEditUpdate = function () {
var _local1 = null;
};
popSlave();
$slave.destroy();
removeSegments();
super.destroy();
}
}
Symbol 1325 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.TransformControlBase] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.TransformControlBase extends com.preloaded.scimus.launchpad.Engine.UIElements.ControlBase
{
var $borderSize, $mc, $button, onButtonRelease, $showing;
function TransformControlBase (host) {
super(host);
}
function initMc(linkage) {
super.initMc(linkage);
$borderSize = $mc.borderMc._width;
$button = new com.preloaded.UI.MovieClipButton($mc.buttonMc, "over", "out");
$button.dispatchGlobalEvents = false;
$button.addEventListener("onRelease", mx.utils.Delegate.create(this, onButtonRelease));
}
function show(blockX, blockY) {
if (!$showing) {
super.show();
var _local3 = ($borderSize / 2) - (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
$mc._x = Math.round(blockX - _local3);
$mc._y = Math.round(blockY - _local3);
com.preloaded.animation.AnimUtils.popOpen($mc.borderMc, com.preloaded.scimus.launchpad.Config.GRID_SIZE, 5);
}
}
function onShowComplete() {
$mc.buttonMc._visible = true;
com.preloaded.animation.AnimUtils.popOpen($mc.buttonMc, 0, 10);
}
function hide() {
com.preloaded.animation.AnimUtils.stopAllTweens($mc.borderMc);
com.preloaded.animation.AnimUtils.stopAllTweens($mc.buttonMc);
super.hide();
}
function destroy() {
$mc.removeMovieClip();
delete $button;
super.destroy();
}
}
Symbol 1326 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl extends com.preloaded.scimus.launchpad.Engine.UIElements.TransformControlBase
{
var $button, $mc, accentColor, $threadId, dispatchEvent, $center, $showing, $borderSize;
function RotateFreeControl () {
super();
}
function initMc(linkage) {
super.initMc(linkage);
$button.addEventListener("onRelease", mx.utils.Delegate.create(this, onButtonRelease));
$button.addEventListener("onReleaseOutside", mx.utils.Delegate.create(this, onButtonReleaseOutside));
$button.addEventListener("onPress", mx.utils.Delegate.create(this, onButtonPress));
$mc.arrowMc.onPress = mx.utils.Delegate.create(this, onButtonPress);
$mc.arrowMc.onRelease = mx.utils.Delegate.create(this, onButtonRelease);
$mc.arrowMc.onReleaseOutside = mx.utils.Delegate.create(this, onReleaseOutside);
new Color($mc.arrowMc).setRGB(accentColor);
}
function onButtonPress() {
$threadId = com.preloaded.lang.Threads.ThreadManager.addThread(mx.utils.Delegate.create(this, update));
}
function onButtonReleaseOutside() {
onButtonRelease();
onHitterRollOut();
}
function onButtonRelease() {
com.preloaded.lang.Threads.ThreadManager.removeThread($threadId);
delete $threadId;
super.onButtonRelease();
}
function onReleaseOutside() {
onButtonRelease();
onHitterRollOut();
}
function destroy() {
com.preloaded.lang.Threads.ThreadManager.removeThread($threadId);
delete $threadId;
super.destroy();
}
function onHitterRollOut() {
var _local3 = $mc.hitterMc.hitTest(_root._xmouse, _root._ymouse, true);
var _local4 = $button.__get___isDown();
if ((!_local3) && (!_local4)) {
dispatchEvent({type:"onRollOut", target:this});
}
}
function update() {
var _local3 = Math.atan2($center.y - _root._ymouse, $center.x - _root._xmouse);
_local3 = com.preloaded.math.MathUtils.rads2degs(_local3);
if (!$button.__get___isDown()) {
_local3 = _local3 - 180;
}
$mc._rotation = _local3;
dispatchEvent({type:"onUpdate", rotation:_local3});
}
function show(blockX, blockY, r) {
$center = new flash.geom.Point(blockX + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2), blockY + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2));
if (!$showing) {
if ($mc == undefined) {
initMc("mc.ui.control.rotator.free");
}
super.show();
if (r != undefined) {
$mc._rotation = r;
}
$mc._x = $center.x;
$mc._y = $center.y;
$mc.borderMc._x = ($mc.borderMc._y = 0);
_popOpen($mc.borderMc, com.preloaded.scimus.launchpad.Config.GRID_SIZE, 5);
com.preloaded.animation.AnimUtils.popOpen($mc.arrowMc);
}
}
function _popOpen(mc, startSize, time, onComplete) {
com.preloaded.animation.AnimUtils.stopAllTweens(mc);
var _local3 = $borderSize;
mc.tweens.push(new mx.transitions.Tween(mc, "_width", com.robertpenner.easing.Back.easeOut, startSize, _local3, time, false));
mc.tweens.push(new mx.transitions.Tween(mc, "_height", com.robertpenner.easing.Back.easeOut, startSize, _local3, time, false));
}
}
Symbol 1327 MovieClip [__Packages.com.preloaded.math.MathUtils] Frame 0
class com.preloaded.math.MathUtils
{
function MathUtils () {
}
static function constrain(num, min, max) {
if (num > max) {
return(max);
}
if (num < min) {
return(min);
}
return(num);
}
static function rads2degs(rads) {
return((rads * 180) / Math.PI);
}
static function degs2rads(degs) {
return((degs * Math.PI) / 180);
}
static function constrainToCircle(ang, isDegrees) {
var _local2 = (isDegrees ? 360 : (Math.PI*2));
if (ang < 0) {
ang = _local2 + ang;
}
if (ang > _local2) {
ang = ang % _local2;
}
return(ang);
}
}
Symbol 1328 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockGateSegment] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockGateSegment extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $conductionMatrix, $segments, $gfx, loadBounceSounds, saveMe, __set__immobile, $boltsMc, $active, animOffset, dispatchEvent;
function BlockGateSegment (host, rotation) {
super(host, "BlockGateSegment", "mc.block.gate.segment", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 0;
$segments = new Array();
var _local3 = 1;
while (_local3 < 6) {
var _local4 = $gfx["seg_" + _local3];
_local4.gotoAndStop(Math.round(_local4._totalframes / 2));
$segments.push(_local4);
_local3++;
}
rotate(rotation);
loadBounceSounds(["e1.aif", "e2.aif", "e3.aif", "e4.aif"]);
saveMe = false;
__set__immobile(true);
$boltsMc._visible = false;
$active = true;
}
function rotate(r) {
super.rotate(r + 180);
}
function presenceify() {
active = (true);
}
function removePresence() {
active = (false);
$gfx._alpha = 20;
}
function set active(b) {
if (b) {
super.presenceify();
$gfx._alpha = 100;
for (var _local4 in $segments) {
var _local3 = $segments[_local4];
_local3.gotoAndPlay((Number(_local4) + (animOffset * $segments.length)) % _local3._totalframes);
}
} else {
super.removePresence();
$gfx._alpha = 0;
for (var _local4 in $segments) {
var _local3 = $segments[_local4];
_local3.gotoAndStop(Math.round(_local3._totalframes / 2));
}
}
$active = b;
dispatchEvent({type:"onActive", active:active});
//return(active);
}
function get active() {
return($active);
}
}
Symbol 1329 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockIron] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockIron extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockIron (host) {
super(host, "inv-iron.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockIron(host));
}
}
Symbol 1330 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockIron] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockIron extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $conductionMatrix, $chargeMatrix, colour, $connectionIndicator, loadBounceSounds, $dbCount, pathIndices, $gfx, $df, $neighbours, gridPos;
function BlockIron (host, arg_type, linkage, friction) {
super(host, ((arg_type == undefined) ? "BlockIron" : (arg_type)), ((linkage == undefined) ? "mc.block.iron" : (linkage)), ((friction == undefined) ? (com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION) : (friction)), com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 1;
$conductionMatrix[1] = 0.05;
$chargeMatrix[0] = 0;
$chargeMatrix[1] = 0;
colour = 16743936 /* 0xFF7E00 */;
$connectionIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator(this);
hideCharge(1);
loadBounceSounds(["m1.aif", "m2.aif", "m3.aif", "m4.aif"]);
}
function resetDBCount() {
$dbCount = 0;
}
function applyCharge(energyType, strength, originator) {
if (!(energyType === 1)) {
} else {
if (strength > 0) {
var _local3 = $chargeMatrix[energyType];
_local3 = _local3 + ((strength / pathIndices[energyType]) * $conductionMatrix[energyType]);
_local3 = ((_local3 > 1) ? 1 : (_local3));
strength = _local3;
$dbCount++;
}
$gfx.txtDebug.text = strength;
$gfx.txtDebug2.text = pathIndices[energyType];
}
super.applyCharge(energyType, strength);
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if ((energyType == 0) && (strength > 0)) {
$df = com.preloaded.lang.DelayedFunctionCall.create(mx.utils.Delegate.create(this, onLeccyDelay), pathIndices[energyType]);
}
}
function onLeccyDelay() {
$gfx.onEnterFrame = function () {
this.gotoAndPlay("on");
delete this.onEnterFrame;
};
}
function presenceify() {
super.presenceify();
}
function removePresence() {
super.removePresence();
$chargeMatrix[0] = 0;
$chargeMatrix[1] = 0;
$df.stop();
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType === 0) {
$gfx.gotoAndStop("idle");
}
}
function onEditRollOver() {
var _local3 = false;
$neighbours = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getNeighbours(gridPos.x, gridPos.y);
for (var _local4 in $neighbours) {
var _local2 = $neighbours[_local4];
if (_local2.__get__conductionMatrix()[0] == 1) {
_local3 = true;
}
}
if (!_local3) {
$connectionIndicator.showOutwardConnections();
}
}
function onEditRollOut() {
$connectionIndicator.hideOutwardConnections();
}
}
Symbol 1331 MovieClip [__Packages.com.preloaded.lang.DelayedFunctionCall] Frame 0
class com.preloaded.lang.DelayedFunctionCall
{
var $fn, $frames, threadId;
function DelayedFunctionCall (fn, frames) {
$fn = fn;
$frames = frames;
}
function tick() {
if ((--$frames) <= 0) {
stop();
$fn.call();
}
}
function stop() {
com.preloaded.lang.Threads.ThreadManager.removeThread(threadId);
}
function trigger() {
$fn.call();
stop();
}
static function create(fn, frames) {
var _local1 = new com.preloaded.lang.DelayedFunctionCall(fn, frames);
_local1.threadId = com.preloaded.lang.Threads.ThreadManager.addThread(mx.utils.Delegate.create(_local1, _local1.tick));
return(_local1);
}
function restart(frames) {
$frames = frames;
}
}
Symbol 1332 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLeft] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLeft extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockLeft (host) {
super(host, "inv-slope.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockLeft(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1333 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockPolygon] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockPolygon extends com.preloaded.scimus.launchpad.blocks.BlockBase
{
var lineDepth, $control, $host, $rotation, $gfx, $surfaces, $points, $baseRect, $friction, $bounce, _onTileContact, $outerSurfaces, $center, gridPos;
function BlockPolygon (host, bt, linkage, friction, bounce) {
super(host, bt, linkage, friction, bounce);
lineDepth = 20;
rotate(0);
}
function onEditRollOver() {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y, $rotation);
$control.__get__mc().arrowMc._visible = false;
$control.addEventListener("onUpdate", mx.utils.Delegate.create(this, onControlUpdate));
}
function onControlUpdate(evt) {
var _local2 = evt.rotation;
_local2 = Math.floor(_local2 / 90) * 90;
_local2 = com.preloaded.math.MathUtils.constrainToCircle(_local2, true);
rotate(_local2);
}
function rotate(r) {
super.rotate(r);
switch ($rotation) {
case 270 :
$gfx._x = $gfx._x + 1;
break;
case 0 :
$gfx._x = $gfx._x + 1;
case 90 :
$gfx._y = $gfx._y + 1;
}
}
function presenceify() {
if ($surfaces == undefined) {
$surfaces = new Array();
for (var _local3 in $points) {
$surfaces.push(drawLine($points[_local3]));
}
if ($baseRect != undefined) {
$surfaces.push(new org.cove.flade.surfaces.RectangleTile($baseRect.x, $baseRect.y, $baseRect.width, $baseRect.height, $friction, $bounce));
}
for (var _local3 in $surfaces) {
var _local2 = $surfaces[_local3];
org.cove.flade.DynamicsEngine.__get__instance().addSurface(_local2);
_local2.onContact = mx.utils.Delegate.create(this, _onTileContact);
}
$outerSurfaces = $surfaces.splice(0, 2);
}
var _local4 = com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2;
$center = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
$center.x = $center.x + _local4;
$center.y = $center.y + _local4;
}
function checkCollision(b) {
var _local3 = b.gridPos;
var _local2 = b.presence;
var _local4 = false;
switch ($rotation) {
case 0 :
_local4 = (_local3.x >= gridPos.x) && (_local3.y < (gridPos.y + 1));
break;
case 90 :
_local4 = (_local3.x >= gridPos.x) && (_local3.y >= gridPos.y);
break;
case 180 :
_local4 = (_local3.x < (gridPos.x + 1)) && (_local3.y >= gridPos.y);
break;
case 270 :
_local4 = (_local3.x < (gridPos.x + 1)) && (_local3.y < (gridPos.y + 1));
}
if (_local4) {
for (var _local5 in $surfaces) {
_local2.checkCollision($surfaces[_local5]);
}
} else {
for (var _local5 in $outerSurfaces) {
_local2.checkCollision($outerSurfaces[_local5]);
}
}
}
function drawLine(points) {
var _local2 = new org.cove.flade.surfaces.LineSurface(points[0].x, points[0].y, points[1].x, points[1].y, $friction, $bounce);
_local2.setCollisionDepth(lineDepth);
return(_local2);
}
function removePresence() {
for (var _local2 in $surfaces) {
$surfaces[_local2].destroy();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($surfaces[_local2]);
delete $surfaces[_local2];
}
delete $surfaces;
}
function onRollOut() {
}
function get gfx() {
return($gfx.shapeMc);
}
}
Symbol 1334 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockLeft] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockLeft extends com.preloaded.scimus.launchpad.blocks.BlockPolygon
{
var loadBounceSounds, isMaterial, $boltsMc, __get__immobile, gridPos, $points, $rotation;
function BlockLeft (host, friction, bounce, linkage, arg_type) {
super(host, ((arg_type == undefined) ? "BlockLeft" : (arg_type)), ((linkage == undefined) ? "mc.block.slope" : (linkage)), 0.01, bounce);
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
isMaterial = true;
}
function set immobile(b) {
super.__set__immobile(b);
if (b) {
$boltsMc.gotoAndStop("slope");
}
//return(__get__immobile());
}
function presenceify() {
var _local8 = com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local7 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
var _local6 = _local7.x;
var _local5 = _local7.x + _local8;
var _local3 = _local7.y;
var _local4 = _local7.y + _local8;
$points = new Array();
switch ($rotation) {
case 0 :
$points.push(new Array(new flash.geom.Point(_local6, _local3), new flash.geom.Point(_local5, _local4)));
$points.push(new Array(new flash.geom.Point(_local6, _local4), new flash.geom.Point(_local6, _local3)));
$points.push(new Array(new flash.geom.Point(_local6, _local4), new flash.geom.Point(_local5, _local4)));
break;
case 90 :
$points.push(new Array(new flash.geom.Point(_local5, _local3), new flash.geom.Point(_local6, _local4)));
$points.push(new Array(new flash.geom.Point(_local6, _local4), new flash.geom.Point(_local6, _local3)));
$points.push(new Array(new flash.geom.Point(_local6, _local3), new flash.geom.Point(_local5, _local3)));
break;
case 180 :
$points.push(new Array(new flash.geom.Point(_local5, _local4), new flash.geom.Point(_local6, _local3)));
$points.push(new Array(new flash.geom.Point(_local5, _local3), new flash.geom.Point(_local5, _local4)));
$points.push(new Array(new flash.geom.Point(_local6, _local3), new flash.geom.Point(_local5, _local3)));
break;
case 270 :
$points.push(new Array(new flash.geom.Point(_local6, _local4), new flash.geom.Point(_local5, _local3)));
$points.push(new Array(new flash.geom.Point(_local5, _local3), new flash.geom.Point(_local5, _local4)));
$points.push(new Array(new flash.geom.Point(_local6, _local4), new flash.geom.Point(_local5, _local4)));
}
super.presenceify();
}
}
Symbol 1335 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLeftCurve] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLeftCurve extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockLeftCurve (host) {
super(host, "inv-ramp.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockLeftCurve(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1336 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockLeftCurve] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockLeftCurve extends com.preloaded.scimus.launchpad.blocks.BlockPolygon
{
var $resolution, loadBounceSounds, rotate, isMaterial, $boltsMc, __get__immobile, gridPos, $points, $rotation;
function BlockLeftCurve (host, friction, bounce, resolution) {
super(host, "BlockLeftCurve", "mc.block.ramp", 0.01, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$resolution = ((resolution == undefined) ? 5 : (resolution));
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
rotate(0);
isMaterial = true;
}
function set immobile(b) {
super.__set__immobile(b);
if (b) {
$boltsMc.gotoAndStop("slope");
}
//return(__get__immobile());
}
function presenceify() {
var _local4 = (Math.PI/2) / $resolution;
var _local13 = com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local12 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
var _local10 = _local12.x;
var _local9 = _local12.x + _local13;
var _local7 = _local12.y;
var _local8 = _local12.y + _local13;
var _local3 = _local8 - _local7;
$points = new Array();
switch ($rotation) {
case 0 :
var _local11 = new flash.geom.Point(_local10, _local7);
var _local6 = _local4;
while (_local6 < (Math.PI/2)) {
var _local5 = new flash.geom.Point(_local9, _local7);
_local5.x = _local5.x - (Math.cos(_local6) * _local3);
_local5.y = _local5.y + (Math.sin(_local6) * _local3);
$points.push(new Array(_local11, _local5));
_local11 = _local5;
_local6 = _local6 + _local4;
}
$points.push(new Array(_local11, new flash.geom.Point(_local9, _local8)));
$points.push(new Array(new flash.geom.Point(_local10, _local8), new flash.geom.Point(_local10, _local7)));
$points.push(new Array(new flash.geom.Point(_local9, _local8), new flash.geom.Point(_local10, _local8)));
break;
case 90 :
_local11 = new flash.geom.Point(_local9, _local7);
_local6 = 4.71238898038469 + _local4;
while (_local6 < (Math.PI*2)) {
var _local5 = new flash.geom.Point(_local9, _local8);
_local5.x = _local5.x - (Math.cos(_local6) * _local3);
_local5.y = _local5.y + (Math.sin(_local6) * _local3);
$points.push(new Array(_local11, _local5));
_local11 = _local5;
_local6 = _local6 + _local4;
}
$points.push(new Array(_local11, new flash.geom.Point(_local10, _local8)));
$points.push(new Array(new flash.geom.Point(_local10, _local8), new flash.geom.Point(_local10, _local7)));
$points.push(new Array(new flash.geom.Point(_local10, _local7), new flash.geom.Point(_local9, _local7)));
break;
case 180 :
_local11 = new flash.geom.Point(_local9, _local8);
_local6 = Math.PI + _local4;
while (_local6 < 4.71238898038469) {
var _local5 = new flash.geom.Point(_local10, _local8);
_local5.x = _local5.x - (Math.cos(_local6) * _local3);
_local5.y = _local5.y + (Math.sin(_local6) * _local3);
$points.push(new Array(_local11, _local5));
_local11 = _local5;
_local6 = _local6 + _local4;
}
$points.push(new Array(_local11, new flash.geom.Point(_local10, _local7)));
$points.push(new Array(new flash.geom.Point(_local9, _local7), new flash.geom.Point(_local9, _local8)));
$points.push(new Array(new flash.geom.Point(_local10, _local7), new flash.geom.Point(_local9, _local7)));
break;
case 270 :
_local11 = new flash.geom.Point(_local10, _local8);
_local6 = (Math.PI/2) - _local4;
while (_local6 > 0) {
var _local5 = new flash.geom.Point(_local10, _local7);
_local5.x = _local5.x + (Math.cos(_local6) * _local3);
_local5.y = _local5.y + (Math.sin(_local6) * _local3);
$points.push(new Array(_local11, _local5));
_local11 = _local5;
_local6 = _local6 - _local4;
}
$points.push(new Array(_local11, new flash.geom.Point(_local9, _local7)));
$points.push(new Array(new flash.geom.Point(_local9, _local7), new flash.geom.Point(_local9, _local8)));
$points.push(new Array(new flash.geom.Point(_local9, _local8), new flash.geom.Point(_local10, _local8)));
}
super.presenceify();
}
}
Symbol 1337 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockMagnet] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockMagnet extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockMagnet (host) {
super(host, "inv-magnet.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockMagnet(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1338 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockMagnet] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockMagnet extends com.preloaded.scimus.launchpad.blocks.BlockMagnetBase
{
var loadBounceSounds, $magnet, $tile, $magnetStrength, $effectiveDistance, showForce, showIndicator, hideIndicator;
function BlockMagnet (host, friction, bounce) {
super(host, "BlockMagnet", "mc.block.magnet", 1, 0);
loadBounceSounds(["m1.aif", "m2.aif", "m3.aif", "m4.aif"]);
}
function presenceify() {
super.presenceify();
onEditRollOut();
if ($magnet == undefined) {
$magnet = new com.preloaded.scimus.launchpad.FladeExtensions.PointForceEased($tile.center.x, $tile.center.y, $magnetStrength, com.robertpenner.easing.Quart.easeOut, $effectiveDistance);
org.cove.flade.DynamicsEngine.__get__instance().addPointForce($magnet);
}
showForce();
}
function onEditRollOver() {
showIndicator();
}
function onEditRollOut() {
hideIndicator();
}
function removePresence() {
$magnet.destroy();
org.cove.flade.DynamicsEngine.__get__instance().removePointForce($magnet);
delete $magnet;
super.removePresence();
}
}
Symbol 1339 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSpring] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSpring extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockSpring (host) {
super(host, "inv-spring.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockSpring(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, 0.99));
}
}
Symbol 1340 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockSpring] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockSpring extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $springVector, loadBounceSounds, $host, $gfx, $tile;
function BlockSpring (host) {
super(host, "BlockSpring", "mc.block.spring", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$springVector = new org.cove.flade.util.Vector(0, -7);
loadBounceSounds(["sp1.aif", "sp2.aif", "sp3.aif", "sp4.aif"]);
}
function postTileContact(p) {
if (p.curr.y < $host._y) {
if ($gfx.hitTest(p.curr.x, $tile.center.y)) {
p.curr.plus($springVector);
$gfx.gotoAndPlay("bounce");
}
}
}
function presenceify() {
super.presenceify();
$tile.postContact = mx.utils.Delegate.create(this, postTileContact);
}
}
Symbol 1341 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSquare] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSquare extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockSquare (host) {
super(host, "inv-block.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockSquare(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1342 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockSquare] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockSquare extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var loadBounceSounds, isMaterial;
function BlockSquare (host) {
super(host, "BlockSquare", "mc.block.square", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
isMaterial = true;
}
}
Symbol 1343 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockStart] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockStart extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockStart (host) {
super(host, "start.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockStart(host));
}
}
Symbol 1344 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockStart] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockStart extends com.preloaded.scimus.launchpad.blocks.BlockBase
{
var $gfx, $immobile, __get__immobile;
function BlockStart (host) {
super(host, "BlockStart", "mc.block.start");
$gfx.host = this;
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.blockStart = this;
}
function set immobile(b) {
$immobile = b;
//return(__get__immobile());
}
function spawn() {
$gfx.gotoAndPlay("enter");
}
function reset() {
$gfx.gotoAndStop("idle");
}
function onCallback() {
com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.blockStartCallback();
}
}
Symbol 1345 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSwitch] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSwitch extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockSwitch (host) {
super(host, "inv-switch.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockSwitch(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1346 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockSwitch] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockSwitch extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $switchCount;
var colour, $connectionIndicator, loadBounceSounds, $sfx, $editState, $conductionMatrix, $gfx, $chargedNeighbours, $targetNeighbours, showCharge, getAllNeighbours, transmitCharge, hideCharge, $chargeIndicator, $toggle, startSfx, $neighbours, gridPos;
function BlockSwitch (host) {
super(host, "BlockSwitch", "mc.block.switch", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
if ($switchCount == undefined) {
$switchCount = 0;
} else {
$switchCount++;
}
colour = 16777215 /* 0xFFFFFF */;
$connectionIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator(this);
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
$sfx = com.preloaded.sound.SoundManager.addSound("switch.aif", "switch_" + $switchCount);
$editState = false;
$conductionMatrix[0] = 0;
}
function toggle(b, isEdit) {
if (b) {
$gfx.gotoAndStop("on");
if (!isEdit) {
$conductionMatrix[0] = 1;
$chargedNeighbours = new Array();
$targetNeighbours = new Array();
showCharge(0, 1);
var _local5 = getAllNeighbours();
for (var _local4 in _local5) {
var _local3 = _local5[_local4];
var _local2 = _local3.__get__conductionMatrix();
if (_local2[0] > 0) {
if (_local3.getCharge(0) > 0) {
$chargedNeighbours.push(_local3);
} else {
$targetNeighbours.push(_local3);
}
}
}
if ($chargedNeighbours.length > 0) {
transmitCharge(0, 1, this, false);
}
}
} else {
$gfx.gotoAndStop(1);
$conductionMatrix[0] = 0;
applyCharge(0, 0);
hideCharge(0);
if (!isEdit) {
for (var _local4 in $targetNeighbours) {
var _local3 = $targetNeighbours[_local4];
transmitCharge(0, 0, _local3, false);
}
$chargeIndicator.removeMovieClip();
}
}
$toggle = b;
}
function applyCharge(energyType, strength) {
super.applyCharge(energyType, strength);
if ((energyType == 0) && ($conductionMatrix[0] > 0)) {
transmitCharge(energyType, strength, this, false);
}
}
function presenceify() {
super.presenceify();
$conductionMatrix[0] = 0;
}
function postInit() {
toggle($editState);
}
function removePresence() {
toggle($editState, true);
transmitCharge(0, 0);
super.removePresence();
}
function onTileContact() {
super.onTileContact();
toggle(!$toggle);
startSfx(false, false, 70);
}
function onEditClick() {
$editState = !$editState;
toggle($editState, true);
startSfx(false, false, 70);
}
function onEditRollOver() {
var _local3 = false;
$neighbours = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getAllNeighbours(gridPos.x, gridPos.y);
for (var _local4 in $neighbours) {
var _local2 = $neighbours[_local4];
if (_local2.__get__conductionMatrix()[0] == 1) {
_local3 = true;
}
}
if (!_local3) {
$connectionIndicator.showOutwardConnections();
}
}
function onEditRollOut() {
$connectionIndicator.hideOutwardConnections();
}
function set state(s) {
if (s == "on") {
$editState = true;
toggle($editState, true);
}
if (s == "off") {
$editState = false;
toggle($editState, true);
}
//return(state);
}
function get state() {
if ($editState) {
return("on");
}
return("off");
}
}
Symbol 1347 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockRubber] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockRubber extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockRubber (host) {
super(host, "inv-rubber.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockRubber(host));
}
}
Symbol 1348 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockRubber] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockRubber extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var loadBounceSounds, $gfx;
function BlockRubber (host) {
super(host, "BlockRubber", "mc.block.rubber", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, 0.999);
loadBounceSounds(["sp1.aif", "sp2.aif", "sp3.aif", "sp4.aif"]);
}
function onTileContact() {
super.onTileContact();
$gfx.gotoAndPlay("bounce");
}
}
Symbol 1349 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFoam] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFoam extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockFoam (host) {
super(host, "inv-foam.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockFoam(host));
}
}
Symbol 1350 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockFoam] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockFoam extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var loadBounceSounds, $gfx;
function BlockFoam (host) {
super(host, "BlockFoam", "mc.block.foam", 0.5, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE / 2);
loadBounceSounds(["d1.aif", "d2.aif", "d3.aif", "d4.aif"]);
}
function onTileContact() {
super.onTileContact();
$gfx.gotoAndPlay("bounce");
}
}
Symbol 1351 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTreacle] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTreacle extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockTreacle (host) {
super(host, "inv-treacle.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockTreacle(host));
}
}
Symbol 1352 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockTreacle] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockTreacle extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var loadBounceSounds;
function BlockTreacle (host, friction, bounce) {
super(host, "BlockTreacle", "mc.block.treacle", 0.3, 0);
loadBounceSounds(["st1.aif", "st2.aif", "st3.aif", "st4.aif"]);
}
}
Symbol 1353 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBomb] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBomb extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockBomb (host) {
super(host, "inv-bomb.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockBomb(host));
}
}
Symbol 1354 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockBomb] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockBomb extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $gfx, $sfx, startSfx;
function BlockBomb (host) {
super(host, "BlockBomb", "mc.block.bomb");
$gfx.host = this;
$sfx = com.preloaded.sound.SoundManager.addSound("bomb explode.aif", "bomb_explode");
}
function reset() {
$gfx._visible = true;
$gfx.gotoAndStop("idle");
}
function onTileContact() {
startSfx(false, false, 80);
$gfx._visible = false;
}
function removePresence() {
reset();
super.removePresence();
}
}
Symbol 1355 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTorch] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTorch extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockTorch (host) {
super(host, "inv-torch.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockTorch(host));
}
}
Symbol 1356 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockTorch] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockTorch extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $torchCount;
var colour, loadBounceSounds, $sfx, $control, $host, $rotation, $gfx, $beam, startSfx, stopSfx;
function BlockTorch (host) {
super(host, "BlockTorch", "mc.block.torch", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
rotate(0);
colour = 16776960 /* 0xFFFF00 */;
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
$sfx = com.preloaded.sound.SoundManager.addSound("light beam loop.aif", "lightbeam_" + $torchCount);
}
function onEditRollOver() {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl();
$control.parent = this;
$control.accentColor = colour;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y, $rotation);
$control.addEventListener("onUpdate", mx.utils.Delegate.create(this, onControlUpdate));
}
function onControlUpdate(evt) {
rotate(evt.rotation);
}
function rotate(r) {
$rotation = ($gfx.torchMc._rotation = r);
}
function init() {
$beam.destroy();
$beam = new com.preloaded.scimus.launchpad.Engine.Phenomena.LightBeam();
$beam.originator = this;
if ($torchCount == undefined) {
$torchCount = 0;
} else {
$torchCount++;
}
$beam.project(this);
startSfx();
}
function terminate() {
$beam.destroy();
stopSfx(false);
}
}
Symbol 1357 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.Phenomena.LightBeam] Frame 0
class com.preloaded.scimus.launchpad.Engine.Phenomena.LightBeam
{
static var $numBeams;
var $id, $points, $host, $mc, $path, $bitmap, $dbMc, $sfx, lastPoint, $length, originator, $currentListener, $currentBroadcaster, $currentEvent, $listenedSegments, $segmentListener;
function LightBeam () {
}
function init() {
if ($numBeams == undefined) {
$numBeams = 0;
}
$id = $numBeams++;
clear();
$points = new Array();
$host.removeMovieClip();
var _local2 = Number(getTimer().toString().substr(-2));
$host = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.bgEffectsLayer.getNewContainer($id + random(100 + _local2));
$mc = $host.createEmptyMovieClip("beam", $host.getNextHighestDepth());
$mc.blendMode = "add";
}
function clear() {
for (var _local2 in $path) {
$path[_local2].applyCharge(2, 0);
}
$bitmap.dispose();
$mc.removeMovieClip();
$dbMc.removeMovieClip();
removeCurrentListner();
unListenSegments();
$sfx.stop();
}
function destroy() {
clear();
$host.removeMovieClip();
}
function project(torch) {
init();
$sfx.start(0, 9999);
var _local22 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(torch.gridPos);
var _local7 = _local22.x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
var _local6 = _local22.y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
var _local31 = com.preloaded.math.MathUtils.degs2rads(torch.__get__rotation());
$path = new Array();
lastPoint = new flash.geom.Point(_local7, _local6);
$length = 0;
$mc.lineStyle(6, 16777115, 65, false, "normal", "square", "bevel");
$mc.moveTo(_local7, _local6);
var _local18 = com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2;
_local18 = _local18 * _local18;
_local18 = Math.sqrt(_local18 + _local18);
_local18 = 2;
var _local9 = new flash.geom.Point(Math.cos(_local31) * _local18, Math.sin(_local31) * _local18);
do {
if (!((((_local7 > 0) && (_local7 < com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH)) && (_local6 > 0)) && (_local6 < com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT))) {
break;
}
var _local3 = true;
_local7 = _local7 + _local9.x;
_local6 = _local6 + _local9.y;
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(Math.floor(_local7 / com.preloaded.scimus.launchpad.Config.GRID_SIZE), Math.floor(_local6 / com.preloaded.scimus.launchpad.Config.GRID_SIZE));
if (_local2 != undefined) {
var _local20 = false;
var _local30 = 0;
while (_local30 < ($path.length - 1)) {
if (_local2 == $path[_local30]) {
_local20 = true;
}
_local30++;
}
switch (_local2.type) {
case "BlockMirror" :
var _local16 = _local2.getPts();
var _local17 = false;
var _local29 = (Math.PI*2);
_local3 = false;
for (_local30 in _local16) {
var _local4 = _local16[_local30];
var _local14 = LineToLineIntersect(_local4.p1.x, _local4.p1.y, _local4.p2.x, _local4.p2.y, lastPoint.x, lastPoint.y, _local7, _local6);
if (_local14.b && (!_local17)) {
_local17 = true;
$path.push(_local2);
var _local5 = Math.atan2(_local4.p2.y - _local4.p1.y, _local4.p2.x - _local4.p1.x);
var _local10 = Math.atan2(_local14.y - lastPoint.y, _local14.x - lastPoint.x);
if (_local10 == 0) {
if (_local5 == Math.PI) {
_local10 = _local10 - (Math.PI/2);
}
if (_local5 == (Math.PI/2)) {
if ((_local2.__get__rotation() == 270) || (_local2.__get__rotation() == 180)) {
_local10 = _local10 + Math.PI;
}
}
}
var _local8 = new org.cove.flade.util.Vector(Math.cos(_local10), Math.sin(_local10));
_local8.normalize();
_local8.rotate(_local5);
_local8.y = _local8.y * -1;
_local8.rotate(-_local5);
if ((_local5 % (Math.PI/2)) != 0) {
_local8.rotate(Math.PI);
}
$mc.lineTo(_local14.x, _local14.y);
if (_local2.beamIntersections[$id] == undefined) {
_local2.beamIntersections[$id] = new Array();
}
if (_local2.beamIntersections[$id][_local30] != undefined) {
for (var _local28 in _local2.beamIntersections[$id][_local30]) {
if (_local2.beamIntersections[$id][_local30][_local28] == _local5) {
_local3 = true;
}
}
} else {
_local2.beamIntersections[$id][_local30] = new Array();
}
if (!_local3) {
_local2.beamIntersections[$id][_local30].push(_local5);
_local9 = new flash.geom.Point(_local8.x * _local18, _local8.y * _local18);
_local7 = _local14.x + _local9.x;
_local6 = _local14.y + _local9.y;
} else {
_local7 = _local14.x;
_local6 = _local14.y;
}
}
}
break;
case "BlockLens" :
var _local27 = _local2;
_local3 = true;
var _local25 = _local2.getPts(4);
var _local15 = _local25[0];
var _local14 = LineToLineIntersect(_local15.p1.x, _local15.p1.y, _local15.p2.x, _local15.p2.y, lastPoint.x, lastPoint.y, _local7 + (_local9.x * 3), _local6 + (_local9.y * 3));
if (_local14.b) {
var _local10 = Math.atan2(_local14.y - lastPoint.y, _local14.x - lastPoint.x);
var _local26 = com.preloaded.math.MathUtils.degs2rads(_local2.__get__rotation());
_local10 = _local10 - _local26;
var _local24 = _local10;
_local10 = Math.abs(_local10);
var _local19 = (Math.PI/2);
if (_local10 > _local19) {
_local10 = _local19 - (_local10 - _local19);
}
var _local23 = com.preloaded.math.MathUtils.degs2rads(15);
_local7 = _local14.x;
_local6 = _local14.y;
if ((_local10 >= (-_local23)) && (_local10 <= _local23)) {
_local27.applyCharge(2, 1, _local24);
} else {
_local7 = _local7 + _local9.x;
_local6 = _local6 + _local9.y;
_local3 = false;
}
$path.push(_local2);
} else {
_local3 = false;
}
break;
case "BlockTorch" :
if ((_local2 == originator) && ($length < com.preloaded.scimus.launchpad.Config.GRID_SIZE)) {
_local3 = false;
}
break;
case "BlockGateSegment" :
var _local21 = _local2;
listenToSegment(_local21);
if (!_local21.active) {
_local3 = false;
}
break;
case "BlockIce" :
_local21 = _local2;
var _local12 = _local7;
var _local11 = _local6;
var _local13 = 0;
while (_local13 < 3) {
_local22 = new flash.geom.Point(_local12, _local11);
$mc.localToGlobal(_local22);
if (!_local21.maskMc.hitTest(_local12, _local11)) {
_local3 = false;
} else {
break;
}
_local12 = _local12 + _local9.x;
_local11 = _local11 + _local9.x;
_local13++;
}
if (_local3 == true) {
if ($currentListener == undefined) {
$currentListener = mx.utils.Delegate.create(this, reProject);
$currentBroadcaster = _local2;
$currentEvent = "onMassChange";
_local2.addEventListener($currentEvent, $currentListener);
}
} else {
removeCurrentListner();
}
break;
case "BlockStart" :
case "BlockFinish" :
_local3 = false;
break;
case "BlockSolar" :
$path.push(_local2);
_local3 = true;
default :
_local22 = new flash.geom.Point(_local7, _local6);
$host.localToGlobal(_local7, _local6);
if (!_local2.__get__gfx().hitTest(_local22.x, _local22.y, true)) {
_local3 = false;
} else {
if (_local20) {
break;
}
_local2.applyCharge(2, 1);
}
}
} else {
_local3 = false;
}
lastPoint.x = _local7;
lastPoint.y = _local6;
$mc.lineTo(_local7, _local6);
$length = $length + _local18;
} while (!_local3);
}
function onSegmentChange(evt) {
reProject();
}
function listenToSegment(b) {
var _local2 = false;
for (var _local4 in $listenedSegments) {
if ($listenedSegments[_local4] == b) {
_local2 = true;
}
}
if (!_local2) {
if ($listenedSegments == undefined) {
$listenedSegments = new Array();
}
if ($segmentListener == undefined) {
$segmentListener = mx.utils.Delegate.create(this, onSegmentChange);
}
b.addEventListener("onActive", $segmentListener);
$listenedSegments.push(b);
}
}
function unListenSegments() {
for (var _local2 in $listenedSegments) {
$listenedSegments[_local2].removeEventListener("onActive", $segmentListener);
}
delete $listenedSegments;
}
function removeCurrentListner() {
$currentBroadcaster.removeEventListener($currentEvent, $currentListener);
delete $currentListener;
delete $currentBroadcaster;
delete $currentEvent;
}
function LineToLineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) {
var _local5;
var _local4;
var _local7;
var _local12;
var _local11;
var _local1 = {b:false, x:0, y:0};
_local5 = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));
if (_local5 != 0) {
_local4 = (((x4 - x3) * (y1 - y3)) - ((y4 - y3) * (x1 - x3))) / _local5;
_local7 = (((x2 - x1) * (y1 - y3)) - ((y2 - y1) * (x1 - x3))) / _local5;
if ((((_local4 >= 0) && (_local4 <= 1)) && (_local7 >= 0)) && (_local7 <= 1)) {
_local12 = x1 + (_local4 * (x2 - x1));
_local11 = y1 + (_local4 * (y2 - y1));
_local1.b = true;
_local1.x = _local12;
_local1.y = _local11;
return(_local1);
}
}
return(_local1);
}
function reProject() {
project(originator);
}
static function resetCount() {
}
}
Symbol 1358 MovieClip [__Packages.org.cove.flade.util.Line] Frame 0
class org.cove.flade.util.Line
{
var p1, p2;
function Line (p1, p2) {
this.p1 = p1;
this.p2 = p2;
}
function get slope() {
return(Math.atan2(p2.y - p1.y, p2.x - p1.x));
}
}
Symbol 1359 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockMirror] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockMirror extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockMirror (host) {
super(host, "inv-mirror.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockMirror(host));
}
}
Symbol 1360 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockMirror] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockMirror extends com.preloaded.scimus.launchpad.blocks.BlockLeft
{
var loadBounceSounds, isMaterial, gridPos, $rotation, beamIntersections;
function BlockMirror (host) {
super(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE, "mc.block.mirror", "BlockMirror");
loadBounceSounds(["g1.aif", "g2.aif", "g3.aif", "g4.aif"]);
isMaterial = false;
}
function getPts() {
var _local2 = new Array();
var _local8 = com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local7 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
var _local6 = _local7.x;
var _local5 = _local7.x + _local8;
var _local3 = _local7.y;
var _local4 = _local7.y + _local8;
switch ($rotation) {
case 0 :
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local4), new org.cove.flade.util.Vector(_local6, _local3)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local4), new org.cove.flade.util.Vector(_local6, _local4)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local6, _local3), new org.cove.flade.util.Vector(_local6, _local4)));
break;
case 90 :
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local6, _local3), new org.cove.flade.util.Vector(_local5, _local3)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local3), new org.cove.flade.util.Vector(_local6, _local4)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local6, _local3), new org.cove.flade.util.Vector(_local6, _local4)));
break;
case 180 :
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local6, _local3), new org.cove.flade.util.Vector(_local5, _local3)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local3), new org.cove.flade.util.Vector(_local5, _local4)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local4), new org.cove.flade.util.Vector(_local6, _local3)));
break;
case 270 :
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local6, _local4), new org.cove.flade.util.Vector(_local5, _local3)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local3), new org.cove.flade.util.Vector(_local5, _local4)));
_local2.push(new org.cove.flade.util.Line(new org.cove.flade.util.Vector(_local5, _local4), new org.cove.flade.util.Vector(_local6, _local4)));
}
return(_local2);
}
function presenceify() {
super.presenceify();
beamIntersections = new Array();
}
}
Symbol 1361 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTurbine] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTurbine extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockTurbine (host) {
super(host, "inv-turbine.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockTurbine(host));
}
}
Symbol 1362 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockTurbine] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockTurbine extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $turbineCount;
var $conductionMatrix, $chargeMatrix, loadBounceSounds, $sfx, transmitCharge, $gfx, $host, _rotSpeed, $roTween, startSfx, stopSfx;
function BlockTurbine (host, friction, bounce) {
super(host, "BlockTurbine", "mc.block.turbine", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
if ($turbineCount == undefined) {
$turbineCount = 0;
} else {
$turbineCount++;
}
$conductionMatrix[0] = 1;
$conductionMatrix[3] = 1;
$chargeMatrix[0] = 0;
$chargeMatrix[3] = 0;
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
$sfx = com.preloaded.sound.SoundManager.addSound("wind turbine loop.aif", "turbineLoop_" + $turbineCount);
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if (energyType == 3) {
startTheFansPlease();
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType == 3) {
stopFan();
transmitCharge(0, 0);
$gfx.gotoAndStop("idle");
}
}
function startTheFansPlease() {
$host.onEnterFrame = mx.utils.Delegate.create(this, tick);
_rotSpeed = 0;
$roTween.stop();
$roTween = new mx.transitions.Tween(this, "_rotSpeed", com.robertpenner.easing.Quad.easeIn, 1, 20, 10, false);
$roTween.onMotionFinished = mx.utils.Delegate.create(this, tweenCallback);
startSfx(true, true, 30, ($turbineCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
function tweenCallback() {
transmitCharge(0, 1);
$gfx.gotoAndPlay("on");
}
function stopFan() {
$roTween.stop();
$roTween = new mx.transitions.Tween($gfx.rotorMc, "_rotation", com.robertpenner.easing.Expo.easeOut, $gfx.rotorMc._rotation, 0, 80, false);
delete $host.onEnterFrame;
_rotSpeed = 0;
stopSfx();
}
function tick() {
$gfx.rotorMc._rotation = ($gfx.rotorMc._rotation + _rotSpeed) % 360;
}
function removePresence() {
super.removePresence();
$gfx.gotoAndStop("idle");
stopFan();
}
}
Symbol 1363 MovieClip [__Packages.com.robertpenner.easing.Expo] Frame 0
class com.robertpenner.easing.Expo
{
function Expo () {
}
static function easeIn(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOut(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOut(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);
}
}
Symbol 1364 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFan] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFan extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockFan (host) {
super(host, "inv-fan.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockFan(host));
}
}
Symbol 1365 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockFan] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockFan extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $fanCount;
var $conductionMatrix, $chargeMatrix, colour, $effectiveAngle, $effectiveDistance, loadBounceSounds, $sfx, $gfx, $rotation, $control, $host, $connectionIndicator, $powerIndicator, showConnections, hideConnections, _rotSpeed, _tiles2DArray, $tile, $direction, $roTween, startSfx, $effectiveTiles, stopSfx, $dbmc, gridPos, __get__center, $visualiserMc;
function BlockFan (host) {
super(host, "BlockFan", "mc.block.fan", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
rotate(0);
if ($fanCount == undefined) {
$fanCount = 0;
} else {
$fanCount++;
}
$conductionMatrix[0] = 1;
$chargeMatrix[0] = 0;
colour = 65400;
$effectiveAngle = 20;
$effectiveDistance = 10;
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
$sfx = com.preloaded.sound.SoundManager.addSound("fan loop.aif", "fanLoop_" + $fanCount);
$gfx.directionIndicatorMc._alpha = 0;
$gfx.directionIndicatorMc.blendMode = "layer";
}
function showImmobileIndicator() {
$gfx.directionIndicatorMc._rotation = $rotation;
$gfx.directionIndicatorMc.tween.stop();
$gfx.directionIndicatorMc.tween = new com.preloaded.animation.ExtendedTween($gfx.directionIndicatorMc, "_alpha", com.robertpenner.easing.Linear.easeNone, $gfx.directionIndicatorMc._alpha, 100);
$gfx.directionIndicatorMc.tween.precalculatedFunction = com.preloaded.scimus.launchpad.Config.PRECALC_QUADOUT_10;
}
function hideImmobileIndicator() {
$gfx.directionIndicatorMc.tween.stop();
$gfx.directionIndicatorMc.tween = new com.preloaded.animation.ExtendedTween($gfx.directionIndicatorMc, "_alpha", com.robertpenner.easing.Linear.easeNone, $gfx.directionIndicatorMc._alpha, 0);
$gfx.directionIndicatorMc.tween.precalculatedFunction = com.preloaded.scimus.launchpad.Config.PRECALC_QUADOUT_8;
}
function onEditRollOver() {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl();
$control.parent = this;
$control.accentColor = colour;
$control.addEventListener("onUpdate", mx.utils.Delegate.create(this, onControlUpdate));
$control.addEventListener("onRollOut", mx.utils.Delegate.create(this, onControlRollOut));
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y, $rotation);
$connectionIndicator.destroy();
$powerIndicator.destroy();
$connectionIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator(this);
$powerIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.PowerIndicator(this);
showConnections();
}
function onControlRollOut() {
hideConnections();
$control.destroy();
delete $control;
}
function onEditRollOut() {
}
function onControlUpdate(evt) {
rotate(evt.rotation);
}
function rotate(r) {
$rotation = r;
}
function tick() {
$gfx.fanMc._rotation = ($gfx.fanMc._rotation + _rotSpeed) % 360;
for (var _local5 in org.cove.flade.DynamicsEngine.__get__instance().primitives) {
var _local2 = org.cove.flade.DynamicsEngine.__get__instance().primitives[_local5];
var _local4 = Math.floor(_local2.curr.x / com.preloaded.scimus.launchpad.Config.GRID_SIZE);
var _local3 = Math.floor(_local2.curr.y / com.preloaded.scimus.launchpad.Config.GRID_SIZE);
if (_tiles2DArray[_local4][_local3]) {
effectParticle(_local2);
}
}
}
function effectParticle(p) {
var _local3 = $tile.center.x - p.curr.x;
var _local4 = $tile.center.y - p.curr.y;
var _local7 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
var _local6 = $effectiveDistance * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local2 = com.robertpenner.easing.Quad.easeOut(_local7, $windStrength, -$windStrength, _local6);
_local2 = ((_local2 < 0) ? 0 : (_local2));
p.curr.x = p.curr.x + ($direction.x * _local2);
p.curr.y = p.curr.y + ($direction.y * _local2);
}
function startTheFansPlease() {
delete $host.onEnterFrame;
_rotSpeed = 0;
$direction = calcInfluence();
$host.onEnterFrame = mx.utils.Delegate.create(this, tick);
$roTween.stop();
$roTween = new mx.transitions.Tween(this, "_rotSpeed", com.robertpenner.easing.Quad.easeIn, 1, 20, 20, false);
tweenCallback();
visualise();
startSfx(true, true, 80, ($fanCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
function tweenCallback() {
blow();
}
function blow() {
for (var _local3 in $effectiveTiles) {
var _local2 = $effectiveTiles[_local3];
_local2.applyCharge(3, 1);
}
}
function stopFan() {
delete $host.onEnterFrame;
$roTween.stop();
$roTween = new mx.transitions.Tween(this, "_rotSpeed", com.robertpenner.easing.Expo.easeOut, _rotSpeed, 0, 20, false);
var ref = $gfx.fanMc;
$roTween.onMotionChanged = function () {
ref._rotation = ref._rotation + this.obj[this.prop];
};
for (var _local3 in $effectiveTiles) {
var _local2 = $effectiveTiles[_local3];
_local2.applyCharge(3, 0);
}
unVisualise();
stopSfx();
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if ((energyType === 0) && (strength > 0)) {
startTheFansPlease();
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType === 0) {
stopFan();
}
}
function presenceify() {
super.presenceify();
_rotSpeed = 0;
}
function removePresence() {
$dbmc.removeMovieClip();
delete $host.onEnterFrame;
super.removePresence();
}
function calcInfluence() {
var _local19 = gridPos;
var _local9 = com.preloaded.math.MathUtils.degs2rads($rotation);
var _local16 = com.preloaded.math.MathUtils.degs2rads($effectiveAngle);
var _local20 = com.preloaded.math.MathUtils.degs2rads(3);
_tiles2DArray = new Array();
$effectiveTiles = new Array();
var _local17 = 0;
var _local18 = __get__center().clone();
var _local8 = _local16 * 0.5;
var _local13 = new org.cove.flade.util.Vector(Math.cos(_local9 - _local8), Math.sin(_local9 - _local8));
var _local12 = new org.cove.flade.util.Vector(Math.cos(_local9 + _local8), Math.sin(_local9 + _local8));
_local8 = _local8 * 0.5;
var _local11 = new org.cove.flade.util.Vector(Math.cos(_local9 - _local8), Math.sin(_local9 - _local8));
var _local10 = new org.cove.flade.util.Vector(Math.cos(_local9 + _local8), Math.sin(_local9 + _local8));
_local13.mult($effectiveDistance);
_local12.mult($effectiveDistance);
_local11.mult($effectiveDistance - 1);
_local10.mult($effectiveDistance - 1);
_local13.round();
_local12.round();
_local11.round();
_local10.round();
var _local7 = com.preloaded.gfx.Primitives.Bresenham.line(_local13.x, _local13.y, _local12.x, _local12.y);
_local7 = _local7.concat(com.preloaded.gfx.Primitives.Bresenham.line(_local11.x, _local11.y, _local10.x, _local10.y));
$effectiveTiles = new Array();
_tiles2DArray = new Array();
for (var _local14 in _local7) {
var _local6 = _local7[_local14];
var _local5 = com.preloaded.gfx.Primitives.Bresenham.line(gridPos.x, gridPos.y, gridPos.x + _local6.x, gridPos.y + _local6.y);
var _local14 = 1;
while (_local14 < _local5.length) {
var _local2 = _local5[_local14];
var _local4 = false;
var _local3 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(_local2.x, _local2.y);
if (_local3 != undefined) {
if (_tiles2DArray[_local2.x][_local2.y] != true) {
$effectiveTiles.push(_local3);
}
_local4 = true;
}
if (_tiles2DArray[_local2.x] == undefined) {
_tiles2DArray[_local2.x] = new Array();
}
_tiles2DArray[_local2.x][_local2.y] = true;
if (_local4) {
break;
}
_local14++;
}
}
var _local15 = com.preloaded.math.MathUtils.degs2rads($rotation);
return(new org.cove.flade.util.Vector(Math.cos(_local15), Math.sin(_local15)));
}
function visualise(mc) {
$visualiserMc.removeMovieClip();
$visualiserMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.bgEffectsLayer.getNewContainer($fanCount);
var _local7 = $visualiserMc.createEmptyMovieClip("blockHolder", 10);
var _local6 = 25;
$visualiserMc.arrTweens = new Array();
var _local15 = function (n, ea) {
return(Math.sin(com.preloaded.math.MathUtils.degs2rads(ea / 2)) * n);
};
var _local8 = 25;
var _local5 = com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2;
var _local10 = com.preloaded.animation.ExtendedTween.precalculateFunction(com.robertpenner.easing.Linear.easeNone, _local8);
var _local11 = $effectiveDistance * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local14 = _local15(_local11, $effectiveAngle) * 2;
var heightRatio = (_local14 / (_local11 - com.preloaded.scimus.launchpad.Config.GRID_SIZE));
var alphaRatio = (100 / _local11);
var _local9 = function () {
var _local2 = this.obj[this.prop];
this.obj._height = (heightRatio * _local2) + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
this.obj._alpha = 100 - (alphaRatio * _local2);
};
var _local2 = 0;
while (_local2 <= ($effectiveDistance * com.preloaded.scimus.launchpad.Config.GRID_SIZE)) {
mc = _local7.attachMovie("blockUtil.centered", "block_" + _local2, _local2);
mc._width = 4;
mc._height = com.preloaded.scimus.launchpad.Config.GRID_SIZE;
new Color(mc).setRGB(colour);
var _local3 = new com.preloaded.animation.ExtendedTween(mc, "_x", com.robertpenner.easing.Linear.easeNone, (_local2 + _local5) - 5, ((_local2 + _local6) + _local5) - 5, _local8, false);
_local3.__set__precalculatedFunction(_local10);
_local3.precalculateSequence();
_local3.onMotionChanged = _local9;
_local3.looping = true;
$visualiserMc.arrTweens.push(_local3);
_local2 = _local2 + _local6;
}
var _local12 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
$visualiserMc._x = _local12.x + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
$visualiserMc._y = _local12.y + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
_local7._rotation = $rotation;
}
function unVisualise() {
for (var _local3 in $visualiserMc.arrTweens) {
var _local2 = $visualiserMc.arrTweens[_local3];
_local2.stop();
_local2.obj.removeMovieClip();
}
delete $visualiserMc.arrTweens;
$visualiserMc.removeMovieClip();
}
function drawInfluence(target) {
for (var _local7 in _tiles2DArray) {
var _local4 = _tiles2DArray[_local7];
for (var _local6 in _local4) {
if (_local4[_local6] != undefined) {
var _local3 = target.getNextHighestDepth();
var _local2 = target.attachMovie("blockUtil", "mc_" + _local3, _local3);
_local2._width = (_local2._height = com.preloaded.scimus.launchpad.Config.GRID_SIZE);
_local2._x = _local7 * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
_local2._y = _local6 * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
}
}
}
}
var $windStrength = 0.5;
}
Symbol 1366 MovieClip [__Packages.com.preloaded.gfx.Primitives.Bresenham] Frame 0
class com.preloaded.gfx.Primitives.Bresenham
{
function Bresenham () {
}
static function line(x1, y1, x2, y2) {
var _local3;
var _local2;
var _local5;
var _local4;
var _local8;
var _local7;
var _local1;
var _local6 = new Array();
if (x2 >= x1) {
_local5 = x2 - x1;
_local8 = 1;
} else {
_local5 = x1 - x2;
_local8 = -1;
}
if (y2 >= y1) {
_local4 = y2 - y1;
_local7 = 1;
} else {
_local4 = y1 - y2;
_local7 = -1;
}
_local3 = x1;
_local2 = y1;
if (_local5 >= _local4) {
_local4 = _local4 << 1;
_local1 = _local4 - _local5;
_local5 = _local5 << 1;
while (_local3 != x2) {
_local6.push(new flash.geom.Point(_local3, _local2));
if (_local1 >= 0) {
_local2 = _local2 + _local7;
_local1 = _local1 - _local5;
}
_local1 = _local1 + _local4;
_local3 = _local3 + _local8;
}
_local6.push(new flash.geom.Point(_local3, _local2));
} else {
_local5 = _local5 << 1;
_local1 = _local5 - _local4;
_local4 = _local4 << 1;
while (_local2 != y2) {
_local6.push(new flash.geom.Point(_local3, _local2));
if (_local1 >= 0) {
_local3 = _local3 + _local8;
_local1 = _local1 - _local4;
}
_local1 = _local1 + _local5;
_local2 = _local2 + _local7;
}
_local6.push(new flash.geom.Point(_local3, _local2));
}
return(_local6);
}
}
Symbol 1367 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSolar] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSolar extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockSolar (host) {
super(host, "inv-solar.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockSolar(host));
}
}
Symbol 1368 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockSolar] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockSolar extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $conductionMatrix, $chargeMatrix, loadBounceSounds, getChargePath, $gfx;
function BlockSolar (host) {
super(host, "BlockSolar", "mc.block.solar", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 1;
$conductionMatrix[2] = 1;
$chargeMatrix[0] = 0;
$chargeMatrix[2] = 0;
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
}
function applyCharge(energyType, strength) {
if (energyType == 2) {
super.applyCharge(0, strength);
transmitCharge(0, strength);
}
}
function transmitCharge(energyType, strength, start) {
var _local3 = getChargePath(energyType, start);
for (var _local6 in _local3) {
var _local2 = _local3[_local6];
_local2.applyCharge(energyType, strength, this);
}
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if (energyType == 0) {
$gfx.gotoAndPlay("on");
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType == 0) {
$gfx.gotoAndStop("idle");
}
}
}
Symbol 1369 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBlowtorch] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBlowtorch extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockBlowtorch (host) {
super(host, "inv-blowtorch.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockBlowtorch(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1370 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockBlowtorch] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockBlowtorch extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $blowtorchCount;
var $conductionMatrix, $chargeMatrix, hideCharge, colour, $connectionIndicator, $sfx, loadBounceSounds, $gfx, startSfx, transmitCharge, $neighbours, gridPos;
function BlockBlowtorch (host) {
super(host, "BlockBlowtorch", "mc.block.blowtorch", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
if ($blowtorchCount == undefined) {
$blowtorchCount = 0;
} else {
$blowtorchCount++;
}
$conductionMatrix[0] = 0;
$conductionMatrix[1] = 1;
$chargeMatrix[1] = 0;
hideCharge(1);
colour = 16711680 /* 0xFF0000 */;
$connectionIndicator = new com.preloaded.scimus.launchpad.Engine.UIElements.ConnectionIndicator(this);
$sfx = com.preloaded.sound.SoundManager.addSound("blow torch loop.aif", "blowtorchLoop_" + $blowtorchCount);
loadBounceSounds(["m1.aif", "m2.aif", "m3.aif", "m4.aif"]);
}
function init() {
$gfx.onEnterFrame = mx.utils.Delegate.create(this, tick);
startSfx(true, true, 12, ($blowtorchCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
function tick() {
transmitCharge(1, 1);
}
function terminate() {
delete $gfx.onEnterFrame;
transmitCharge(1, 0);
$sfx.stop();
}
function onEditRollOver() {
var _local3 = false;
$neighbours = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getNeighbours(gridPos.x, gridPos.y);
for (var _local4 in $neighbours) {
var _local2 = $neighbours[_local4];
if (_local2.__get__conductionMatrix()[0] == 1) {
_local3 = true;
}
}
if (!_local3) {
$connectionIndicator.showOutwardConnections();
}
}
function onEditRollOut() {
$connectionIndicator.hideOutwardConnections();
}
function removePresence() {
$sfx.stop();
delete $gfx.onEnterFrame;
}
}
Symbol 1371 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockWater] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockWater extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockWater (host) {
super(host, "inv-water.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockWater(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1372 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockWater] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockWater extends com.preloaded.scimus.launchpad.blocks.BlockIron
{
static var $waterCount;
var $conductionMatrix, $visualiserDistance, loadBounceSounds, $sfx, $waterLevel, $ceiling, $visualiserMc, stopSfx, $gfx, gridPos, startSfx, $host;
function BlockWater (host) {
super(host, "BlockWater", "mc.block.water");
if ($waterCount == undefined) {
$waterCount = 0;
} else {
$waterCount++;
}
$conductionMatrix[0] = 0;
resetWaterLevel();
$visualiserDistance = 1.5;
loadBounceSounds(["w1.aif", "w2.aif", "w3.aif", "w4.aif"]);
$sfx = com.preloaded.sound.SoundManager.addSound("steam loop.aif", "waterLoop_" + $waterCount);
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if ((energyType == 1) && (strength >= 0.7)) {
if ($waterLevel > 0) {
tick();
$ceiling.applyCharge(4, 1);
visualise();
} else if ($visualiserMc != undefined) {
if (!$visualiserMc.tween.isPlaying) {
stopSfx();
$ceiling.applyCharge(4, 0);
unVisualise();
}
}
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType == 1) {
unVisualise();
}
}
function tick() {
setWaterLevel($waterLevel - 0.005);
}
function setWaterLevel(pc) {
$gfx.waterMaskMc._height = 20 * pc;
$waterLevel = pc;
}
function presenceify() {
super.presenceify();
$ceiling = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x, gridPos.y - 1);
}
function removePresence() {
super.removePresence();
$ceiling.applyCharge(4, 0);
resetWaterLevel();
delete $ceiling;
_unVisualise();
}
function resetWaterLevel() {
setWaterLevel(1);
}
function visualise(mc) {
if ($visualiserMc == undefined) {
startSfx(true, true, 30, ($waterCount * 0.05) % ($sfx.__get__sound().duration / 1000));
$visualiserMc.removeMovieClip();
$visualiserMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.bgEffectsLayer.getNewContainer();
var _local5 = 10;
$visualiserMc.arrTweens = new Array();
var _local10 = com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2;
var _local8 = 25;
var _local9 = function (n, ef) {
ef = ef * com.preloaded.scimus.launchpad.Config.GRID_SIZE;
return(100 - Math.round((n / ef) * 100));
};
var _local2 = 0;
while (_local2 <= ($visualiserDistance * com.preloaded.scimus.launchpad.Config.GRID_SIZE)) {
mc = $visualiserMc.attachMovie("blockUtil", "block_" + _local2, _local2);
mc._width = 19;
mc._height = 3;
mc._x = _local10 - (mc._width / 2);
new Color(mc).setRGB(234489);
var _local7 = _local9(_local2, $visualiserDistance);
var _local6 = _local9(_local2 + _local5, $visualiserDistance);
var _local4 = new mx.transitions.Tween(mc, "_alpha", com.robertpenner.easing.Linear.easeNone, _local7, _local6, _local8, false);
_local4.looping = true;
$visualiserMc.arrTweens.push(_local4);
_local4 = new mx.transitions.Tween(mc, "_y", com.robertpenner.easing.Linear.easeNone, -_local2, -(_local2 + _local5), _local8, false);
_local4.looping = true;
$visualiserMc.arrTweens.push(_local4);
_local2 = _local2 + _local5;
}
$visualiserMc._x = $host._x;
$visualiserMc._y = $host._y + _local10;
$visualiserMc.tween.stop();
$visualiserMc.tween = new mx.transitions.Tween($visualiserMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 10, false);
}
}
function _unVisualise() {
for (var _local2 in $visualiserMc.arrTweens) {
$visualiserMc.arrTweens[_local2].stop();
}
delete $visualiserMc.arrTweens;
$visualiserMc.removeMovieClip();
delete $visualiserMc;
stopSfx();
}
function unVisualise() {
$visualiserMc.tween.stop();
$visualiserMc.tween = new mx.transitions.Tween($visualiserMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $visualiserMc._alpha, 0, 30, false);
$visualiserMc.tween.onMotionFinished = mx.utils.Delegate.create(this, _unVisualise);
}
}
Symbol 1373 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSteamTurbine] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSteamTurbine extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockSteamTurbine (host) {
super(host, "inv-steamturbine.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockSteamTurbine(host));
}
}
Symbol 1374 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockGeneratorBase] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockGeneratorBase extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
var $conductionMatrix, $chargeMatrix, _rotSpeed, $energyType, $roTween, $gfx, transmitCharge;
function BlockGeneratorBase (host, arg_type, linkage, energyType) {
super(host, arg_type, linkage, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 1;
$conductionMatrix[energyType] = 1;
$chargeMatrix[0] = 0;
$chargeMatrix[energyType] = 0;
_rotSpeed = 0;
$energyType = energyType;
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if ((energyType == $energyType) && (_rotSpeed <= 0)) {
startRotor();
}
tick();
}
function stopRotor() {
$roTween.stop();
$roTween = new mx.transitions.Tween($gfx.rotorMc, "_rotation", com.robertpenner.easing.Expo.easeOut, $gfx.rotorMc._rotation, 0, 80, false);
_rotSpeed = 0;
}
function startRotor() {
$roTween.stop();
$roTween = new mx.transitions.Tween(this, "_rotSpeed", com.robertpenner.easing.Quad.easeIn, 1, 20, 50, false);
$roTween.onMotionFinished = mx.utils.Delegate.create(this, tweenCallback);
}
function tweenCallback() {
transmitCharge(0, 1);
$gfx.gotoAndPlay("on");
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if ((energyType == $energyType) && ($chargeMatrix[0] == 1)) {
transmitCharge(0, 0);
$gfx.gotoAndStop("idle");
stopRotor();
}
}
function tick() {
$gfx.rotorMc._rotation = ($gfx.rotorMc._rotation + _rotSpeed) % 360;
}
function removePresence() {
super.removePresence();
$gfx.gotoAndStop("idle");
stopRotor();
}
}
Symbol 1375 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockSteamTurbine] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockSteamTurbine extends com.preloaded.scimus.launchpad.blocks.BlockGeneratorBase
{
var loadBounceSounds, $roTween, tweenCallback;
function BlockSteamTurbine (host) {
super(host, "BlockSteamTurbine", "mc.block.steamturbine", 4);
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
}
function startRotor() {
$roTween.stop();
$roTween = new mx.transitions.Tween(this, "_rotSpeed", com.robertpenner.easing.Quad.easeIn, 1, 40, 15, false);
$roTween.onMotionFinished = mx.utils.Delegate.create(this, tweenCallback);
}
}
Symbol 1376 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockIce] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockIce extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockIce (host) {
super(host, "inv-ice.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockIce(host));
}
}
Symbol 1377 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockIce] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockIce extends com.preloaded.scimus.launchpad.blocks.BlockIron
{
var $conductionMatrix, loadBounceSounds, $mass, $effectMc, $gfx, $host, $floor, $tile, gridPos, dispatchEvent;
function BlockIce (host) {
super(host, "BlockIce", "mc.block.ice", 0.01);
$conductionMatrix[0] = 0;
resetMass();
loadBounceSounds(["g1.aif", "g2.aif", "g3.aif", "g4.aif"]);
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if ((energyType == 1) && (strength >= 0.7)) {
if ($mass > 0) {
if ($effectMc == undefined) {
$effectMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.bgEffectsLayer.attachMovie("mc.effect.ice.melt");
$effectMc._x = $host._x + $gfx._x;
$effectMc._y = $host._y + $gfx._y;
}
tick();
$floor.applyCharge(5, 1);
} else {
if ($effectMc != undefined) {
removeEffect();
}
$floor.applyCharge(5, 0);
}
}
}
function removeEffect() {
$effectMc.removeMovieClip();
delete $effectMc;
}
function tick() {
setMass($mass - 0.004);
if ($mass <= 0.2) {
$effectMc._alpha = $mass * 500;
}
}
function setMass(pc) {
$gfx.maskMc._y = $gfx.maskMc._height - ($gfx.maskMc._height * pc);
$tile.destroy();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($tile);
delete $tile;
if (pc > 0) {
var _local3 = com.preloaded.scimus.launchpad.Config.GRID_SIZE * pc;
$tile = new org.cove.flade.surfaces.RectangleTile(Math.floor((gridPos.x * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)), Math.floor(($host._y + com.preloaded.scimus.launchpad.Config.GRID_SIZE) - (_local3 / 2)), com.preloaded.scimus.launchpad.Config.GRID_SIZE, _local3, 0, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
org.cove.flade.DynamicsEngine.__get__instance().addSurface($tile);
$tile.rectHeight = com.preloaded.scimus.launchpad.Config.GRID_SIZE * pc;
$tile.center.y = ($host._y + com.preloaded.scimus.launchpad.Config.GRID_SIZE) - ($tile.rectHeight / 2);
}
dispatchEvent({type:"onMassChange", mass:pc});
$mass = pc;
}
function presenceify() {
super.presenceify();
$floor = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(gridPos.x, gridPos.y + 1);
resetMass();
}
function removePresence() {
$floor.applyCharge(5, 0);
resetMass();
removeEffect();
delete $floor;
super.removePresence();
}
function onEditRollOver() {
}
function resetMass() {
setMass(1);
}
function get maskMc() {
return($gfx.maskMc);
}
}
Symbol 1378 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockPeltonWheel] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockPeltonWheel extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockPeltonWheel (host) {
super(host, "inv-peltonwheel.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockPeltonWheel(host));
}
}
Symbol 1379 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockPeltonWheel] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockPeltonWheel extends com.preloaded.scimus.launchpad.blocks.BlockGeneratorBase
{
var loadBounceSounds, _rotSpeed, $gfx;
function BlockPeltonWheel (host) {
super(host, "BlockPeltonWheel", "mc.block.peltonwheel", 5);
loadBounceSounds(["w1.aif", "w2.aif", "w3.aif", "w4.aif"]);
}
function tick() {
$gfx.rotorMc._rotation = ($gfx.rotorMc._rotation - _rotSpeed) % 360;
}
}
Symbol 1380 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockConveyor] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockConveyor extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockConveyor (host) {
super(host, "inv-conveyor.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockConveyor(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1381 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockConveyor] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockConveyor extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $conveyorCount;
var $speed, $blockOffset, $conductionMatrix, $chargeMatrix, isMaterial, $gfx, $sfx, $beltVector, $rotation, $host, $tile, startSfx, stopSfx, applyCharge, $control, $chargeIndicator;
function BlockConveyor (host) {
super(host, "BlockConveyor", "mc.block.conveyor", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
if ($conveyorCount == undefined) {
$conveyorCount = 0;
} else {
$conveyorCount++;
}
$speed = 0.4;
rotate(0);
$blockOffset = 0;
$conductionMatrix[0] = 1;
$chargeMatrix[0] = 0;
isMaterial = false;
$gfx.gotoAndStop("idle");
$sfx = com.preloaded.sound.SoundManager.addSound("escalator_conveyor.aif", "conveyorLoop_" + $conveyorCount);
}
function rotate(r) {
if (r == 0) {
$beltVector = new org.cove.flade.util.Vector($speed, 0);
} else if (r == 180) {
$beltVector = new org.cove.flade.util.Vector(-$speed, 0);
} else {
$beltVector = new org.cove.flade.util.Vector(0, 0);
}
$gfx.arrowsMc._rotation = r;
$rotation = r;
}
function _onTileContact(p) {
if ($chargeMatrix[0] > 0) {
if (p.curr.y < $host._y) {
if ($gfx.hitTest(p.curr.x, $tile.center.y)) {
p.curr.plus($beltVector);
}
}
}
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if (energyType == 0) {
if ($rotation == 0) {
$gfx.gotoAndPlay("active_right");
} else {
$gfx.gotoAndPlay("active_left");
}
startSfx(true, true, 40, ($conveyorCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType == 0) {
$gfx.gotoAndStop("idle");
stopSfx(false);
}
}
function presenceify() {
super.presenceify();
$chargeMatrix[0] = 0;
}
function removePresence() {
applyCharge(0, 0);
}
function onEditRollOver() {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.FlipControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y);
$control.addEventListener("onButtonRelease", mx.utils.Delegate.create(this, onFlip));
}
function onFlip() {
rotate((($rotation == 0) ? 180 : 0));
}
function showElectricalCharge() {
var offset = 3;
super.showElectricalCharge();
if ($chargeIndicator != undefined) {
with ($chargeIndicator) {
leftMc._y = leftMc._y + 1;
rightMc._y = rightMc._y + 1;
tlMc._y = tlMc._y + offset;
trMc._y = trMc._y + offset;
ttlConnectorMc._visible = (ttrConnectorMc._visible = false);
topMc._visible = (ltlConnectorMc._visible = (rtrConnectorMc._visible = false));
}
}
}
}
Symbol 1382 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.FlipControl] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.FlipControl extends com.preloaded.scimus.launchpad.Engine.UIElements.TransformControlBase
{
var $mc, initMc, onShowComplete;
function FlipControl () {
super();
}
function show(blockX, blockY, rotation, buttonOffset) {
if ($mc == undefined) {
initMc("mc.ui.control.flip");
}
super.show(blockX, blockY);
$mc.buttonMc._x = $mc.buttonMc._x + buttonOffset;
onShowComplete();
}
}
Symbol 1383 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockEscalator] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockEscalator extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockEscalator (host) {
super(host, "inv-escalator.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockEscalator(host));
}
}
Symbol 1384 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockEscalator] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockEscalator extends com.preloaded.scimus.launchpad.blocks.BlockLeft
{
static var $escalatorCount;
var $speed, $conductionMatrix, $chargeMatrix, isMaterial, $sfx, $elevationVector, $gfx, $boltsMc, $rotation, startSfx, stopSfx, $surfaces, $chargeIndicator, $control, $host;
function BlockEscalator (host) {
super(host, 0.2, 0, "mc.block.escalator", "BlockEscalator");
if ($escalatorCount == undefined) {
$escalatorCount = 0;
} else {
$escalatorCount++;
}
$speed = 0.2;
rotate(270);
$conductionMatrix[0] = 1;
$chargeMatrix[0] = 0;
isMaterial = false;
$sfx = com.preloaded.sound.SoundManager.addSound("escalator_conveyor.aif", "escalatorLoop_" + $escalatorCount);
}
function rotate(a) {
if (a == 0) {
$elevationVector = new org.cove.flade.util.Vector(-$speed, -$speed);
$boltsMc._x = ($gfx._x = 1);
$boltsMc._xscale = ($gfx._xscale = 100);
} else if (a == 270) {
$elevationVector = new org.cove.flade.util.Vector($speed, -$speed);
$boltsMc._x = ($gfx._x = $gfx._width + 1.5);
$boltsMc._xscale = ($gfx._xscale = -100);
} else {
$elevationVector = new org.cove.flade.util.Vector(0, 0);
}
$rotation = a;
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if (energyType == 0) {
$gfx.gotoAndPlay("active");
startSfx(true, true, 30, ($escalatorCount * 0.05) % ($sfx.__get__sound().duration / 1000));
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType == 0) {
$gfx.gotoAndStop("idle");
stopSfx(false);
}
}
function presenceify() {
super.presenceify();
$chargeMatrix[0] = 0;
$surfaces[0].onContact = mx.utils.Delegate.create(this, onContact);
}
function onContact(p) {
if ($chargeMatrix[0] > 0) {
p.curr.plus($elevationVector);
}
}
function showElectricalCharge() {
var offset = 4;
super.showElectricalCharge();
if ($rotation == 0) {
$chargeIndicator.rtrConnectorMc._visible = ($chargeIndicator.brMc._visible = ($chargeIndicator.rightMc._visible = ($chargeIndicator.rbrConnectorMc._visible = false)));
} else {
$chargeIndicator.ltlConnectorMc._visible = ($chargeIndicator.blMc._visible = ($chargeIndicator.leftMc._visible = ($chargeIndicator.lblConnectorMc._visible = false)));
}
if ($chargeIndicator != undefined) {
with ($chargeIndicator) {
tlMc._visible = (trMc._visible = (topMc._visible = (ttlConnectorMc._visible = (ttrConnectorMc._visible = false))));
}
}
}
function onEditRollOver() {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.FlipControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y);
$control.addEventListener("onButtonRelease", mx.utils.Delegate.create(this, onFlip));
}
function onFlip() {
rotate((($rotation == 0) ? 270 : 0));
}
}
Symbol 1385 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLens] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockLens extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockLens (host) {
super(host, "inv-lens.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockLens(host));
}
}
Symbol 1386 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockLens] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockLens extends com.preloaded.scimus.launchpad.blocks.BlockBase
{
var colour, $lensRadius, $focalLength, loadBounceSounds, gridPos, $rotation, $target, $host, $friction, $bounce, $upperSurface, $lowerSurface, _onTileContact, $dbmc, $focusMc, __get__center, $gfx, $control;
function BlockLens (host) {
super(host, "BlockLens", "mc.block.lens", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
rotate(0);
colour = 16776960 /* 0xFFFF00 */;
$lensRadius = 15;
$focalLength = com.preloaded.scimus.launchpad.Config.GRID_SIZE * 2;
loadBounceSounds(["g1.aif", "g2.aif", "g3.aif", "g4.aif"]);
}
function getPts(rad) {
var _local5 = new Array();
var _local6 = com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.gridToScreen(gridPos);
_local2 = _local2.add(new flash.geom.Point(_local6 / 2, _local6 / 2));
var _local3 = com.preloaded.math.MathUtils.degs2rads($rotation);
_local3 = _local3 + (Math.PI/2);
rad = ((rad == undefined) ? ($lensRadius) : (rad));
var _local8 = new org.cove.flade.util.Vector(_local2.x + (Math.cos(_local3) * rad), _local2.y + (Math.sin(_local3) * rad));
_local3 = _local3 + Math.PI;
var _local7 = new org.cove.flade.util.Vector(_local2.x + (Math.cos(_local3) * rad), _local2.y + (Math.sin(_local3) * rad));
_local5.push(new org.cove.flade.util.Line(_local8, _local7));
return(_local5);
}
function applyCharge(energyType, strength, relativeAngle) {
super.applyCharge(energyType, strength);
if (energyType == 2) {
if (strength > 0) {
var _local5 = ((Math.abs(relativeAngle) > (Math.PI/2)) ? Math.PI : 0);
showFocus(com.preloaded.math.MathUtils.rads2degs(_local5));
if ($target == undefined) {
var _local6 = com.preloaded.math.MathUtils.degs2rads($rotation);
var _local7 = $focalLength / com.preloaded.scimus.launchpad.Config.GRID_SIZE;
var _local4 = Math.cos(_local6 + _local5) * _local7;
var _local3 = Math.sin(_local6 + _local5) * _local7;
_local4 = _local4 + (gridPos.x + 0.5);
_local3 = _local3 + (gridPos.y + 0.5);
_local4 = Math.floor(_local4);
_local3 = Math.floor(_local3);
$target = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(_local4, _local3);
$target.pathIndices[1] = 1;
}
if ($target.type != undefined) {
$host.onEnterFrame = mx.utils.Delegate.create(this, tick);
}
} else {
hideFocus();
delete $host.onEnterFrame;
$target.transmitCharge(1, 0);
delete $target;
}
}
}
function tick() {
$target.transmitCharge(1, 1, $target);
}
function presenceify() {
super.presenceify();
var _local3 = getPts()[0];
var _local5 = new org.cove.flade.surfaces.LineSurface(_local3.p1.x, _local3.p1.y, _local3.p2.x, _local3.p2.y, $friction, $bounce);
var _local4 = new org.cove.flade.surfaces.LineSurface(_local3.p2.x, _local3.p2.y, _local3.p1.x, _local3.p1.y, $friction, $bounce);
if (_local3.p1.x < _local3.p2.x) {
$upperSurface = _local5;
$lowerSurface = _local4;
} else {
$upperSurface = _local4;
$lowerSurface = _local5;
}
$upperSurface.setCollisionDepth(10);
$lowerSurface.setCollisionDepth(10);
$upperSurface.onContact = mx.utils.Delegate.create(this, _onTileContact);
$lowerSurface.onContact = mx.utils.Delegate.create(this, _onTileContact);
delete $target;
}
function removePresence() {
super.removePresence();
$dbmc.removeMovieClip();
$focusMc.removeMovieClip();
$upperSurface.destroy();
$lowerSurface.destroy();
delete $upperSurface;
delete $lowerSurface;
}
function checkCollision(b) {
if (b.presence.curr.y < __get__center().y) {
b.presence.checkCollision($upperSurface);
} else {
b.presence.checkCollision($lowerSurface);
}
}
function rotate(r) {
$rotation = ($focusMc._rotation = ($gfx.lensMc._rotation = r));
}
function set focalLength(n) {
$focusMc._xscale = ($focalLength = n);
//return(focalLength);
}
function get focalLength() {
return($focalLength);
}
function showImmobileIndicator() {
showFocus();
}
function hideImmobileIndicator() {
hideFocus();
}
function onEditRollOver() {
showFocus();
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.LensControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y, $rotation);
$control.addEventListener("onUpdate", mx.utils.Delegate.create(this, onControlUpdate));
$control.addEventListener("onRollOut", mx.utils.Delegate.create(this, _onControlRollOut));
$control.addEventListener("buttonMinusIsDown", mx.utils.Delegate.create(this, buttonMinusIsDown));
$control.addEventListener("buttonPlusIsDown", mx.utils.Delegate.create(this, buttonPlusIsDown));
$control.addEventListener("onHidden", mx.utils.Delegate.create(this, onControlHidden));
}
function buttonMinusIsDown() {
if ($focalLength > com.preloaded.scimus.launchpad.Config.GRID_SIZE) {
focalLength = focalLength - 5;
}
}
function buttonPlusIsDown() {
if ($focalLength < (com.preloaded.scimus.launchpad.Config.GRID_SIZE * 3)) {
focalLength = focalLength + 5;
}
}
function onControlUpdate(evt) {
rotate(evt.rotation);
}
function showFocus(rotationOffset) {
if (rotationOffset == undefined) {
rotationOffset = 0;
}
$focusMc.tween.stop();
$focusMc.removeMovieClip();
$focusMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.bgEffectsLayer.attachMovie("mc.effect.lens.focus");
$focusMc.tween = new mx.transitions.Tween($focusMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 75, 15, false);
$focusMc._x = __get__center().x;
$focusMc._y = __get__center().y;
$focusMc._rotation = $gfx.lensMc._rotation + rotationOffset;
$focusMc._xscale = $focalLength;
$focusMc.blendMode = "add";
}
function hideFocus() {
$focusMc.tween.stop();
$focusMc.tween = new mx.transitions.Tween($focusMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $focusMc._alpha, 0, 10, false);
$focusMc.tween.onMotionComplete = mx.utils.Delegate.create(this, _hideFocus);
}
function _hideFocus() {
$focusMc.removeMovieClip();
}
function _onControlRollOut() {
hideFocus();
}
function onControlHidden() {
$control.destroy();
delete $control;
}
function destroy() {
$focusMc.removeMovieClip();
}
}
Symbol 1387 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.LensControl] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.LensControl extends com.preloaded.scimus.launchpad.Engine.UIElements.ControlBase
{
var $rotateControl, parent, $powerControl, passthruEvent, host, dispatchEvent;
function LensControl () {
super();
}
function initMc(linkage) {
}
function show(x, y, r) {
$rotateControl = new com.preloaded.scimus.launchpad.Engine.UIElements.RotateFreeControl();
$rotateControl.parent = this;
$rotateControl.accentColor = parent.colour;
$powerControl = new com.preloaded.scimus.launchpad.Engine.UIElements.PowerControl();
$powerControl.parent = this;
spawnControl($rotateControl, x, y, r);
spawnControl($powerControl, x, y);
$powerControl.__get__mc().hitterMc._visible = false;
$rotateControl.__get__mc().arrowMc._x = -32;
$rotateControl.addEventListener("onUpdate", mx.utils.Delegate.create(this, passthruEvent));
$rotateControl.addEventListener("onRollOut", mx.utils.Delegate.create(this, onRotateHitterRollOut));
$powerControl.addEventListener("buttonMinusIsDown", mx.utils.Delegate.create(this, passthruEvent));
$powerControl.addEventListener("buttonPlusIsDown", mx.utils.Delegate.create(this, passthruEvent));
}
function spawnControl(control, x, y, r) {
control.host = host;
control.show(x, y, r);
}
function hide() {
$rotateControl.hide();
$powerControl.hide();
dispatchEvent({type:"onHidden", target:this});
}
function destroy() {
$rotateControl.destroy();
$powerControl.destroy();
}
function checkHitter() {
$rotateControl.onHitterRollOut();
}
function onRotateHitterRollOut() {
_onRollOut();
}
function _onRollOut() {
dispatchEvent({type:"onRollOut", target:this});
}
}
Symbol 1388 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSeesaw] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockSeesaw extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockSeesaw (host) {
super(host, "inv-seesaw.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockSeesaw(host, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE));
}
}
Symbol 1389 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockSeesaw] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockSeesaw extends com.preloaded.scimus.launchpad.blocks.BlockBase
{
var loadBounceSounds, $threshold, gridPos, $relayBallGhostMc, $host, $tileLeft, $contactees, $tileRight, $fulcrum, $relayBall, $gfx, $rotation, $control, $power, $hitter, __get__immobile;
function BlockSeesaw (host) {
super(host, "BlockSeesaw", "mc.block.seesaw", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
rotate(0);
drawGhostBall();
power = (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2);
loadBounceSounds(["sp1.aif", "sp2.aif", "sp3.aif", "sp4.aif"]);
$threshold = 1;
}
function onPlace() {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().addBlock(this, gridPos.x + 1, gridPos.y, false);
}
function onGridPop() {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().popBlockAt(gridPos.x + 1, gridPos.y, false);
removePresence();
}
function drawGhostBall() {
$relayBallGhostMc.removeMovieClip();
$relayBallGhostMc = $host.createEmptyMovieClip("ghostMc", $host.getNextHighestDepth());
$relayBallGhostMc.lineStyle(2, 6710886, 100);
org.cove.flade.graphics.Graphics.paintCircle($relayBallGhostMc, 0, 0, 10);
$relayBallGhostMc._y = -10;
}
function presenceify() {
if ($tileLeft == undefined) {
super.presenceify();
$contactees = new Array();
$tileLeft = new org.cove.flade.surfaces.RectangleTile(Math.floor((gridPos.x * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)), Math.floor((gridPos.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)), com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
org.cove.flade.DynamicsEngine.__get__instance().addSurface($tileLeft);
$tileRight = new org.cove.flade.surfaces.RectangleTile(Math.floor(((gridPos.x + 1) * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)), Math.floor((gridPos.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)), com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
org.cove.flade.DynamicsEngine.__get__instance().addSurface($tileRight);
$tileLeft.onContact = mx.utils.Delegate.create(this, onTileContact);
$tileRight.onContact = mx.utils.Delegate.create(this, onTileContact);
$fulcrum = new flash.geom.Point((gridPos.x + 1) * com.preloaded.scimus.launchpad.Config.GRID_SIZE, gridPos.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE);
$relayBall = new com.preloaded.scimus.launchpad.Engine.Ball(com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.getNewContainer());
$relayBall.spawn($host._x + $relayBallGhostMc._x, $host._y + $relayBallGhostMc._y);
$relayBallGhostMc.removeMovieClip();
$gfx.onEnterFrame = mx.utils.Delegate.create(this, tick);
}
}
function onTileContact(p) {
$contactees.push({particle:p, yvel:p.curr.y - p.prev.y});
}
function transferForce(dp, up) {
var _local6 = dp.particle;
var _local5 = up.particle;
var _local2 = Math.abs(dp.yvel);
var _local3 = $fulcrum.x - _local6.curr.x;
var _local4 = $fulcrum.x - _local5.curr.x;
if (((_local3 > 0) && (_local4 < 0)) || ((_local3 < 0) && (_local4 > 0))) {
_local2 = (_local2 / Math.abs(_local3)) * Math.abs(_local4);
_local2 = _local2 * 0.8;
if (_local2 > $threshold) {
_local5.curr.y = _local5.curr.y - _local2;
return(_local2);
}
}
return(null);
}
function tick() {
$relayBall.update();
if ($contactees.length > 1) {
var _local4;
var _local3 = transferForce($contactees[0], $contactees[1]);
var _local2 = transferForce($contactees[1], $contactees[0]);
if (((_local3 > _local2) || (_local2 == null)) && (_local3 != null)) {
_local4 = $contactees[0];
} else if (((_local3 < _local2) || (_local3 == null)) && (_local2 != null)) {
_local4 = $contactees[1];
}
if (_local4.curr.x != undefined) {
if (_local4.curr.x < $fulcrum.x) {
$gfx.gotoAndPlay("left");
} else {
$gfx.gotoAndPlay("right");
}
}
}
$contactees = new Array();
}
function rotate(r) {
$rotation = r;
}
function onEditRollOver() {
$control = new com.preloaded.scimus.launchpad.Engine.UIElements.SeesawControl();
$control.parent = this;
com.preloaded.scimus.launchpad.Engine.GameUI.instance.spawnControl($control, $host._x, $host._y);
$control.addEventListener("buttonLeftIsDown", mx.utils.Delegate.create(this, buttonLeftIsDown));
$control.addEventListener("buttonRightIsDown", mx.utils.Delegate.create(this, buttonRightIsDown));
}
function buttonLeftIsDown() {
if ($power > (-(com.preloaded.scimus.launchpad.Config.GRID_SIZE - 5))) {
power = power - 5;
}
}
function buttonRightIsDown() {
if ($power < (com.preloaded.scimus.launchpad.Config.GRID_SIZE - 5)) {
power = power + 5;
}
}
function set power(d) {
$relayBallGhostMc._x = com.preloaded.scimus.launchpad.Config.GRID_SIZE + d;
$power = d;
//return(power);
}
function get power() {
return($power);
}
function set immobile(b) {
super.__set__immobile(b);
if (!b) {
$hitter._xscale = 200;
}
//return(__get__immobile());
}
function removePresence() {
delete $gfx.onEnterFrame;
super.removePresence();
$tileLeft.destroy();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($tileLeft);
delete $tileLeft;
$tileRight.destroy();
org.cove.flade.DynamicsEngine.__get__instance().removeSurface($tileRight);
delete $tileRight;
$relayBall.destroy();
drawGhostBall();
power = ($power);
}
function checkCollision(b) {
b.presence.checkCollision($tileLeft);
b.presence.checkCollision($tileRight);
}
function destroy() {
super.destroy();
$relayBallGhostMc.removeMovieClip();
}
}
Symbol 1390 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.UIElements.SeesawControl] Frame 0
class com.preloaded.scimus.launchpad.Engine.UIElements.SeesawControl extends com.preloaded.scimus.launchpad.Engine.UIElements.TransformControlBase
{
var $buttonLeft, $mc, $buttonRight, dispatchEvent;
function SeesawControl () {
super();
}
function initMc(linkage) {
super.initMc(linkage);
$buttonLeft = new com.preloaded.UI.MovieClipButton($mc.buttonLeftMc, "over", "out");
$buttonLeft.addEventListener("isDown", mx.utils.Delegate.create(this, buttonLeftIsDown));
$buttonLeft.dispatchGlobalEvents = false;
$buttonRight = new com.preloaded.UI.MovieClipButton($mc.buttonRightMc, "over", "out");
$buttonRight.addEventListener("isDown", mx.utils.Delegate.create(this, buttonRightIsDown));
$buttonRight.dispatchGlobalEvents = false;
}
function buttonLeftIsDown() {
dispatchEvent({type:"buttonLeftIsDown", target:this});
}
function buttonRightIsDown() {
dispatchEvent({type:"buttonRightIsDown", target:this});
}
function onShowComplete() {
$mc.buttonLeftMc._visible = true;
com.preloaded.animation.AnimUtils.popOpen($mc.buttonLeftMc, 0, 10);
$mc.buttonRightMc._visible = true;
com.preloaded.animation.AnimUtils.popOpen($mc.buttonRightMc, 0, 10);
}
function show(blockX, blockY, rotation, buttonOffset) {
if ($mc == undefined) {
initMc("mc.ui.control.seesaw");
}
super.show((blockX + com.preloaded.scimus.launchpad.Config.GRID_SIZE) - 3, (blockY + (com.preloaded.scimus.launchpad.Config.GRID_SIZE / 2)) - 3);
onShowComplete();
}
}
Symbol 1391 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTesla] Frame 0
class com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockTesla extends com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockBase
{
function InterfaceBlockTesla (host) {
super(host, "inv-tesla.png");
}
function instantiate(host) {
return(new com.preloaded.scimus.launchpad.blocks.BlockTesla(host));
}
}
Symbol 1392 MovieClip [__Packages.com.preloaded.scimus.launchpad.blocks.BlockTesla] Frame 0
class com.preloaded.scimus.launchpad.blocks.BlockTesla extends com.preloaded.scimus.launchpad.blocks.BlockBaseSquare
{
static var $allCoils;
var $conductionMatrix, $chargeMatrix, $boltResolution, $boltDeviance, $boltDevianceHalf, loadBounceSounds, $intervalTimer, $sparkTime, $effectsMc, $flip, $home, polarity, __get__center, $gfx;
function BlockTesla (host) {
super(host, "BlockTesla", "mc.block.tesla", com.preloaded.scimus.launchpad.Config.DEFAULT_FRICTION, com.preloaded.scimus.launchpad.Config.DEFAULT_BOUNCE);
$conductionMatrix[0] = 1;
$conductionMatrix[2] = 1;
$chargeMatrix[0] = 0;
$chargeMatrix[2] = 0;
$boltResolution = 4;
$boltDeviance = 30;
$boltDevianceHalf = $boltDeviance / 2;
loadBounceSounds(["n1.aif", "n2.aif", "n3.aif", "n4.aif"]);
}
function transmitCharge(energyType, strength) {
if (energyType == 0) {
for (var _local4 in $allCoils) {
var _local2 = $allCoils[_local4];
if (_local2.polarity <= 0) {
_local2.applyCharge(0, strength, this);
}
}
}
}
function resetInterval() {
$intervalTimer = 15 + random(62);
$sparkTime = 15 + random(46);
$effectsMc.clear();
}
function tick() {
if (($intervalTimer--) <= 0) {
$effectsMc.clear();
$effectsMc.lineStyle(2, 16777215, 100);
for (var _local10 in $allCoils) {
var _local8 = $allCoils[_local10];
var _local7 = _local10 % 2;
if (((_local7 == 0) && ($flip)) || ((_local7 == 1) && (!$flip))) {
if (_local8.polarity == -1) {
$effectsMc.moveTo($home.x, $home.y);
var _local2 = $home.clone();
var _local9 = _local8.__get__center();
var _local6 = _local9.x - $home.x;
var _local5 = _local9.y - $home.y;
_local6 = _local6 / $boltResolution;
_local5 = _local5 / $boltResolution;
var _local10 = 0;
while (_local10 < $boltResolution) {
var _local4 = _local2.x + _local6;
var _local3 = _local2.y + _local5;
$effectsMc.lineTo((_local4 - $boltDevianceHalf) + random($boltDeviance), (_local3 - $boltDevianceHalf) + random($boltDeviance));
_local2.x = _local4;
_local2.y = _local3;
_local10++;
}
}
}
}
$flip = !$flip;
if ($intervalTimer < (-$sparkTime)) {
resetInterval();
}
}
}
function presenceify() {
super.presenceify();
polarity = 0;
$home = __get__center().clone();
if ($allCoils == undefined) {
$allCoils = new Array();
}
$allCoils.push(this);
}
function removePresence() {
super.removePresence();
$allCoils = new Array();
$effectsMc.removeMovieClip();
applyCharge(0, 0);
}
function destroy() {
$effectsMc.removeMovieClip();
for (var _local3 in $allCoils) {
if ($allCoils[_local3] == this) {
$allCoils.splice(_local3, 1);
}
}
super.destroy();
}
function applyCharge(energyType, strength, originator) {
super.applyCharge(energyType, strength);
if (energyType == 0) {
if (originator.type != "BlockTesla") {
polarity = 1;
transmitCharge(0, strength);
if (strength > 0) {
$effectsMc.removeMovieClip();
$effectsMc = com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.fgEffectsLayer.getNewContainer();
$gfx.onEnterFrame = mx.utils.Delegate.create(this, tick);
resetInterval();
$intervalTimer = 0;
} else {
$effectsMc.removeMovieClip();
delete $gfx.onEnterFrame;
}
} else {
polarity = -1;
super.transmitCharge(0, strength, this, false);
}
}
}
function showCharge(energyType, strength) {
super.showCharge(energyType, strength);
if (energyType == 0) {
$gfx.gotoAndPlay("on");
}
}
function hideCharge(energyType) {
super.hideCharge(energyType);
if (energyType == 0) {
$gfx.gotoAndStop("idle");
$effectsMc.removeMovieClip();
}
}
}
Symbol 1393 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.MaterialLayer] Frame 0
class com.preloaded.scimus.launchpad.Engine.MaterialLayer
{
static var instance;
var $host, $borderOffset, $fillColour, $strokeColour, $blitter, $filterStackA, $filterStackB, $regPoint, __get__blendMode;
function MaterialLayer (host) {
$host = host;
instance = this;
$borderOffset = 10;
$host._x = ($host._y = -2 - $borderOffset);
$fillColour = 16777215 /* 0xFFFFFF */;
$strokeColour = 65280;
$blitter = new flash.display.BitmapData((com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH + 2) + ($borderOffset * 2), (com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT + 2) + ($borderOffset * 2), true, 0);
$host.attachBitmap($blitter, 10);
$filterStackA = new Array();
$filterStackB = new Array();
$filterStackA.push(new flash.filters.GlowFilter(0, 1, 4, 4, 50, 1));
$filterStackA.push(new flash.filters.GlowFilter(16777215, 1, 2, 2, 50, 1, true));
$filterStackB.push(new flash.filters.GlowFilter($strokeColour, 1, 2, 2, 20, 2, true));
$regPoint = new flash.geom.Point(0, 0);
}
function update() {
var _local10 = 0;
var _local13 = getTimer();
clear();
var _local9 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__get__grid();
var _local8 = flash.display.BitmapData.loadBitmap("material-layer-slope.png");
var _local7 = flash.display.BitmapData.loadBitmap("material-layer-curve.png");
for (var _local12 in _local9) {
var _local5 = _local9[_local12];
for (var _local11 in _local5) {
var _local3 = _local5[_local11];
if (_local3.isMaterial && (_local3.__get__immobile())) {
var _local2 = new flash.geom.Matrix(1, 0, 0, 1, 0, 0);
var _local12 = ((_local3.gridPos.x * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + 1) + $borderOffset;
var _local11 = ((_local3.gridPos.y * com.preloaded.scimus.launchpad.Config.GRID_SIZE) + 1) + $borderOffset;
_local2.tx = _local12;
_local2.ty = _local11;
switch (_local3.type) {
case "BlockSquare" :
var _local4 = new flash.geom.Rectangle(_local2.tx, _local2.ty, com.preloaded.scimus.launchpad.Config.GRID_SIZE, com.preloaded.scimus.launchpad.Config.GRID_SIZE);
$blitter.fillRect(_local4, 4278190080);
break;
case "BlockLeft" :
case "BlockLeftCurve" :
var _local6 = ((_local3.type == "BlockLeft") ? (_local8) : (_local7));
_local2.rotate(com.preloaded.UtilsMath.toRadians(_local3.__get__rotation()));
_local2.tx = _local12;
_local2.ty = _local11;
switch (_local3.__get__rotation()) {
case 90 :
_local2.tx = _local2.tx + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
break;
case 180 :
_local2.tx = _local12 + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
_local2.ty = _local11 + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
break;
case 270 :
_local2.ty = _local2.ty + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
}
$blitter.draw(_local6, _local2);
}
_local10++;
}
}
}
_local8.dispose();
_local7.dispose();
applyFilterStack($filterStackA);
$blitter.threshold($blitter, $blitter.rectangle, $regPoint, "!=", 4278190080, 0);
drawOuterRectangle($borderOffset + 2);
$blitter.floodFill(0, 0, 4294901760);
$blitter.threshold($blitter, $blitter.rectangle, $regPoint, "==", 4278190080, 0);
$blitter.floodFill(0, 0, 4278190080);
applyFilterStack($filterStackB);
drawOuterRectangle(2);
}
function drawOuterRectangle(borderWidth) {
$blitter.fillRect(new flash.geom.Rectangle(0, 0, $blitter.width, borderWidth), 4278190080);
$blitter.fillRect(new flash.geom.Rectangle(0, $blitter.height - borderWidth, $blitter.width, borderWidth), 4278190080);
$blitter.fillRect(new flash.geom.Rectangle(0, 0, borderWidth, $blitter.height), 4278190080);
$blitter.fillRect(new flash.geom.Rectangle($blitter.width - borderWidth, 0, borderWidth, $blitter.height), 4278190080);
}
function applyFilterStack(stack) {
var _local2 = 0;
while (_local2 < stack.length) {
$blitter.applyFilter($blitter, $blitter.rectangle, $regPoint, stack[_local2]);
_local2++;
}
}
function set blendMode(b) {
$host.blendMode = b;
//return(__get__blendMode());
}
function clear() {
$blitter.fillRect($blitter.rectangle, 16777215);
}
function get host() {
return($host);
}
function destroy() {
$blitter.dispose();
delete $filterStackA;
delete $filterStackB;
delete $blitter;
delete $regPoint;
$host.removeMovieClip();
}
}
Symbol 1394 MovieClip [__Packages.com.preloaded.UtilsMath] Frame 0
class com.preloaded.UtilsMath
{
function UtilsMath () {
}
static function percentage(l, h) {
return((l / h) * 100);
}
static function percentOf(percent, total) {
var _local2 = percent / 100;
var _local1 = _local2 * total;
return(_local1);
}
static function randomRange(min, max) {
return(Math.floor(Math.random() * ((max - min) + 1)) + min);
}
static function roundTo(n, dp) {
return(Math.round(n * Math.pow(10, dp)) / Math.pow(10, dp));
}
static function distance(x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function getAngle(x1, y1, x2, y2) {
var _local3 = x1 - x2;
var _local2 = y1 - y2;
var _local1 = Math.atan2(_local2, _local3);
_local1 = _local1 / (Math.PI/180);
_local1 = _local1 - 90;
_local1 = ((_local1 < 0) ? (_local1 + 360) : (_local1));
return(_local1);
}
static function toDegrees(theta) {
return((theta * 180) / Math.PI);
}
static function toRadians(theta) {
return((theta * Math.PI) / 180);
}
static function toGrid(val, grid) {
return(Math.floor(val / grid));
}
}
Symbol 1395 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.SandboxHandler] Frame 0
class com.preloaded.scimus.launchpad.Engine.SandboxHandler
{
static var instance;
var $host, $backButton, $finshedDesigningButton, $finshedRemovingButton, $finshedTestingButton, _backListener, _loadCallback, $mode, $designedXML, $editXML, $saveListener, $removedInventory, $removedBlockPosns, $tempInventory, $removedXML, $levelTitle, $levelName, $gridListener;
function SandboxHandler (host) {
$host = host;
instance = this;
setupArrowButtons();
}
function setupArrowButtons() {
var _local3 = $host.attachMovie("mc.ui.sandbox.button.back", "backButton", $host.getNextHighestDepth());
$backButton = new com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxBack(_local3, "over", "out");
$backButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onBackButtonRelease));
$backButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onButtonRollOver));
$backButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onButtonRollOut));
$backButton.__set___visible(false);
$backButton.__get__mc()._alpha = 0;
$backButton.__get__mc()._x = -14;
$backButton.__get__mc()._y = 166;
var _local2 = $host.attachMovie("mc.ui.sandbox.button.advance", "adv_1", $host.getNextHighestDepth());
_local2._x = 667;
_local2._y = 166;
$finshedDesigningButton = new com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxAdvance(_local2, "Finished designing");
$finshedDesigningButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onButtonRollOver));
$finshedDesigningButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onButtonRollOut));
$finshedDesigningButton.addEventListener("onRelease", mx.utils.Delegate.create(this, launchPopupRemoveOne));
_local2 = $host.attachMovie("mc.ui.sandbox.button.advance", "adv_2", $host.getNextHighestDepth());
_local2._x = 667;
_local2._y = 166;
$finshedRemovingButton = new com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxAdvance(_local2, "Finished removing");
$finshedRemovingButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onButtonRollOver));
$finshedRemovingButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onButtonRollOut));
$finshedRemovingButton.addEventListener("onRelease", mx.utils.Delegate.create(this, launchPopupExtrasOne));
_local2 = $host.attachMovie("mc.ui.sandbox.button.advance", "adv_3", $host.getNextHighestDepth());
_local2._x = 667;
_local2._y = 166;
$finshedTestingButton = new com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxAdvance(_local2, "Finished testing");
$finshedTestingButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onButtonRollOver));
$finshedTestingButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onButtonRollOut));
$finshedTestingButton.addEventListener("onRelease", mx.utils.Delegate.create(this, launchPopupDone));
}
function onButtonRollOver() {
com.preloaded.scimus.launchpad.Engine.GameUI.instance.catchClicks(true);
}
function onButtonRollOut() {
com.preloaded.scimus.launchpad.Engine.GameUI.instance.catchClicks(false);
}
function onBackButtonRelease() {
_backListener.call();
}
function init(xmlPath, callback) {
_loadCallback = callback;
if (xmlPath == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxIntro();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onPopupIntroDismissed));
$mode = "normal";
} else {
$designedXML = new XML();
$designedXML.ignoreWhite = true;
com.preloaded.scimus.launchpad.IOHandler.__get__instance().honourImmobile = false;
$mode = "edit";
$editXML = xmlPath;
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadLevel(xmlPath, mx.utils.Delegate.create(this, onLevelXMLLoaded));
}
$saveListener = mx.utils.Delegate.create(this, returnToUI);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onLevelSaved", $saveListener);
setupArrowButtons();
}
function execCallback() {
_loadCallback.call();
delete _loadCallback;
}
function onLevelXMLLoaded() {
$designedXML = new XML();
var _local2 = new XMLNode(1, "level");
_local2.appendChild(com.preloaded.scimus.launchpad.IOHandler.currentGridXML);
$designedXML.appendChild(_local2);
$removedInventory = com.preloaded.scimus.launchpad.IOHandler.currentInventoryListing;
com.preloaded.scimus.launchpad.IOHandler.__get__instance().clearXMLFromCache($editXML);
execCallback();
launchPopupDesignOne();
}
function onPopupIntroDismissed() {
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 0;
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupShape));
}
function launchPopupShape() {
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 0;
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxShape();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onThumbnailRelease", mx.utils.Delegate.create(this, onShapeSelected));
}
function onShapeSelected(evt) {
var _local2 = evt.data;
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadLevel(com.preloaded.scimus.launchpad.Config.SERVER_URL + _local2.xmlPath, mx.utils.Delegate.create(this, onShapeLoaded));
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 1;
}
function onShapeLoaded() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupDesignOne));
}
function launchPopupDesignOne() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxDesignOne();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onPopupDesignOneDismissed));
execCallback();
}
function onPopupDesignOneDismissed() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
$backButton.show(8);
$finshedDesigningButton.show(8);
_backListener = mx.utils.Delegate.create(this, onDesignBack);
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 1;
}
function launchPopupRemoveOne() {
$finshedDesigningButton.hide();
$designedXML = generateLevelXml();
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxRemoveOne();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onPopupRemoveOneDismissed));
_local2.addEventListener("onSkipButtonRelease", mx.utils.Delegate.create(this, onPopupRemoveOneSkipped));
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 2;
}
function onPopupRemoveOneDismissed() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
$finshedRemovingButton.show(8);
for (var _local3 in $removedBlockPosns) {
var _local2 = $removedBlockPosns[_local3];
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().getBlockAt(_local2.x, _local2.y).toggleRemoveMode();
}
$tempInventory = new Array();
$removedInventory = new Array();
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__set__active(false);
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__mode("remove");
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__set__mode("remove");
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(true);
_backListener = mx.utils.Delegate.create(this, onRemoveBack);
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 2;
}
function generateTempInventory() {
$tempInventory = new Array();
$removedBlockPosns = new Array();
var _local6 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__get__grid();
var _local5 = 0;
while (_local5 < com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridHeight) {
var _local3 = 0;
while (_local3 < _local6.length) {
var _local4 = _local6[_local3][_local5];
if (_local4.removeFlag) {
var _local2 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().popBlockAt(_local3, _local5);
if ($tempInventory[_local2.type] == undefined) {
$tempInventory[_local2.type] = 0;
}
$tempInventory[_local2.type]++;
$removedBlockPosns.push(_local4.gridPos);
_local2.destroy();
}
_local3++;
}
_local5++;
}
var _local7 = generateInventoryXml($tempInventory);
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadInventorytoEngine(_local7);
}
function onPopupRemoveOneSkipped() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupDone));
}
function launchPopupExtrasOne() {
$finshedRemovingButton.hide();
$removedXML = generateLevelXml();
generateTempInventory();
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExtrasOne();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onPopupExtrasOneDismissed));
_local2.addEventListener("onSkipButtonRelease", mx.utils.Delegate.create(this, onPopupExtrasOneSkipped));
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 2;
}
function onPopupExtrasOneSkipped() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupDone));
}
function onPopupExtrasOneDismissed() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupExtrasTwo));
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 2;
}
function launchPopupExtrasTwo() {
$finshedTestingButton.hide(0);
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(false);
if ($mode == "edit") {
for (var _local3 in com.preloaded.scimus.launchpad.IOHandler.currentInventoryListing) {
if ($tempInventory[_local3] == undefined) {
$tempInventory[_local3] = com.preloaded.scimus.launchpad.IOHandler.currentInventoryListing[_local3];
} else {
$tempInventory[_local3] = $tempInventory[_local3] + com.preloaded.scimus.launchpad.IOHandler.currentInventoryListing[_local3];
}
}
}
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExtrasTwo($tempInventory);
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onPopupExtrasTwoDismissed));
_local2.addEventListener("onPreviewButtonRelease", mx.utils.Delegate.create(this, onTestButtonRelease));
_local2.addEventListener("onBackButtonRelease", mx.utils.Delegate.create(this, onExtrasBack));
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 2;
}
function onTestButtonRelease(evt) {
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__mode("game");
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__set__mode("game");
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__active(true);
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__set__active(true);
$tempInventory = evt.inventory;
var _local2 = generateLevelXml();
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadXMLToEngine(_local2, null, true);
$finshedTestingButton.show(8);
$finshedTestingButton.addEventListener("onRelease", mx.utils.Delegate.create(this, launchPopupExtrasTwo));
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
_backListener = mx.utils.Delegate.create(this, launchPopupExtrasTwo);
}
function onPopupExtrasTwoDismissed(evt) {
$tempInventory = evt.inventory;
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupDone));
}
function launchPopupDone() {
Key.removeListener(this);
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxDone();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onSaveButtonRelease", mx.utils.Delegate.create(this, onPopupSaveSelected));
_local2.addEventListener("onBackButtonRelease", mx.utils.Delegate.create(this, onDoneBack));
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 3;
}
function onPopupSaveSelected(evt) {
saveLevel(evt.title, evt.name);
com.preloaded.scimus.launchpad.Engine.UIElements.TitleStripBase.instance.stage = 3;
}
function saveLevel(title, name) {
$levelTitle = title;
$levelName = name;
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn && (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous)) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.saveLevel(generateLevelXml(true), title, name);
} else {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.PopupLoginPrompt("To save your level, you need to create an account. Do this now?", "save");
_local2.emailPrompt = "To restore your level in future you\nneed a secret code. Enter your email address to create one now.";
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(this, launchPopupExtrasTwo));
_local2.onUserRegistered = mx.utils.Delegate.create(this, onNewUserSaveCallback);
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
}
}
function onNewUserSaveCallback() {
saveLevel($levelTitle, $levelName);
}
function returnToUI() {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.removeEventListener("onLevelSaved", $saveListener);
delete $saveListener;
flush();
com.preloaded.scimus.launchpad.ConnectionHandler.instance.flushCustomLevels();
com.preloaded.scimus.launchpad.Main.instance.returnToUI("sandbox");
}
function onDesignBack() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackDesign();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(this, clearPopup));
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onDesignBackConfirmed));
}
function onDesignBackConfirmed() {
$finshedDesigningButton.hide(0);
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().clearAllBlocks();
onPopupIntroDismissed();
}
function onRemoveBack() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackRemove();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(this, clearPopup));
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onRemoveBackConfirmed));
}
function onRemoveBackConfirmed() {
$finshedRemovingButton.hide(0);
$removedInventory = new Array();
$tempInventory = new Array();
delete $removedBlockPosns;
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadXMLToEngine($designedXML);
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().setupSandboxInventory();
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().removeEventListener($gridListener);
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().__set__mode("game");
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__set__mode("game");
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().__set__active(true);
onPopupDesignOneDismissed();
}
function onExtrasBack() {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackExtras();
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(this, launchPopupExtrasTwo));
_local2.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onExtrasBackConfirmed));
}
function onExtrasBackConfirmed() {
com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance().setupSandboxInventory();
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadXMLToEngine($designedXML);
onPopupRemoveOneDismissed();
}
function onDoneBack() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup(mx.utils.Delegate.create(this, launchPopupExtrasTwo));
}
function clearPopup() {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
}
function generateLevelXml(immobile) {
var _local3 = new XML();
var _local2 = new XMLNode(1, "level");
_local2.appendChild(generateInventoryXml($tempInventory));
_local2.appendChild(generateGridXml(com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().__get__grid(), immobile));
_local3.appendChild(_local2);
return(_local3);
}
function generateGridXml(grid, immobile) {
var _local9 = new XMLNode(1, "grid");
var _local4 = 0;
while (_local4 < com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().gridHeight) {
var _local6 = true;
var _local5 = new XMLNode(1, "row");
_local5.attributes.index = _local4;
var _local3 = 0;
while (_local3 < grid.length) {
var _local1 = grid[_local3][_local4];
if ((_local1 != undefined) && (_local1.saveMe)) {
var _local2 = new XMLNode(1, "block");
_local2.attributes.type = _local1.type;
_local2.attributes.index = _local3;
if (immobile === true) {
_local2.attributes.immobile = true;
} else {
_local2.attributes.immobile = _local1.immobile;
}
if (_local1.rotation != undefined) {
_local2.attributes.rotation = _local1.rotation;
}
if (_local1.effectiveDistance != undefined) {
_local2.attributes.effectiveDistance = _local1.effectiveDistance;
}
if (_local1.power != undefined) {
_local2.attributes.power = _local1.power;
}
if (_local1.state != undefined) {
_local2.attributes.state = _local1.state;
}
_local5.appendChild(_local2);
_local6 = false;
}
_local3++;
}
if (!_local6) {
_local9.appendChild(_local5);
}
_local4++;
}
return(_local9);
}
function generateInventoryXml(arrInventory) {
var _local6 = new XMLNode(1, "inventory");
var _local1 = new Array();
var _local3 = 0;
for (var _local7 in arrInventory) {
if (_local3 < 5) {
var _local4 = new XMLNode(1, "group");
_local4.attributes.name = "group_" + _local1.length;
_local4.attributes.colour = "0xFECD09";
_local1.push(_local4);
} else {
var _local4 = _local1[_local3 % 5];
}
var _local2 = new XMLNode(1, "block");
_local2.attributes.type = _local7;
_local2.attributes.quota = arrInventory[_local7];
_local4.appendChild(_local2);
_local3++;
}
for (var _local7 in _local1) {
_local6.appendChild(_local1[_local7]);
}
return(_local6);
}
function flush() {
delete $designedXML;
delete $removedXML;
}
function destroy() {
flush();
delete $removedBlockPosns;
$removedInventory = null;
delete $removedInventory;
$removedXML = null;
com.preloaded.scimus.launchpad.ConnectionHandler.instance.removeEventListener("onLevelSaved", $saveListener);
delete $saveListener;
delete $removedXML;
delete $finshedDesigningButton;
delete $finshedRemovingButton;
delete $finshedRemovingButton;
$backButton.__get__mc().removeMovieClip();
delete $backButton;
com.preloaded.scimus.launchpad.Engine.GridInterface.__get__instance().onBlockRemoved = null;
Key.removeListener(this);
$host.removeMovieClip();
}
}
Symbol 1396 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxBack] Frame 0
class com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxBack extends com.preloaded.UI.MovieClipButton
{
var $mc, __set___visible, $maskTween_x, $bgTween_width;
function ButtonSandboxBack (mc, label) {
super(mc, "over", "out");
$mc.maskMc._width = 45;
$mc.maskMc._x = (-$mc.maskMc._width) + 25;
$mc.bgMc._orig_width = $mc.bgMc._width;
__set___visible(false);
$mc._alpha = 0;
com.preloaded.gfx.ColorUtils.colorMc($mc, 16698633);
}
function onRollOver() {
$maskTween_x.stop();
$bgTween_width.stop();
$maskTween_x = new mx.transitions.Tween($mc.maskMc, "_x", com.robertpenner.easing.Quad.easeOut, -$mc.maskMc._width, 25, 8, false);
$bgTween_width = new mx.transitions.Tween($mc.bgMc, "_width", com.robertpenner.easing.Quad.easeOut, $mc.bgMc._width, $mc.maskMc._width + 25, 8, false);
$mc.hitterMc._width = $mc.maskMc._width + 30;
$mc.hitterMc._x = -$mc.maskMc._width;
super.onRollOver();
com.preloaded.gfx.ColorUtils.colorMc($mc, 16777215);
}
function onRollOut() {
$maskTween_x.stop();
$bgTween_width.stop();
$maskTween_x = new mx.transitions.Tween($mc.maskMc, "_x", com.robertpenner.easing.Quad.easeOut, $mc.maskMc._x, (-$mc.maskMc._width) + 25, 5, false);
$bgTween_width = new mx.transitions.Tween($mc.bgMc, "_width", com.robertpenner.easing.Quad.easeOut, $mc.bgMc._width, $mc.bgMc._orig_width, 5, false);
$mc.hitterMc._width = 30;
$mc.hitterMc._x = 0;
super.onRollOut();
com.preloaded.gfx.ColorUtils.colorMc($mc, 16698633);
}
}
Symbol 1397 MovieClip [__Packages.com.preloaded.gfx.ColorUtils] Frame 0
class com.preloaded.gfx.ColorUtils
{
function ColorUtils () {
}
static function colorMc(mc, color) {
var _local4 = (color >> 16) & msk;
var _local6 = (color >> 8) & msk;
var _local1 = color & msk;
var _local5 = new flash.geom.ColorTransform(_local4 / c, _local6 / c, _local1 / c, 1, 0, 0, 0, 0);
var _local3 = new flash.geom.Transform(mc);
_local3.colorTransform = _local5;
}
static var msk = 255;
static var c = 255;
}
Symbol 1398 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxAdvance] Frame 0
class com.preloaded.scimus.launchpad.ui.Sandbox.ButtonSandboxAdvance extends com.preloaded.UI.MovieClipButton
{
var resetLabel, $mc, __set___visible, $maskTween_x, $bgTween_width, $bgTween_x;
function ButtonSandboxAdvance (mc, label) {
super(mc, "over", "out");
resetLabel(label);
$mc.maskMc._width = $mc.txtLabel.textWidth + 10;
$mc.bgMc._orig_width = $mc.bgMc._width;
__set___visible(false);
$mc._alpha = 0;
com.preloaded.gfx.ColorUtils.colorMc($mc, 16698633);
}
function onRollOver() {
$maskTween_x.stop();
$bgTween_width.stop();
$bgTween_x.stop();
$maskTween_x = new mx.transitions.Tween($mc.maskMc, "_x", com.robertpenner.easing.Quad.easeOut, $mc.maskMc._x, -$mc.txtLabel.textWidth, 8, false);
$bgTween_width = new mx.transitions.Tween($mc.bgMc, "_width", com.robertpenner.easing.Quad.easeOut, $mc.bgMc._width, $mc.maskMc._width + 25, 8, false);
$bgTween_x = new mx.transitions.Tween($mc.bgMc, "_x", com.robertpenner.easing.Quad.easeOut, $mc.bgMc._x, -($mc.txtLabel.textWidth + 10), 8, false);
$mc.hitterMc._width = $mc.maskMc._width + 30;
$mc.hitterMc._x = -$mc.maskMc._width;
super.onRollOver();
com.preloaded.gfx.ColorUtils.colorMc($mc, 16777215);
}
function onRollOut() {
$maskTween_x.stop();
$bgTween_width.stop();
$bgTween_x.stop();
$maskTween_x = new mx.transitions.Tween($mc.maskMc, "_x", com.robertpenner.easing.Quad.easeOut, $mc.maskMc._x, 0, 5, false);
$bgTween_width = new mx.transitions.Tween($mc.bgMc, "_width", com.robertpenner.easing.Quad.easeOut, $mc.bgMc._width, $mc.bgMc._orig_width, 5, false);
$bgTween_x = new mx.transitions.Tween($mc.bgMc, "_x", com.robertpenner.easing.Quad.easeOut, $mc.bgMc._x, 0, 5, false);
$mc.hitterMc._width = 30;
$mc.hitterMc._x = 0;
super.onRollOut();
com.preloaded.gfx.ColorUtils.colorMc($mc, 16698633);
}
}
Symbol 1399 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxIntro] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxIntro extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $continueButton, $mc, dispatchEvent;
function PopupSandboxIntro () {
super("mc.popup.sandbox.intro");
}
function show(host) {
super.show(host);
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
}
function onHitterRollOver() {
$continueButton.onRollOver();
}
function onHitterRollOut() {
$continueButton.onRollOut();
}
function onHitterRelease() {
$continueButton.onRelease();
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $continueButton;
super.destroy();
}
}
Symbol 1400 MovieClip [__Packages.com.preloaded.scimus.launchpad.IOHandler] Frame 0
class com.preloaded.scimus.launchpad.IOHandler extends mx.events.EventDispatcher
{
static var $instance, currentGridXML, currentInventoryXML, currentInventoryListing, currentBlockListing;
var honourImmobile, $xmlCache, dispatchEvent, $xml;
function IOHandler () {
super(this);
$instance = this;
flushXMLCache();
honourImmobile = true;
}
function flushXMLCache() {
for (var _local2 in $xmlCache) {
delete $xmlCache[_local2];
$xmlCache[_local2] = null;
}
$xmlCache = new Array();
}
function clearXMLFromCache(url) {
$xmlCache[url] = null;
delete $xmlCache[url];
}
function loadLevel(url, callback) {
com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance().clearAllBlocks();
var ref = this;
var cb = callback;
var _local2 = function () {
ref.loadXMLToEngine(this, cb);
};
loadXMLFile(url, _local2);
}
function loadXMLFile(url, onLoad) {
var _local2 = 0;
for (var _local3 in $xmlCache) {
_local2 = _local2 + $xmlCache[_local3].getBytesTotal();
}
if (_local2 > com.preloaded.scimus.launchpad.Config.XML_CACHE_SIZE) {
$xmlCache.shift();
_local2 = 0;
for (var _local3 in $xmlCache) {
_local2 = _local2 + $xmlCache[_local3].getBytesTotal();
}
}
if (($xmlCache[url] == undefined) || ($xmlCache[url] == null)) {
var _local4 = new XML();
_local4.ignoreWhite = true;
_local4.load(url);
_local4.onLoad = onLoad;
$xmlCache[url] = _local4;
} else {
var _local4 = $xmlCache[url];
_local4.onLoad = onLoad;
_local4.onLoad.apply(_local4);
}
}
function loadXMLToEngine(xmlObj, callback, parseInventory) {
var _local6 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance();
for (var _local5 in xmlObj.firstChild.childNodes) {
var _local2 = xmlObj.firstChild.childNodes[_local5];
switch (_local2.nodeName) {
case "grid" :
loadGridtoEngine(_local2);
currentGridXML = _local2;
break;
case "inventory" :
if ((com.preloaded.scimus.launchpad.Engine.EngineHandler.mode == "game") || (parseInventory)) {
loadInventorytoEngine(_local2);
}
currentInventoryXML = _local2;
}
}
callback.call();
dispatchEvent({type:"onLevelLoaded", target:this});
}
function loadInventorytoEngine(inventoryNode) {
currentInventoryListing = new Array();
var _local8 = com.preloaded.scimus.launchpad.Engine.Inventory.__get__instance();
_local8.clear();
for (var _local9 in inventoryNode.childNodes) {
var _local3 = inventoryNode.childNodes[_local9];
var _local5 = _local8.createGroup(_local3.attributes.name, Number(_local3.attributes.colour));
for (var _local7 in _local3.childNodes) {
var _local4 = _local3.childNodes[_local7];
var _local1 = _local4.attributes.type;
var _local2 = com.preloaded.scimus.launchpad.blocks.Interface.InterfaceBlockFactory.createBlock(_local1);
_local2.__set__quota(Number(_local4.attributes.quota));
_local5.addItem(_local2);
if (currentInventoryListing[_local1] == undefined) {
currentInventoryListing[_local1] = 0;
} else {
currentInventoryListing[_local1]++;
}
}
}
}
function loadGridtoEngine(gridNode) {
currentBlockListing = new Array();
var _local9 = com.preloaded.scimus.launchpad.Engine.GridHandler.__get__instance();
_local9.clearAllBlocks();
for (var _local12 in gridNode.childNodes) {
var _local7 = gridNode.childNodes[_local12];
for (var _local11 in _local7.childNodes) {
var _local3 = _local7.childNodes[_local11];
var _local5 = _local3.attributes.type;
var _local8 = new _global.com.preloaded.scimus.launchpad.blocks.Interface["Interface" + _local5]();
var _local4 = _local8.instantiate(com.preloaded.scimus.launchpad.Engine.EngineHandler.instance.getNewContainer());
if ((honourImmobile == undefined) || (honourImmobile === true)) {
if (_local3.attributes.immobile == undefined) {
if ((com.preloaded.scimus.launchpad.Engine.EngineHandler.mode == "sandbox") && ((_local5 == "BlockStart") || (_local5 == "BlockFinish"))) {
_local4.immobile = false;
} else {
_local4.immobile = true;
}
} else {
var _local6 = false;
if (typeof(_local3.attributes.immobile) == "string") {
_local6 = ((_local3.attributes.immobile == "true") ? true : false);
} else {
_local6 = _local3.attributes.immobile;
}
_local4.immobile = _local6;
}
} else {
_local4.immobile = false;
}
_local9.addBlock(_local4, Number(_local3.attributes.index), Number(_local7.attributes.index));
if (_local3.attributes.rotation != undefined) {
_local4.rotation = Number(_local3.attributes.rotation);
}
if (_local3.attributes.effectiveDistance != undefined) {
_local4.effectiveDistance = Number(_local3.attributes.effectiveDistance);
}
if (_local3.attributes.state != undefined) {
_local4.state = _local3.attributes.state;
}
if (currentBlockListing[_local5] == undefined) {
currentBlockListing[_local5] = 0;
} else {
currentBlockListing[_local5]++;
}
}
}
com.preloaded.scimus.launchpad.Engine.MaterialLayer.instance.update();
honourImmobile = true;
}
static function get instance() {
return($instance);
}
function onPHPSaveComplete() {
var _local2 = $xml.firstChild.firstChild.firstChild.nodeValue;
com.preloaded.scimus.launchpad.ui.PopupHandler.showError(_local2 + "\n(This is not an error ;) )");
}
}
Symbol 1401 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxShape] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxShape extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $thumbnails, $mc, $thumbPointer, dispatchEvent;
function PopupSandboxShape () {
super("mc.popup.sandbox.shape");
}
function show(host) {
super.show(host, undefined, Math.floor((com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT / 2) - 190));
$thumbnails = new Array();
var _local5 = com.preloaded.scimus.launchpad.ConnectionHandler.sandboxLevelsThread.levels;
var _local4 = 0;
while (_local4 < _local5.length) {
var _local3 = new com.preloaded.scimus.launchpad.ui.LevelThumbnail($mc);
_local3.mc._x = 18 + ((_local4 % 3) * (_local3.mc._width + 40));
_local3.mc._y = 134 + (Math.floor(_local4 / 3) * (_local3.mc._height + 20));
_local3.__set__border(16698633);
_local3.addEventListener("onLoadComplete", mx.utils.Delegate.create(this, _stepLoad));
_local3.addEventListener("onRelease", mx.utils.Delegate.create(this, onThumbnailRelease));
$thumbnails.push(_local3);
_local4++;
}
}
function onShowComplete() {
$thumbPointer = -1;
_stepLoad();
}
function _stepLoad() {
$thumbPointer++;
$thumbnails[$thumbPointer].showForLevel(com.preloaded.scimus.launchpad.ConnectionHandler.sandboxLevelsThread.levels[$thumbPointer]);
}
function onThumbnailRelease(evt) {
dispatchEvent({type:"onThumbnailRelease", data:evt.data, target:this});
}
function destroy() {
for (var _local3 in $thumbnails) {
$thumbnails[_local3].destroy();
}
super.destroy();
}
}
Symbol 1402 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.LevelThumbnail] Frame 0
class com.preloaded.scimus.launchpad.ui.LevelThumbnail extends com.preloaded.lang.DispatcherBase
{
var GRID_SIZE, BLOCK_SIZE, GRID_WIDTH, GRID_HEIGHT, mc, $canvasMc, $spinnerMc, $active, dispatchEvent, data, $borderMc, $outColour, __get__border, $blockMcs, $animationPointer, __get__showLabel;
function LevelThumbnail (host) {
super(this);
GRID_SIZE = 7;
BLOCK_SIZE = 6;
GRID_WIDTH = 17;
GRID_HEIGHT = 9;
var _local4 = host.getNextHighestDepth();
mc = host.attachMovie("mc.ui.thumbnail.level", "thumb_" + _local4, _local4);
$canvasMc = mc.createEmptyMovieClip("canvasMc", 20);
var _local3 = $canvasMc.attachMovie("blockUtil", "bg", $canvasMc.getNextHighestDepth());
com.preloaded.gfx.ColorUtils.colorMc(_local3, 0);
_local3._width = GRID_SIZE * (GRID_WIDTH + 2);
_local3._height = GRID_SIZE * (GRID_HEIGHT + 2);
$spinnerMc = $canvasMc.attachMovie("spinner", "spinnerMc", $canvasMc.getNextHighestDepth());
$spinnerMc._x = _local3._width / 2;
$spinnerMc._y = _local3._height / 2;
mc.hitterMc.onRelease = mx.utils.Delegate.create(this, onHitterRelease);
mc.hitterMc.onRollOver = mx.utils.Delegate.create(this, onHitterRollOver);
mc.hitterMc.onRollOut = mx.utils.Delegate.create(this, onHitterRollOut);
clear();
mc.txtTitle.htmlText = "";
$active = false;
}
function onHitterRelease() {
dispatchEvent({type:"onRelease", target:this, data:data});
}
function onHitterRollOver() {
mc.txtTitle.textColor = 16777215 /* 0xFFFFFF */;
com.preloaded.gfx.ColorUtils.colorMc($borderMc, 16777215);
}
function onHitterRollOut() {
mc.txtTitle.textColor = $outColour;
com.preloaded.gfx.ColorUtils.colorMc($borderMc, $outColour);
}
function set border(col) {
$borderMc = mc.attachMovie("blockUtil", "border", 10);
var _local2 = 1;
$borderMc._width = $canvasMc._width + (_local2 * 2);
$borderMc._height = $canvasMc._height + (_local2 * 2);
$borderMc._x = $canvasMc._x - _local2;
$borderMc._y = $canvasMc._y - _local2;
com.preloaded.gfx.ColorUtils.colorMc($borderMc, col);
$outColour = col;
//return(__get__border());
}
function clear() {
mc.txtTitle.htmlText = "";
$spinnerMc._visible = false;
delete $canvasMc.onEnterFrame;
for (var _local2 in $blockMcs) {
$blockMcs[_local2].tween.stop();
$blockMcs[_local2].removeMovieClip();
}
$active = false;
}
function showForLevel(lvl) {
clear();
$active = true;
data = lvl;
mc.txtTitle.htmlText = lvl.title;
$spinnerMc._visible = true;
var ref = this;
var _local3 = function () {
ref.onXMLLoad(this);
};
com.preloaded.scimus.launchpad.IOHandler.__get__instance().loadXMLFile(com.preloaded.scimus.launchpad.Config.SERVER_URL + lvl.xmlPath, _local3);
}
function onXMLLoad(xml) {
if ($active) {
drawFromXML(xml);
}
}
function drawFromXML(xml) {
$spinnerMc._visible = false;
$blockMcs = new Array();
var _local8 = com.xfactorstudio.xml.xpath.XPath.selectNodes(xml, "/level/grid")[0];
for (var _local10 in _local8.childNodes) {
var _local6 = _local8.childNodes[_local10];
for (var _local9 in _local6.childNodes) {
var _local3 = _local6.childNodes[_local9];
var _local4 = _local3.attributes.type;
var _local5 = $canvasMc.getNextHighestDepth();
var _local2 = $canvasMc.attachMovie("preview.block." + _local4, "mc_" + _local5, _local5);
_local2._x = (Number(_local3.attributes.index) + 1) * GRID_SIZE;
_local2._y = (Number(_local6.attributes.index) + 1) * GRID_SIZE;
_local2._width = (_local2._height = BLOCK_SIZE);
if ((_local4 != "BlockFan") && (_local4 != "BlockTorch")) {
var _local7 = Number(_local3.attributes.rotation);
_local2._rotation = _local7;
switch (_local7) {
case 90 :
_local2._x = _local2._x + _local2._width;
break;
case 180 :
_local2._x = _local2._x + _local2._width;
_local2._y = _local2._y + _local2._height;
break;
case 270 :
_local2._y = _local2._y + _local2._height;
}
}
$blockMcs.push(_local2);
_local2._visible = false;
}
}
$blockMcs = com.preloaded.lang.ArrayUtils.shuffle($blockMcs);
$animationPointer = 0;
$canvasMc.onEnterFrame = mx.utils.Delegate.create(this, stepAnimation);
dispatchEvent({type:"onLoadComplete", target:this});
}
function stepAnimation() {
var _local2 = 0;
while (_local2 < ($blockMcs.length / 10)) {
_stepAnimation();
_local2++;
}
}
function _stepAnimation() {
var _local2 = $blockMcs[$animationPointer++];
_local2._visible = true;
_local2.tween.stop();
_local2.tween = new mx.transitions.Tween(_local2, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 5, false);
if ($animationPointer == $blockMcs.length) {
delete $canvasMc.onEnterFrame;
}
}
function set showLabel(b) {
mc.txtTitle._visible = b;
if (!b) {
mc.hitterMc._y = 0;
mc.hitterMc._height = 60;
} else {
mc.hitterMc._y = -25;
mc.hitterMc._height = 85;
}
//return(__get__showLabel());
}
function destroy() {
clear();
delete data;
$canvasMc.removeMovieClip();
delete $canvasMc;
$borderMc.removeMovieClip();
delete $borderMc;
$spinnerMc.removeMovieClip;
mc.removeMovieClip();
delete mc;
}
}
Symbol 1403 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxDesignOne] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxDesignOne extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $continueButton, $mc, dispatchEvent;
function PopupSandboxDesignOne () {
super("mc.popup.sandbox.design.1");
}
function show(host) {
super.show(host);
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
}
function onHitterRollOver() {
$continueButton.onRollOver();
}
function onHitterRollOut() {
$continueButton.onRollOut();
}
function onHitterRelease() {
$continueButton.onRelease();
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $continueButton;
super.destroy();
}
}
Symbol 1404 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxRemoveOne] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxRemoveOne extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $continueButton, $mc, $skipButton, dispatchEvent;
function PopupSandboxRemoveOne () {
super("mc.popup.sandbox.remove.1");
}
function show(host) {
super.show(host);
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
$skipButton = new com.preloaded.UI.MovieClipButton($mc.skipButtonMc, "over", "out");
$skipButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSkipButtonRelease));
}
function onSkipButtonRelease() {
$skipButton.enable(false);
dispatchEvent({type:"onSkipButtonRelease", target:this});
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $continueButton;
super.destroy();
}
}
Symbol 1405 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExtrasOne] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExtrasOne extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $continueButton, $mc, $skipButton, dispatchEvent;
function PopupSandboxExtrasOne () {
super("mc.popup.sandbox.extra.1");
}
function show(host) {
super.show(host);
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
$skipButton = new com.preloaded.UI.MovieClipButton($mc.skipButtonMc, "over", "out");
$skipButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSkipButtonRelease));
}
function onSkipButtonRelease() {
$skipButton.enable(false);
dispatchEvent({type:"onSkipButtonRelease", target:this});
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $continueButton;
delete $skipButton;
super.destroy();
}
}
Symbol 1406 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExtrasTwo] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExtrasTwo extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $inventory, $spinners, $mc, $continueButton, $previewButton, $backButton, dispatchEvent;
function PopupSandboxExtrasTwo (inventory) {
super("mc.popup.sandbox.extra.2");
$inventory = inventory;
}
function show(host) {
super.show(host);
$spinners = new Array();
var _local4 = "spinner";
for (var _local5 in $mc) {
if (_local5.indexOf(_local4) > -1) {
var _local3 = new com.preloaded.scimus.launchpad.ui.Sandbox.SpinnerSandboxExtra($mc[_local5]);
_local3.id = _local5.substr(_local4.length);
_local3.accentColour = 7536384 /* 0x72FF00 */;
if ($inventory[_local3.id] != undefined) {
_local3.__set__count($inventory[_local3.id]);
}
$spinners.push(_local3);
}
}
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
$previewButton = new com.preloaded.UI.MovieClipButton($mc.previewButtonMc, "over", "out");
$previewButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onPreviewButtonRelease));
$backButton = new com.preloaded.UI.MovieClipButton($mc.buttonBackMc, "over", "out");
$backButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onBackButtonRelease));
}
function onPreviewButtonRelease() {
var _local2 = constructInventory();
dispatchEvent({type:"onPreviewButtonRelease", target:this, inventory:_local2});
}
function onContinueButtonRelease() {
$continueButton.enable(false);
var _local2 = constructInventory();
dispatchEvent({type:"onContinueButtonRelease", target:this, inventory:_local2});
}
function onBackButtonRelease() {
$backButton.enable(false);
dispatchEvent({type:"onBackButtonRelease", target:this});
}
function constructInventory() {
var _local3 = new Array();
for (var _local4 in $spinners) {
var _local2 = $spinners[_local4];
if (_local2.__get__count() > 0) {
_local3[_local2.id] = _local2.count;
}
}
return(_local3);
}
function destroy() {
for (var _local3 in $spinners) {
$spinners[_local3].destroy();
}
delete $continueButton;
delete $previewButton;
delete $backButton;
super.destroy();
}
}
Symbol 1407 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Sandbox.SpinnerSandboxExtra] Frame 0
class com.preloaded.scimus.launchpad.ui.Sandbox.SpinnerSandboxExtra
{
var $mc, $iconMc, $texter, $upButton, $downButton, $count, accentColour;
function SpinnerSandboxExtra (mc) {
$mc = mc;
$iconMc = mc.mcIcon;
$texter = mc.txtNumber;
$upButton = new com.preloaded.UI.MovieClipButton(mc.buttonUpArrowMc, "over", "out");
$downButton = new com.preloaded.UI.MovieClipButton(mc.buttonDownArrowMc, "over", "out");
$upButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onButtonUpRelease));
$downButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onButtonDownRelease));
count = (0);
}
function onButtonUpRelease() {
if ($count < 99) {
count = ((count+1));
}
}
function onButtonDownRelease() {
if ($count > 0) {
count = ((count-1));
}
}
function setColor(col) {
com.preloaded.gfx.ColorUtils.colorMc($iconMc, col);
$texter.textColor = col;
}
function set count(n) {
if (n > 0) {
setColor(accentColour);
} else {
setColor(2116448);
}
$texter.text = com.preloaded.UtilsString.padNumber(n);
$count = n;
//return(count);
}
function get count() {
return($count);
}
function destroy() {
delete $upButton;
delete $downButton;
}
}
Symbol 1408 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxDone] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxDone extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $backButton, $mc, $saveButton, $defaultTexts, dispatchEvent;
function PopupSandboxDone () {
super("mc.popup.sandbox.done");
}
function show(host) {
super.show(host);
$backButton = new com.preloaded.UI.MovieClipButton($mc.buttonBackMc, "over", "out");
$backButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onBackButtonRelease));
$saveButton = new com.preloaded.UI.MovieClipButton($mc.buttonSaveMc, "over", "out");
$saveButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSaveButtonRelease));
$mc.tabEnabled = true;
$mc.txtTitle.onSetFocus = mx.utils.Delegate.create(this, onTitleFocus);
$mc.txtTitle.onKillFocus = mx.utils.Delegate.create(this, checkTexts);
$mc.txtTitle.tabIndex = 1;
$mc.txtName.onSetFocus = mx.utils.Delegate.create(this, onNameFocus);
$mc.txtName.onKillFocus = mx.utils.Delegate.create(this, checkTexts);
$mc.txtName.tabIndex = 2;
$mc.titleErrorMc._visible = ($mc.nameErrorMc._visible = false);
$mc.titleErrorMc._alpha = ($mc.nameErrorMc._alpha = 0);
$defaultTexts = new Array($mc.txtTitle.text, $mc.txtName.text);
}
function onTitleFocus() {
$mc.txtTitle.text = "";
hideMsg($mc.titleErrorMc);
}
function onNameFocus() {
$mc.txtName.text = "";
hideMsg($mc.nameErrorMc);
}
function checkTexts() {
if ($mc.txtTitle.text.length <= 0) {
$mc.txtTitle.text = $defaultTexts[0];
}
if ($mc.txtName.text.length <= 0) {
$mc.txtName.text = $defaultTexts[1];
}
}
function onSaveButtonRelease() {
var _local2 = true;
checkTexts();
if ($mc.txtTitle.text == $defaultTexts[0]) {
showMsg($mc.titleErrorMc);
_local2 = false;
}
if ($mc.txtName.text == $defaultTexts[1]) {
showMsg($mc.nameErrorMc);
_local2 = false;
}
if (_local2) {
dispatchEvent({type:"onSaveButtonRelease", title:$mc.txtTitle.text, name:$mc.txtName.text, target:this});
}
}
function onBackButtonRelease() {
dispatchEvent({type:"onBackButtonRelease", target:this});
}
function showMsg(clip) {
clip._visible = true;
clip.tween.stop();
clip.tween = new mx.transitions.Tween(clip, "_alpha", com.robertpenner.easing.Quad.easeOut, clip._alpha, 100, 8, false);
}
function hideMsg(clip, onComplete) {
clip.tween.stop();
clip.tween = new mx.transitions.Tween(clip, "_alpha", com.robertpenner.easing.Quad.easeOut, clip._alpha, 0, 5, false);
clip.tween.onMotionFinished = onComplete;
}
function destroy() {
$mc.titleErrorMc.tween.stop();
$mc.nameErrorMc.tween.stop();
delete $backButton;
delete $saveButton;
super.destroy();
}
}
Symbol 1409 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupLoginPrompt] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupLoginPrompt extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
static var seen;
var $mode, $warning, $panelPrompt, $mc, $panelEmail, emailPrompt, $panelCode, onUserRegistered, dispatchEvent;
function PopupLoginPrompt (warning, mode) {
super("mc.popup.login.prompt");
$mode = mode;
$warning = warning;
}
function show(host) {
super.show(host);
$panelPrompt = new com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginPrompt($mc.panelPromptMc, $mode, $warning);
$panelEmail = new com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginEmail($mc.panelEmailMc, emailPrompt);
$panelCode = new com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginCode($mc.panelCodeMc);
$panelPrompt.addEventListener("onCreateButtonRelease", mx.utils.Delegate.create(this, onCreateButtonRelease));
$panelPrompt.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(this, onCancelButtonRelease));
$panelEmail.addEventListener("onSubmitButtonRelease", mx.utils.Delegate.create(this, onEmailSubmit));
$panelCode.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onNewUserContinue));
$panelCode.mc._x = ($panelEmail.mc._x = $panelPrompt.mc._x);
$panelCode.mc._visible = ($panelEmail.mc._visible = false);
$mc.onEnterFrame = mx.utils.Delegate.create(this, recenter);
seen = true;
}
function recenter() {
$mc._x = (com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH / 2) - ($mc._width / 2);
}
function onCreateButtonRelease() {
$panelEmail.show();
}
function onEmailSubmit() {
if (com.preloaded.UtilsString.isEmail($panelEmail.__get__email())) {
$panelEmail.submitButton.enable(false);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.registerNewUser($panelEmail.__get__email());
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onRegisterNewUserResponse", mx.utils.Delegate.create(this, onRegisterNewUserResponse));
} else {
$panelEmail.showError();
}
}
function onRegisterNewUserResponse(evt) {
$panelEmail.hide(10, null, $panelPrompt.mc._x);
$panelCode.show(evt.response);
}
function onNewUserContinue() {
onUserRegistered.call();
}
function onCancelButtonRelease() {
dispatchEvent({type:"onCancelButtonRelease", target:this});
}
function hide() {
$panelPrompt.deactivate();
super.hide();
}
function destroy() {
delete $mc.onEnterFrame;
$panelEmail.destroy();
$panelPrompt.destroy();
$panelCode.destroy();
super.destroy();
}
}
Symbol 1410 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase extends com.preloaded.lang.DispatcherBase
{
var mc, $accentColourHi, $accentColourLo, tween;
function PanelBase (arg_mc) {
super(this);
mc = arg_mc;
mc.tabEnabled = false;
mc.origin = new flash.geom.Point(Math.round(mc._x), Math.round(mc._y));
}
function setColours(hi, lo) {
$accentColourHi = hi;
$accentColourLo = lo;
com.preloaded.gfx.ColorUtils.colorMc(mc.panelBgMc, lo);
com.preloaded.gfx.ColorUtils.colorMc(mc.copyMc, hi);
}
function destroy() {
mc.removeMovieClip();
super.clearListeners();
}
function hide(time, onComplete) {
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, mc.origin.x - com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, time, false);
tween.onMotionFinished = onComplete;
Key.removeListener(this);
}
function resetPos() {
mc._x = mc.origin.x;
}
}
Symbol 1411 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginPrompt] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginPrompt extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var $createButton, mc, $cancelButton, $continueButton, dispatchEvent;
function PanelLoginPrompt (arg_mc, mode, warning) {
super(arg_mc);
$createButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton(mc.buttonCreateMc);
$createButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onCreateButtonRelease));
mc.txtWarning.text = warning;
if (mode == "save") {
mc.continueButtonMc._visible = false;
$cancelButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton(mc.buttonCancelMc);
$cancelButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onCancelButtonRelease));
} else {
mc.cancelButtonMc._visible = false;
$continueButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton(mc.buttonContinueMc);
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
}
}
function deactivate() {
$cancelButton.active = false;
$createButton.active = false;
$continueButton.active = false;
}
function onCreateButtonRelease() {
dispatchEvent({type:"onCreateButtonRelease", target:this});
}
function onCancelButtonRelease() {
dispatchEvent({type:"onCancelButtonRelease", target:this});
}
function onContinueButtonRelease() {
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $createButton;
delete $cancelButton;
delete $continueButton;
super.destroy();
}
}
Symbol 1412 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton extends mx.events.EventDispatcher
{
var $mc, $maskMc, active, $selected, $tween_x, $tween_width, dispatchEvent;
function LoginPanelButton (mc) {
super(this);
$mc = mc;
$maskMc = $mc.rolloverMaskMc;
mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
mc.onRelease = mx.utils.Delegate.create(this, onRelease);
$maskMc._orig_x = $maskMc._x;
$maskMc._orig_width = $maskMc._width;
active = true;
}
function set selected(b) {
$selected = b;
if (!b) {
if ($mc.hitTest(_root._xmouse, _root._ymouse)) {
onRollOver();
} else {
onRollOut();
}
}
//return(selected);
}
function get selected() {
return($selected);
}
function onRollOver() {
if (active) {
var _local2 = 8;
$tween_x.stop();
$tween_width.stop();
$tween_x = new mx.transitions.Tween($maskMc, "_x", com.robertpenner.easing.Quad.easeOut, $maskMc._x, 0, _local2, false);
$tween_width = new mx.transitions.Tween($maskMc, "_width", com.robertpenner.easing.Quad.easeOut, $maskMc._width, $mc.bgMc._width + $maskMc._orig_width, _local2, false);
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
dispatchEvent({type:"onRollOver", target:this});
}
}
function onRollOut() {
if (active) {
if (!selected) {
var _local2 = 5;
$tween_x.stop();
$tween_width.stop();
$tween_x = new mx.transitions.Tween($maskMc, "_x", com.robertpenner.easing.Quad.easeOut, $maskMc._x, $maskMc._orig_x, _local2, false);
$tween_width = new mx.transitions.Tween($maskMc, "_width", com.robertpenner.easing.Quad.easeOut, $maskMc._width, $maskMc._orig_width, _local2, false);
}
dispatchEvent({type:"onRollOut", target:this});
}
}
function onRelease() {
if (active) {
com.preloaded.scimus.launchpad.Main.instance.onButtonReleaseGlobal();
dispatchEvent({type:"onRelease", target:this});
}
}
}
Symbol 1413 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginEmail] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginEmail extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var mc, submitButton, dispatchEvent, tween;
function PanelLoginEmail (arg_mc, warning) {
super(arg_mc);
mc.errorMc._visible = (mc._visible = false);
mc.errorMc._alpha = 0;
submitButton = new com.preloaded.UI.MovieClipButton(mc.submitButtonMc, "over", "out");
submitButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSubmitButtonRelease));
mc.txtWarning.text = warning;
mc.txtEmail.onSetFocus = mx.utils.Delegate.create(this, onTextFocus);
}
function onTextFocus() {
hideError();
mc.txtEmail.text = "";
hideError();
}
function onSubmitButtonRelease() {
submitButton.enable(false);
dispatchEvent({type:"onSubmitButtonRelease", target:this});
}
function show() {
mc._visible = true;
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, mc.origin.x, 20, false);
submitButton.enable(true);
Key.addListener(this);
}
function hide(time, onComplete, xPos) {
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, xPos, time, false);
tween.onMotionFinished = mx.utils.Delegate.create(this, onHideComplete);
Key.removeListener(this);
}
function onHideComplete() {
mc._visible = false;
}
function showMsg(clip) {
clip._visible = true;
clip.tween.stop();
clip.tween = new mx.transitions.Tween(clip, "_alpha", com.robertpenner.easing.Quad.easeOut, clip._alpha, 100, 8, false);
}
function hideMsg(clip, onComplete) {
clip._alpha = 0;
clip._visible = false;
}
function showError() {
showMsg(mc.errorMc);
submitButton.enable(true);
}
function hideError() {
hideMsg(mc.errorMc);
}
function destroy() {
delete submitButton;
Key.removeListener(this);
super.destroy();
}
function get email() {
return(mc.txtEmail.text);
}
function onKeyUp() {
if (Key.getCode() == 13) {
submitButton.onRelease();
}
}
}
Symbol 1414 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginCode] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Panels.PanelLoginCode extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var $continueButton, mc, dispatchEvent, tween;
function PanelLoginCode (arg_mc) {
super(arg_mc);
$continueButton = new com.preloaded.UI.MovieClipButton(mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
}
function onContinueButtonRelease() {
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function show(code) {
mc._visible = true;
mc.mcAlreadyRegistered._visible = code.toString() == "-1";
tween.stop();
mc.txtCode.text = code;
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, mc.origin.x, 20, false);
}
function hide(time, onComplete, xPos) {
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, xPos, time, false);
tween.onMotionFinished = onComplete;
}
function destroy() {
delete $continueButton;
super.destroy();
}
}
Symbol 1415 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $cancelButton, $mc, $continueButton, dispatchEvent;
function PopupSandboxBack (linkage) {
super(linkage);
}
function show(host) {
super.show(host);
$cancelButton = new com.preloaded.UI.MovieClipButton($mc.cancelButtonMc, "over", "out");
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$cancelButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onCancelButtonRelease));
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
}
function onCancelButtonRelease() {
$cancelButton.enable(false);
dispatchEvent({type:"onCancelButtonRelease", target:this});
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function destroy() {
delete $continueButton;
delete $cancelButton;
super.destroy();
}
}
Symbol 1416 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackDesign] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackDesign extends com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack
{
function PopupSandboxBackDesign (linkage) {
super("mc.popup.sandbox.back.design");
}
}
Symbol 1417 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackRemove] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackRemove extends com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack
{
function PopupSandboxBackRemove (linkage) {
super("mc.popup.sandbox.back.remove");
}
}
Symbol 1418 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackExtras] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBackExtras extends com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack
{
function PopupSandboxBackExtras (linkage) {
super("mc.popup.sandbox.back.extra");
}
}
Symbol 1419 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.BackgroundHandler] Frame 0
class com.preloaded.scimus.launchpad.Engine.BackgroundHandler
{
static var $instance;
var $host, $mc, $gridBmp;
function BackgroundHandler (host) {
$host = host;
$instance = this;
$mc = $host.attachMovie("mc.playarea.bg", "bg", $host.getNextHighestDepth());
}
function showGrid(b) {
if (b) {
$mc.gridMc._visible = true;
$mc.tween.stop();
$mc.tween = new com.preloaded.animation.ExtendedTween($mc.gridMc, "_alpha", null, 0, 100);
$mc.tween.precalculatedFunction = com.preloaded.scimus.launchpad.Config.PRECALC_QUADOUT_10;
} else {
$mc.tween.stop();
$mc.tween = new com.preloaded.animation.ExtendedTween($mc.gridMc, "_alpha", null, 100, 0);
$mc.tween.precalculatedFunction = com.preloaded.scimus.launchpad.Config.PRECALC_QUADOUT_8;
$mc.tween.onComplete = mx.utils.Delegate.create(this, onHideComplete);
}
}
function onHideComplete() {
$mc.gridMc._visible = false;
}
function destroy() {
$host.removeMovieClip();
$gridBmp.dispose();
delete $gridBmp;
}
function getNewContainer() {
var _local2 = $host.getNextHighestDepth();
var _local3 = $host.createEmptyMovieClip("container_" + _local2, _local2);
return(_local3);
}
function get host() {
return($host);
}
static function get instance() {
return($instance);
}
}
Symbol 1420 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.EffectsLayer] Frame 0
class com.preloaded.scimus.launchpad.Engine.EffectsLayer
{
var $host, __get__blendMode;
function EffectsLayer (host) {
$host = host;
}
function set blendMode(b) {
$host.blendMode = b;
//return(__get__blendMode());
}
function attachMovie(linkage) {
var _local2 = $host.getNextHighestDepth();
var _local3 = $host.attachMovie(linkage, "clip_" + _local2, _local2);
return(_local3);
}
function getNewContainer(depthOffset) {
var _local4 = false;
var _local3 = 0;
while (!_local4) {
depthOffset = ((depthOffset == undefined) ? 1 : (depthOffset));
_local3 = ($host.getNextHighestDepth() + depthOffset) + 1;
if ($host.getInstanceAtDepth(_local3) == undefined) {
_local4 = true;
} else {
depthOffset++;
}
}
var _local5 = $host.createEmptyMovieClip("container_" + _local3, _local3);
return(_local5);
}
function clear() {
for (var _local2 in $host) {
$host[_local2].removeMovieClip();
}
}
function get host() {
return($host);
}
function destroy() {
$host.removeMovieClip();
}
}
Symbol 1421 MovieClip [__Packages.com.preloaded.scimus.launchpad.Engine.WipeHandler] Frame 0
class com.preloaded.scimus.launchpad.Engine.WipeHandler
{
var $host, $blocks, $masterBg, $precalc, $frameQuota, $animationPointer;
function WipeHandler (host) {
$host = host;
$blocks = new Array();
$masterBg = $host.attachMovie("blockUtil", "masterBg", $host.getNextHighestDepth());
new Color($masterBg).setRGB(0);
$masterBg._width = com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH + 22;
$masterBg._height = com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT + 22;
$masterBg._x = ($masterBg._y = -10);
var _local5 = 0;
while (_local5 < com.preloaded.scimus.launchpad.Config.PLAYAREA_WIDTH) {
var _local3 = 0;
while (_local3 < com.preloaded.scimus.launchpad.Config.PLAYAREA_HEIGHT) {
var _local4 = $host.getNextHighestDepth();
var _local2 = $host.attachMovie("blockUtil", "mc_" + _local4, _local4);
_local2._width = (_local2._height = com.preloaded.scimus.launchpad.Config.GRID_SIZE - 1);
new Color(_local2).setRGB(0);
_local2._x = _local5;
_local2._y = _local3;
$blocks.push(_local2);
_local3 = _local3 + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
}
_local5 = _local5 + com.preloaded.scimus.launchpad.Config.GRID_SIZE;
}
$precalc = com.preloaded.animation.ExtendedTween.precalculateFunction(com.robertpenner.easing.Quint.easeIn, 5);
}
function reveal(delay) {
$masterBg.tween = new mx.transitions.Tween($masterBg, "_alpha", com.robertpenner.easing.Quad.easeIn, 100, 0, 30, false);
if ($blocks != undefined) {
$blocks = com.preloaded.lang.ArrayUtils.shuffle($blocks);
$frameQuota = 7;
$animationPointer = ((delay == undefined) ? 0 : (-(delay * $frameQuota)));
$host.onEnterFrame = mx.utils.Delegate.create(this, _stepAnimation);
}
}
function _stepAnimation() {
var _local3 = 0;
while (_local3 < $frameQuota) {
var _local2 = $blocks[$animationPointer++];
_local2.tween.stop();
_local2.tween = new com.preloaded.animation.ExtendedTween(_local2, "_alpha", com.robertpenner.easing.Quad.easeOut, 100, 0, 5 + _local3, false);
_local2.tween.precalculatedFunction = $precalc;
_local3++;
}
if ($animationPointer >= $blocks.length) {
onAnimationComplete();
}
}
function onAnimationComplete() {
destroy();
}
function destroy() {
$masterBg.tween.stop();
$masterBg.removeMovieClip();
delete $masterBg;
delete $host.onEnterFrame;
for (var _local2 in $blocks) {
$blocks[_local2].removeMovieClip();
}
delete $blocks;
$host.removeMovieClip();
}
}
Symbol 1422 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupGameIntro] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupGameIntro extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
static var seen;
var $continueButton, $mc, dispatchEvent;
function PopupGameIntro () {
super("mc.intro.play");
}
function show(host) {
super.show(host, (com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH / 2) - 300, (com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT / 2) - 199);
$continueButton = new com.preloaded.UI.MovieClipButton($mc.continueButtonMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
seen = true;
}
function onHitterRollOver() {
$continueButton.onRollOver();
}
function onHitterRollOut() {
$continueButton.onRollOut();
}
function onHitterRelease() {
$continueButton.onRelease();
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onMcRelease", target:this});
}
}
Symbol 1423 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.ScreenHandler] Frame 0
class com.preloaded.scimus.launchpad.ui.ScreenHandler extends com.preloaded.lang.DispatcherBase
{
static var instance;
var $host, $backDelegate, $bgMc, $contentMc, $contentMaskMc, $commonMc, $signoutButton, $backButton, $loaderDepth, $catcherDepth, $tabberDepth, $subTabberDepth, $loaderMc, $clickCatcher, $onTabSelectDelegate, $tabber, $subtabber, $currentLoginCallback, dispatchEvent, currentScreen, _hideCallback;
function ScreenHandler (host) {
super(this);
$host = host;
instance = this;
$backDelegate = mx.utils.Delegate.create(this, goBack);
$bgMc = $host.attachMovie("blockUtil", "bg", $host.getNextHighestDepth());
$bgMc._width = com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
$bgMc._height = com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT;
new Color($bgMc).setRGB(0);
$contentMc = $host.createEmptyMovieClip("content", $host.getNextHighestDepth());
$contentMaskMc = $host.attachMovie("blockUtil", "mask", $host.getNextHighestDepth());
$contentMaskMc._x = 71;
$contentMaskMc._width = 605;
$contentMaskMc._height = 488;
$contentMc.setMask($contentMaskMc);
$commonMc = $host.attachMovie("mc.ui.screen.common", "common", $host.getNextHighestDepth());
$signoutButton = new com.preloaded.UI.MovieClipButton($commonMc.signoutButtonMc, "over", "out");
$signoutButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSignoutRelease));
$signoutButton.__get__mc()._visible = false;
$signoutButton.__get__mc()._alpha = 0;
$backButton = new com.preloaded.UI.MovieClipButton($commonMc.backButtonMc, "over", "out");
$backButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onBackRelease));
$backButton.__set___visible(false);
$loaderDepth = 300;
$catcherDepth = 200;
$tabberDepth = 180;
$subTabberDepth = 190;
$loaderMc = $host.attachMovie("mc.ui.loading", "loader", $loaderDepth);
$loaderMc._x = 71;
$loaderMc._y = 426;
$clickCatcher = $host.attachMovie("blockUtil", "clickCatcher", $catcherDepth);
$clickCatcher._width = com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
$clickCatcher._height = com.preloaded.scimus.launchpad.Config.SCREEN_HEIGHT;
$clickCatcher._alpha = 50;
new Color($clickCatcher).setRGB(0);
$clickCatcher.onPress = function () {
var _local1 = null;
};
$clickCatcher.useHandCursor = false;
catchClicks(false);
$onTabSelectDelegate = mx.utils.Delegate.create(this, onTabSelect);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onLoginResponse", mx.utils.Delegate.create(this, onLoginResponse));
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onGetLevelsResponse", mx.utils.Delegate.create(this, onGetLevelsResponse));
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onGetCustomLevelsResponse", mx.utils.Delegate.create(this, onGetCustomLevelsResponse));
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onGetReceivedLevelsResponse", mx.utils.Delegate.create(this, onGetReceivedLevelsResponse));
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onGetExtraLevelsResponse", mx.utils.Delegate.create(this, onGetExtraLevelsResponse));
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onGetSandboxLevelsResponse", mx.utils.Delegate.create(this, onGetSandboxLevelsResponse));
}
function start() {
spawnConnectingScreen();
}
function attachTabber(initalTab) {
if ($tabber != undefined) {
$tabber.__set__active(initalTab);
removeSubTabber();
return(undefined);
}
removeTabber();
$tabber = new com.preloaded.scimus.launchpad.ui.TabberMain($host.attachMovie("mc.ui.screen.cns.tabber.pc", "tabber", $tabberDepth));
$tabber.__get__mc()._x = 79;
$tabber.__get__mc()._y = 29;
var _local2 = new Array("play", "create");
var _local3 = mx.utils.Delegate.create(this, onTabSelect);
$tabber.setTabInfo(_local2);
$tabber.__set__active(initalTab);
$tabber.selectEvent = _local3;
}
function attachSubTabber(initalTab, mode) {
$backButton.enable(true);
if (($subtabber != undefined) && ($subtabber.mode == mode)) {
$subtabber.__set__active(initalTab);
return(undefined);
}
removeSubTabber();
if (mode == "play") {
$subtabber = com.preloaded.scimus.launchpad.ui.Screens.tabber.TabberBase(MovieClip($host.attachMovie("mc.ui.screen.levels.tabber.tae", "subtabber", $subTabberDepth)));
} else {
$subtabber = com.preloaded.scimus.launchpad.ui.Screens.tabber.TabberBase(MovieClip($host.attachMovie("mc.ui.screen.levels.tabber.cns", "subtabber", $host.getNextHighestDepth())));
}
$subtabber.mode = mode;
$subtabber._x = 80;
$subtabber._y = 66;
if (mode == "play") {
var tabberInfo = new Array("training", "advanced", "extras");
} else {
var tabberInfo = new Array("create", "share");
}
var cb = mx.utils.Delegate.create(this, onTabSelect);
var _local3 = function () {
this.setTabs(tabberInfo);
this.active = initalTab;
this.selectEvent = cb;
delete this.onEnterFrame;
};
$subtabber.onEnterFrame = _local3;
}
function removeTabber() {
$tabber.destroy();
delete $tabber;
}
function removeSubTabber() {
$subtabber.removeMovieClip();
delete $subtabber;
}
function onTabSelect(evt) {
com.preloaded.scimus.launchpad.Main.instance.onButtonReleaseGlobal();
switch (String(evt.screenType)) {
case "cns" :
removeSubTabber();
spawnCnsCreateScreen();
break;
case "play" :
removeSubTabber();
spawnLevelsHomeScreen();
break;
case "training" :
spawnLevelsTrainingScreen();
break;
case "advanced" :
spawnLevelsAdvancedScreen();
break;
case "extras" :
spawnLevelsExtrasScreen();
break;
case "create" :
spawnCnsCreateScreen();
break;
case "share" :
spawnCnsShareScreen();
}
}
function onLoginResponse(result) {
if (result.response == true) {
if (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous) {
$signoutButton.show(10);
}
$currentLoginCallback();
} else {
catchClicks(false);
com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin.instance.showError();
}
}
function onGetLevelsResponse(response) {
spawnLevelsHomeScreen();
catchClicks(false);
}
function onGetCustomLevelsResponse(response) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.getReceivedLevels();
}
function onGetReceivedLevelsResponse(response) {
spawnCnsCreateScreen();
catchClicks(false);
}
function onBackRelease() {
goBack();
}
function onSignoutRelease() {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.logout();
$signoutButton.hide(8);
}
function onLevelSelected(evt) {
evt.target = this;
evt.type = "onLevelSelected";
dispatchEvent(evt);
}
function onNewUserButtonRelease(evt) {
catchClicks(true);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.doAnonymousLogin();
}
function onCodeSubmit(evt) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.doLogin(evt.code);
com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin.instance.showChecking();
catchClicks(true);
}
function onPlaySelected() {
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn) {
spawnLevelsHomeScreen();
} else {
$currentLoginCallback = mx.utils.Delegate.create(com.preloaded.scimus.launchpad.ConnectionHandler.instance, com.preloaded.scimus.launchpad.ConnectionHandler.instance.getLevels);
spawnLoginScreen(com.preloaded.scimus.launchpad.Config.SCREEN_COLOR_PLAY_HI, com.preloaded.scimus.launchpad.Config.SCREEN_COLOR_PLAY_LO);
}
}
function onCreateSelected() {
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn) {
spawnCnsCreateScreen();
} else {
$currentLoginCallback = mx.utils.Delegate.create(com.preloaded.scimus.launchpad.ConnectionHandler.instance, com.preloaded.scimus.launchpad.ConnectionHandler.instance.getCustomLevels);
spawnLoginScreen(com.preloaded.scimus.launchpad.Config.SCREEN_COLOR_CREATE_HI, com.preloaded.scimus.launchpad.Config.SCREEN_COLOR_CREATE_LO);
}
}
function onTrainingSelected() {
spawnLevelsTrainingScreen();
}
function onAdvancedSelected() {
spawnLevelsAdvancedScreen();
}
function onExtrasSelected() {
spawnLevelsExtrasScreen();
}
function onCreateButtonRelease() {
if (com.preloaded.scimus.launchpad.ConnectionHandler.sandboxLevelsThread == undefined) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.getSandboxLevels();
catchClicks(true);
} else {
onGetSandboxLevelsResponse();
}
}
function onGetSandboxLevelsResponse() {
catchClicks(false);
dispatchEvent({type:"onCreateLevelRelease", target:this});
}
function onCnsItemDelete(evt) {
evt.target = this;
evt.type = "onCnsItemDelete";
dispatchEvent(evt);
}
function onCnsItemEdit(evt) {
evt.target = this;
evt.type = "onCnsItemEdit";
dispatchEvent(evt);
}
function spawnConnectingScreen() {
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenConnecting.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenConnecting();
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenConnecting.instance);
}
}
function spawnStartupScreen() {
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup();
showScreen(_local2);
_local2.addEventListener("onPlaySelected", mx.utils.Delegate.create(this, onPlaySelected));
_local2.addEventListener("onCreateSelected", mx.utils.Delegate.create(this, onCreateSelected));
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance);
}
}
function spawnLevelsHomeScreen() {
if (com.preloaded.scimus.launchpad.ConnectionHandler.threads == undefined) {
catchClicks(true);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.getLevels();
return(undefined);
}
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome();
_local2.addEventListener("onTrainingSelected", mx.utils.Delegate.create(this, onTrainingSelected));
_local2.addEventListener("onAdvancedSelected", mx.utils.Delegate.create(this, onAdvancedSelected));
_local2.addEventListener("onExtrasSelected", mx.utils.Delegate.create(this, onExtrasSelected));
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome.instance);
}
}
function spawnLevelsTrainingScreen() {
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsBasic.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsBasic();
_local2.addEventListener("onThumbnailRelease", mx.utils.Delegate.create(this, onLevelSelected));
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsBasic.instance);
}
}
function spawnLevelsAdvancedScreen() {
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsAdvanced.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsAdvanced();
_local2.addEventListener("onListItemRelease", mx.utils.Delegate.create(this, onLevelSelected));
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsAdvanced.instance);
}
}
function spawnLevelsExtrasScreen() {
if (com.preloaded.scimus.launchpad.ConnectionHandler.extraLevelsThread == undefined) {
catchClicks(true);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.getExtraLevels();
} else if (com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsExtras.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsExtras();
_local2.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onLevelSelected));
_local2.addEventListener("onFavouriteDelete", mx.utils.Delegate.create(this, onFavouriteDelete));
_local2.addEventListener("onFavouriteAdd", mx.utils.Delegate.create(this, onFavouriteAdd));
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsExtras.instance);
}
}
function onFavouriteDelete(evt) {
evt.target = this;
evt.type = "onFavouriteDelete";
dispatchEvent(evt);
}
function onFavouriteAdd(evt) {
evt.target = this;
evt.type = "onFavouriteAdd";
dispatchEvent(evt);
}
function onGetExtraLevelsResponse(response) {
spawnLevelsExtrasScreen();
catchClicks(false);
}
function spawnCnsCreateScreen() {
if ((!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous) && (com.preloaded.scimus.launchpad.ConnectionHandler.customLevelsThread == undefined)) {
catchClicks(true);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.getCustomLevels();
return(undefined);
}
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsCreate.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsCreate();
_local2.addEventListener("onCreateButtonRelease", mx.utils.Delegate.create(this, onCreateButtonRelease));
_local2.addEventListener("onListItemEdit", mx.utils.Delegate.create(this, onCnsItemEdit));
_local2.addEventListener("onListItemDelete", mx.utils.Delegate.create(this, onCnsItemDelete));
_local2.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onLevelSelected));
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsCreate.instance);
}
}
function spawnCnsShareScreen() {
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsShare.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsShare();
_local2.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onLevelSelected));
showScreen(_local2);
} else {
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsShare.instance);
}
}
function spawnLoginScreen(colorHi, colorLo) {
removeTabber();
removeSubTabber();
if (com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin.instance == undefined) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin();
_local2.addEventListener("onCodeSubmit", mx.utils.Delegate.create(this, onCodeSubmit));
_local2.addEventListener("onNewUserButtonRelease", mx.utils.Delegate.create(this, onNewUserButtonRelease));
_local2.setColours(colorHi, colorLo);
showScreen(_local2);
} else {
com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin.instance.setColours(colorHi, colorLo);
showScreen(com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin.instance);
}
}
function hide(cb) {
currentScreen.hide(10);
currentScreen.onHideComplete = mx.utils.Delegate.create(this, _hide);
_hideCallback = cb;
}
function _hide() {
currentScreen.destroy();
delete currentScreen;
$host._visible = false;
_hideCallback.call();
delete _hideCallback;
}
function showScreen(screen, goingBack) {
if ($host._visible == false) {
$host._visible = true;
}
if (screen != currentScreen) {
if ((screen == com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance) || (screen == com.preloaded.scimus.launchpad.ui.Screens.ScreenConnecting.instance)) {
$backButton.hide(8);
} else {
$backButton.show(10);
}
currentScreen.removeEventListener($backDelegate);
if (!goingBack) {
var _local3 = screen.show($contentMc);
currentScreen.hide(_local3);
} else {
var _local3 = screen.showForBack($contentMc);
currentScreen.hideForBack(_local3);
$backButton.enable(false);
var ref = $backButton;
var _local4 = function () {
ref.enable(true);
};
var _local5 = new com.preloaded.lang.DelayedFunctionCall(_local4, 22);
}
currentScreen = screen;
}
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn && (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous)) {
$signoutButton.show(10);
}
}
function goBack() {
var _local2 = currentScreen.getBackScreen();
if (_local2 != undefined) {
showScreen(_local2, true);
}
}
function catchClicks(b) {
$loaderMc._visible = ($clickCatcher._visible = b);
}
}
Symbol 1424 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.TabberMain] Frame 0
class com.preloaded.scimus.launchpad.ui.TabberMain
{
var $mc, maxTabs, $tabNames, $active;
function TabberMain (mc) {
$mc = mc;
$mc.onAnimCallback = mx.utils.Delegate.create(this, _onAnimCallback);
}
function setTabInfo(t) {
maxTabs = t.length;
$tabNames = t;
}
function onTabSelect(screenType, id) {
active = (id);
var _local2 = {target:this, type:"onTabSelect", screenType:screenType};
selectEvent(_local2);
}
function set active(index) {
if ($active != index) {
var _local2;
if ($active == undefined) {
_local2 = $tabNames[index] + "_in";
} else {
_local2 = $tabNames[$active] + "_swap";
}
$mc.gotoAndStop(_local2);
$mc.onEnterFrame = mx.utils.Delegate.create(this, giveItAKick);
$active = index;
}
//return(active);
}
function setupTabs() {
var _local2 = 0;
while (_local2 < maxTabs) {
var _local3 = new com.preloaded.scimus.launchpad.ui.Screens.tabber.MainTab($mc["tab" + _local2]);
_local3.__set__active(false);
_local3.init(this, $tabNames[_local2], _local2);
_local2++;
}
var _local3 = new com.preloaded.scimus.launchpad.ui.Screens.tabber.MainTab($mc["tab" + $active]);
_local3.__set__active(true);
}
function giveItAKick() {
delete $mc.onEnterFrame;
$mc.play();
}
function get active() {
return($active);
}
function _onAnimCallback() {
setupTabs();
}
function selectEvent(evt) {
}
function get mc() {
return($mc);
}
function destroy() {
$mc.removeMovieClip();
}
}
Symbol 1425 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.tabber.MainTab] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.tabber.MainTab
{
var $mc, tabber, screenType, id, isActive, enabled;
function MainTab (mc) {
$mc = mc;
$mc.onRollOver = ($mc.onDragOver = mx.utils.Delegate.create(this, onOver));
$mc.onRollOut = ($mc.onDragOut = mx.utils.Delegate.create(this, onOut));
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
}
function init(t, sType, i) {
tabber = t;
screenType = sType;
id = i;
}
function set active(state) {
isActive = state;
enabled = !state;
if (state) {
$mc.gotoAndStop("active");
} else {
onOut();
}
//return(active);
}
function get active() {
return(isActive);
}
function onOver() {
if (!active) {
$mc.gotoAndStop("over");
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
}
function onOut() {
if (!active) {
$mc.gotoAndStop("out");
}
}
function onRelease() {
tabber.onTabSelect(screenType, id);
}
function destroy() {
$mc.removeMovieClip();
}
}
Symbol 1426 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.tabber.TabberBase] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.tabber.TabberBase extends MovieClip
{
var tabs, maxTabs, activeTab, animCallback, onEnterFrame, stateNames, gotoAndPlay;
function TabberBase () {
super();
tabs = this;
}
function dispatchEvent() {
}
function addEventListener() {
}
function removeEventListener() {
}
function setTabs(t) {
maxTabs = t.length;
var _local2 = 0;
while (_local2 < maxTabs) {
var _local3 = com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab(MovieClip(tabs["tab" + _local2]));
_local3.init(this, t[_local2], _local2);
_local2++;
}
}
function onTabSelect(screenType, id) {
active = (id);
var _local2 = {target:this, type:"onTabSelect", screenType:screenType};
selectEvent(_local2);
}
function get active() {
return(activeTab);
}
function set active(index) {
activeTab = index;
var _local2 = 0;
while (_local2 < maxTabs) {
var _local3 = com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab(MovieClip(tabs["tab" + _local2]));
_local3.__set__active(false);
_local2++;
}
var _local3 = com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab(tabs["tab" + activeTab]);
_local3.__set__active(true);
//return(active);
}
function selectEvent(evt) {
}
function onAnimCallback() {
animCallback.call();
delete animCallback;
}
function init(callback) {
animCallback = callback;
onEnterFrame = mx.utils.Delegate.create(this, postInit);
}
function postInit() {
animCallback.call();
var _local2 = stateNames[activeTab] + "_in";
delete onEnterFrame;
gotoAndPlay(_local2);
}
}
Symbol 1427 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenBase] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenBase extends com.preloaded.lang.DispatcherBase
{
var $host, $mc, $onHideComplete, dispatchEvent, $showTween, _currentShowCallback;
function ScreenBase () {
super(this);
}
function init(host, linkage) {
$host = host;
var _local2 = $host.getNextHighestDepth();
$mc = $host.attachMovie(linkage, "screen_" + _local2, _local2);
$mc.tabEnabled = false;
$mc._x = com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
}
function onHideComplete() {
}
function _onHideComplete() {
$onHideComplete();
delete $onHideComplete;
if (onHideComplete != _onHideComplete) {
onHideComplete();
}
delete onHideComplete;
dispatchEvent({type:"onHideComplete", target:this});
destroy();
}
function show(onComplete) {
var _local2 = 20;
$showTween.stop();
$showTween = new mx.transitions.Tween($mc, "_x", com.robertpenner.easing.Quint.easeOut, com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, 0, _local2, false);
$showTween.onMotionFinished = mx.utils.Delegate.create(this, onShowComplete);
_currentShowCallback = onComplete;
return(_local2);
}
function _showForBack(onComplete) {
var _local2 = 20;
$showTween.stop();
$showTween = new mx.transitions.Tween($mc, "_x", com.robertpenner.easing.Quint.easeOut, -com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, 0, _local2, false);
$showTween.onMotionFinished = mx.utils.Delegate.create(this, onShowComplete);
delete _currentShowCallback;
_currentShowCallback = onComplete;
return(_local2);
}
function onShowComplete() {
_currentShowCallback.call();
delete _currentShowCallback;
}
function hide(time, onComplete) {
$showTween.stop();
$showTween = new mx.transitions.Tween($mc, "_x", com.robertpenner.easing.Quint.easeOut, 0, -com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, time, false);
$showTween.onMotionFinished = mx.utils.Delegate.create(this, _onHideComplete);
if (onComplete == undefined) {
$onHideComplete = onComplete;
}
}
function hideForBack(time, onComplete) {
$showTween.stop();
$showTween = new mx.transitions.Tween($mc, "_x", com.robertpenner.easing.Quint.easeOut, 0, com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, time, false);
$showTween.onMotionFinished = mx.utils.Delegate.create(this, _onHideComplete);
if (onComplete == undefined) {
$onHideComplete = onComplete;
}
}
function get mc() {
return($mc);
}
function destroy() {
$mc.removeMovieClip();
delete $mc;
}
function getBackScreen() {
return(null);
}
}
Symbol 1428 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenLogin extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $mc, accentColourLo, $panelCode, accentColourHi, $panelLogin, $panelForgot, $resendCodeDelegate, dispatchEvent, _onHideComplete;
function ScreenLogin () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.login");
new Color($mc.lineTopMc).setRGB(accentColourLo);
new Color($mc.lineBottomMc).setRGB(accentColourLo);
$panelCode = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCode($mc.panelCodeMc);
$panelCode.setColours(accentColourHi, accentColourLo);
$panelLogin = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLogin($mc.panelMc);
$panelLogin.setColours(accentColourHi, accentColourLo);
$panelForgot = new com.preloaded.scimus.launchpad.ui.Screens.PanelLoginForgot($mc.panelForgotMc);
$panelForgot.setColours(accentColourHi, accentColourLo);
$panelForgot.mc._x = ($panelCode.mc._x = $mc.panelMc._x);
$panelLogin.addEventListener("onExistButtonRelease", mx.utils.Delegate.create(this, onExistButtonRelease));
$panelLogin.addEventListener("onNewButtonRelease", mx.utils.Delegate.create(this, onNewButtonRelease));
$panelCode.addEventListener("onSubmitButtonRelease", mx.utils.Delegate.create(this, onSubmitButtonRelease));
$panelCode.addEventListener("onForgotButtonRelease", mx.utils.Delegate.create(this, onForgotButtonRelease));
$panelForgot.addEventListener("onSubmitButtonRelease", mx.utils.Delegate.create(this, onForgotSubmitButtonRelease));
$panelForgot.addEventListener("onContinueButtonRelease", mx.utils.Delegate.create(this, onForgotContinueButtonRelease));
$resendCodeDelegate = mx.utils.Delegate.create(this, onResendCodeResponse);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.removeEventListener("onResendCodeResponse", $resendCodeDelegate);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onResendCodeResponse", $resendCodeDelegate);
setColours(accentColourHi, accentColourLo);
}
function setColours(hi, lo) {
accentColourHi = hi;
accentColourLo = lo;
}
function onForgotButtonRelease() {
$panelForgot.show();
$panelCode.hide(10);
}
function onExistButtonRelease() {
$panelCode.show();
$panelForgot.hide(10, null, $mc.panelMc._x);
}
function onNewButtonRelease() {
dispatchEvent({type:"onNewUserButtonRelease", code:$panelCode.__get__code()});
}
function onSubmitButtonRelease() {
if ($panelCode.__get__code().length == 11) {
dispatchEvent({type:"onCodeSubmit", code:$panelCode.__get__code()});
} else {
showError();
}
}
function onForgotSubmitButtonRelease(evt) {
com.preloaded.scimus.launchpad.ConnectionHandler.instance.resendCode(evt.email);
}
function onResendCodeResponse(evt) {
if (evt.response >= 0) {
$panelForgot.showSent();
} else {
$panelForgot.showNotExist();
}
}
function onForgotContinueButtonRelease() {
$panelForgot.hide(10, null, $mc.panelMc._x);
$panelLogin.resetButtons();
}
function showChecking() {
$panelCode.hideError();
$panelCode.showChecking();
}
function showError() {
$panelCode.hideChecking();
$panelCode.showError();
}
function show(host) {
if ($mc == undefined) {
init(host);
}
return(super.show());
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
return(super._showForBack());
}
function hide(time) {
$panelCode.hide(time);
$panelForgot.hide(time);
$panelLogin.hide(time, mx.utils.Delegate.create(this, _onHideComplete));
}
function onHideComplete() {
$panelCode.destroy();
$panelLogin.destroy();
$panelForgot.destroy();
}
function destroy() {
Key.removeListener(this);
$panelCode.destroy();
$panelLogin.destroy();
$panelForgot.destroy();
delete $panelCode;
delete $panelLogin;
delete $panelForgot;
super.destroy();
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance);
}
}
Symbol 1429 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCode] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCode extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var mc, $accentColourHi, $submitButton, $forgotButton, dispatchEvent, tween;
function PanelCode (arg_mc) {
super(arg_mc);
mc.errorMc._visible = (mc.checkingMc._visible = (mc._visible = false));
mc.checkingMc._alpha = (mc.errorMc._alpha = 0);
new Color(mc.checkingMc).setRGB($accentColourHi);
$submitButton = new com.preloaded.UI.MovieClipButton(mc.submitButtonMc, "over", "out");
$submitButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSubmitButtonRelease));
$forgotButton = new com.preloaded.UI.MovieClipButton(mc.forgotButtonMc, "over", "out");
$forgotButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onForgotButtonRelease));
mc.txtCode.onSetFocus = mx.utils.Delegate.create(this, onTextFocus);
}
function onTextFocus() {
hideError();
mc.txtCode.text = "";
}
function onSubmitButtonRelease() {
$submitButton.enable(false);
dispatchEvent({type:"onSubmitButtonRelease", target:this});
}
function onForgotButtonRelease() {
dispatchEvent({type:"onForgotButtonRelease", target:this});
}
function show() {
mc._visible = true;
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, mc.origin.x, 20, false);
Key.addListener(this);
}
function showMsg(clip) {
clip._visible = true;
clip.tween.stop();
clip.tween = new mx.transitions.Tween(clip, "_alpha", com.robertpenner.easing.Quad.easeOut, clip._alpha, 100, 8, false);
}
function hideMsg(clip, onComplete) {
clip._alpha = 0;
clip._visible = false;
}
function showChecking() {
new Color(mc.checkingMc).setRGB($accentColourHi);
showMsg(mc.checkingMc);
}
function hideChecking(onComplete) {
hideMsg(mc.checkingMc, onComplete);
}
function showError() {
showMsg(mc.errorMc);
$submitButton.enable(true);
}
function hideError() {
hideMsg(mc.errorMc);
}
function destroy() {
delete $submitButton;
delete $forgotButton;
super.destroy();
Key.removeListener(this);
}
function get code() {
return(mc.txtCode.text);
}
function onKeyUp() {
if (Key.getCode() == 13) {
$submitButton.onRelease();
}
}
}
Symbol 1430 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLogin] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLogin extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var $newButton, mc, $existButton, dispatchEvent;
function PanelLogin (arg_mc) {
super(arg_mc);
$newButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton(mc.newButtonMc);
$existButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.LoginPanelButton(mc.existButtonMc);
$newButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onNewButtonRelease));
$existButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onExistButtonRelease));
}
function onNewButtonRollOver() {
$existButton.__set__selected(false);
}
function onExistButtonRollOver() {
$newButton.__set__selected(false);
}
function onNewButtonRelease() {
$newButton.__set__selected(true);
$existButton.__set__selected(false);
dispatchEvent({type:"onNewButtonRelease", target:this});
}
function onExistButtonRelease() {
$existButton.__set__selected(true);
$newButton.__set__selected(false);
dispatchEvent({type:"onExistButtonRelease", target:this});
}
function destroy() {
delete $newButton;
delete $existButton;
super.destroy();
}
function resetButtons() {
$existButton.__set__selected(false);
$newButton.__set__selected(false);
}
}
Symbol 1431 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.PanelLoginForgot] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.PanelLoginForgot extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var $formMc, mc, $sendingMc, $sentMc, $notExistMc, $submitButton, $continueButton, $continueNotExistButton, tween, dispatchEvent, $tween;
function PanelLoginForgot (arg_mc) {
super(arg_mc);
$formMc = mc.formMc;
$sendingMc = mc.sendingMc;
$sentMc = mc.sentMc;
$notExistMc = mc.notExistMc;
$submitButton = new com.preloaded.UI.MovieClipButton($formMc.submitButtonMc, "over", "out");
$continueButton = new com.preloaded.UI.MovieClipButton($sentMc.continueButtonMc, "over", "out");
$continueNotExistButton = new com.preloaded.UI.MovieClipButton($notExistMc.continueButtonMc, "over", "out");
$submitButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSubmitButtonRelease));
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
$continueNotExistButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
$formMc.txtEmail.onSetFocus = mx.utils.Delegate.create(this, onEmailFocus);
$sendingMc._visible = ($sentMc._visible = false);
$notExistMc._visible = false;
}
function onEmailFocus() {
$formMc.txtEmail.text = "";
hideError();
}
function show() {
mc._visible = true;
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, mc.origin.x, 20, false);
showForm();
}
function hide(time, onComplete, dest_x) {
tween.stop();
if (dest_x == undefined) {
dest_x = mc.origin.x - com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
}
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc._x, dest_x, time, false);
tween.onMotionFinished = onComplete;
Key.removeListener(this);
}
function onSubmitButtonRelease() {
if (com.preloaded.UtilsString.isEmail($formMc.txtEmail.text)) {
var _local2 = new Object();
_local2.email = $formMc.txtEmail.text;
_local2.type = "onSubmitButtonRelease";
dispatchEvent(_local2);
$submitButton.enable(false);
} else {
showError();
}
}
function onContinueButtonRelease() {
dispatchEvent({type:"onContinueButtonRelease", target:this});
showForm();
}
function showForm() {
Key.addListener(this);
$submitButton.enable(true);
$formMc._visible = true;
$sendingMc._visible = false;
$sentMc._visible = false;
$notExistMc._visible = false;
$formMc.errorMc._visible = false;
$tween.stop();
$tween = new mx.transitions.Tween($formMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
}
function showError() {
$formMc.errorMc._visible = true;
$formMc.errorMc.tween.stop();
$formMc.errorMc.tween = new mx.transitions.Tween($formMc.errorMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $formMc.errorMc._alpha, 100, 10, false);
$submitButton.enable(true);
}
function hideError() {
$formMc.errorMc.tween.stop();
$formMc.errorMc.tween = new mx.transitions.Tween($formMc.errorMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $formMc.errorMc._alpha, 0, 8, false);
}
function showSending(name) {
Key.removeListener(this);
$formMc._visible = false;
$sendingMc._visible = true;
$sentMc._visible = false;
$notExistMc._visible = false;
$tween.stop();
$tween = new mx.transitions.Tween($sendingMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
}
function showSent() {
Key.removeListener(this);
$formMc._visible = false;
$sendingMc._visible = false;
$sentMc._visible = true;
$notExistMc._visible = false;
$tween.stop();
$tween = new mx.transitions.Tween($sentMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
}
function showNotExist() {
Key.removeListener(this);
$formMc._visible = false;
$sendingMc._visible = false;
$sentMc._visible = false;
$notExistMc._visible = true;
$tween.stop();
$tween = new mx.transitions.Tween($notExistMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
}
function destroy() {
$submitButton.destroy();
delete $submitButton;
$continueButton.destroy();
delete $continueButton;
$continueNotExistButton.destroy();
delete $continueNotExistButton;
}
function onKeyUp() {
if (Key.getCode() == 13) {
$submitButton.onRelease();
}
}
}
Symbol 1432 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $playPanel, $mc, $createPanel, dispatchEvent, _onHideComplete;
function ScreenStartup () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.startup");
$playPanel = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup($mc.playPanelMc);
$createPanel = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup($mc.createPanelMc);
$playPanel.button = new com.preloaded.UI.MovieClipButton($mc.playPanelMc.playButtonMc, "over", "out");
$createPanel.button = new com.preloaded.UI.MovieClipButton($mc.createPanelMc.createButtonMc, "over", "out");
$playPanel.addEventListener("onRelease", mx.utils.Delegate.create(this, onPlayPanelClick));
$createPanel.addEventListener("onRelease", mx.utils.Delegate.create(this, onCreatePanelClick));
}
function onPlayPanelClick() {
$playPanel.active = false;
dispatchEvent({type:"onPlaySelected", target:this});
}
function onCreatePanelClick() {
$createPanel.active = false;
dispatchEvent({type:"onCreateSelected", target:this});
}
function show(host, immediate) {
if ($mc == undefined) {
init(host);
}
showInit();
return(super.show(mx.utils.Delegate.create(this, onShowComplete)));
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
showInit();
return(super._showForBack());
}
function showInit() {
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.removeTabber();
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.removeSubTabber();
$playPanel.resetPos();
$createPanel.resetPos();
$playPanel.active = ($createPanel.active = true);
$mc.subtitleMc._visible = ($mc.titleMc._visible = false);
}
function onShowComplete() {
$mc.subtitleMc._visible = ($mc.titleMc._visible = true);
$mc.subtitleMc.tween.stop();
$mc.subtitleMc.tween = new mx.transitions.Tween($mc.subtitleMc, "_y", com.robertpenner.easing.Back.easeOut, $mc.subtitleMc._y - ($mc.subtitleMc._height * 2), $mc.subtitleMc._y, 10, false);
$mc.titleMc.tween.stop();
$mc.titleMc.tween = new mx.transitions.Tween($mc.titleMc, "_y", com.robertpenner.easing.Back.easeOut, $mc.titleMc._y + ($mc.titleMc._height * 2), $mc.titleMc._y, 12, false);
}
function hide(time) {
$playPanel.hide(time);
$createPanel.hide(time, mx.utils.Delegate.create(this, _onHideComplete));
$mc.subtitleMc.tween.stop();
$mc.subtitleMc.tween = new mx.transitions.Tween($mc.subtitleMc, "_y", com.robertpenner.easing.Back.easeIn, $mc.subtitleMc._y, $mc.subtitleMc._y - ($mc.subtitleMc._height * 2), 10, false);
$mc.titleMc.tween.stop();
$mc.titleMc.tween = new mx.transitions.Tween($mc.titleMc, "_y", com.robertpenner.easing.Back.easeIn, $mc.titleMc._y, $mc.titleMc._y + ($mc.titleMc._height * 2), 12, false);
$playPanel.active = ($createPanel.active = false);
}
function destroy() {
$playPanel.destroy();
$createPanel.destroy();
delete $playPanel;
delete $createPanel;
super.destroy();
}
}
Symbol 1433 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var mc, active, button, dispatchEvent;
function PanelStartup (arg_mc) {
super(arg_mc);
mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
mc.onRelease = mx.utils.Delegate.create(this, onRelease);
active = true;
}
function onRollOver() {
if (active) {
delete mc.onEnterFrame;
mc.play();
button.onRollOver();
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
}
function onRollOut() {
if (active) {
mc.stop();
mc.onEnterFrame = function () {
if (this._currentframe > 1) {
this.gotoAndStop(this._currentframe - 1);
} else {
delete this.onEnterFrame;
}
};
button.onRollOut();
}
}
function onRelease() {
if (active) {
com.preloaded.scimus.launchpad.Main.instance.onButtonReleaseGlobal();
dispatchEvent({type:"onRelease", target:this});
}
}
function hide(time, onComplete) {
super.hide(time, onComplete);
active = false;
}
function destroy() {
delete button;
super.destroy();
}
}
Symbol 1434 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenConnecting] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenConnecting extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $mc;
function ScreenConnecting () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.connecting");
}
function show(host) {
if ($mc == undefined) {
init(host);
}
return(super.show());
}
}
Symbol 1435 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $panelTraining, $mc, $panelAdvanced, $panelExtras, dispatchEvent, _onHideComplete;
function ScreenLevelsHome () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.levels.home");
$panelTraining = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup($mc.panelTrainingMc);
$panelAdvanced = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup($mc.panelAdvancedMc);
$panelExtras = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelStartup($mc.panelExtrasMc);
$panelTraining.button = new com.preloaded.UI.MovieClipButton($mc.panelTrainingMc.buttonMc, "over", "out");
$panelAdvanced.button = new com.preloaded.UI.MovieClipButton($mc.panelAdvancedMc.buttonMc, "over", "out");
$panelExtras.button = new com.preloaded.UI.MovieClipButton($mc.panelExtrasMc.buttonMc, "over", "out");
$panelTraining.addEventListener("onRelease", mx.utils.Delegate.create(this, onTrainingSelected));
$panelAdvanced.addEventListener("onRelease", mx.utils.Delegate.create(this, onAdvancedSelected));
$panelExtras.addEventListener("onRelease", mx.utils.Delegate.create(this, onExtrasSelected));
$mc.panelAdvancedMc.lockedMc._visible = ($mc.panelExtrasMc.lockedMc._visible = false);
}
function onTrainingSelected() {
dispatchEvent({type:"onTrainingSelected", target:this});
}
function onAdvancedSelected() {
dispatchEvent({type:"onAdvancedSelected", target:this});
}
function onExtrasSelected() {
dispatchEvent({type:"onExtrasSelected", target:this});
}
function show(host, immediate) {
if ($mc == undefined) {
init(host);
}
showInit();
return(super.show(null, immediate));
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
showInit();
return(super._showForBack());
}
function showInit() {
$panelAdvanced.resetPos();
$panelExtras.resetPos();
$panelTraining.resetPos();
$panelAdvanced.active = ($panelExtras.active = ($panelTraining.active = true));
}
function onShowComplete() {
super.onShowComplete();
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachTabber(0);
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachSubTabber(-1, "play");
}
function hide(time) {
$panelTraining.hide(time, mx.utils.Delegate.create(this, _onHideComplete));
$panelAdvanced.hide(time);
$panelExtras.hide(time);
}
function destroy() {
$panelTraining.destroy();
$panelAdvanced.destroy();
$panelExtras.destroy();
delete $panelTraining;
delete $panelAdvanced;
delete $panelExtras;
super.destroy();
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance);
}
}
Symbol 1436 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsBasic] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsBasic extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $thumbnails, $mc, dispatchEvent;
function ScreenLevelsBasic () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.levels.training");
var _local5 = com.preloaded.scimus.launchpad.ConnectionHandler.threads[com.preloaded.scimus.launchpad.ConnectionHandler.prefs.defaultthreads[0]].levels;
var _local6 = new Array(15885616, 40191, 15024279, 13832517, 5619968, 3354770);
var _local10 = 71;
var _local9 = 102;
var _local8 = 208;
var _local7 = 160;
$thumbnails = new Array();
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = new com.preloaded.scimus.launchpad.ui.Screens.BasicThumbnail($mc, _local5[_local3]);
_local4.__get__mc()._x = _local10 + ((_local3 % 3) * _local8);
_local4.__get__mc()._y = _local9 + (Math.floor(_local3 / 3) * _local7);
new Color(_local4.__get__mc().bgMc).setRGB(_local6[_local3]);
_local4.addEventListener("onRelease", mx.utils.Delegate.create(this, onThumbnailRelease));
_local4.active = false;
$thumbnails.push(_local4);
_local3++;
}
}
function onThumbnailRelease(evt) {
evt.type = "onThumbnailRelease";
evt.target = this;
dispatchEvent(evt);
}
function show(host) {
if ($mc == undefined) {
init(host);
}
return(super.show());
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
return(super._showForBack());
}
function onShowComplete() {
super.onShowComplete();
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachTabber(0);
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachSubTabber(0, "play");
for (var _local3 in $thumbnails) {
$thumbnails[_local3].active = true;
}
}
function destroy() {
super.destroy();
for (var _local3 in $thumbnails) {
$thumbnails[_local3].destroy();
}
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome.instance);
}
function hide(time, onComplete) {
super.hide(time, onComplete);
for (var _local3 in $thumbnails) {
$thumbnails[_local3].active = false;
}
}
}
Symbol 1437 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.BasicThumbnail] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.BasicThumbnail extends com.preloaded.lang.DispatcherBase
{
var data, $mc, $thumbnail, active, dispatchEvent, $tween, clearListeners;
function BasicThumbnail (host, arg_data) {
super(this);
var _local3 = host.getNextHighestDepth();
data = arg_data;
$mc = host.attachMovie("mc.ui.screen.levels.training.thumbnail", "thumb_" + _local3, _local3);
$mc.txtLabelOver.text = ($mc.txtLabel.text = data.title);
$thumbnail = new com.preloaded.scimus.launchpad.ui.LevelThumbnail($mc);
$thumbnail.__set__showLabel(false);
$thumbnail.mc._x = ($mc._width / 2) - ($thumbnail.mc._width / 2);
$thumbnail.mc._y = 43;
$thumbnail.showForLevel(arg_data);
$mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
$mc.overMc._visible = false;
$mc.overMc.stop();
$mc.tickMc._visible = ($mc.tickOverMc._visible = arg_data.isComplete);
active = true;
}
function onRollOver() {
if (active) {
delete $mc.onEnterFrame;
$mc.play();
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
}
function onRollOut() {
if (active) {
$mc.stop();
$mc.onEnterFrame = function () {
if (this._currentframe > 1) {
this.gotoAndStop(this._currentframe - 1);
} else {
delete this.onEnterFrame;
}
};
}
}
function onRelease() {
if (active) {
com.preloaded.scimus.launchpad.Main.instance.onButtonReleaseGlobal();
dispatchEvent({type:"onRelease", target:this, data:data, item:this});
}
}
function destroy() {
$tween.stop();
delete $tween;
clearListeners();
$thumbnail.destroy();
$mc.removeMovieClip();
}
function get mc() {
return($mc);
}
}
Symbol 1438 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsAdvanced] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsAdvanced extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $panelHard, $mc, $panelInsane, $panelBeyond, passthruEvent, _onHideComplete;
function ScreenLevelsAdvanced () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.levels.advanced");
$panelHard = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsAdvanced($mc.panelHardMc);
$panelInsane = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsAdvanced($mc.panelInsaneMc);
$panelBeyond = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsAdvanced($mc.panelBeyondMc);
$panelHard.mc._x = $panelHard.mc._x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
$panelInsane.mc._x = $panelInsane.mc._x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
$panelBeyond.mc._x = $panelBeyond.mc._x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH;
var _local3 = com.preloaded.scimus.launchpad.ConnectionHandler.threads;
var _local4 = com.preloaded.scimus.launchpad.ConnectionHandler.prefs.defaultthreads;
var _local7 = _local3[_local4[1]].levels;
var _local5 = _local3[_local4[2]].levels;
var _local6 = _local3[_local4[3]].levels;
$panelHard.populateList(_local7);
$panelInsane.populateList(_local5);
$panelBeyond.populateList(_local6);
$panelHard.addEventListener("onListItemRelease", mx.utils.Delegate.create(this, passthruEvent));
$panelInsane.addEventListener("onListItemRelease", mx.utils.Delegate.create(this, passthruEvent));
$panelBeyond.addEventListener("onListItemRelease", mx.utils.Delegate.create(this, passthruEvent));
$mc._x = 0;
}
function show(host) {
if ($mc == undefined) {
init(host);
}
var _local3 = 20;
var _local2 = com.robertpenner.easing.Quint.easeOut;
$panelHard.tween.stop();
$panelInsane.tween.stop();
$panelBeyond.tween.stop();
$panelHard.tween = new mx.transitions.Tween($panelHard.mc, "_x", _local2, $panelHard.mc.origin.x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, $panelHard.mc.origin.x, 15, false);
$panelInsane.tween = new mx.transitions.Tween($panelInsane.mc, "_x", _local2, $panelInsane.mc.origin.x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, $panelInsane.mc.origin.x, 17, false);
$panelBeyond.tween = new mx.transitions.Tween($panelBeyond.mc, "_x", _local2, $panelBeyond.mc.origin.x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, $panelBeyond.mc.origin.x, _local3 - 1, false);
$panelBeyond.tween.onMotionFinished = mx.utils.Delegate.create(this, onShowComplete);
return(_local3);
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
$panelHard.tween.stop();
$panelInsane.tween.stop();
$panelBeyond.tween.stop();
$panelBeyond.resetPos();
$panelHard.resetPos();
$panelInsane.resetPos();
return(super._showForBack());
}
function onShowComplete() {
super.onShowComplete();
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachTabber(0);
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachSubTabber(1, "play");
}
function hide(time) {
var _local2 = com.robertpenner.easing.Quint.easeOut;
$panelHard.tween.stop();
$panelInsane.tween.stop();
$panelBeyond.tween.stop();
$panelHard.tween = new mx.transitions.Tween($panelHard.mc, "_x", _local2, $panelHard.mc._x, $panelHard.mc.origin.x - com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, time - 4, false);
$panelInsane.tween = new mx.transitions.Tween($panelInsane.mc, "_x", _local2, $panelInsane.mc._x, $panelInsane.mc.origin.x - com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, time - 2, false);
$panelBeyond.tween = new mx.transitions.Tween($panelBeyond.mc, "_x", _local2, $panelBeyond.mc._x, $panelBeyond.mc.origin.x - com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, time, false);
$panelBeyond.tween.onMotionFinished = mx.utils.Delegate.create(this, _onHideComplete);
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome.instance);
}
}
Symbol 1439 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var mc, $scrollBox, $scrollWidth, $scrollHeight, $scroll_x, $scroll_y, $listItems, dispatchEvent;
function PanelListing (arg_mc) {
super(arg_mc);
mc.scrollBarMc._visible = (mc.listingSurroundMc._visible = false);
}
function populateList(arrList) {
var _local5 = new Array();
if (arrList.length > 0) {
mc.defaultMc._visible = false;
mc.listingSurroundMc._visible = true;
if ($scrollBox == undefined) {
$scrollBox = new com.preloaded.UI.Scroll.ScrollBox(mc.createEmptyMovieClip("scrollBox", mc.getNextHighestDepth()), $scrollWidth, $scrollHeight);
$scrollBox.__get__mc()._x = $scroll_x;
$scrollBox.__get__mc()._y = $scroll_y;
$scrollBox.__set__scrollBarVertical(new com.preloaded.UI.Scroll.ScrollBarVertical(mc.scrollBarMc, mc.scrollBarMc.upArrowMc, mc.scrollBarMc.downArrowMc, mc.scrollBarMc.thumbMc, 5));
}
$listItems = new Array();
var _local2 = 0;
while (_local2 < arrList.length) {
var _local3 = addListItem(arrList[_local2]);
_local5.push(_local3);
_local2++;
}
} else {
mc.defaultMc._visible = true;
mc.listingSurroundMc._visible = false;
}
$scrollBox.update();
$scrollBox.__get__frame().offsetMask(0, 1);
return(_local5);
}
function removeListItem(item) {
for (var _local3 in $listItems) {
if ($listItems[_local3] == item) {
$listItems[_local3].destroy();
$listItems.splice(_local3, 1);
}
}
}
function addListItem(data) {
return("");
}
function onListItemRelease(evt) {
dispatchEvent({type:"onListItemRelease", item:evt.target, target:this});
}
function destroy() {
for (var _local3 in $listItems) {
$listItems[_local3].destroy();
$listItems[_local3] = null;
}
delete $listItems;
$scrollBox.destroy();
delete $scrollBox;
super.destroy();
}
}
Symbol 1440 MovieClip [__Packages.com.preloaded.UI.Scroll.ScrollBox] Frame 0
class com.preloaded.UI.Scroll.ScrollBox
{
var $host, $scrollFrame, $scrollBarVertical, __get___visible, __get__scrollBarVertical;
function ScrollBox (host, width, height) {
$host = host;
$scrollFrame = new com.preloaded.UI.Scroll.ScrollFrame(host.createEmptyMovieClip("scrollFrame", host.getNextHighestDepth()), width, height);
}
function set _visible(b) {
$host._visible = b;
if (b) {
update();
} else {
$scrollBarVertical.__set___visible(false);
}
//return(__get___visible());
}
function update() {
if ($scrollFrame.__get__contentHolder()._height > $scrollFrame.__get__scrollHeight()) {
$scrollBarVertical.__set___visible(true);
} else {
$scrollBarVertical.__set___visible(false);
}
}
function set scrollBarVertical(bar) {
$scrollBarVertical = bar;
$scrollBarVertical.addEventListener("onScrollProgress", mx.utils.Delegate.create(this, onVerticalScrollProgress));
//return(__get__scrollBarVertical());
}
function onVerticalScrollProgress(evt) {
setVerticalScrollProgress(evt.progress);
}
function setVerticalScrollProgress(pc) {
$scrollFrame.setPositionForPercent(pc);
}
function get contentHolder() {
var _local2 = $scrollFrame.__get__contentHolder();
return(_local2);
}
function get frame() {
return($scrollFrame);
}
function get mc() {
return($host);
}
function destroy() {
delete $scrollBarVertical;
$host.removeMovieClip();
}
}
Symbol 1441 MovieClip [__Packages.com.preloaded.UI.Scroll.ScrollFrame] Frame 0
class com.preloaded.UI.Scroll.ScrollFrame
{
var $host, $contentMask, $contentMc, vSnap, $yTween;
function ScrollFrame (host, width, height) {
$host = host;
$contentMask = $host.attachMovie("blockUtil", "mask", 20, {_width:width, _height:height, _alpha:20});
$contentMc = $host.createEmptyMovieClip("content", 10);
$contentMc.setMask($contentMask);
}
function offsetMask(x, y) {
$contentMask._x = $contentMask._x + x;
$contentMask._y = $contentMask._y + y;
$contentMask._width = $contentMask._width - x;
$contentMask._height = $contentMask._height - y;
}
function eventHandler(evt) {
setPositionForPercent(evt.progress);
}
function setPositionForPercent(pc) {
setVerticalPositionForPercent(pc);
}
function setVerticalPositionForPercent(pc) {
pc = com.preloaded.math.MathUtils.constrain(pc, 0, 1);
var _local3 = -(($contentMc._height - $contentMask._height) * pc);
if (vSnap == undefined) {
$contentMc._y = _local3;
} else {
var _local2 = Math.floor(_local3 / vSnap) * vSnap;
if ($contentMc._y != _local2) {
$yTween.stop();
$yTween = new mx.transitions.Tween($contentMc, "_y", com.robertpenner.easing.Quad.easeOut, $contentMc._y, _local2, 5, false);
$yTween.onMotionChanged = function () {
this.obj[this.prop] = Math.round(this.obj[this.prop]);
};
}
}
}
function setHorizontalPositionForPercent(pc) {
pc = com.preloaded.math.MathUtils.constrain(pc, 0, 1);
$contentMc._x = -(($contentMc._width - $contentMask._width) * pc);
}
function get contentHolder() {
return($contentMc);
}
function get mc() {
return($host);
}
function get scrollWidth() {
return($contentMask._width);
}
function get scrollHeight() {
return($contentMask._height);
}
function get host() {
return($host);
}
function set host(val) {
$host = val;
$contentMc = $host;
//return(host);
}
function get contentMask() {
return($contentMask);
}
function set contentMask(val) {
$contentMask = val;
//return(contentMask);
}
}
Symbol 1442 MovieClip [__Packages.com.preloaded.UI.Scroll.ScrollBarVertical] Frame 0
class com.preloaded.UI.Scroll.ScrollBarVertical extends mx.events.EventDispatcher
{
var $mc, $uparrowMc, $downarrowMc, $thumbMc, $speed, $topOffset, $upperBound, $lowerBound, $distance, $increment, dispatchEvent, __get___visible;
function ScrollBarVertical (mc, uparrowMc, downarrowMc, thumbMc, speed) {
super(this);
$mc = mc;
$uparrowMc = uparrowMc;
$downarrowMc = downarrowMc;
$thumbMc = thumbMc;
$speed = speed;
var _local3 = 0;
$topOffset = 0;
if ($thumbMc._y > 0) {
$upperBound = $thumbMc._y;
_local3 = $thumbMc._y - $uparrowMc._height;
} else {
$upperBound = $uparrowMc._y + $uparrowMc._height;
}
$lowerBound = $downarrowMc._y;
if ($lowerBound == $mc._height) {
$lowerBound = $lowerBound - $downarrowMc._height;
}
$lowerBound = $lowerBound - (_local3 + $thumbMc._height);
$distance = $lowerBound - $upperBound;
$uparrowMc.onPress = mx.utils.Delegate.create(this, onUpPress);
$uparrowMc.onReleaseOutside = ($uparrowMc.onRelease = mx.utils.Delegate.create(this, cancelUpdate));
$downarrowMc.onPress = mx.utils.Delegate.create(this, onDownPress);
$downarrowMc.onReleaseOutside = ($downarrowMc.onRelease = mx.utils.Delegate.create(this, cancelUpdate));
$thumbMc.onPress = mx.utils.Delegate.create(this, onThumbPress);
$thumbMc.onRelease = ($thumbMc.onReleaseOutside = mx.utils.Delegate.create(this, cancelUpdate));
}
function onUpPress() {
$increment = -$speed;
$mc.onEnterFrame = mx.utils.Delegate.create(this, updateIncrement);
}
function onDownPress() {
$increment = $speed;
$mc.onEnterFrame = mx.utils.Delegate.create(this, updateIncrement);
}
function onThumbPress() {
$mc.onEnterFrame = mx.utils.Delegate.create(this, updateThumb);
}
function cancelUpdate() {
delete $mc.onEnterFrame;
$increment = 0;
}
function setPositionForPercent(n) {
var _local2 = $distance / n;
if (!((_local2 > 0) && (_local2 < $upperBound))) {
_local2 = 0;
}
$thumbMc._y = $upperBound + _local2;
}
function updateThumb() {
var _local2 = Math.ceil($mc._ymouse - ($thumbMc._height / 2));
_local2 = com.preloaded.math.MathUtils.constrain(_local2, $upperBound, $lowerBound);
$thumbMc._y = _local2;
sendUpdate();
}
function updateIncrement() {
var _local2 = $thumbMc._y;
_local2 = _local2 + $increment;
_local2 = com.preloaded.math.MathUtils.constrain(_local2, $upperBound, $lowerBound);
$thumbMc._y = _local2;
sendUpdate();
}
function sendUpdate() {
var _local2 = Math.round($thumbMc._y - $upperBound) / Math.round($distance);
dispatchEvent({type:"onScrollProgress", progress:_local2});
}
function set _visible(b) {
$mc._visible = b;
//return(__get___visible());
}
function destroy() {
delete $uparrowMc.onRelease;
delete $downarrowMc.onRelease;
delete $thumbMc.onPress;
delete $thumbMc.onRelease;
delete $mc.onEnterFrame;
}
}
Symbol 1443 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsAdvanced] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsAdvanced extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing
{
var $scroll_x, $scroll_y, $scrollWidth, $scrollHeight, $thumbnail, mc, $scrollBox, $listItems, $highestCompletedIndex, onListItemRelease, dispatchEvent;
function PanelLevelsAdvanced (arg_mc) {
super(arg_mc);
$scroll_x = 15;
$scroll_y = 135;
$scrollWidth = 140;
$scrollHeight = 149;
$thumbnail = new com.preloaded.scimus.launchpad.ui.LevelThumbnail(mc);
$thumbnail.__set__showLabel(false);
$thumbnail.mc._x = 27;
$thumbnail.mc._y = 55;
$thumbnail.addEventListener("onRelease", mx.utils.Delegate.create(this, onThumbnailRelease));
}
function addListItem(data) {
var _local4 = $scrollBox.__get__contentHolder().getNextHighestDepth();
var _local3 = $scrollBox.__get__contentHolder().attachMovie("mc.ui.listItem.level.advanced", "item_" + _local4, _local4);
_local3._y = $listItems.length * (_local3._height + 4);
$scrollBox.__get__frame().vSnap = _local3._height + 4;
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemAdvanced(_local3);
_local2.__set__displayName((String(_local4 + 1) + " ") + data.title);
_local2.__set__complete(data.isComplete);
if (data.isComplete) {
$highestCompletedIndex = $listItems.length;
_local2.__set__active(true);
} else {
_local2.__set__active(false);
}
_local2.data = data;
_local2.addEventListener("onRelease", mx.utils.Delegate.create(this, onListItemRelease));
_local2.addEventListener("onRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
_local2.addEventListener("onRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$listItems.push(_local2);
}
function onThumbnailRelease(evt) {
var _local5 = {data:evt.data};
dispatchEvent({type:"onListItemRelease", item:evt.target, target:this});
}
function onListItemRollOver(evt) {
if (evt.data != $thumbnail.data) {
$thumbnail.clear();
$thumbnail.showForLevel(evt.data);
}
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
function onListItemRollOut(evt) {
}
function populateList(arrItems) {
$highestCompletedIndex = -1;
super.populateList(arrItems);
$listItems[$highestCompletedIndex + 1].active = true;
var _local3 = (($highestCompletedIndex >= ($listItems.length - 1)) ? ($listItems.length - 1) : ($highestCompletedIndex + 1));
$thumbnail.showForLevel($listItems[_local3].data);
}
function destroy() {
super.destroy();
$thumbnail.destroy();
delete $thumbnail;
}
}
Symbol 1444 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItem] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItem extends com.preloaded.lang.DispatcherBase
{
var $mc, __get__displayName, __get__displayNew, $tween, dispatchEvent, data;
function ListItem (mc) {
super(this);
$mc = mc;
$mc.rolloverMc._alpha = 0;
$mc.rolloverMc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.rolloverMc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
$mc.rolloverMc.onRelease = mx.utils.Delegate.create(this, onRelease);
displayNew = (false);
}
function set displayName(n) {
$mc.txtName.text = ($mc.rolloverMc.txtName.text = n);
//return(__get__displayName());
}
function set displayNew(b) {
$mc.indicatorNewMc._visible = b;
//return(__get__displayNew());
}
function onRollOver() {
$mc.rolloverMc._visible = true;
$mc.rolloverMc.gotoAndPlay(1);
$tween.stop();
$mc.rolloverMc._alpha = 100;
dispatchEvent({type:"onRollOver", target:this, data:data});
}
function onRollOut() {
$tween.stop();
$tween = new mx.transitions.Tween($mc.rolloverMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc.rolloverMc._alpha, 0, 5, false);
dispatchEvent({type:"onRollOut", target:this, data:data});
}
function onTweenComplete() {
$mc.rolloverMc._visible = false;
}
function onRelease() {
dispatchEvent({type:"onRelease", target:this, data:data});
}
function destroy() {
$mc.removeMovieClip();
delete $mc;
delete data;
}
}
Symbol 1445 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemAdvanced] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemAdvanced extends com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItem
{
var $activeColour, $mc, __get__complete, onRollOver, onRollOut, onRelease, __get__active;
function ListItemAdvanced (mc) {
super(mc);
$activeColour = $mc.txtName.textColor;
}
function set complete(b) {
$mc.tickMc._visible = ($mc.rolloverMc.tickMc._visible = b);
//return(__get__complete());
}
function set active(b) {
if (b) {
$mc.rolloverMc._visible = 100;
$mc.rolloverMc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.rolloverMc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
$mc.rolloverMc.onRelease = mx.utils.Delegate.create(this, onRelease);
$mc.txtName.textColor = $activeColour;
} else {
delete $mc.rolloverMc.onRollOver;
delete $mc.rolloverMc.onRollOut;
delete $mc.rolloverMc.onRelease;
$mc.rolloverMc._alpha = 0;
$mc.txtName.textColor = 8349445 /* 0x7F6705 */;
}
//return(__get__active());
}
}
Symbol 1446 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsExtras] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsExtras extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $panelPick, __get__mc, $panelFavourites, $detailBox, $mc, dispatchEvent;
function ScreenLevelsExtras () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.levels.extras");
$panelPick = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsExtrasPick(__get__mc().pickPanelMc);
$panelFavourites = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsExtrasFavourites(__get__mc().favouritesMc);
var _local3 = $panelFavourites.populateList(com.preloaded.scimus.launchpad.ConnectionHandler.favouriteLevelsThread.levels);
$panelFavourites.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onListItemPassThru));
$panelFavourites.addEventListener("onListItemDelete", mx.utils.Delegate.create(this, onListItemDelete));
$panelPick.populateList(com.preloaded.scimus.launchpad.ConnectionHandler.extraLevelsThread.levels, _local3);
$panelPick.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onListItemPassThru));
$panelPick.addEventListener("onListItemFavouriteSelect", mx.utils.Delegate.create(this, onListItemFavouriteSelect));
$panelFavourites.addEventListener("onListItemRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
$panelPick.addEventListener("onListItemRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
$panelFavourites.addEventListener("onListItemRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$panelPick.addEventListener("onListItemRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$detailBox = new com.preloaded.scimus.launchpad.ui.Screens.DetailBox($mc.previewMc, 8838144, 4419072);
$detailBox.showIntro();
}
function onListItemDelete(evt) {
for (var _local3 in com.preloaded.scimus.launchpad.ConnectionHandler.favouriteLevelsThread.levels) {
if (com.preloaded.scimus.launchpad.ConnectionHandler.favouriteLevelsThread.levels[_local3] == evt.data) {
com.preloaded.scimus.launchpad.ConnectionHandler.favouriteLevelsThread.levels.splice(_local3, 1);
}
}
$panelPick.enableItem(evt.data.guid);
dispatchEvent({type:"onFavouriteDelete", data:evt.data});
}
function onListItemFavouriteSelect(evt) {
com.preloaded.scimus.launchpad.ConnectionHandler.favouriteLevelsThread.levels.unshift(evt.data);
$panelFavourites.rePopulateList(com.preloaded.scimus.launchpad.ConnectionHandler.favouriteLevelsThread.levels);
$panelPick.selectItem(evt.data.guid);
dispatchEvent({type:"onFavouriteAdd", data:evt.data});
}
function onListItemPassThru(evt) {
evt.target = this;
dispatchEvent(evt);
}
function onListItemRollOver(evt) {
$detailBox.showDetail(evt.data);
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
function onListItemRollOut(evt) {
$detailBox.showIntro();
}
function show(host) {
if ($mc == undefined) {
init(host);
}
return(super.show());
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
return(super._showForBack());
}
function onShowComplete() {
super.onShowComplete();
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachTabber(0);
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachSubTabber(2, "play");
}
function destroy() {
super.destroy();
$detailBox.destroy();
delete $detailBox;
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenLevelsHome.instance);
}
}
Symbol 1447 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsExtrasPick] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsExtrasPick extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing
{
var $scroll_x, $scroll_y, $scrollWidth, $scrollHeight, $scrollBox, $listItems, $arrKeys, dispatchEvent;
function PanelLevelsExtrasPick (arg_mc) {
super(arg_mc);
$scroll_x = 1;
$scroll_y = 71;
$scrollWidth = 245;
$scrollHeight = 119;
}
function addListItem(data) {
var _local7 = $scrollBox.__get__contentHolder().getNextHighestDepth();
var _local5 = $scrollBox.__get__contentHolder().attachMovie("mc.ui.levels.listItem.extra.level", "item_" + _local7, _local7);
_local5._y = $listItems.length * (_local5._height + 4);
$scrollBox.__get__frame().vSnap = _local5._height + 4;
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemLevelsExtras(_local5);
_local2.__set__displayName(data.title);
_local2.data = data;
_local2.addEventListener("onLabelRelease", mx.utils.Delegate.create(this, onListItemSelect));
var _local3 = false;
for (var _local6 in $arrKeys) {
if (data.guid == $arrKeys[_local6]) {
_local3 = true;
}
}
if (_local3) {
_local2.__set__selected(true);
}
_local2.addEventListener("onFavouriteButtonRelease", mx.utils.Delegate.create(this, onListItemFavouriteSelect));
_local2.addEventListener("onLabelRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
_local2.addEventListener("onLabelRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$listItems.push(_local2);
}
function populateList(arrList, arrKeys) {
$arrKeys = arrKeys;
super.populateList(arrList);
}
function onListItemRollOut(evt) {
evt.type = "onListItemRollOut";
dispatchEvent(evt);
}
function onListItemRollOver(evt) {
evt.type = "onListItemRollOver";
dispatchEvent(evt);
}
function onListItemSelect(evt) {
dispatchEvent({type:"onListItemSelect", target:this, item:evt.target, data:evt.data});
}
function onListItemFavouriteSelect(evt) {
dispatchEvent({type:"onListItemFavouriteSelect", target:this, item:evt.target, data:evt.data});
}
function selectItem(id) {
for (var _local4 in $listItems) {
var _local2 = $listItems[_local4];
if (_local2.data.guid == id) {
_local2.__set__selected(true);
}
}
}
function enableItem(id) {
for (var _local4 in $listItems) {
var _local2 = $listItems[_local4];
if (_local2.data.guid == id) {
_local2.__set__selected(false);
}
}
}
}
Symbol 1448 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemLevelsExtras] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemLevelsExtras extends com.preloaded.lang.DispatcherBase
{
var $mc, $favouriteButton, $labelButton, $selected, dispatchEvent, data, __get__displayName, __get__displayNew;
function ListItemLevelsExtras (arg_mc) {
super(this);
$mc = arg_mc;
displayNew = (false);
$favouriteButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt($mc.buttonFavouriteMc);
$favouriteButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onFavouriteButtonRelease));
$labelButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonLabel($mc.buttonLabelMc);
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn && (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous)) {
$favouriteButton.__set__active(true);
} else {
$favouriteButton.__set__active(false);
}
$labelButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onLabelRelease));
$labelButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onLabelRollOver));
$labelButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onLabelRollOut));
}
function get selected() {
return($selected);
}
function set selected(b) {
if (b) {
$favouriteButton.__set__active(false);
$favouriteButton.__set__selected(true);
} else {
$favouriteButton.__set__active(true);
$favouriteButton.__set__selected(false);
}
$selected = b;
//return(selected);
}
function onFavouriteButtonRelease() {
dispatchEvent({type:"onFavouriteButtonRelease", target:this, data:data, item:this});
}
function onLabelRollOver() {
dispatchEvent({type:"onLabelRollOver", target:this, data:data, item:this});
}
function onLabelRollOut() {
dispatchEvent({type:"onLabelRollOut", target:this, data:data, item:this});
}
function onLabelRelease() {
dispatchEvent({type:"onLabelRelease", target:this, data:data, item:this});
}
function set displayName(n) {
$labelButton.__set__label(n);
//return(__get__displayName());
}
function set displayNew(b) {
$mc.indicatorNewMc._visible = b;
//return(__get__displayNew());
}
function destroy() {
super.clearListeners();
delete $labelButton;
delete $favouriteButton;
$mc.removeMovieClip();
delete $mc;
delete data;
}
function get mc() {
return($mc);
}
}
Symbol 1449 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt extends com.preloaded.lang.DispatcherBase
{
var $mc, __get__active, $selected, $tween, dispatchEvent;
function ListItemButtonAlt (mc) {
super(this);
$mc = mc;
active = (true);
$mc.overMc._alpha = 0;
}
function set active(b) {
if (b) {
$mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
} else {
delete $mc.onRollOver;
delete $mc.onRollOut;
delete $mc.onRelease;
onRollOut();
}
//return(__get__active());
}
function set selected(b) {
$selected = b;
if (b) {
onRollOver(false);
} else {
onRollOut();
}
//return(selected);
}
function get selected() {
return($selected);
}
function onRollOver(noise) {
$tween.stop();
$tween = new mx.transitions.Tween($mc.overMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc.overMc._alpha, 100, 10, false);
dispatchEvent({type:"onRollOver", target:this});
if (noise != false) {
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
}
function onRollOut() {
if (!$selected) {
$tween.stop();
$tween = new mx.transitions.Tween($mc.overMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc.overMc._alpha, 0, 8, false);
}
dispatchEvent({type:"onRollOut", target:this});
}
function onTweenComplete() {
$mc.overMc._visible = false;
}
function onRelease() {
com.preloaded.scimus.launchpad.Main.instance.onButtonReleaseGlobal();
dispatchEvent({type:"onRelease", target:this});
}
function destroy() {
$tween.stop();
delete $tween;
}
}
Symbol 1450 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonLabel] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonLabel extends com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt
{
var $mc, __get__label;
function ListItemButtonLabel (mc) {
super(mc);
}
function set label(str) {
$mc.overMc.txtLabel.text = str;
$mc.txtLabel.text = str;
//return(__get__label());
}
}
Symbol 1451 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsExtrasFavourites] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelLevelsExtrasFavourites extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing
{
var $scroll_x, $scroll_y, $scrollWidth, $scrollHeight, $helpButtonMc, mc, $listItems, $scrollBox, dispatchEvent, removeListItem, populateList;
function PanelLevelsExtrasFavourites (arg_mc) {
super(arg_mc);
$scroll_x = 0;
$scroll_y = 64;
$scrollWidth = 241;
$scrollHeight = 121;
$helpButtonMc = mc.buttonHelpMc;
toggleHelp(true);
}
function addListItem(data) {
var _local2 = false;
for (var _local6 in $listItems) {
if (data == $listItems[_local6]) {
_local2 = true;
}
}
if (!_local2) {
var _local7 = $scrollBox.__get__contentHolder().getNextHighestDepth();
var _local5 = $scrollBox.__get__contentHolder().attachMovie("mc.ui.levels.listItem.extra.level.favourite", "item_" + _local7, _local7);
_local5._y = $listItems.length * (_local5._height + 4);
$scrollBox.__get__frame().vSnap = _local5._height + 4;
var _local3 = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemLevelsFavourite(_local5);
_local3.__set__displayName(data.title);
_local3.data = data;
_local3.addEventListener("onLabelRelease", mx.utils.Delegate.create(this, onListItemSelect));
_local3.addEventListener("onDeleteButtonRelease", mx.utils.Delegate.create(this, onListItemDelete));
_local3.addEventListener("onLabelRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
_local3.addEventListener("onLabelRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$listItems.push(_local3);
$scrollBox.update();
setHelpActive();
}
return(data.guid);
}
function onListItemRollOut(evt) {
evt.type = "onListItemRollOut";
dispatchEvent(evt);
}
function onListItemRollOver(evt) {
evt.type = "onListItemRollOver";
dispatchEvent(evt);
}
function onListItemSelect(evt) {
dispatchEvent({type:"onListItemSelect", target:this, item:evt.target, data:evt.data});
}
function onListItemDelete(evt) {
removeListItem(evt.target);
if ($listItems.length <= 0) {
toggleHelp(true);
} else {
rearrangeItems();
}
dispatchEvent({type:"onListItemDelete", target:this, item:evt.target, data:evt.data});
}
function rearrangeItems() {
var _local3 = 0;
while (_local3 < $listItems.length) {
var _local2 = $listItems[_local3];
var _local4 = _local3 * (_local2.__get__mc()._height + 4);
var _local5;
if (_local2.__get__mc()._y != _local4) {
_local2.__get__mc().tween.stop();
_local2.__get__mc().tween = new mx.transitions.Tween(_local2.__get__mc(), "_y", com.robertpenner.easing.Quad.easeOut, _local2.__get__mc()._y, _local4, 8, false);
_local5 = _local2;
}
_local5.__get__mc().tween.onMotionFinished = mx.utils.Delegate.create(this, onItemsRearranged);
_local3++;
}
setHelpActive();
}
function onItemsRearranged() {
$scrollBox.update();
}
function rePopulateList(levels) {
for (var _local2 in $listItems) {
$listItems[_local2].destroy();
}
populateList(levels);
if (levels.length > 0) {
$scrollBox.__set___visible(true);
$scrollBox.__get__frame().__get__contentHolder()._y = -$scrollBox.__get__frame().vSnap;
$scrollBox.__get__frame().setPositionForPercent(0);
}
setHelpActive();
}
function toggleHelp(b) {
if (b == undefined) {
b = !mc.defaultMc._visible;
}
if (b) {
mc.defaultMc._visible = true;
if (com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn && (!com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous)) {
mc.defaultMc.gotoAndStop("loggedIn");
} else {
mc.defaultMc.gotoAndStop("notLoggedIn");
}
mc.listingSurroundMc._visible = false;
$scrollBox.__set___visible(false);
$helpButtonMc.gotoAndStop("list");
} else {
mc.defaultMc._visible = false;
mc.listingSurroundMc._visible = true;
$scrollBox.__set___visible(true);
$helpButtonMc.gotoAndStop("help");
}
setHelpActive();
}
function setHelpActive() {
if ($listItems.length <= 0) {
delete $helpButtonMc.onRelease;
} else {
$helpButtonMc.onRelease = mx.utils.Delegate.create(this, toggleHelp);
}
}
}
Symbol 1452 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemLevelsFavourite] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemLevelsFavourite extends com.preloaded.lang.DispatcherBase
{
var $mc, $deleteButton, $labelButton, dispatchEvent, data, __get__displayName, __get__displayNew;
function ListItemLevelsFavourite (arg_mc) {
super(this);
$mc = arg_mc;
displayNew = (false);
$deleteButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt($mc.buttonDeleteMc);
$labelButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonLabel($mc.buttonLabelMc);
$deleteButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onDeleteButtonRelease));
$labelButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onLabelRelease));
$labelButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onLabelRollOver));
$labelButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onLabelRollOut));
}
function onDeleteButtonRelease() {
dispatchEvent({type:"onDeleteButtonRelease", target:this, data:data, item:this});
}
function onLabelRelease() {
dispatchEvent({type:"onLabelRelease", target:this, data:data, item:this});
}
function onLabelRollOver() {
dispatchEvent({type:"onLabelRollOver", target:this, data:data, item:this});
}
function onLabelRollOut() {
dispatchEvent({type:"onLabelRollOut", target:this, data:data, item:this});
}
function set displayName(n) {
$labelButton.__set__label(n);
//return(__get__displayName());
}
function set displayNew(b) {
$mc.indicatorNewMc._visible = b;
//return(__get__displayNew());
}
function destroy() {
super.clearListeners();
delete $labelButton;
delete $deleteButton;
$mc.removeMovieClip();
delete $mc;
delete data;
}
function get mc() {
return($mc);
}
}
Symbol 1453 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.DetailBox] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.DetailBox
{
var $mc, $levelInfoPanel, $hiding, $tween;
function DetailBox (mc, lightCol, darkCol) {
$mc = mc;
$levelInfoPanel = new com.preloaded.scimus.launchpad.ui.LevelInfoPanel(mc.detailsMc);
$levelInfoPanel.setColours(lightCol, darkCol);
$hiding = false;
}
function showDetail(data) {
if (!$hiding) {
$levelInfoPanel.__set__data(data);
$mc.introMc._visible = false;
$mc.detailsMc._visible = true;
$mc._alpha = 0;
show();
}
}
function showIntro() {
if (!$hiding) {
$mc.introMc._visible = true;
$mc.detailsMc._visible = false;
$levelInfoPanel.thumbnail.clear();
$mc._alpha = 0;
show();
}
}
function show() {
$tween.stop();
$tween = new mx.transitions.Tween($mc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc._alpha, 100, 10, false);
}
function hide() {
$tween.stop();
$tween = new mx.transitions.Tween($mc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc._alpha, 0, 8, false);
$tween.onMotionFinished = mx.utils.Delegate.create(this, onHideComplete);
$hiding = true;
}
function onHideComplete() {
$mc.introMc._visible = ($mc.detailsMc._visible = false);
$hiding = false;
}
function destroy() {
$tween.stop();
$levelInfoPanel.destroy();
delete $levelInfoPanel;
}
}
Symbol 1454 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.LevelInfoPanel] Frame 0
class com.preloaded.scimus.launchpad.ui.LevelInfoPanel
{
var $mc, thumbnail, __get__data;
function LevelInfoPanel (mc) {
$mc = mc;
}
function set data(lvl) {
thumbnail = new com.preloaded.scimus.launchpad.ui.LevelThumbnail($mc);
thumbnail.__set__showLabel(false);
thumbnail.mc._x = 14;
thumbnail.mc._y = -7;
$mc.txtTitle.text = lvl.title;
$mc.txtCreator.text = lvl.author;
$mc.txtCreated.text = "Created " + formatDate(lvl.creationDate);
var _local4 = new com.preloaded.data.TimeValues(lvl.bestTimeGlobal);
$mc.txtTimeBest.text = (((com.preloaded.UtilsString.padNumber(_local4.hours) + ":") + com.preloaded.UtilsString.padNumber(_local4.mins)) + ":") + com.preloaded.UtilsString.padNumber(_local4.secs);
var _local3 = new com.preloaded.data.TimeValues(lvl.bestTimeUser);
$mc.txtTimeYou.text = (((com.preloaded.UtilsString.padNumber(_local3.hours) + ":") + com.preloaded.UtilsString.padNumber(_local3.mins)) + ":") + com.preloaded.UtilsString.padNumber(_local3.secs);
$mc.txtPlayCountGlobal.text = lvl.playCount;
$mc.txtPlayCountYou.text = 0;
thumbnail.showForLevel(lvl);
//return(__get__data());
}
function setColours(bright, dark) {
com.preloaded.gfx.ColorUtils.colorMc($mc.dividerMc, bright);
com.preloaded.gfx.ColorUtils.colorMc($mc.staticTextMc, dark);
$mc.txtTitle.setTextColor(bright);
}
function formatDate(str) {
var _local3 = str.substr(0, 10);
var _local1 = str.split("-");
return((((_local1[2].substr(0, 2) + "/") + _local1[1]) + "/") + _local1[0].substr(2, 2));
}
function destroy() {
thumbnail.destroy();
delete thumbnail;
}
}
Symbol 1455 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsCreate] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsCreate extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $panelReceivedLevels, $mc, $panelYourLevels, $detailBox, $createButton, __get__mc, $createLink, dispatchEvent;
function ScreenCnsCreate () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.cns.create");
$panelReceivedLevels = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsCreate($mc.panelReceivedLevelsMc);
$panelYourLevels = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsCreate($mc.panelYourLevelsMc);
$panelReceivedLevels.addEventListener("onListItemEdit", mx.utils.Delegate.create(this, onListItemPassThru));
$panelReceivedLevels.addEventListener("onListItemDelete", mx.utils.Delegate.create(this, onListItemPassThru));
$panelReceivedLevels.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onListItemPassThru));
$panelYourLevels.addEventListener("onListItemEdit", mx.utils.Delegate.create(this, onListItemPassThru));
$panelYourLevels.addEventListener("onListItemDelete", mx.utils.Delegate.create(this, onListItemPassThru));
$panelYourLevels.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onListItemPassThru));
$panelYourLevels.addEventListener("onListItemRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
$panelReceivedLevels.addEventListener("onListItemRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
$panelYourLevels.addEventListener("onListItemRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$panelReceivedLevels.addEventListener("onListItemRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$detailBox = new com.preloaded.scimus.launchpad.ui.Screens.DetailBox($mc.previewMc, 40191, 1661828);
$detailBox.showIntro();
$createButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.CreateLevelButton(__get__mc().previewMc.introMc.buttonCreateMc);
$createButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onCreateButtonRelease));
$createLink = new com.preloaded.UI.MovieClipButton(__get__mc().panelYourLevelsMc.defaultMc.createLinkMc, "over", "out");
$createLink.addEventListener("onRelease", mx.utils.Delegate.create(this, onCreateButtonRelease));
$panelYourLevels.populateList(com.preloaded.scimus.launchpad.ConnectionHandler.customLevelsThread.levels);
$panelReceivedLevels.populateList(com.preloaded.scimus.launchpad.ConnectionHandler.receivedLevelsThread.levels);
}
function onListItemPassThru(evt) {
evt.target = this;
dispatchEvent(evt);
}
function onListItemRollOver(evt) {
$detailBox.showDetail(evt.data);
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
function onListItemRollOut(evt) {
$detailBox.showIntro();
}
function onCreateButtonRelease() {
dispatchEvent({type:"onCreateButtonRelease", target:this});
}
function show(host) {
if ($mc == undefined) {
init(host);
}
return(super.show());
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
return(super._showForBack());
}
function onShowComplete() {
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachTabber(1);
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachSubTabber(0, "cns");
}
function destroy() {
$panelReceivedLevels.destroy();
$panelYourLevels.destroy();
$detailBox.destroy();
delete $detailBox;
delete $panelReceivedLevels;
delete $panelYourLevels;
super.destroy();
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenStartup.instance);
}
}
Symbol 1456 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsCreate] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsCreate extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing
{
var $scroll_x, $scroll_y, $scrollWidth, $scrollHeight, $scrollBox, $listItems, dispatchEvent, removeListItem, mc;
function PanelCnsCreate (arg_mc) {
super(arg_mc);
$scroll_x = 14;
$scroll_y = 77;
$scrollWidth = 243;
$scrollHeight = 119;
}
function populateList(arrList) {
arrList.reverse();
super.populateList(arrList);
}
function addListItem(data) {
var _local4 = $scrollBox.__get__contentHolder().getNextHighestDepth();
var _local3 = $scrollBox.__get__contentHolder().attachMovie("mc.ui.cns.listItem.level.edit", "item_" + _local4, _local4);
_local3._y = $listItems.length * (_local3._height + 4);
$scrollBox.__get__frame().vSnap = _local3._height + 4;
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemCnsEdit(_local3);
_local2.__set__displayName(data.title);
_local2.data = data;
_local2.addEventListener("onDeleteButtonRelease", mx.utils.Delegate.create(this, onListItemDelete));
_local2.addEventListener("onEditButtonRelease", mx.utils.Delegate.create(this, onListItemEdit));
_local2.addEventListener("onLabelRelease", mx.utils.Delegate.create(this, onListItemSelect));
_local2.addEventListener("onLabelRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
_local2.addEventListener("onLabelRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$listItems.push(_local2);
}
function onListItemRollOut(evt) {
evt.type = "onListItemRollOut";
dispatchEvent(evt);
}
function onListItemRollOver(evt) {
evt.type = "onListItemRollOver";
dispatchEvent(evt);
}
function onListItemDelete(evt) {
var _local2 = new com.preloaded.scimus.launchpad.ui.Popups.PopupLevelDelete();
var evt = evt;
var ref = this;
var _local3 = function () {
ref.onListItemDeleteConfirmed(evt);
};
_local2.addEventListener("onCancelButtonRelease", mx.utils.Delegate.create(com.preloaded.scimus.launchpad.ui.PopupHandler.instance, com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup));
_local2.addEventListener("onContinueButtonRelease", _local3);
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.showPopup(_local2);
}
function onListItemDeleteConfirmed(evt) {
com.preloaded.scimus.launchpad.ui.PopupHandler.instance.hideCurrentPopup();
removeListItem(evt.target);
if ($listItems.length > 0) {
rearrangeItems();
} else {
mc.defaultMc._visible = true;
mc.listingSurroundMc._visible = false;
}
dispatchEvent({type:"onListItemDelete", target:this, item:evt.target, data:evt.data});
}
function onListItemEdit(evt) {
dispatchEvent({type:"onListItemEdit", target:this, item:evt.target, data:evt.data});
}
function onListItemSelect(evt) {
dispatchEvent({type:"onListItemSelect", target:this, item:evt.target, data:evt.data});
}
function rearrangeItems() {
var _local3 = 0;
while (_local3 < $listItems.length) {
var _local2 = $listItems[_local3];
var _local4 = _local3 * (_local2.__get__mc()._height + 4);
var _local5;
if (_local2.__get__mc()._y != _local4) {
_local2.__get__mc().tween.stop();
_local2.__get__mc().tween = new mx.transitions.Tween(_local2.__get__mc(), "_y", com.robertpenner.easing.Quad.easeOut, _local2.__get__mc()._y, _local4, 8, false);
_local5 = _local2;
}
_local5.__get__mc().tween.onMotionFinished = mx.utils.Delegate.create(this, onItemsRearranged);
_local3++;
}
}
function onItemsRearranged() {
$scrollBox.update();
}
}
Symbol 1457 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemCnsEdit] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemCnsEdit extends com.preloaded.lang.DispatcherBase
{
var $mc, $editButton, $deleteButton, $labelButton, dispatchEvent, data, __get__displayName, __get__displayNew;
function ListItemCnsEdit (arg_mc) {
super(this);
$mc = arg_mc;
displayNew = (false);
$editButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt($mc.buttonPencilMc);
$deleteButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonAlt($mc.buttonDeleteMc);
$labelButton = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemButtonLabel($mc.buttonLabelMc);
$editButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onEditButtonRelease));
$deleteButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onDeleteButtonRelease));
$labelButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onLabelRelease));
$labelButton.addEventListener("onRollOver", mx.utils.Delegate.create(this, onLabelRollOver));
$labelButton.addEventListener("onRollOut", mx.utils.Delegate.create(this, onLabelRollOut));
}
function onEditButtonRelease() {
dispatchEvent({type:"onEditButtonRelease", target:this, data:data, item:this});
}
function onDeleteButtonRelease() {
dispatchEvent({type:"onDeleteButtonRelease", target:this, data:data, item:this});
}
function onLabelRelease() {
dispatchEvent({type:"onLabelRelease", target:this, data:data, item:this});
}
function onLabelRollOut() {
dispatchEvent({type:"onLabelRollOut", target:this, data:data, item:this});
}
function onLabelRollOver() {
dispatchEvent({type:"onLabelRollOver", target:this, data:data, item:this});
}
function set displayName(n) {
$labelButton.__set__label(n);
//return(__get__displayName());
}
function set displayNew(b) {
$mc.indicatorNewMc._visible = b;
//return(__get__displayNew());
}
function destroy() {
super.clearListeners();
delete $labelButton;
delete $deleteButton;
delete $editButton;
$mc.removeMovieClip();
delete $mc;
delete data;
}
function get mc() {
return($mc);
}
}
Symbol 1458 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupLevelDelete] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupLevelDelete extends com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack
{
function PopupLevelDelete (linkage) {
super("mc.popup.delete.confirm");
}
}
Symbol 1459 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.CreateLevelButton] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.CreateLevelButton extends mx.events.EventDispatcher
{
var $mc, $plusMc, $tween_r, dispatchEvent;
function CreateLevelButton (mc) {
super(this);
$mc = mc;
$plusMc = $mc.plusMc;
mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
mc.onRelease = mx.utils.Delegate.create(this, onRelease);
}
function onRollOver() {
$mc.gotoAndStop("over");
$tween_r.stop();
$tween_r = new mx.transitions.Tween($plusMc, "_rotation", com.robertpenner.easing.Quad.easeOut, $plusMc._rotation, 90, 10, false);
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
function onRollOut() {
$mc.gotoAndStop("out");
$tween_r.stop();
$tween_r = new mx.transitions.Tween($plusMc, "_rotation", com.robertpenner.easing.Quad.easeOut, $plusMc._rotation, 0, 8, false);
}
function onRelease() {
com.preloaded.scimus.launchpad.Main.instance.onButtonReleaseGlobal();
dispatchEvent({type:"onRelease", target:this});
}
}
Symbol 1460 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsShare] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsShare extends com.preloaded.scimus.launchpad.ui.Screens.ScreenBase
{
static var instance;
var $panelReceivedLevels, $mc, $panelYourLevels, $panelSend, $detailBox, $currentLevel, $formData, $sendDelegate;
function ScreenCnsShare () {
super();
instance = this;
}
function init(host) {
super.init(host, "mc.ui.screen.cns.share");
$panelReceivedLevels = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsShare($mc.panelReceivedLevelsMc);
$panelYourLevels = new com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsShare($mc.panelYourLevelsMc);
$panelSend = new com.preloaded.scimus.launchpad.ui.Screens.PanelCnsSend($mc.panelSendMc);
$panelSend.mc._visible = false;
$panelSend.addEventListener("onSubmitButtonRelease", mx.utils.Delegate.create(this, onSubmitButtonRelease));
$panelSend.addEventListener("onShareButtonRelease", mx.utils.Delegate.create(this, onShareButtonRelease));
$panelSend.addEventListener("onBackButtonRelease", mx.utils.Delegate.create(this, onBackButtonRelease));
$panelYourLevels.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onListItemSelect));
$panelReceivedLevels.addEventListener("onListItemSelect", mx.utils.Delegate.create(this, onListItemSelect));
$panelYourLevels.addEventListener("onListItemRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
$panelReceivedLevels.addEventListener("onListItemRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
$panelYourLevels.addEventListener("onListItemRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$panelReceivedLevels.addEventListener("onListItemRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$panelYourLevels.populateList(com.preloaded.scimus.launchpad.ConnectionHandler.customLevelsThread.levels);
$panelReceivedLevels.populateList(com.preloaded.scimus.launchpad.ConnectionHandler.receivedLevelsThread.levels);
$detailBox = new com.preloaded.scimus.launchpad.ui.Screens.DetailBox($mc.previewMc, 40191, 1661828);
$detailBox.showIntro();
}
function onListItemRollOver(evt) {
$detailBox.showDetail(evt.data);
com.preloaded.scimus.launchpad.Main.instance.onButtonRollOverGlobal();
}
function onListItemRollOut(evt) {
$detailBox.showIntro();
}
function onListItemSelect(evt) {
$detailBox.hide();
$currentLevel = evt.data;
var _local2 = 10;
$panelSend.show(20, $currentLevel.title);
$panelReceivedLevels.hide(_local2);
$panelYourLevels.hide(_local2);
}
function onSubmitButtonRelease(evt) {
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.catchClicks(true);
$formData = evt;
$panelSend.showSending(evt.friendName);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.sendLevelToFriend($currentLevel, evt.email, evt.yourName, evt.friendName);
$sendDelegate = mx.utils.Delegate.create(this, onSendLevelToFriendResponse);
com.preloaded.scimus.launchpad.ConnectionHandler.instance.addEventListener("onSendLevelToFriendResponse", $sendDelegate);
}
function onSendLevelToFriendResponse() {
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.catchClicks(false);
$panelSend.showSent();
com.preloaded.scimus.launchpad.ConnectionHandler.instance.removeEventListener("onSendLevelToFriendResponse", $sendDelegate);
}
function onBackButtonRelease() {
onShareButtonRelease();
}
function onShareButtonRelease() {
var _local2 = 10;
$panelSend.hide(15);
$panelReceivedLevels.show(20);
$panelYourLevels.show(18);
$detailBox.showIntro();
}
function resetPanels() {
$panelSend.mc._visible = false;
$panelSend.resetPos();
$panelReceivedLevels.resetPos();
$panelYourLevels.resetPos();
}
function show(host) {
if ($mc == undefined) {
init(host);
}
return(super.show());
}
function showForBack(host) {
if ($mc == undefined) {
init(host);
}
return(super._showForBack());
}
function onShowComplete() {
super.onShowComplete();
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachTabber(1);
com.preloaded.scimus.launchpad.ui.ScreenHandler.instance.attachSubTabber(1, "cns");
}
function getBackScreen() {
return(com.preloaded.scimus.launchpad.ui.Screens.ScreenCnsCreate.instance);
}
function destroy() {
super.destroy();
$panelReceivedLevels.destroy();
$panelYourLevels.destroy();
$panelSend.destroy();
$mc.removeMovieClip();
$detailBox.destroy();
delete $detailBox;
}
}
Symbol 1461 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsShare] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelCnsShare extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelListing
{
var $scroll_x, $scroll_y, $scrollWidth, $scrollHeight, $scrollBox, $listItems, dispatchEvent, mc, tween;
function PanelCnsShare (arg_mc) {
super(arg_mc);
$scroll_x = 14;
$scroll_y = 77;
$scrollWidth = 243;
$scrollHeight = 119;
}
function populateList(arrList) {
arrList.reverse();
super.populateList(arrList);
}
function addListItem(data) {
var _local4 = $scrollBox.__get__contentHolder().getNextHighestDepth();
var _local3 = $scrollBox.__get__contentHolder().attachMovie("mc.ui.cns.listItem.level.date", "item_" + _local4, _local4);
_local3._y = $listItems.length * (_local3._height + 4);
$scrollBox.__get__frame().vSnap = _local3._height + 4;
var _local2 = new com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemCnsDate(_local3);
_local2.__set__data(data);
_local2.addEventListener("onRelease", mx.utils.Delegate.create(this, onListItemSelect));
_local2.addEventListener("onRollOver", mx.utils.Delegate.create(this, onListItemRollOver));
_local2.addEventListener("onRollOut", mx.utils.Delegate.create(this, onListItemRollOut));
$listItems.push(_local2);
}
function onListItemSelect(evt) {
dispatchEvent({type:"onListItemSelect", target:this, item:evt.target, data:evt.data});
}
function onListItemRollOut(evt) {
evt.type = "onListItemRollOut";
dispatchEvent(evt);
}
function onListItemRollOver(evt) {
evt.type = "onListItemRollOver";
dispatchEvent(evt);
}
function show(t) {
mc._visible = true;
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc.origin.x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, mc.origin.x, t, false);
}
}
Symbol 1462 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemCnsDate] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.Panels.ListItemCnsDate extends com.preloaded.lang.DispatcherBase
{
var $mc, $tween, dispatchEvent, $data, __get__data, __get__displayNew;
function ListItemCnsDate (arg_mc) {
super(this);
$mc = arg_mc;
displayNew = (false);
$mc.onRollOver = mx.utils.Delegate.create(this, onRollOver);
$mc.onRollOut = mx.utils.Delegate.create(this, onRollOut);
$mc.onRelease = mx.utils.Delegate.create(this, onRelease);
$mc.hiliteMc._alpha = 0;
}
function onRollOver() {
$tween.stop();
$tween = new mx.transitions.Tween($mc.hiliteMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc.hiliteMc._alpha, 100, 10, false);
dispatchEvent({type:"onRollOver", target:this, data:$data, item:this});
}
function onRollOut() {
$tween.stop();
$tween = new mx.transitions.Tween($mc.hiliteMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $mc.hiliteMc._alpha, 0, 8, false);
dispatchEvent({type:"onRollOut", target:this, data:$data, item:this});
}
function onRelease() {
dispatchEvent({type:"onRelease", target:this, data:$data, item:this});
}
function set data(d) {
$data = d;
$mc.hiliteMc.txtName.text = ($mc.txtName.text = d.title);
$mc.hiliteMc.txtDate.text = ($mc.txtDate.text = formatDate(d.creationDate));
//return(__get__data());
}
function set displayNew(b) {
$mc.indicatorNewMc._visible = b;
//return(__get__displayNew());
}
function destroy() {
super.clearListeners();
$mc.removeMovieClip();
delete $mc;
delete eval (__get__data());
}
function get mc() {
return($mc);
}
function formatDate(str) {
var _local3 = str.substr(0, 10);
var _local1 = str.split("-");
return((((_local1[2].substr(0, 2) + "/") + _local1[1]) + "/") + _local1[0].substr(2, 2));
}
}
Symbol 1463 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Screens.PanelCnsSend] Frame 0
class com.preloaded.scimus.launchpad.ui.Screens.PanelCnsSend extends com.preloaded.scimus.launchpad.ui.Screens.Panels.PanelBase
{
var $formMc, mc, $sendingMc, $sentMc, $submitButton, $shareButton, $backButton, $defaultTexts, tween, dispatchEvent, $tween;
function PanelCnsSend (arg_mc) {
super(arg_mc);
$formMc = mc.formMc;
$sendingMc = mc.sendingMc;
$sentMc = mc.sentMc;
$submitButton = new com.preloaded.UI.MovieClipButton($formMc.submitButtonMc, "over", "out");
$shareButton = new com.preloaded.UI.MovieClipButton($sentMc.shareButtonMc, "over", "out");
$shareButton = new com.preloaded.UI.MovieClipButton($formMc.backButtonMc, "over", "out");
$submitButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSubmitButtonRelease));
$backButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onBackButtonRelease));
$shareButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onShareButtonRelease));
$formMc.tabEnabled = true;
$formMc.txtYourName.onSetFocus = mx.utils.Delegate.create(this, onNameFocus);
$formMc.txtYourName.onKillFocus = mx.utils.Delegate.create(this, checkTexts);
$formMc.txtYourName.tabIndex = 1;
$formMc.txtFriendName.onSetFocus = mx.utils.Delegate.create(this, onFriendFocus);
$formMc.txtFriendName.onKillFocus = mx.utils.Delegate.create(this, checkTexts);
$formMc.txtFriendName.tabIndex = 2;
$formMc.txtFriendEmail.onSetFocus = mx.utils.Delegate.create(this, onEmailFocus);
$formMc.txtFriendEmail.onKillFocus = mx.utils.Delegate.create(this, checkTexts);
$formMc.txtFriendEmail.tabIndex = 3;
$defaultTexts = new Array($formMc.txtYourName.text, $formMc.txtFriendName.text, $formMc.txtFriendEmail.text);
$sendingMc._visible = ($sentMc._visible = false);
}
function onNameFocus() {
$formMc.txtYourName.text = "";
}
function onFriendFocus() {
$formMc.txtFriendName.text = "";
}
function onEmailFocus() {
$formMc.txtFriendEmail.text = "";
hideError();
}
function checkTexts() {
if ($formMc.txtYourName.text == "") {
$formMc.txtYourName.text = $defaultTexts[0];
}
if ($formMc.txtFriendName.text == "") {
$formMc.txtFriendName.text = $defaultTexts[1];
}
if ($formMc.txtFriendEmail.text == "") {
$formMc.txtFriendEmail.text = $defaultTexts[2];
}
}
function resetText() {
$formMc.txtYourName.text = $defaultTexts[0];
$formMc.txtFriendName.text = $defaultTexts[1];
$formMc.txtFriendEmail.text = $defaultTexts[2];
}
function show(t, title) {
mc._visible = true;
tween.stop();
tween = new mx.transitions.Tween(mc, "_x", com.robertpenner.easing.Quint.easeOut, mc.origin.x + com.preloaded.scimus.launchpad.Config.SCREEN_WIDTH, mc.origin.x, t, false);
mc.txtTitle.text = "Sending " + title;
showForm();
resetText();
}
function onSubmitButtonRelease() {
if (com.preloaded.UtilsString.isEmail($formMc.txtFriendEmail.text)) {
var _local2 = new Object();
_local2.yourName = $formMc.txtYourName.text;
_local2.friendName = $formMc.txtFriendName.text;
_local2.email = $formMc.txtFriendEmail.text;
_local2.type = "onSubmitButtonRelease";
dispatchEvent(_local2);
$submitButton.enable(false);
} else {
showError();
}
}
function onShareButtonRelease() {
dispatchEvent({type:"onShareButtonRelease", target:this});
}
function onBackButtonRelease() {
dispatchEvent({type:"onBackButtonRelease", target:this});
}
function showForm() {
Key.addListener(this);
$submitButton.enable(true);
$formMc._visible = true;
$sendingMc._visible = false;
$sentMc._visible = false;
$formMc.errorMc._visible = false;
$tween.stop();
$tween = new mx.transitions.Tween($formMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
}
function showError() {
$formMc.errorMc._visible = true;
$formMc.errorMc.tween.stop();
$formMc.errorMc.tween = new mx.transitions.Tween($formMc.errorMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $formMc.errorMc._alpha, 100, 10, false);
$submitButton.enable(true);
}
function hideError() {
$formMc.errorMc.tween.stop();
$formMc.errorMc.tween = new mx.transitions.Tween($formMc.errorMc, "_alpha", com.robertpenner.easing.Quad.easeOut, $formMc.errorMc._alpha, 0, 8, false);
}
function showSending(name) {
Key.removeListener(this);
$formMc._visible = false;
$sendingMc._visible = true;
$tween.stop();
$tween = new mx.transitions.Tween($sendingMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
$sendingMc.txtSending.htmlText = ("Sending level to <font color=\"#FFFFFF\">" + name) + "</font>";
}
function showSent() {
Key.removeListener(this);
$sendingMc._visible = false;
$sentMc._visible = true;
$tween.stop();
$tween = new mx.transitions.Tween($sentMc, "_alpha", com.robertpenner.easing.Quad.easeOut, 0, 100, 8, false);
}
function destroy() {
$submitButton.destroy();
delete $submitButton;
$shareButton.destroy();
delete $shareButton;
}
function onKeyUp() {
if (Key.getCode() == 13) {
$submitButton.onRelease();
}
}
}
Symbol 1464 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFinish] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFinish extends com.preloaded.scimus.launchpad.ui.Popups.PopupBase
{
var $levelTime, $numBlocks, $mc, $continueButton, $replayButton, $content, __get__content, dispatchEvent;
function PopupLevelFinish (linkage, levelTime, numBlocks, contentTag) {
super(linkage);
$levelTime = levelTime;
$numBlocks = numBlocks;
}
function show(host) {
super.show(host);
var _local3 = new com.preloaded.data.TimeValues($levelTime);
$mc.txtTime.text = (((com.preloaded.UtilsString.padNumber(_local3.hours) + ":") + com.preloaded.UtilsString.padNumber(_local3.mins)) + ":") + com.preloaded.UtilsString.padNumber(_local3.secs);
$mc.txtBlocksUsed.text = com.preloaded.UtilsString.padNumber($numBlocks);
$continueButton = new com.preloaded.UI.MovieClipButton($mc.buttonContinueMc, "over", "out");
$continueButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onContinueButtonRelease));
$replayButton = new com.preloaded.UI.MovieClipButton($mc.buttonReplayMc, "over", "out");
$replayButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onReplayButtonRelease));
setContent();
}
function set content(o) {
$content = o.response;
if ($mc.txtFactoidTitle != undefined) {
setContent();
}
//return(__get__content());
}
function setContent() {
$mc.txtFactoidTitle.htmlText = $content.title;
$mc.txtFactoidBody.htmlText = $content.copy;
}
function onContinueButtonRelease() {
$continueButton.enable(false);
dispatchEvent({type:"onContinueButtonRelease", target:this});
}
function onReplayButtonRelease() {
$replayButton.enable(false);
dispatchEvent({type:"onReplayButtonRelease", target:this});
}
function destroy() {
super.destroy();
$continueButton.destroy();
delete $continueButton;
$replayButton.destroy();
delete $replayButton;
}
}
Symbol 1465 MovieClip [__Packages.com.preloaded.debug.Logger] Frame 0
class com.preloaded.debug.Logger
{
static var $outputTextField, $broadcaster, $initialised, $tracelevel, $limpets, __get__traceLevel;
function Logger () {
}
static function addOutputWindow(target, x, y, width, height, level, fmt) {
var _local2 = target.getNextHighestDepth();
var _local1 = target.createEmptyMovieClip("LoggerWindow_" + _local2, _local2);
_local1._x = x;
_local1._y = y;
var txt = _local1.createTextField("loggerTxt", 10, 0, 0, width, height);
txt.selectable = true;
txt.multiline = true;
txt.embedFonts = false;
if (fmt != undefined) {
txt.setTextFormat(fmt);
} else {
txt.textColor = 8947848 /* 0x888888 */;
}
var lv = level;
var _local3 = function (msg, lvl) {
if (lvl >= lv) {
txt.text = txt.text + (msg + newline);
}
txt.setTextFormat(fmt);
txt.scroll = txt.maxscroll;
};
txt.text = "Logger.outputWindow initialised...\n";
$outputTextField = txt;
addLimpet(_local3);
}
static function init() {
$broadcaster = new Object();
AsBroadcaster.initialize($broadcaster);
$initialised = true;
}
static function log(msg, level) {
if (typeof(msg) != "string") {
msg = msg.toString();
}
if (level == undefined) {
level = 0;
}
if (!$initialised) {
init();
}
if ((level >= $tracelevel) || ($tracelevel == undefined)) {
}
$broadcaster.broadcastMessage("onLogMessage", msg, level);
for (var _local3 in $limpets) {
$limpets[_local3](msg, level);
}
}
static function addLimpet(limpet) {
if ($limpets == undefined) {
$limpets = new Array();
}
$limpets.push(limpet);
}
static function set traceLevel(n) {
$tracelevel = n;
//return(__get__traceLevel());
}
static function addListener(target) {
if (!$initialised) {
init();
}
$broadcaster.addListener(target);
}
static function removeListener(target) {
$broadcaster.removeListener(target);
}
static function clear() {
$outputTextField.text = "";
}
}
Symbol 1466 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExit] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxExit extends com.preloaded.scimus.launchpad.ui.Popups.Sandbox.PopupSandboxBack
{
function PopupSandboxExit (linkage) {
super("mc.popup.sandbox.exit");
}
}
Symbol 1467 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupLevelComplete] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupLevelComplete extends com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFinish
{
var $saveButton, $mc, dispatchEvent;
function PopupLevelComplete (levelTime, numBlocks, contentTag) {
super("mc.popup.level.complete", levelTime, numBlocks, contentTag);
}
function show(host) {
super.show(host);
if ((!com.preloaded.scimus.launchpad.ConnectionHandler.instance.loggedIn) || (com.preloaded.scimus.launchpad.ConnectionHandler.instance.isAnonymous)) {
$saveButton = new com.preloaded.UI.MovieClipButton($mc.buttonSaveMc, "over", "out");
$saveButton.addEventListener("onRelease", mx.utils.Delegate.create(this, onSaveButtonRelease));
} else {
$mc.buttonSaveMc.gotoAndStop("off");
}
}
function onSaveButtonRelease() {
dispatchEvent({type:"onSaveButtonRelease", target:this});
}
}
Symbol 1468 MovieClip [__Packages.com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFailed] Frame 0
class com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFailed extends com.preloaded.scimus.launchpad.ui.Popups.PopupLevelFinish
{
var $continueButton;
function PopupLevelFailed (levelTime, numBlocks, contentTag) {
super("mc.popup.level.failed", levelTime, numBlocks, contentTag);
}
function onHitterRollOver() {
$continueButton.onRollOver();
}
function onHitterRollOut() {
$continueButton.onRollOut();
}
function onHitterRelease() {
$continueButton.onRelease();
}
}
Symbol 1469 MovieClip [__Packages.com.preloaded.UtilsArray] Frame 0
class com.preloaded.UtilsArray
{
function UtilsArray () {
}
static function in_array(needle, haystack) {
for (var _local3 in haystack) {
if (haystack[_local3].toString() == needle.toString()) {
return(true);
}
}
return(false);
}
static function insert(arr, index, value) {
if (index < 0) {
return(arr);
}
var _local1 = arr.slice();
var _local2 = _local1.splice(index);
_local1[index] = value;
_local1 = _local1.concat(_local2);
return(_local1);
}
static function getRandomElement(arr) {
return(arr[Math.floor(Math.random() * arr.length)]);
}
static function interpolate(ary1, ary2, t) {
var _local3 = ((ary1.length >= ary2.length) ? (ary1.slice()) : (ary2.slice()));
var _local1 = _local3.length;
while (_local1--) {
_local3[_local1] = ary1[_local1] + ((ary2[_local1] - ary1[_local1]) * t);
}
return(_local3);
}
}
Symbol 29 MovieClip [__Packages.com.blitzagency.xray.Xray] Frame 0
class com.blitzagency.xray.Xray
{
static var basePackages, addedObjects, recursionControl, xrayTrace, xrayLogger, pointConverter, fpsMeter, functionName, lc_info, lc_exec, packagesInitialized;
function Xray () {
}
static function init() {
basePackages = new Array("com,org,net,edu,gov,ch,mx,flash");
addedObjects = new Object();
recursionControl = 0;
xrayTrace = com.blitzagency.xray.XrayTrace.getInstance();
com.blitzagency.xray.logger.LogManager.initialize();
xrayLogger = com.blitzagency.xray.logger.LogManager.getLogger("com.blitzagency.xray.logger.XrayLogger");
_global.view = function () {
com.blitzagency.xray.Xray.xrayTrace.trace.apply(com.blitzagency.xray.Xray.xrayTrace, arguments);
};
_global.tt = function () {
com.blitzagency.xray.Xray.xrayTrace.trace.apply(com.blitzagency.xray.Xray.xrayTrace, arguments);
};
_global.Xray = com.blitzagency.xray.Xray;
_global.Xray.setLogLevel = function (p_level) {
com.blitzagency.xray.Xray.xrayLogger.setLevel(p_level);
};
_global.Xray.debug = function () {
com.blitzagency.xray.Xray.xrayLogger.debug(arguments[0], arguments[1]);
};
_global.Xray.info = function () {
com.blitzagency.xray.Xray.xrayLogger.info(arguments[0], arguments[1]);
};
_global.Xray.warn = function () {
com.blitzagency.xray.Xray.xrayLogger.warn(arguments[0], arguments[1]);
};
_global.Xray.error = function () {
com.blitzagency.xray.Xray.xrayLogger.error(arguments[0], arguments[1]);
};
_global.Xray.fatal = function () {
com.blitzagency.xray.Xray.xrayLogger.fatal(arguments[0], arguments[1]);
};
pointConverter = com.blitzagency.util.PointConverter.getInstance();
fpsMeter = com.blitzagency.xray.FPSMeter.getInstance();
fpsMeter.addEventListener("onFpsUpdate", com.blitzagency.util.Delegate.create(com.blitzagency.xray.Xray, updateFps));
functionName = com.blitzagency.xray.FunctionName.getInstance();
_global.tf = function () {
com.blitzagency.xray.Xray.functionName.traceFunction.apply(com.blitzagency.xray.Xray.functionName, arguments);
};
if (!_global.isLivePreview) {
if (lc_info) {
return(undefined);
}
lc_exec = new com.blitzagency.xray.ControlConnection();
lc_info = new com.blitzagency.xray.LoggerConnection();
}
}
static function addObject(id, obj) {
addedObjects[id] = new Object({id:id, obj:obj});
}
static function addPackages(ary) {
var _local1 = 0;
while (_local1 < ary.length) {
if (ary[_local1] != "") {
com.blitzagency.xray.ClassPath.registerPackage(ary[_local1]);
}
_local1++;
}
com.blitzagency.xray.ClassPath.registerPackage();
packagesInitialized = true;
}
static function trace() {
xrayLogger.debug.apply(xrayLogger, arguments);
}
static function tt() {
xrayTrace.trace.apply(xrayTrace, arguments);
}
static function tf() {
_global.FunctionName.traceFunction.apply(_global.FunctionName, arguments);
}
static function updateFps(obj) {
lc_exec.sendFPS(obj);
}
static function createFPSMeter(target_mc, fpsColor) {
target_mc = ((!target_mc) ? (_level0) : (target_mc));
var _local2 = target_mc.createEmptyMovieClip("fpsContainer", target_mc.getNextHighestDepth());
_local2.cacheAsBitmap = true;
var _local4 = _local2.createTextField("fps", 1, 0, 0, 40, 22);
_local4.autoSize = true;
_local2.embedFonts = false;
_local2.textFormat = new TextFormat();
_local2.textFormat.color = fpsColor;
_local2.textFormat.font = "_sans";
_local2.textFormat.size = 10;
_local2.fps.setNewTextFormat(_local2.textFormat);
_local2.fps.setTextFormat(_local2.textFormat);
_local2.updateFps = function (obj) {
this.fps.text = obj.fps;
};
fpsMeter.__set__runFPS(true);
fpsMeter.addEventListener("onFpsUpdate", com.blitzagency.util.Delegate.create(_local2, _local2.updateFps));
return(_local2);
}
static function sendMetaData(obj) {
if (obj != undefined) {
var _local2 = lc_exec.send("_xray_conn", "setMetaData", obj);
}
}
static function initConnections() {
var _local1 = lc_exec.initConnection();
var _local2 = lc_info.initConnection();
if (_local1) {
lc_exec.send("_xray_conn", "checkFPSOn");
lc_exec.getLogLevel();
}
tt("Connections", (_local1 + " | ") + _local2);
}
static var $version = "1.6.3";
}
Symbol 33 MovieClip [__Packages.com.blitzagency.util.Delegate] Frame 0
class com.blitzagency.util.Delegate
{
function Delegate () {
}
static function create(target, handler) {
var extraArgs = arguments.slice(2);
var delegate;
delegate = function () {
var _local2 = arguments.concat(extraArgs, [delegate]);
return(handler.apply(target, _local2));
};
return(delegate);
}
}
Symbol 34 MovieClip [__Packages.com.blitzagency.xray.Watch] Frame 0
class com.blitzagency.xray.Watch
{
function Watch () {
}
static function createCallBack(obj, prop_str, callBack) {
var _local1 = obj[prop_str];
obj.watch(prop_str, _functionChanged, callBack);
obj[prop_str] = undefined;
if (_local1) {
obj[prop_str] = _local1;
}
}
static function removeCallBack(obj, prop_str, callBack) {
obj.unwatch(prop_str);
var _local2 = obj[prop_str];
var _local6;
var _local3;
var _local5 = new Array();
while (true) {
_local3 = _local2.callBack;
if (typeof(_local3) == "function") {
_local6 = _local2.newVal;
_local2.callBack = undefined;
if ((_local3 == callBack) || (callBack == undefined)) {
break;
}
_local5.push(_local3);
_local2 = _local6;
} else {
break;
}
}
if (_local6) {
obj[prop_str] = _local6;
} else {
delete obj[prop_str];
obj[prop_str] = null;
}
var _local1 = 0;
while (_local1 < _local5.length) {
callBack = _local5[_local1];
createCallBack(obj, prop_str, callBack);
_local1++;
}
}
static function _functionChanged(prop_str, oldVal, newVal, callBack) {
var _local3 = function () {
var _local3 = arguments.callee;
var _local5 = _local3.newVal;
var _local4 = _local3.callBack;
_local5.apply(this, arguments);
_local4.apply(this, arguments);
};
_local3.newVal = newVal;
_local3.callBack = callBack;
return(_local3);
}
}
Symbol 35 MovieClip [__Packages.com.blitzagency.xray.DragableMovieClip] Frame 0
class com.blitzagency.xray.DragableMovieClip extends MovieClip
{
static var _instance;
var startDrag, ___onMouseMove, onMouseMove, stopDrag;
function DragableMovieClip () {
super();
}
static function initialize(mc, restriction_obj) {
if (!_instance) {
_instance = new com.blitzagency.xray.DragableMovieClip();
}
var _local2 = arguments.slice(2);
_instance._enable.apply(_instance, [mc, restriction_obj].concat(_local2));
}
function _customOnPress(restriction_obj) {
var _local4 = arguments.slice(1);
if (restriction_obj) {
startDrag(false, restriction_obj.left, restriction_obj.top, restriction_obj.right, restriction_obj.bottom);
} else {
startDrag();
}
___onMouseMove = onMouseMove;
onMouseMove = updateAfterEvent;
}
function _customOnRelease() {
stopDrag();
com.blitzagency.xray.Xray.lc_exec.updateHistory(this);
onMouseMove = ___onMouseMove;
}
function _enable(mc, restriction_obj) {
var _local5 = arguments.slice(2);
var _local6 = com.blitzagency.util.Delegate.create.apply(com.blitzagency.util.Delegate, [mc, _customOnPress, restriction_obj].concat(_local5));
var _local4 = com.blitzagency.util.Delegate.create.apply(com.blitzagency.util.Delegate, [mc, _customOnRelease].concat(_local5));
mc.__removeReferenceDelegatePress__ = _local6;
mc.__removeReferenceDelegateRelease__ = _local4;
com.blitzagency.xray.Watch.createCallBack(mc, "onPress", _local6);
com.blitzagency.xray.Watch.createCallBack(mc, "onRelease", _local4);
com.blitzagency.xray.Watch.createCallBack(mc, "onReleaseOutside", _local4);
}
static function remove(mc) {
var _local3 = mc.__removeReferenceDelegatePress__;
var _local2 = mc.__removeReferenceDelegateRelease__;
if (_local3 && (_local2)) {
delete mc.__removeReferenceDelegatePress__;
delete mc.__removeReferenceDelegateRelease__;
com.blitzagency.xray.Watch.removeCallBack(mc, "onPress", _local3);
com.blitzagency.xray.Watch.removeCallBack(mc, "onRelease", _local2);
com.blitzagency.xray.Watch.removeCallBack(mc, "onReleaseOutside", _local2);
}
}
}
Symbol 36 MovieClip [__Packages.com.blitzagency.events.GDispatcher] Frame 0
class com.blitzagency.events.GDispatcher
{
var gDispatcher_listeners;
function GDispatcher () {
}
static function initialize(p_obj) {
if ($instance == undefined) {
$instance = new com.blitzagency.events.GDispatcher();
}
p_obj.dispatchEvent = $instance.dispatchEvent;
p_obj.eventListenerExists = $instance.eventListenerExists;
p_obj.addEventListener = $instance.addEventListener;
p_obj.removeEventListener = $instance.removeEventListener;
p_obj.removeAllEventListeners = $instance.removeAllEventListeners;
}
static function $indexOfListener(p_listeners, p_obj, p_function) {
var _local3 = p_listeners.length;
var _local2 = -1;
while (_local2++ , _local2 < _local3) {
var _local1 = p_listeners[_local2];
if ((_local1.o == p_obj) && (_local1.f == p_function)) {
return(_local2);
}
}
return(-1);
}
static function $dispatchEvent(p_dispatchObj, p_listeners, p_eventObj) {
var _local5;
for (_local5 in p_listeners) {
var _local1 = p_listeners[_local5].o;
var _local3 = typeof(_local1);
var _local2 = p_listeners[_local5].f;
if ((_local3 == "object") || (_local3 == "movieclip")) {
if ((_local1.handleEvent != undefined) && (_local2 == undefined)) {
_local1.handleEvent(p_eventObj);
} else {
if (_local2 == undefined) {
_local2 = p_eventObj.type;
}
_local1[_local2](p_eventObj);
}
} else {
_local1.apply(p_dispatchObj, [p_eventObj]);
}
}
}
function dispatchEvent(p_eventObj) {
if (p_eventObj.type == "ALL") {
return(undefined);
}
if (p_eventObj.target == undefined) {
p_eventObj.target = this;
}
this[p_eventObj.type + "Handler"](p_eventObj);
var _local3 = gDispatcher_listeners[p_eventObj.type];
if (_local3 != undefined) {
$dispatchEvent(this, _local3, p_eventObj);
}
_local3 = gDispatcher_listeners.ALL;
if (_local3 != undefined) {
$dispatchEvent(this, _local3, p_eventObj);
}
}
function eventListenerExists(p_event, p_obj, p_function) {
return($indexOfListener(gDispatcher_listeners[p_event], p_obj, p_function) != -1);
}
function addEventListener(p_event, p_obj, p_function) {
if (gDispatcher_listeners == undefined) {
gDispatcher_listeners = {};
_global.ASSetPropFlags(this, gDispatcher_listeners, 1);
}
var _local3 = gDispatcher_listeners[p_event];
if (_local3 == undefined) {
_local3 = [];
gDispatcher_listeners[p_event] = _local3;
}
if ($indexOfListener(_local3, p_obj, p_function) == -1) {
_local3.push({o:p_obj, f:p_function});
}
}
function removeEventListener(p_event, p_obj, p_function) {
var _local2 = gDispatcher_listeners[p_event];
if (_local2 == undefined) {
return(undefined);
}
var _local3 = $indexOfListener(_local2, p_obj, p_function);
if (_local3 != -1) {
_local2.splice(_local3, 1);
}
}
function removeAllEventListeners(p_event) {
if (p_event == undefined) {
delete gDispatcher_listeners;
} else {
delete gDispatcher_listeners[p_event];
}
}
static var $instance = undefined;
}
Symbol 37 MovieClip [__Packages.com.blitzagency.util.RecursionCheck] Frame 0
class com.blitzagency.util.RecursionCheck
{
var members, maxRecursionLevel;
function RecursionCheck () {
com.blitzagency.events.GDispatcher.initialize(this);
members = new Array();
maxRecursionLevel = 3;
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.util.RecursionCheck();
}
return(_instance);
}
function isMember(obj) {
var _local2 = getIndex(obj);
if (_local2 != null) {
return(_local2);
}
}
function addMember(obj) {
if (obj != undefined) {
members.push({obj:obj, count:1});
return(true);
}
return(false);
}
function removeMember(obj) {
var _local2 = getIndex(obj);
if (_local2.exists) {
members.splice(_local2.index, 1);
return(true);
}
return(false);
}
function clear() {
members = [];
}
function getIndex(obj) {
var _local6 = members.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = members[_local3];
if ((_local2.obj == obj) && (_local2.count < maxRecursionLevel)) {
_local2.count++;
return({exists:true, recurse:true, count:_local2.count, index:_local3});
}
if ((_local2.obj == obj) && (_local2.count >= maxRecursionLevel)) {
return({exists:true, recurse:false, count:_local2.count, index:_local3});
}
_local3++;
}
return({exists:false, recurse:true, index:-1});
}
static var _instance = null;
}
Symbol 38 MovieClip [__Packages.com.blitzagency.xray.ClassPath] Frame 0
class com.blitzagency.xray.ClassPath
{
static var check, fullPath;
function ClassPath () {
}
static function registerPackage(packageName) {
if (check == undefined) {
check = [];
}
if (packageName == undefined) {
var _local2 = [];
for (var _local3 in _global) {
_local2.push(_local3);
}
_global.ASSetPropFlags(_global, null, 0, 1);
classPusher(_global);
_protect(_global, _local2);
} else {
classPusher(_global[packageName], packageName);
}
}
static function _protect(package_obj, unprotected) {
_global.ASSetPropFlags(package_obj, null, 1, 1);
_global.ASSetPropFlags(package_obj, unprotected, 0, 1);
_global.ASSetPropFlags(package_obj, ["constructor", "__constructor__", "prototype", "__proto__"], 1, 1);
}
static function getClassName(obj) {
if (obj instanceof Function) {
return(obj.shortClassName);
}
return(obj.constructor.shortClassName);
}
static function getLongClassName(obj) {
if (obj instanceof Function) {
return(obj.className);
}
return(obj.constructor.className);
}
static function getPath(obj) {
if (obj instanceof Function) {
return(obj.className);
}
return(obj.constructor.className);
}
static function classPusher(node, name) {
var _local2 = ((name == undefined) ? "" : (name + "."));
for (var _local3 in node) {
if (((node[_local3] instanceof Function) && (node[_local3].constructor != null)) && (node[_local3].className == undefined)) {
node[_local3].className = _local2 + _local3;
node[_local3].shortClassName = _local3;
check.push(node[_local3]);
} else if ((node[_local3] instanceof Object) && (node[_local3].className == undefined)) {
}
}
}
static function checkProtoChain(obj, extendedPath, includePath) {
if ((obj.__proto__ != undefined) && (obj.__proto__.constructor.className != undefined)) {
var _local1 = checkExtended(obj);
var _local4 = ((extendedPath || (includePath)) ? (_local1.className) : (_local1.shortClassName));
fullPath = ((fullPath == "") ? (_local4) : ((fullPath + ".") + _local1.shortClassName));
if (extendedPath) {
checkProtoChain(obj.__proto__, extendedPath);
}
}
}
static function getClass(obj, extendedPath, includePath) {
fullPath = "";
checkProtoChain(obj, extendedPath, includePath);
if (fullPath == "") {
fullPath = typeof(obj);
}
return(fullPath);
}
static function checkExtended(obj) {
var _local2 = {extended:false};
var _local1 = 0;
while (_local1 < check.length) {
var _local3 = ((obj.__proto__ == check[_local1].prototype) ? true : false);
if (_local3) {
_local2.extended = _local3;
_local2.className = check[_local1].className;
_local2.shortClassName = check[_local1].shortClassName;
return(_local2);
}
_local1++;
}
return(_local2);
}
}
Symbol 39 MovieClip [__Packages.com.blitzagency.xray.ObjectViewer] Frame 0
class com.blitzagency.xray.ObjectViewer
{
var _recursionCount, recursionCheck, mc_prop_ary, TextField_prop_ary, Button_prop_ary, Sound_prop_ary, mc_prop_small_ary, objMap, currentObjPath, XMLStr, dispatchEvent, XMLDoc;
function ObjectViewer () {
_recursionCount = 0.003;
recursionCheck = com.blitzagency.util.RecursionCheck.getInstance();
mc_prop_ary = new Array("_name", "_x", "_y", "_width", "_height", "_rotation", "_visible", "_alpha", "_xscale", "_yscale", "cacheAsBitmap", "filters", "_currentframe", "_totalframes", "_framesloaded", "enabled", "hitArea", "_droptarget", "_target", "_focusEnabled", "_focusrect", "_lockroot", "menu", "_quality", "soundbuftime", "tabChildren", "tabEnabled", "tabIndex", "trackAsMenu", "_url", "useHandCursor");
TextField_prop_ary = new Array("_name", "_x", "_y", "_width", "_height", "_rotation", "_visible", "_alpha", "_xscale", "_yscale", "html", "htmlText", "text");
Button_prop_ary = new Array("_name", "_x", "_y", "_width", "_height", "_rotation", "_visible", "_alpha", "_xscale", "_yscale", "enabled");
Sound_prop_ary = new Array("position", "duration", "id3.comment", "id3.album", "id3.genre", "id3.songname", "id3.artist", "id3.track", "id3.year", "volume", "pan");
mc_prop_small_ary = new Array("_x", "_y", "_width", "_height", "_visible", "_alpha", "_currentframe");
mc_prop_ary.reverse();
TextField_prop_ary.reverse();
Button_prop_ary.reverse();
Sound_prop_ary.reverse();
mc_prop_small_ary.reverse();
com.blitzagency.events.GDispatcher.initialize(this);
}
function replace(str, srch_str, repl_str) {
var _local1 = new Array();
_local1 = str.split(srch_str);
var _local2 = _local1.join(repl_str);
return(_local2);
}
function setAttributes(xmlNode, obj) {
for (var _local3 in obj) {
if (((_local3 != "__recursionCheck") && (_local3 != "getRecursionChecked")) && (_local3 != "setRecursionChecked")) {
xmlNode.attributes[_local3] = obj[_local3];
}
}
}
function getObjProperties(obj) {
var _local3 = new Object();
var _local4 = 0;
for (var _local5 in obj) {
if ((((((_local5 != "Xray") && (_local5 != "__recursionCheck")) && (_local5 != "getRecursionChecked")) && (_local5 != "__removeReferenceDelegateRelease__")) && (_local5 != "__removeReferenceDelegatePress__")) && (_local5 != "setRecursionChecked")) {
_local4++;
var _local1 = com.blitzagency.xray.ClassPath.getClass(obj[_local5]);
_local1 = ((_local1 != "") ? (_local1) : (typeof(obj[_local5])));
_local3[_local5] = (_local1 + " :: ") + obj[_local5];
}
}
if (_local4 == 0) {
_local3.value = new Object();
_local3.value = obj.toString();
}
return(_local3);
}
function getObjPropertiesF2(obj) {
var _local3 = new Object();
var _local4 = 0;
for (var _local5 in obj) {
if ((((((_local5 != "Xray") && (_local5 != "__recursionCheck")) && (_local5 != "getRecursionChecked")) && (_local5 != "__removeReferenceDelegateRelease__")) && (_local5 != "__removeReferenceDelegatePress__")) && (_local5 != "setRecursionChecked")) {
_local4++;
var _local1 = com.blitzagency.xray.ClassPath.getClass(obj[_local5]);
_local1 = ((_local1 != "") ? (_local1) : (typeof(obj[_local5])));
_local3[_local5] = (_local1 + "::") + obj[_local5];
}
}
if (_local4 == 0) {
_local3.value = new Object();
_local3.value = obj.toString();
}
return(_local3);
}
function getFunctionProperties(obj, sPath) {
_global.ASSetPropFlags(obj, null, 0, true);
var _local4 = new Object();
for (var _local5 in obj) {
if ((((((((_local5 != "__proto__") && (_local5 != "prototype")) && (_local5 != "Xray")) && (_local5 != "__recursionCheck")) && (_local5 != "__removeReferenceDelegateRelease__")) && (_local5 != "__removeReferenceDelegatePress__")) && (_local5 != "getRecursionChecked")) && (_local5 != "setRecursionChecked")) {
var _local3 = ((typeof(obj[_local5]) == "function") ? "function" : (obj[_local5]));
_local4[_local5] = _local3;
}
}
if (obj.prototype) {
for (var _local5 in obj.prototype) {
if ((((((((_local5 != "__proto__") && (_local5 != "prototype")) && (_local5 != "Xray")) && (_local5 != "__recursionCheck")) && (_local5 != "__removeReferenceDelegateRelease__")) && (_local5 != "__removeReferenceDelegatePress__")) && (_local5 != "getRecursionChecked")) && (_local5 != "setRecursionChecked")) {
var _local3 = ((typeof(obj.prototype[_local5]) == "function") ? "function" : "property");
_local4[_local5] = _local3;
}
}
}
_global.ASSetPropFlags(obj, null, 1, true);
return(_local4);
}
function getBaseProperties(target_obj, path) {
var _local2 = new Object();
_local2.path = path;
for (var _local5 in target_obj) {
if (((((((_local5 != "__recursionCheck") && (_local5 != "Xray")) && (_local5 != "getRecursionChecked")) && (_local5 != "setRecursionChecked")) && (_local5 != "__removeReferenceDelegateRelease__")) && (_local5 != "__removeReferenceDelegatePress__")) && (_local5 != "__proto__")) {
var _local3 = com.blitzagency.xray.ClassPath.getClass(target_obj[_local5]);
_local3 = ((_local3 != "") ? (_local3) : (typeof(target_obj[_local5])));
_local2[_local5] = new Object();
_local2[_local5].className = _local3;
_local2[_local5].objName = _local5;
_local2[_local5].val = target_obj[_local5];
_local2[_local5].target = (_local2.path + ".") + _local5;
_local2[_local5].type = getType(target_obj[_local5]);
}
}
_local2.Class = com.blitzagency.xray.ClassPath.getClass(target_obj, true);
return(_local2);
}
function getProperties(target_obj, showAll) {
_global.ASSetPropFlags(target_obj, null, 0, true);
var _local6 = new Object();
if (showAll) {
for (var _local8 in target_obj) {
if ((((((_local8 != "__recursionCheck") && (_local8 != "Xray")) && (_local8 != "getRecursionChecked")) && (_local8 != "__removeReferenceDelegateRelease__")) && (_local8 != "__removeReferenceDelegatePress__")) && (_local8 != "setRecursionChecked")) {
var _local7 = com.blitzagency.xray.ClassPath.getClass(target_obj[_local8]);
_local7 = ((_local7 != "") ? (_local7) : (typeof(target_obj[_local8])));
_local6[_local8] = (_local7 + " :: ") + target_obj[_local8];
}
}
}
_local6.Class = com.blitzagency.xray.ClassPath.getClass(target_obj, true);
_local6._props = new Object();
var _local4;
if (target_obj instanceof MovieClip) {
_local4 = mc_prop_ary;
}
if (target_obj instanceof TextField) {
_local4 = TextField_prop_ary;
}
if (target_obj instanceof Button) {
_local4 = Button_prop_ary;
}
if (target_obj instanceof Sound) {
_local4 = Sound_prop_ary;
}
var _local3 = 0;
while (_local3 < _local4.length) {
switch (_local4) {
case mc_prop_ary :
if (_local4[_local3] == "_y") {
_local6._props.depth = target_obj.getDepth();
}
_local6._props[_local4[_local3]] = target_obj[_local4[_local3]];
break;
case TextField_prop_ary :
_local6._props[_local4[_local3]] = target_obj[_local4[_local3]];
break;
case Button_prop_ary :
_local6._props[_local4[_local3]] = target_obj[_local4[_local3]];
break;
case Sound_prop_ary :
if (_local4[_local3] == "volume") {
_local6._props.volume = target_obj.getVolume();
} else if (_local4[_local3] == "pan") {
_local6._props.pan = target_obj.getPan();
} else if (_local4[_local3] == "id3.comment") {
_local6._props.id3_comment = target_obj.id3.comment;
} else if (_local4[_local3] == "id3.album") {
_local6._props.id3_album = target_obj.id3.album();
} else if (_local4[_local3] == "id3.genre") {
_local6._props.id3_genre = target_obj.id3.genre();
} else if (_local4[_local3] == "id3.songname") {
_local6._props.id3_songname = target_obj.id3.songname();
} else if (_local4[_local3] == "id3.artist") {
_local6._props.id3_artist = target_obj.id3.artist();
} else if (_local4[_local3] == "id3.track") {
_local6._props.id3_track = target_obj.id3.track();
} else {
if (_local4[_local3] != "id3.year") {
break;
}
_local6._props.id3_year = target_obj.id3.year();
}
}
_local3++;
}
_global.ASSetPropFlags(_local6, ["constructor", "__constructor__", "prototype", "__proto__", "__recursionCheck"], 1, true);
return(_local6);
}
function getPropertiesF2(target_obj, showAll) {
_global.ASSetPropFlags(target_obj, null, 0, 7);
var _local6 = new Object();
if (showAll) {
for (var _local8 in target_obj) {
if ((((((_local8 != "__recursionCheck") && (_local8 != "Xray")) && (_local8 != "getRecursionChecked")) && (_local8 != "__removeReferenceDelegateRelease__")) && (_local8 != "__removeReferenceDelegatePress__")) && (_local8 != "setRecursionChecked")) {
var _local7 = com.blitzagency.xray.ClassPath.getClass(target_obj[_local8]);
_local7 = ((_local7 != "") ? (_local7) : (typeof(target_obj[_local8])));
_local6[_local8] = (_local7 + "::") + target_obj[_local8];
}
}
}
_local6.Class = com.blitzagency.xray.ClassPath.getClass(target_obj, true);
_local6._props = new Object();
var _local4;
if ((target_obj instanceof MovieClip) || (typeof(target_obj) == "movieclip")) {
_local4 = mc_prop_ary;
}
if (target_obj instanceof TextField) {
_local4 = TextField_prop_ary;
}
if (target_obj instanceof Button) {
_local4 = Button_prop_ary;
}
if (target_obj instanceof Sound) {
_local4 = Sound_prop_ary;
}
var _local3 = 0;
while (_local3 < _local4.length) {
switch (_local4) {
case mc_prop_ary :
if (_local4[_local3] == "_y") {
_local6._props.depth = target_obj.getDepth();
}
_local6._props[_local4[_local3]] = target_obj[_local4[_local3]];
break;
case TextField_prop_ary :
_local6._props[_local4[_local3]] = target_obj[_local4[_local3]];
break;
case Button_prop_ary :
_local6._props[_local4[_local3]] = target_obj[_local4[_local3]];
break;
case Sound_prop_ary :
if (_local4[_local3] == "volume") {
_local6._props.volume = target_obj.getVolume();
} else if (_local4[_local3] == "pan") {
_local6._props.pan = target_obj.getPan();
} else if (_local4[_local3] == "id3.comment") {
_local6._props.id3_comment = target_obj.id3.comment;
} else if (_local4[_local3] == "id3.album") {
_local6._props.id3_album = target_obj.id3.album();
} else if (_local4[_local3] == "id3.genre") {
_local6._props.id3_genre = target_obj.id3.genre();
} else if (_local4[_local3] == "id3.songname") {
_local6._props.id3_songname = target_obj.id3.songname();
} else if (_local4[_local3] == "id3.artist") {
_local6._props.id3_artist = target_obj.id3.artist();
} else if (_local4[_local3] == "id3.track") {
_local6._props.id3_track = target_obj.id3.track();
} else {
if (_local4[_local3] != "id3.year") {
break;
}
_local6._props.id3_year = target_obj.id3.year();
}
}
_local3++;
}
_global.ASSetPropFlags(_local6, ["constructor", "__constructor__", "prototype", "__proto__", "__recursionCheck"], 1, true);
return(_local6);
}
function getStandardProperties(target_mc) {
var _local3 = new Object();
_local3._props = new Object();
var _local2 = 0;
while (_local2 < mc_prop_small_ary.length) {
if (mc_prop_small_ary[_local2] == "_y") {
_local3._props.depth = target_mc.getDepth();
}
_local3._props[mc_prop_small_ary[_local2]] = target_mc[mc_prop_small_ary[_local2]];
_local2++;
}
return(_local3);
}
function getSoundProperties(snd) {
var _local1 = new Object();
_local1.txtPosition = snd.position;
_local1.txtDuration = snd.duration;
_local1.txtComment = snd.id3.comment;
_local1.txtAlbum = snd.id3.album;
_local1.txtGenre = snd.id3.genre;
_local1.txtSongName = snd.id3.songname;
_local1.txtArtist = snd.id3.artist;
_local1.txtTrack = snd.id3.track;
_local1.txtYear = snd.id3.year;
_local1.txtVolume = snd.getVolume();
_local1.txtPan = snd.getPan();
return(_local1);
}
function getVideoProperties(ns) {
var _local2 = new Object();
_local2.txtPosition = ns.time;
_local2.txtBufferLength = ns.bufferLength;
_local2.txtBufferTime = ns.bufferTime;
_local2.txtBytesLoaded = ns.bytesLoaded;
_local2.txtBytesTotal = ns.bytesTotal;
_local2.txtCurrentFps = ns.currentFps;
var _local4 = getObjProperties(ns);
_local2.props = _local4;
return(_local2);
}
function getName(clip) {
var _local1 = clip._name;
return(((!_local1) ? (String(clip)) : (_local1)));
}
function addObject(link, iType, sName, isBranch) {
if (link.lastIndexOf(".") > -1) {
var _local6 = link.split(".");
var _local2 = objMap;
var _local4 = 0;
while (_local4 < _local6.length) {
var _local3 = ((_local4 == (_local6.length - 1)) ? (sName) : (_local6[_local4]));
var _local5 = _local6.slice(0, _local4).join(".");
var _local8 = true;
if (!_local2[_local3]) {
_local8 = false;
_local2[_local3] = new Object();
_local5 = ((_local4 > 0) ? ((_local5 + ".") + _local3) : (_local5));
_local2[_local3].sPath = _local5;
_local2[_local3].iType = iType;
_local2[_local3].isBranch = isBranch;
_local2[_local3].sName = _local3;
}
_local2 = _local2[_local3];
if ((_local4 == (_local6.length - 1)) && (!_local8)) {
var _local9 = link.split(".");
var _local13 = _local9.pop();
link = (_local9.join(".") + ".") + sName;
_local2.sPath = link;
_local2.iType = iType;
_local2.isBranch = isBranch;
_local2.sName = sName;
}
_local4++;
}
} else {
if (!objMap[link]) {
objMap[link] = new Object();
}
objMap[link].sPath = link;
objMap[link].iType = iType;
objMap[link].isBranch = isBranch;
objMap[link].sName = sName;
}
}
function buildTree(obj) {
var len = currentObjPath.split(".").length;
var aTemp = obj.sPath.split(".");
aTemp.splice(0, len - 1);
var checkPath = ((aTemp.join(".") == "") ? false : true);
var sNodeName;
var sNodeLabel;
var sCurrentTarget;
var iType;
var o;
if (((obj.sPath != undefined) && (checkPath)) && (obj.sName != undefined)) {
sNodeName = getName(obj.sName);
sNodeName = replace(sNodeName, " ", "_");
sNodeLabel = getName(obj.sName);
sCurrentTarget = obj.sPath;
iType = obj.iType;
switch (iType) {
case 0 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Object";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 1 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 2 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 3 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 4 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 5 :
var sClass = "TextField";
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 6 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Object";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 7 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (sClass) {
sClass = ("( " + sClass) + " )";
} else {
sClass = "( function )";
}
sNodeLabel = sNodeLabel + sClass;
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 8 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "NetStream";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 12 :
var sClass = "Date";
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Date";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
default :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Object";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
}
XMLStr = XMLStr + (("<" + sNodeName) + " ");
if (obj.isBranch) {
o.isBranch = true;
}
for (var atr in o) {
XMLStr = XMLStr + (((atr + "=\"") + o[atr]) + "\" ");
}
XMLStr = XMLStr + ">";
}
aTemp = new Array();
for (var items in obj) {
if (typeof(obj[items]) == "object") {
aTemp.push(obj[items]);
}
}
aTemp.sortOn("sName");
var x = 0;
while (x < aTemp.length) {
buildTree(aTemp[x]);
x++;
}
if (sNodeName) {
XMLStr = XMLStr + (("</" + sNodeName) + ">");
}
}
function _protect(package_obj, unprotected_array) {
_global.ASSetPropFlags(package_obj, null, 1, true);
_global.ASSetPropFlags(package_obj, unprotected_array, 0, true);
_global.ASSetPropFlags(package_obj, ["constructor", "__constructor__", "prototype", "__proto__"], 1, true);
}
function viewTree(obj, objPath, recursiveSearch, showHidden, objectSearch) {
dispatchEvent({type:"onViewTree", obj:obj});
objMap = new Object();
XMLStr = "";
com.blitzagency.xray.Xray.recursionControl = com.blitzagency.xray.Xray.recursionControl + 1;
recursionCheck.clear();
var sNodeName;
if (typeof(obj) == "movieclip") {
sNodeName = getName(obj);
} else if (typeof(obj) == "object") {
sNodeName = objPath.split(".")[0];
}
var objType = getType(obj);
var targetPath;
if (objType == 2) {
targetPath = String(eval (obj._target));
objPath = targetPath;
} else {
targetPath = objPath;
}
currentObjPath = objPath;
var aTemp = currentObjPath.split(".");
if (aTemp.length > 1) {
aTemp.splice(aTemp.length - 1);
}
var o;
aTemp = targetPath.split(".");
XMLDoc = new XML();
if (recursiveSearch || ((!recursiveSearch) && (targetPath == "_level0"))) {
var currentNode;
var element1 = XMLDoc.createElement(aTemp[0]);
XMLDoc.appendChild(element1);
var attribute_obj = {label:aTemp[0], mc:aTemp[0], t:objType};
setAttributes(XMLDoc.lastChild, attribute_obj);
currentNode = XMLDoc.lastChild;
}
var bParsed = false;
addObject(sNodeName, objType, sNodeName);
if (!objectSearch) {
objectSearch = ((objType == 0) ? true : false);
}
parseTree(obj, sNodeName, objPath, recursiveSearch, showHidden, objectSearch);
buildTree(objMap);
XMLDoc = new XML(XMLStr);
obj = new Object();
obj.XMLDoc = XMLDoc;
dispatchEvent({type:"onViewTreeReturn", obj:obj});
return(XMLDoc);
}
function parseTree(obj, sName, sPath, recursiveSearch, showHidden, objectSearch, parent, lastParent) {
var unprotected_array = new Array();
if (((typeof(obj) == "object") || (typeof(obj) == "movieclip")) || (typeof(obj) == "function")) {
if (showHidden) {
for (var items in obj) {
unprotected_array.push(items);
}
_global.ASSetPropFlags(obj, null, 0, true);
}
if (recursiveSearch) {
if (obj.__recursionCheck == null) {
obj.prototype.getRecursionChecked = function () {
};
obj.prototype.setRecursionChecked = function (value) {
};
var created = obj.prototype.addProperty("__recursionCheck", obj.prototype.getRecursionChecked, obj.prototype.setRecursionChecked);
obj.__recursionCheck = 0;
_global.ASSetPropFlags(obj, ["__recursionCheck", "getRecursionChecked", "setRecursionChecked"], 1, true);
}
if (Math.floor(obj.__recursionCheck) != Math.floor(com.blitzagency.xray.Xray.recursionControl)) {
obj.__recursionCheck = com.blitzagency.xray.Xray.recursionControl;
}
} else {
delete obj.__recursionCheck;
delete obj.getRecursionChecked;
delete obj.setRecursionChecked;
}
if ((((typeof(obj) == "object") && (recursiveSearch)) && (!objectSearch)) && (((!obj) instanceof XML) || ((!obj) instanceof XMLNode))) {
if (showHidden) {
_protect(obj, unprotected_array);
}
return(undefined);
}
for (var items in obj) {
if ((items != "__recursionCheck") && (((typeof(obj[items]) == "object") || (typeof(obj[items]) == "movieclip")) || (typeof(obj[items]) == "function"))) {
var bReturn = false;
var pathCheck = "";
if (typeof(obj[items]) == "movieclip") {
var pathLength = sPath.split(".").length;
var targetLength = String(eval (obj[items]._target)).split(".").length;
if (pathLength <= targetLength) {
pathCheck = (sPath + ".") + items;
} else {
pathCheck = (sPath + ".") + items;
}
} else {
pathCheck = (sPath + ".") + items;
}
if ((((((((((((((typeof(obj[items]) == "object") || (typeof(obj[items]) == "movieclip")) || (typeof(obj[items]) == "function")) && (items != "Xray")) && (items != "__recursionCheck")) && (items != "getRecursionChecked")) && (items != "setRecursionChecked")) && (items != "__proto__")) && (items != "prototype")) && (items != "__constructor__")) && (items != "__resolve")) && (items != "__removeReferenceDelegateRelease__")) && (items != "__removeReferenceDelegatePress__")) && (items != "constructor")) {
if (recursiveSearch && (((typeof(obj[items]) == "movieclip") || (obj[items] instanceof XML)) || (obj[items] instanceof XMLNode))) {
addObject(pathCheck, getType(obj[items]), items);
if ((Math.floor(obj[items].__recursionCheck) != Math.floor(com.blitzagency.xray.Xray.recursionControl)) || (obj[items].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount))) {
if (Math.floor(obj[items].__recursionCheck) == Math.floor(com.blitzagency.xray.Xray.recursionControl)) {
obj[items].__recursionCheck = obj[items].__recursionCheck + 0.001;
}
if ((obj[items].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount)) || (obj[items].__recursionCheck == undefined)) {
parseTree(obj[items], items, pathCheck, recursiveSearch, showHidden, objectSearch, obj, parent);
}
}
} else {
var isBranch = false;
for (var subItems in obj[items]) {
var subObjType = typeof(obj[items][subItems]);
isBranch = false;
if ((subObjType == "movieclip") || (subObjType == "object")) {
isBranch = true;
break;
}
}
addObject(pathCheck, getType(obj[items]), items, isBranch);
}
}
}
}
if (showHidden) {
_protect(obj, unprotected_array);
}
}
}
function getType(obj) {
var _local14 = Boolean(((typeof(obj) == "object") ? true : false));
var _local6 = ((obj.constructor == Array) ? true : false);
var _local8 = (((obj instanceof MovieClip) || (typeof(obj) == "movieclip")) ? true : false);
var _local15 = obj instanceof Button;
var _local5 = obj instanceof Sound;
var _local3 = obj instanceof Video;
var _local9 = obj instanceof NetStream;
var _local4 = obj instanceof TextField;
var _local11 = obj instanceof Date;
var _local12 = Boolean(((typeof(obj) == "function") ? true : false));
var _local7 = Boolean(((typeof(obj) == "string") ? true : false));
var _local13 = Boolean(((typeof(obj) == "number") ? true : false));
var _local10 = Boolean(((typeof(obj) == "boolean") ? true : false));
var _local1 = 0;
if (_local14) {
_local1 = 0;
}
if (_local6) {
_local1 = 1;
}
if (_local8) {
_local1 = 2;
}
if (_local15) {
_local1 = 3;
}
if (_local5) {
_local1 = 4;
}
if (_local4) {
_local1 = 5;
}
if (_local3) {
_local1 = 6;
}
if (_local12) {
_local1 = 7;
}
if (_local9) {
_local1 = 8;
}
if (_local7) {
_local1 = 9;
}
if (_local13) {
_local1 = 10;
}
if (_local10) {
_local1 = 11;
}
if (_local11) {
_local1 = 12;
}
return(_local1);
}
}
Symbol 40 MovieClip [__Packages.com.blitzagency.xray.FPSMeter] Frame 0
class com.blitzagency.xray.FPSMeter
{
var _fps, dispatchEvent, _modus, _runFPS, fpsSI, _pollInterval, past, now, pass, delta, populationSize, population;
function FPSMeter () {
com.blitzagency.events.GDispatcher.initialize(this);
init();
}
function get fps() {
return(_fps);
}
function set fps(newValue) {
_fps = newValue;
dispatchEvent({type:"onFpsUpdate", fps:newValue});
//return(fps);
}
function get modus() {
return(_modus);
}
function set modus(newValue) {
_modus = newValue;
//return(modus);
}
function get runFPS() {
return(_runFPS);
}
function set runFPS(newValue) {
_runFPS = newValue;
clearInterval(fpsSI);
if (newValue) {
fpsSI = setInterval(this, "update", pollInterval);
}
//return(runFPS);
}
function get pollInterval() {
return(_pollInterval);
}
function set pollInterval(newValue) {
_pollInterval = newValue;
clearInterval(fpsSI);
if (runFPS) {
fpsSI = setInterval(this, "update", pollInterval);
}
//return(pollInterval);
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.xray.FPSMeter();
}
return(_instance);
}
function init() {
past = 0;
now = 0;
fps = ("");
pass = 0;
delta = 0;
populationSize = 10;
population = new Array(populationSize);
runFPS = (false);
modus = (true);
pollInterval = (25);
}
function update() {
if (!runFPS) {
clearInterval(fpsSI);
}
now = getTimer();
delta = now - past;
if (modus) {
population[pass] = delta;
pass++;
if (pass >= populationSize) {
var _local2 = 0;
for (var _local3 in population) {
_local2 = _local2 + population[_local3];
}
var _local5 = int((1000 * populationSize) / _local2);
fps = (("[ " + _local5) + " fps ]");
pass = 0;
}
} else {
var _local4 = int(1000 / delta);
fps = (("[ " + _local4) + " fps ]");
}
past = now;
}
static var _instance = null;
}
Symbol 41 MovieClip [__Packages.com.blitzagency.util.CoordinateTools] Frame 0
class com.blitzagency.util.CoordinateTools
{
function CoordinateTools () {
}
static function initialize() {
_global.localToLocal = localToLocal;
return(true);
}
static function localToLocal(from, to, origin) {
var _local1 = ((origin == undefined) ? ({x:0, y:0}) : (origin));
from.localToGlobal(_local1);
to.globalToLocal(_local1);
return(_local1);
}
static function getAngle(pointAX, pointAY, pointBX, pointBY) {
var _local2 = pointAY - pointBY;
var _local3 = pointAX - pointBX;
var _local4 = Math.atan2(_local2, _local3);
var _local1 = Math.round((_local4 * 180) / Math.PI);
_local1 = convertDegrees(_local1);
return(_local1);
}
static function convertDegrees(p_degree) {
var _local2 = ((p_degree < 0) ? (180 + (180 - Math.abs(p_degree))) : (p_degree));
return(_local2);
}
static function getRectangle(p_x, p_y, p_width, p_height) {
var _local1 = {};
_local1.x = p_x;
_local1.y = p_y;
_local1.width = p_width;
_local1.height = p_height;
_local1.top = p_y;
_local1.left = p_x;
_local1.right = p_x + p_width;
_local1.bottom = p_y + p_height;
_local1.bottomRight = {x:p_x + p_width, y:p_y + p_height};
_local1.topLeft = {x:p_x, y:p_y};
return(_local1);
}
static var initialized = initialize();
}
Symbol 42 MovieClip [__Packages.com.blitzagency.util.DrawingTools] Frame 0
class com.blitzagency.util.DrawingTools
{
function DrawingTools () {
}
static function drawBox(mc, clr, alpha, rect, lineClr, depth) {
var _local4 = ((depth == undefined) ? 100 : (depth));
var _local6 = "mc_" + _local4;
mc = mc.createEmptyMovieClip(_local6, _local4);
alpha = ((alpha == undefined) ? 100 : (alpha));
lineClr = ((lineClr == undefined) ? 16711680 : (lineClr));
mc.beginFill(clr, alpha);
if (lineClr != null) {
mc.lineStyle(0.25, lineClr, 100);
}
mc.moveTo(rect.left, rect.top);
mc.lineTo(rect.left, rect.bottom);
mc.lineTo(rect.bottomRight.x, rect.bottomRight.y);
mc.lineTo(rect.right, rect.top);
mc.lineTo(rect.left, rect.top);
mc.endFill();
return(mc);
}
static function drawLine(mc, clr, fx, fy, tx, ty) {
mc.beginFill(0, 0);
mc.lineStyle(0.25, clr, 100);
mc.moveTo(fx, fy);
mc.lineTo(tx, ty);
mc.endFill();
}
}
Symbol 43 MovieClip [__Packages.com.blitzagency.controls.EditTool] Frame 0
class com.blitzagency.controls.EditTool
{
var _this, blur, ds, currentSelection, dispatchEvent, rect, center, boundingBox, scaleDiff, mc_hiddenBtn, rotateHandle, c2, currentAngle, si;
function EditTool () {
com.blitzagency.events.GDispatcher.initialize(this);
}
function initialize(p_editToolContainer, p_mc, p_allowMove, p_allowRatioScale, p_allowWidthScale, p_allowHeightScale, p_allowRotate) {
_this = p_editToolContainer;
createCenter();
allowMove = p_allowMove;
allowRatioScale = p_allowRatioScale;
allowWidthScale = p_allowWidthScale;
allowHeightScale = p_allowHeightScale;
allowRotate = p_allowRotate;
blur = new flash.filters.BlurFilter(1.2, 1.2, 3);
ds = new flash.filters.DropShadowFilter(4, 45, 0, 1, 2, 2, 1, 3, false, false, false);
currentSelection = p_mc;
_this._x = currentSelection._x;
_this._y = currentSelection._y;
updateBoundingBox();
createHiddenButton();
createCorners();
if (allowRotate) {
createRotateHandle();
}
}
function destroyTool(evtObj) {
_this.removeMovieClip();
dispatchEvent({type:"destroyTool"});
}
function getRegPoint(origin) {
var _local2 = com.blitzagency.util.CoordinateTools.localToLocal(currentSelection, _this, origin);
return(_local2);
}
function updateRect() {
var _local2 = getRegPoint();
rect = com.blitzagency.util.CoordinateTools.getRectangle(_local2.x, _local2.y, currentSelection._width, currentSelection._height);
}
function updateContentVisual() {
_this.filters = [blur];
}
function createCenter() {
center = _this.createEmptyMovieClip("center", _this.getNextHighestDepth());
drawCircle(center, 0, 0, 4);
}
static function drawCircle(mc, x, y, r) {
mc.lineStyle(0, 16777215);
mc.beginFill(16777215, 25);
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
mc.endFill();
}
function updateBoundingBox() {
if (boundingBox != undefined) {
boundingBox.removeMovieClip();
}
updateRect();
boundingBox = com.blitzagency.util.DrawingTools.drawBox(_this, 16777215, 5, rect, 16777215);
var _local2 = com.blitzagency.util.DrawingTools.drawBox(boundingBox, 16777215, 5, rect, 16777215, 0);
var _local3 = currentSelection.getBounds(currentSelection._parent);
var _local4 = com.blitzagency.util.CoordinateTools.localToLocal(currentSelection._parent, _this, {x:_local3.xMin, y:_local3.yMin});
boundingBox._x = _local4.x;
boundingBox._y = _local4.y;
scaleDiff = Math.floor((currentSelection._xscale / boundingBox._xscale) * 100);
if (allowMove) {
_local2.onPress = com.blitzagency.util.Delegate.create(this, startMove);
_local2.onRelease = (_local2.onReleaseOutside = com.blitzagency.util.Delegate.create(this, stopMove));
}
}
function createHiddenButton() {
mc_hiddenBtn = com.blitzagency.util.DrawingTools.drawBox(_this, 16777215, 5, rect, 16777215, 99);
mc_hiddenBtn._alpha = 20;
mc_hiddenBtn._width = boundingBox._width * 100;
mc_hiddenBtn._height = boundingBox._height * 100;
mc_hiddenBtn._x = mc_hiddenBtn._x - (mc_hiddenBtn._width / 2);
mc_hiddenBtn._y = mc_hiddenBtn._y - (mc_hiddenBtn._height / 2);
mc_hiddenBtn.onRelease = com.blitzagency.util.Delegate.create(this, destroyTool);
}
function createRotateHandle() {
rotateHandle = _this.createEmptyMovieClip("rotateHandle", _this.getNextHighestDepth());
drawCircle(rotateHandle, 0, 0, 4);
rotateHandle.onPress = com.blitzagency.util.Delegate.create(this, grabRotate);
rotateHandle.onRelease = (rotateHandle.onReleaseOutside = com.blitzagency.util.Delegate.create(this, releaseRotate));
updateRotateHandle();
}
function createCorners() {
var _local3 = com.blitzagency.util.CoordinateTools.getRectangle(0, 0, 8, 8);
if (!allowRatioScale) {
c2 = com.blitzagency.util.DrawingTools.drawBox(_this, 16777215, 50, _local3, 16777215, _this.getNextHighestDepth());
c2.num = x;
c2.onPress = com.blitzagency.util.Delegate.create(this, grabCorner);
c2.onRelease = (c2.onReleaseOutside = com.blitzagency.util.Delegate.create(this, releaseCorner));
updateCorners();
} else {
var x = 0;
while (x < 4) {
var _local2 = _this.attachMovie("com.blitzagency.controls.GraphicButton:SelectionCorner", "c" + x, _this.getNextHighestDepth());
_local2.num = x;
_local2.addEventListener("down", com.blitzagency.util.Delegate.create(this, grabCorner));
_local2.addEventListener("click", com.blitzagency.util.Delegate.create(this, releaseCorner));
x++;
}
updateCorners();
}
}
function grabCorner(evtObj) {
scale();
}
function releaseCorner(evtObj) {
stop_scale();
}
function updateRotateHandle() {
rotateHandle._x = c2._x + 15;
rotateHandle._y = c2._y + 15;
}
function updateCorners() {
var _local2 = 0;
while (_local2 < 4) {
switch (_local2) {
case 0 :
this["c" + _local2]._x = boundingBox._x;
this["c" + _local2]._y = boundingBox._y;
break;
case 1 :
this["c" + _local2]._x = boundingBox._x + (boundingBox._width - 5);
this["c" + _local2]._y = boundingBox._y;
break;
case 2 :
this["c" + _local2]._x = boundingBox._x + (boundingBox._width - 5);
this["c" + _local2]._y = boundingBox._y + (boundingBox._height - 5);
updateRotateHandle();
break;
case 3 :
this["c" + _local2]._x = boundingBox._x;
this["c" + _local2]._y = boundingBox._y + (boundingBox._height - 5);
}
_local2++;
}
}
function grabRotate(evtObj) {
if (!allowRotate) {
return(undefined);
}
currentAngle = getAngle();
clearInterval(si);
si = setInterval(this, "rotate", 25);
}
function releaseRotate(evtObj) {
clearInterval(si);
_this._rotation = 0;
updateBoundingBox();
updateCorners();
}
function getAngle() {
var _local2 = com.blitzagency.util.CoordinateTools.getAngle(center._x, center._y, center._xmouse, center._ymouse);
return(_local2);
}
function rotate() {
var _local3 = getAngle();
var _local2 = _local3 - currentAngle;
_this._rotation = _this._rotation + _local2;
currentSelection._rotation = currentSelection._rotation + _local2;
dispatchEvent({type:"rotate", value:_this._rotation});
updateContentVisual();
}
function scale() {
clearInterval(si);
si = setInterval(this, "updateScale", 25);
}
function getCoordinates() {
var _local2 = {x:_this._xmouse, y:_this._ymouse};
return(_local2);
}
function updateScale() {
var _local2 = currentSelection;
var _local6 = getCoordinates();
var _local3 = currentSelection.getBounds();
var _local5 = _local3.xMin * (currentSelection._xscale * 0.01);
var _local9 = _local3.yMin * (currentSelection._yscale * 0.01);
var _local4 = _local6.x;
var _local8 = _local6.y;
if (allowRatioScale || (Key.isDown(16))) {
var _local7 = _local2._width / _local2._height;
_local2._width = _local4 + Math.abs(_local5);
_local2._height = _local2._width / _local7;
updateBoundingBox();
updateCorners();
var _local10 = _local2._xscale * (scaleDiff / 100);
} else {
currentSelection._width = _local4 + Math.abs(_local5);
currentSelection._height = _local8 + Math.abs(_local9);
updateBoundingBox();
updateCorners();
}
updateContentVisual();
dispatchEvent({type:"scale", value:_local10});
}
function stop_scale() {
clearInterval(si);
}
function onMouseMove(evtObj) {
currentSelection._x = _this._x;
currentSelection._y = _this._y;
}
function startMove() {
if (!allowMove) {
return(undefined);
}
Mouse.addListener(this);
_this.startDrag();
_this.filters = [blur, ds];
}
function stopMove() {
Mouse.removeListener(this);
_this.stopDrag();
updateContentVisual();
}
static var CLASS_REF = com.blitzagency.controls.EditTool;
static var LINKAGE_ID = "com.blitzagency.controls.EditTool";
var allowMove = true;
var allowRatioScale = true;
var allowWidthScale = true;
var allowHeightScale = true;
var allowRotate = true;
}
Symbol 44 MovieClip [__Packages.org.red5.utils.GridManager] Frame 0
class org.red5.utils.GridManager
{
static var cols, rows, gridLineHistory, gridContainer, mc, gridCount, horizontalRatio, verticalRatio, currentGridLocation, lastGridLocation, dispatchEvent;
function GridManager () {
}
function onLoad() {
init();
}
static function init() {
if (!cols) {
cols = 8;
}
if (!rows) {
rows = 8;
}
initGridContainer();
}
static function initEventDispatcher() {
com.blitzagency.events.GDispatcher.initialize(org.red5.utils.GridManager);
init();
return(true);
}
static function initGridContainer() {
gridLineHistory = [];
var _local1 = ((_level0.getNextHighestDepth() >= 1048575) ? 1048573 : (_level0.getNextHighestDepth() + 1));
gridContainer = _level0.createEmptyMovieClip("xrayGridManager", _local1);
}
static function drawGridLine(target, axis, position, lineColor, path) {
target = ((target._parent != undefined) ? (target._parent) : (target));
var _local11 = ((axis == "_x") ? ({x:position, y:0}) : ({x:0, y:position}));
var _local6 = com.blitzagency.util.CoordinateTools.localToLocal(target, gridContainer, _local11);
position = Math.abs(Math.floor(position));
var _local2 = gridContainer.createEmptyMovieClip((("gridLine_" + axis) + "_") + position, gridContainer.getNextHighestDepth());
addToGridLineHistory(_local2, path);
_local2[axis] = ((axis == "_x") ? (_local6.x) : (_local6.y));
var _local8 = 0;
var _local7 = 0;
var _local10 = ((axis == "_x") ? 0 : (Stage.width));
var _local9 = ((axis == "_y") ? 0 : (Stage.height));
lineColor = ((lineColor == undefined) ? 65280 : (lineColor));
com.blitzagency.util.DrawingTools.drawLine(_local2, lineColor, _local8, _local7, _local10, _local9);
}
static function addToGridLineHistory(mc, path) {
gridLineHistory.push({path:path, mc:mc});
}
static function removeLastGridLine() {
var _local1 = gridLineHistory.pop();
_local1.mc.removeMovieClip();
}
static function clearObjectGridLines(path) {
var _local1 = 0;
while (_local1 < gridLineHistory.length) {
var _local2 = gridLineHistory[_local1];
if (_local2.path == path) {
_local2.mc.removeMovieClip();
gridLineHistory[_local1] = null;
}
_local1++;
}
clearupHistory();
}
static function clearupHistory() {
var _local1 = 0;
while (_local1 < gridLineHistory.length) {
if (gridLineHistory[_local1] == null) {
gridLineHistory.splice(_local1, 1);
}
_local1++;
}
}
static function clearAllGridLines() {
var _local1 = 0;
while (_local1 < gridLineHistory.length) {
var _local2 = gridLineHistory[_local1];
_local2.mc.removeMovieClip();
_local1++;
}
gridLineHistory = [];
}
static function initGrid(p_mc, p_cols, p_rows, p_gridWidth, p_gridHeight, p_lineSize, p_color, p_drawGrid) {
_global.tt("initGrid called", arguments);
mc = p_mc;
cols = p_cols;
rows = p_rows;
gridCount = (cols * rows) - 1;
horizontalRatio = p_gridWidth / cols;
verticalRatio = p_gridHeight / rows;
trace((("dimensions :: " + horizontalRatio) + " :: ") + verticalRatio);
Mouse.addListener(org.red5.utils.GridManager);
if (!p_drawGrid) {
return(undefined);
}
var _local3 = 0;
while (_local3 <= cols) {
var _local4 = mc.createEmptyMovieClip("colLine_" + _local3, mc.getNextHighestDepth());
_local4.lineStyle(p_lineSize, p_color, 100);
_local4.moveTo(horizontalRatio * _local3, 0);
_local4.lineTo(horizontalRatio * _local3, p_gridHeight);
_local3++;
}
_local3 = 0;
while (_local3 <= rows) {
var _local4 = mc.createEmptyMovieClip("rowLine_" + _local3, mc.getNextHighestDepth());
_local4.lineStyle(p_lineSize, p_color, 100);
_local4.moveTo(0, verticalRatio * _local3);
_local4.lineTo(p_gridWidth, verticalRatio * _local3);
_local3++;
}
}
static function calcCenterSpot(p_col, p_row) {
var _local2 = (p_col * horizontalRatio) + (horizontalRatio / 2);
var _local1 = (p_row * verticalRatio) + (verticalRatio / 2);
return({x:_local2, y:_local1});
}
static function getColRow(p_location) {
var _local2 = Math.floor(p_location / cols);
var _local3 = Math.floor(p_location % cols);
return({col:_local3, row:_local2});
}
static function calcGridLocation(p_x, p_y) {
var _local3 = Math.ceil(p_x / horizontalRatio);
var _local2 = Math.ceil(p_y / verticalRatio);
var _local1 = (_local3 + (cols * (_local2 - 1))) - 1;
if ((((_local1 < 0) || (_local1 > ((cols * rows) - 1))) || (_local3 > cols)) || (_local2 > rows)) {
currentGridLocation = null;
return(null);
}
lastGridLocation = currentGridLocation;
currentGridLocation = _local1;
return(_local1);
}
static function onMouseMove() {
var _local1 = calcGridLocation(mc._xmouse, mc._ymouse);
if (_local1 != null) {
if (_local1 != lastGridLocation) {
dispatchEvent({type:"gridLocationChange", location:_local1});
}
if (_local1 == lastGridLocation) {
dispatchEvent({type:"gridLocation", location:_local1});
}
}
}
static var eventDispatcherDependency = com.blitzagency.events.GDispatcher;
static var eventDispatcherInitialized = initEventDispatcher();
}
Symbol 45 MovieClip [__Packages.com.blitzagency.xray.logger.LogManager] Frame 0
class com.blitzagency.xray.logger.LogManager
{
static var initialized, loggerList;
function LogManager () {
}
static function initialize() {
if (initialized) {
return(undefined);
}
com.blitzagency.xray.util.MtascUtility.initialize();
loggerList = new Object();
initialized = true;
}
static function getLogger(p_logger) {
var _local1 = p_logger.split(".").join("_");
if (loggerList[_local1].instance != undefined) {
return(loggerList[_local1].instance);
}
var _local3 = com.blitzagency.xray.logger.ClassLoader.getClassByName(p_logger);
var _local2 = new _local3[undefined]();
loggerList[_local1] = new Object();
loggerList[_local1].instance = _local2;
return(_local2);
}
static var CLASS_REF = com.blitzagency.xray.logger.LogManager;
}
Symbol 46 MovieClip [__Packages.com.blitzagency.xray.logger.Log] Frame 0
class com.blitzagency.xray.logger.Log
{
var message, dump, level;
function Log (p_message, p_dump, p_level) {
setMessage(p_message);
setDump(p_dump);
setLevel(p_level);
}
function setMessage(p_message) {
message = p_message;
}
function setDump(p_dump) {
dump = p_dump;
}
function setLevel(p_level) {
level = p_level;
}
function getMessage() {
return(message);
}
function getDump() {
return(dump);
}
function getLevel() {
return(level);
}
}
Symbol 47 MovieClip [__Packages.com.blitzagency.xray.util.MtascUtility] Frame 0
class com.blitzagency.xray.util.MtascUtility
{
static var logger;
function MtascUtility () {
}
static function initialize() {
return(true);
}
static function trace(log, fullClassName, fileName, lineNumber) {
if (logger == undefined) {
logger = com.blitzagency.xray.logger.LogManager.getLogger("com.blitzagency.xray.logger.XrayLogger");
}
var _local5 = "";
var _local6 = 0;
var _local2;
if (typeof(log) == "string") {
_local5 = String(log);
} else {
_local5 = ((log.getMessage() == undefined) ? "" : (log.getMessage()));
_local6 = ((log.getLevel() == undefined) ? 0 : (log.getLevel()));
_local2 = log.getDump();
}
var _local1 = (fullClassName + " : line ") + lineNumber;
if (_local5.length > 0) {
_local1 = _local1 + (newline + _local5);
}
switch (_local6) {
case 0 :
logger.debug(_local1, _local2, fullClassName);
break;
case 1 :
logger.info(_local1, _local2, fullClassName);
break;
case 2 :
logger.warn(_local1, _local2, fullClassName);
break;
case 3 :
logger.error(_local1, _local2, fullClassName);
break;
case 4 :
logger.fatal(_local1, _local2, fullClassName);
}
}
static var initialized = initialize();
}
Symbol 48 MovieClip [__Packages.com.blitzagency.xray.logger.Logger] Frame 0
interface com.blitzagency.xray.logger.Logger
{
}
Symbol 49 MovieClip [__Packages.com.blitzagency.xray.logger.Debug] Frame 0
class com.blitzagency.xray.logger.Debug
{
static var xrayLC;
function Debug () {
}
static function makeConnection() {
xrayLC = new LocalConnection();
connected = xrayLC.connect("_xray_standAlone_debug");
}
static function trace(pMsg, pPackage, pLevel) {
_global.trace(pMsg);
if (_global.com.blitzagency.xray.Xray.lc_info) {
_global.com.blitzagency.xray.Xray.lc_info.setTrace({trace:pMsg, level:pLevel, package:pPackage});
} else {
if (xrayLC == undefined) {
makeConnection();
}
if (connected) {
var _local8 = xrayLC.send("_xray_view_conn", "setTrace", pMsg, pLevel, pPackage);
}
}
}
static function traceObject(o, pRecurseDepth, pIndent, pPackage, pLevel) {
var _local6;
var _local4;
if (pRecurseDepth == undefined) {
_local6 = 0;
} else {
_local6 = pRecurseDepth;
}
if (pIndent == undefined) {
_local4 = 0;
} else {
_local4 = pIndent;
}
if (getLength(o) == 0) {
var _local3 = "";
var _local2 = 0;
while (_local2 < _local4) {
_local3 = _local3 + " ";
_local2++;
}
var _local1 = o.toString();
if (o instanceof Array) {
_local1 = "[Array]";
}
if (_local1 == "[object Object]") {
_local1 = "[Object]";
}
if (_local1 == "[type Function]") {
_local1 = "[Function]";
}
trace(_local3 + _local1, pPackage, pLevel);
return(undefined);
}
for (var _local9 in o) {
var _local3 = "";
var _local2 = 0;
while (_local2 < _local4) {
_local3 = _local3 + " ";
_local2++;
}
var _local1 = o[_local9].toString();
if (o[_local9] instanceof Array) {
_local1 = "[Array]";
}
if (_local1 == "[object Object]") {
_local1 = "[Object]";
}
if (_local1 == "[type Function]") {
_local1 = "[Function]";
}
trace(((_local3 + _local9) + ": ") + _local1, pPackage, pLevel);
if (_local6 > 0) {
traceObject(o[_local9], _local6 - 1, _local4 + 1, pPackage, pLevel);
}
}
}
static function getLength(o) {
var _local1 = 0;
for (var _local3 in o) {
_local1++;
}
return(_local1);
}
static var connected = false;
}
Symbol 50 MovieClip [__Packages.com.blitzagency.xray.logger.XrayLogger] Frame 0
class com.blitzagency.xray.logger.XrayLogger implements com.blitzagency.xray.logger.Logger
{
function XrayLogger () {
}
static function resolveLevelAsName(p_level) {
switch (p_level) {
case 0 :
return("debug");
case 1 :
return("info");
case 2 :
return("warn");
case 3 :
return("error");
case 4 :
return("fatal");
}
return("debug");
}
function setMovieClipRecursionDepth(p_recursionDepth) {
movieClipRecursionDepth = p_recursionDepth;
}
function setObjectRecursionDepth(p_recursionDepth) {
objectRecursionDepth = p_recursionDepth;
}
function setIndentation(p_indentation) {
indentation = p_indentation;
}
function setLevel(p_level) {
if (level != undefined) {
level = p_level;
}
}
function debug(message, dump, package) {
if (level > DEBUG) {
return(undefined);
}
if (package == undefined) {
package = "";
}
log(message, dump, package, 0);
}
function info(message, dump, package) {
if (level > INFO) {
return(undefined);
}
if (package == undefined) {
package = "";
}
log(message, dump, package, 1);
}
function warn(message, dump, package) {
if (level > WARN) {
return(undefined);
}
if (package == undefined) {
package = "";
}
log(message, dump, package, 2);
}
function error(message, dump, package) {
if (level > ERROR) {
return(undefined);
}
if (package == undefined) {
package = "";
}
log(message, dump, package, 3);
}
function fatal(message, dump, package) {
if (level > FATAL) {
return(undefined);
}
if (package == undefined) {
package = "";
}
log(message, dump, package, 4);
}
function log(message, dump, package, level) {
message = (("(" + getTimer()) + ") ") + message;
com.blitzagency.xray.logger.Debug.trace(message, package, level);
if (dump == XRAYNODUMP) {
return(undefined);
}
var _local3 = typeof(dump);
if ((((((_local3 == "string") || (_local3 == "number")) || (_local3 == "boolean")) || (_local3 == "undefined")) || (_local3 == "null")) || (dump == undefined)) {
if (dump == undefined) {
dump = "undefined";
}
com.blitzagency.xray.logger.Debug.trace(dump, package, level);
} else {
com.blitzagency.xray.logger.Debug.traceObject(dump, resolveDepth(dump), indentation, package, level);
}
}
function resolveDepth(obj) {
switch (typeof(obj)) {
case "movieclip" :
return(movieClipRecursionDepth);
case "object" :
return(objectRecursionDepth);
}
return(objectRecursionDepth);
}
static var CLASS_REF = com.blitzagency.xray.logger.XrayLogger;
static var DEBUG = 0;
static var INFO = 1;
static var WARN = 2;
static var ERROR = 3;
static var FATAL = 4;
static var NONE = 5;
static var XRAYNODUMP = "noDump";
var level = 0;
var movieClipRecursionDepth = 2;
var objectRecursionDepth = 254;
var indentation = 0;
}
Symbol 51 MovieClip [__Packages.com.blitzagency.xray.logger.ClassLoader] Frame 0
class com.blitzagency.xray.logger.ClassLoader
{
function ClassLoader () {
}
static function initialize() {
initializeClasses();
return(true);
}
static function getClassByName(name) {
if (!initialized) {
initialize();
}
var clazz = eval ("_global." + name);
return(clazz);
}
static function getInstanceByName(name, args) {
if (!initialized) {
initialize();
}
var _local2 = getClassByName(name);
if (args == undefined) {
args = new Array();
}
var _local1 = new Object();
_local1.__proto__ = _local2.prototype;
_local2.apply(_local1, args);
return(_local1);
}
static function initializeClasses() {
var _local1 = com.blitzagency.xray.logger.XrayLogger;
}
static var CLASS_REF = com.blitzagency.xray.logger.ClassLoader;
static var initialized = initialize();
}
Symbol 52 MovieClip [__Packages.org.opensourceflash.data.XMLObject] Frame 0
class org.opensourceflash.data.XMLObject
{
static var strings, lastObjectProcessed;
function XMLObject () {
}
static function addStrings(p_strings) {
var _local1 = 0;
while (_local1 < p_strings.length) {
strings.splice(0, 0, p_strings[_local1]);
_local1++;
}
}
static function getlastObjectProcessed() {
return(lastObjectProcessed);
}
static function getXML(p_obj, p_nodeName) {
return(new XML(parseObject(p_obj, p_nodeName)));
}
static function getObject(p_xml, p_allArray) {
lastObjectProcessed = new Object();
lastObjectProcessed = convertToObject(p_xml, lastObjectProcessed, p_allArray);
return(lastObjectProcessed);
}
static function init() {
strings = new Array({to:"<", from:"<"}, {to:">", from:">"}, {to:"'", from:"'"}, {to:""", from:"\""}, {to:"&", from:"&"});
return(true);
}
static function parseObject(p_obj, p_nodeName) {
if (p_nodeName == undefined) {
p_nodeName = "root";
}
var _local3 = ("<" + p_nodeName) + ">";
for (var _local4 in p_obj) {
if (typeof(p_obj[_local4]) == "object") {
_local3 = _local3 + parseObject(p_obj[_local4], _local4);
} else {
var _local1 = p_obj[_local4];
if ((typeof(_local1) != "boolean") && (typeof(_local1) != "number")) {
_local1 = encode(p_obj[_local4]);
}
_local3 = _local3 + (((((("<" + _local4) + ">") + _local1) + "</") + _local4) + ">");
}
}
_local3 = _local3 + (("</" + p_nodeName) + ">");
return(_local3);
}
static function encode(p_str) {
var _local1 = 0;
while (_local1 < strings.length) {
p_str = p_str.split(strings[_local1].from).join(strings[_local1].to);
_local1++;
}
if (p_str == undefined) {
p_str = "";
}
return(p_str);
}
static function convertToObject(p_xml, p_parentObject) {
if (p_xml.hasChildNodes()) {
var _local9 = findTwins(p_xml);
var _local10;
var _local8 = 0;
while (_local8 < p_xml.childNodes.length) {
var _local4 = p_xml.childNodes[_local8];
var _local2 = _local4.nodeName.split("-").join("_");
if (_local2 == null) {
} else {
var _local1 = _local4.firstChild.nodeValue;
if (!isNaN(_local1)) {
_local1 = Number(_local1);
}
if ((_local1 == "true") || (_local1 == "false")) {
_local1 = ((_local1 == "true") ? true : false);
}
var _local5 = false;
var _local3 = 0;
while (_local3 < _local9.length) {
if (_local2 == _local9[_local3]) {
_local5 = true;
break;
}
_local3++;
}
var _local7;
if (_local5) {
if (!p_parentObject[_local2]) {
_local10 = (p_parentObject[_local2] = []);
}
_local7 = (_local10[_local10.length] = {});
} else {
_local7 = (p_parentObject[_local2] = {});
}
if (_local1 != undefined) {
if (_local5) {
p_parentObject[_local2][_local10.length - 1] = _local1;
} else {
p_parentObject[_local2] = _local1;
}
} else if (getAttributesLength(_local4.attributes) > 0) {
setAttributes(_local7, _local4.attributes);
}
if (_local4.childNodes.length > 0) {
convertToObject(_local4, _local7);
}
}
_local8++;
}
}
return(p_parentObject);
}
static function setAttributes(p_obj, p_attributes) {
for (var _local3 in p_attributes) {
p_obj[_local3] = {};
p_obj[_local3] = p_attributes[_local3];
}
}
static function findTwins(p_xml) {
var _local6 = [];
var _local3 = 0;
while (_local3 < p_xml.childNodes.length) {
var _local5 = p_xml.childNodes[_local3].nodeName;
var _local1 = _local3 + 1;
while (_local1 < p_xml.childNodes.length) {
var _local2 = p_xml.childNodes[_local1].nodeName;
if (_local2 == _local5) {
_local6.push(_local2);
}
_local1++;
}
_local3++;
}
return(_local6);
}
static function checkSiblingArray(p_node) {
var _local3 = "";
var _local1 = 0;
while (_local1 < p_node.childNodes.length) {
if (_local3 == p_node.childNodes[_local1].nodeName) {
return(true);
}
_local3 = p_node.childNodes[_local1].nodeName;
_local1++;
}
return(false);
}
static function getAttributesLength(p_attributes) {
var _local1 = 0;
for (var _local3 in p_attributes) {
_local1++;
}
return(_local1);
}
static var initialized = init();
}
Symbol 53 MovieClip [__Packages.com.blitzagency.xray.Commander] Frame 0
class com.blitzagency.xray.Commander
{
function Commander () {
}
static function exec(str) {
var _local7 = str.split(";");
var _local4 = 0;
while (_local4 < _local7.length) {
_local7[_local4] = retainValue(_local7[_local4]);
_local7[_local4] = _local7[_local4].split(".");
_local7[_local4][_local7[_local4].length - 1] = restoreValue(_local7[_local4][_local7[_local4].length - 1]);
var _local6 = _local7[_local4];
var _local8 = _local6.length;
var _local3 = 0;
while (_local3 < _local8) {
if (_local6[_local3].indexOf("[") > -1) {
var _local5 = _local6[_local3].split("[");
_local6[_local3] = _local5[0];
var _local1 = 1;
while (_local1 < _local5.length) {
var _local2 = replace(_local5[_local1], "\"", "");
_local2 = replace(_local2, "]", "");
_local6.splice(_local1, 0, _local2);
_local1++;
}
}
_local3++;
}
_local4++;
}
var _local9 = script(_local7);
return(_local9);
}
static function script(cmds) {
var c = 0;
while (c < cmds.length) {
var cmd = cmds[c][cmds[c].length - 1];
cmd = getArguments(cmd);
var d = ((cmds[c].length > 1) ? 1 : 0);
var r;
if (d > 0) {
var exec = eval (cmds[c][0]);
while (d < (cmds[c].length - 1)) {
exec = exec[cmds[c][d]];
d++;
}
if (cmd.method) {
r = exec[cmd.method].apply(exec, cmd.args);
if (r != undefined) {
return(r);
}
} else {
exec[cmd.prop] = cmd.val;
}
} else {
r = _global[cmd.method](cmd.args);
if (r != undefined) {
return(r);
}
}
c++;
}
}
static function retainValue(str) {
var _local5 = str.indexOf("=");
var _local2 = str.indexOf("(");
if (_local5 > -1) {
var _local3 = str.split("=");
_local3[1] = replace(_local3[1], ".", "(dot)");
return(_local3.join("="));
}
if (_local2 > -1) {
var _local4 = str.indexOf(")", _local2);
var _local6 = str.slice(0, _local2);
var _local7 = str.slice(_local4 + 2);
var _local8 = replace(str.substr(_local2, _local4), ".", "(dot)");
return((_local6 + _local8) + _local7);
}
return(str);
}
static function restoreValue(str) {
return(replace(str, "(dot)", "."));
}
static function replace(str, search, use) {
return(str.split(search).join(use));
}
static function getArguments(str) {
var _local10 = str.indexOf("(");
var _local12 = str.lastIndexOf(")");
var _local13;
var _local2;
var _local11;
var _local7;
if (_local10 > -1) {
_local13 = str.substr(0, _local10);
_local2 = str.substring(_local10 + 1, _local12).split(",");
var _local1 = 0;
while (_local1 < _local2.length) {
var _local4 = _local2[_local1].indexOf("\"");
var _local3 = _local2[_local1].indexOf("(");
if (_local3 > -1) {
_local2[_local1] = String(replace(_local2[_local1], " ", ""));
_local2[_local1] = exec(_local2[_local1]);
} else if ((_local4 > -1) && (_local3 == -1)) {
_local2[_local1] = String(replace(_local2[_local1], "\"", ""));
_local2[_local1] = String(replace(_local2[_local1], "'", ""));
} else if (!isNaN(parseInt(_local2[_local1]))) {
_local2[_local1] = parseInt(_local2[_local1]);
}
_local1++;
}
} else {
_local11 = replace(str.split("=")[0], " ", "");
var _local5 = replace(str.split("=")[1], " ", "");
var _local9;
var _local14;
switch (_local5) {
case "true" :
_local9 = true;
_local7 = _local9;
break;
case "false" :
_local9 = false;
_local7 = _local9;
break;
default :
if (!isNaN(parseInt(_local5))) {
_local14 = parseInt(_local5);
_local7 = _local14;
} else {
_local5 = String(replace(_local5, "\"", ""));
_local5 = String(replace(_local5, "'", ""));
_local7 = _local5;
}
}
}
var _local6 = new Object();
_local6.method = _local13;
_local6.args = _local2;
_local6.prop = _local11;
_local6.val = _local7;
return(_local6);
}
}
Symbol 54 MovieClip [__Packages.com.blitzagency.controls.TransformTool] Frame 0
class com.blitzagency.controls.TransformTool
{
static var editTool;
function TransformTool () {
}
static function initialize(p_asset, p_allowMove, p_allowRatioScale, p_allowWidthScale, p_allowHeightScale, p_allowRotate) {
if (editTool != undefined) {
editTool.destroyTool();
}
var _local3 = ((p_asset._parent.getNextHighestDepth() >= 1048575) ? 1048574 : (p_asset._parent.getNextHighestDepth()));
var _local2 = p_asset._parent.createEmptyMovieClip("xrayEditTool", _local3);
editTool = new com.blitzagency.controls.EditTool();
editTool.initialize(_local2, p_asset, p_allowMove, p_allowRatioScale, p_allowWidthScale, p_allowHeightScale, p_allowRotate);
return(editTool);
}
static function destroyTool(evtObj) {
editTool.destroyTool();
}
static var CLASS_REF = com.blitzagency.controls.TransformTool;
static var LINKAGE_ID = "com.blitzagency.controls.TransformTool";
}
Symbol 55 MovieClip [__Packages.com.blitzagency.xray.ControlConnection] Frame 0
class com.blitzagency.xray.ControlConnection extends LocalConnection
{
var objViewer, tree_que, serialized_que, GM, queSI, send, serializedQueSI, fpsMeter, focusEnabledCheck, editTool, highlightColor, boundingBox_mc, isConnected, connect;
function ControlConnection () {
super();
com.blitzagency.events.GDispatcher.initialize(this);
init();
}
function init() {
objViewer = new com.blitzagency.xray.ObjectViewer();
tree_que = new Array();
serialized_que = new Array();
GM = org.red5.utils.GridManager;
}
function drawGridLine(target, axis, position, lineColor) {
var mc = eval (target);
org.red5.utils.GridManager.drawGridLine(mc, axis, position, lineColor, target);
}
function removeLastGridLine() {
org.red5.utils.GridManager.removeLastGridLine();
}
function clearObjectGridLines(target) {
org.red5.utils.GridManager.clearObjectGridLines(target);
}
function clearAllGridLines() {
org.red5.utils.GridManager.clearAllGridLines();
}
function viewTree(sTarget_mc, recursiveSearch, showHidden, objectSearch) {
var target_mc;
if (sTarget_mc.indexOf("addedObject") > -1) {
var obj = com.blitzagency.xray.Xray.addedObjects[sTarget_mc.split("_")[1]].obj;
target_mc = obj;
} else {
target_mc = eval (sTarget_mc);
}
var objPath = null;
if (typeof(target_mc) == "object") {
objPath = sTarget_mc;
}
var tree_xml = objViewer.viewTree(target_mc, objPath, recursiveSearch, showHidden, objectSearch);
if (!tree_xml) {
com.blitzagency.xray.Xray.tt("treeview search returned undefined");
return(undefined);
}
var level_ary = findLevels();
var sTree = tree_xml.toString();
var treeLength = sTree.length;
if (treeLength > 5000) {
tree_que = new Array();
var x = 0;
while (x < treeLength) {
var toSend = sTree.substring(x, x + 5000);
var bLast = (((x + 5000) >= sTree.length) ? true : false);
tree_que.push({XMLDoc:toSend, level_ary:level_ary, bLast:bLast});
x = x + 5000;
}
queSI = setInterval(this, "processQue", 25);
} else {
var obj = {XMLDoc:tree_xml.toString()};
var bSent = send("_xray_conn", "setTree", obj, level_ary, true);
}
}
function setLogLevel(p_level) {
com.blitzagency.xray.logger.LogManager.getLogger("com.blitzagency.xray.logger.XrayLogger").setLevel(p_level);
}
function getLogLevel(p_level) {
var _local2 = send("_xray_conn", "getLogLevel");
}
function getConnectorVersion() {
var _local2 = send("_xray_conn", "setVersion", com.blitzagency.xray.Xray.$version);
}
function viewTreeF2(sTarget_mc, recursiveSearch, showHidden, objectSearch) {
var target_mc;
target_mc = eval (sTarget_mc);
var objPath = null;
if (typeof(target_mc) == "object") {
objPath = sTarget_mc;
}
var tree_xml = objViewer.viewTree(target_mc, objPath, recursiveSearch, showHidden, objectSearch);
if (!tree_xml) {
com.blitzagency.xray.Xray.tt("treeview search returned undefined");
return(undefined);
}
var sTree = tree_xml.toString();
var treeLength = sTree.length;
if (treeLength > 5000) {
tree_que = new Array();
var x = 0;
while (x < treeLength) {
var toSend = sTree.substring(x, x + 5000);
var bLast = (((x + 5000) >= sTree.length) ? true : false);
tree_que.push({XMLDoc:toSend, bLast:bLast});
x = x + 5000;
}
queSI = setInterval(this, "processQueF2", 25);
} else {
var obj = {XMLDoc:tree_xml.toString()};
var bSent = send("_xray_conn", "setTree", obj, true);
}
}
function serialize(obj) {
var _local3 = org.opensourceflash.data.XMLObject.getXML(obj, "serialized").toString();
var _local7 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = _local3.substring(_local2, _local2 + 5000);
var _local5 = (((_local2 + 5000) >= _local3.length) ? true : false);
serialized_que.push({XMLDoc:_local4, bLast:_local5});
_local2 = _local2 + 5000;
}
serializedQueSI = setInterval(this, "processSerializedQue", 25);
}
function processQue() {
var _local2 = tree_que.shift();
var _local3 = new Object();
_local3.XMLDoc = _local2.XMLDoc;
var _local5 = _local2.level_ary;
var _local4 = _local2.bLast;
if (tree_que.length == 0) {
clearInterval(queSI);
}
var _local6 = send("_xray_conn", "setTree", _local3, _local5, _local4);
}
function processQueF2() {
var _local2 = tree_que.shift();
var _local3 = new Object();
_local3.XMLDoc = _local2.XMLDoc;
var _local4 = _local2.bLast;
if (tree_que.length == 0) {
clearInterval(queSI);
}
var _local5 = send("_xray_conn", "setTree", _local3, _local4);
}
function processSerializedQue() {
var _local2 = serialized_que.shift();
var _local3 = new Object();
_local3.XMLDoc = _local2.XMLDoc;
var _local4 = _local2.bLast;
if (serialized_que.length == 0) {
clearInterval(serializedQueSI);
}
var _local5 = send("_xray_conn", "setObjectProperties", _local3, _local4);
}
function findLevels() {
var iLevelCount = 5000;
var level_ary = new Array();
var x = 1;
while (x <= iLevelCount) {
if (eval ("_level" + x)) {
level_ary.push(x);
}
x++;
}
return(level_ary);
}
function sendAddedObjects(id) {
}
function loadTransformTool(obj) {
}
function unloadTransformTool(obj) {
}
function sendFPS(obj) {
var _local2 = send("_xray_conn", "viewFPS", obj.fps);
}
function showFPS() {
fpsMeter.__set__runFPS(true);
}
function hideFPS() {
fpsMeter.__set__runFPS(false);
}
function fpsOn(showFPS) {
fpsMeter.__set__runFPS(showFPS);
}
function setFilter(sTarget_mc, filter, filterType) {
var target_mc = eval (sTarget_mc);
var newFilter;
switch (filterType) {
case "ds" :
newFilter = new flash.filters.DropShadowFilter();
break;
case "blur" :
newFilter = new flash.filters.BlurFilter();
break;
case "glow" :
newFilter = new flash.filters.GlowFilter();
}
for (var items in filter) {
newFilter[items] = filter[items];
}
target_mc.filters = [newFilter];
}
function getMovieClipProperties(sTarget_mc, bShowAll) {
var target_mc = eval (sTarget_mc);
var obj = objViewer.getProperties(target_mc, bShowAll);
var bSent = send("_xray_conn", "showMovieClipProperties", obj);
}
function getMovieClipPropertiesF2(sTarget_mc, bShowAll) {
var target_mc = eval (sTarget_mc);
var obj = objViewer.getPropertiesF2(target_mc, bShowAll);
serialize(obj);
}
function getTipMovieClipProperties(sTarget_mc, bShowAll) {
var target_mc = eval (sTarget_mc);
var obj = objViewer.getProperties(target_mc, false);
var bSent = send("_xray_conn", "showTipMovieClipProperties", obj);
}
function getBaseProperties(sObj, key) {
var sTemp = sObj.split(".");
var target_obj = eval (sTemp[0]);
var x = 1;
while (x < sTemp.length) {
target_obj = target_obj[sTemp[x]];
x++;
}
if (key) {
target_obj = target_obj[key];
}
var obj = objViewer.getBaseProperties(target_obj, sObj);
var bSent = send("_xray_conn", "showBaseProperties", obj);
}
function getBasePropertiesF2(sObj, key) {
var sTemp = sObj.split(".");
var target_obj = eval (sTemp[0]);
var x = 1;
while (x < sTemp.length) {
target_obj = target_obj[sTemp[x]];
x++;
}
if (key) {
target_obj = target_obj[key];
}
var obj = objViewer.getBaseProperties(target_obj, sObj);
serialize(obj);
}
function getObjProperties(sObj, key) {
var sTemp = sObj.split(".");
var target_obj = eval (sTemp[0]);
var x = 1;
while (x < sTemp.length) {
target_obj = target_obj[sTemp[x]];
x++;
}
if (key) {
target_obj = target_obj[key];
}
var obj = objViewer.getObjProperties(target_obj);
var bSent = send("_xray_conn", "showMovieClipProperties", obj);
}
function getObjPropertiesF2(sObj, key) {
var sTemp = sObj.split(".");
var target_obj = eval (sTemp[0]);
var x = 1;
while (x < sTemp.length) {
target_obj = target_obj[sTemp[x]];
x++;
}
if (key) {
target_obj = target_obj[key];
}
var obj = objViewer.getObjPropertiesF2(target_obj);
serialize(obj);
}
function getFunctionProperties(sObj) {
var target_obj = eval (sObj);
var obj = objViewer.getFunctionProperties(target_obj);
var bSent = send("_xray_conn", "showMovieClipProperties", obj);
}
function getFunctionPropertiesF2(sObj) {
var target_obj = eval (sObj);
var obj = objViewer.getFunctionProperties(target_obj);
serialize(obj);
}
function writeChangeHistory(obj) {
var _local4 = "//==========/[ CHANGES ]\\===========//";
_global.trace(_local4);
for (var _local3 in obj) {
if (typeof(obj[_local3]) == "object") {
_global.trace(obj[_local3].changes + ";");
}
}
_local4 = "//==========\\[ CHANGES ]/===========//";
_global.trace(_local4);
}
function executeScript(sExecute) {
com.blitzagency.xray.Commander.exec(sExecute);
}
function getSoundProperties(sSound) {
var obj = objViewer.getSoundProperties(eval (sSound));
var bSent = send("_xray_conn", "setSoundProperties", obj);
}
function getVideoProperties(sNetStream) {
var obj = objViewer.getVideoProperties(eval (sNetStream));
var bSent = send("_xray_conn", "setVideoProperties", obj);
}
function playSound(sSound, iLoops) {
var snd = eval (sSound);
snd.start(0, iLoops);
}
function playSoundF2(soundPath, position, loopCount) {
var snd = eval (soundPath);
var position = ((position == undefined) ? 0 : (position));
snd.stop();
snd.start(position, loopCount);
}
function setSoundPropertyF2(soundPath, property, value) {
var snd = eval (soundPath);
switch (property) {
case "volume" :
snd.setVolume(value);
return;
case "pan" :
snd.setPan(value);
}
}
function stopSound(sSound) {
var snd = eval (sSound);
snd.stop();
}
function playVideo(sVideo, flv) {
var ns = eval (sVideo);
ns.play(flv);
}
function playVideoF2(videoPath, flv, seek) {
var ns = eval (videoPath);
if (seek > 0) {
ns.seek(seek);
} else {
ns.play(flv);
}
}
function pauseVideo(sVideo) {
var ns = eval (sVideo);
ns.pause();
}
function stopVideo(sVideo) {
var ns = eval (sVideo);
ns.close();
}
function highlightClip(sTarget_mc) {
var target_mc = eval (sTarget_mc);
focusEnabledCheck = target_mc.focusEnabled;
target_mc.focusEnabled = true;
_global.Selection.setFocus(sTarget_mc);
}
function lowlightClip(sTarget_mc) {
var target_mc = eval (sTarget_mc);
_global.Selection.setFocus(null);
target_mc.focusEnabled = focusEnabledCheck;
}
function startExamineClipF2(p_path, p_type) {
var mc = eval (p_path);
if (editTool != undefined) {
com.blitzagency.controls.TransformTool.destroyTool();
}
editTool = com.blitzagency.controls.TransformTool.initialize(mc, true, false, false, false, true);
}
function showGridLine(path, prop, value) {
var mc = eval (path);
var rect;
if (prop == "_x") {
rect = com.blitzagency.util.CoordinateTools.getRectangle(0, 0, Stage.width, 0.25);
}
if (prop == "_y") {
rect = com.blitzagency.util.CoordinateTools.getRectangle(0, 0, 0.25, Stage.height);
}
com.blitzagency.util.DrawingTools.drawBox(mc, 16711680, 100, rect);
}
function hideGridLine(path) {
var mc = eval (path);
mc.clear();
}
function stopExamineClipsF2() {
com.blitzagency.controls.TransformTool.destroyTool();
}
function startExamineClips(sTarget_mc, iType) {
loadTransformTool();
var target_mc = eval (sTarget_mc);
var mc;
if ((iType == 5) || (iType == 3)) {
} else if (iType == 3) {
} else if (iType == 2) {
mc = target_mc;
var colorObj = highlightColor.getTransform();
var myColorTransform;
if (colorObj && (colorObj.rb == 81)) {
myColorTransform = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
com.blitzagency.xray.DragableMovieClip.remove(target_mc);
} else {
com.blitzagency.xray.DragableMovieClip.initialize(target_mc);
myColorTransform = {ra:100, rb:81, ga:100, gb:56, ba:100, bb:-57, aa:100, ab:0};
}
highlightColor = new Color(mc);
highlightColor.setTransform(myColorTransform);
}
boundingBox_mc = mc;
}
function stopExamineClips(sTarget_mc, iType) {
unloadTransformTool();
var target_mc = eval (sTarget_mc);
highlightColor = new Color(boundingBox_mc);
var myColorTransform = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
highlightColor.setTransform(myColorTransform);
com.blitzagency.xray.DragableMovieClip.remove(target_mc);
}
function updateHistory(target_mc) {
var sTarget_mc = String(eval (target_mc._target));
var obj = new Object();
var propsAry = new Array("_x", "_y");
var aTemp = sTarget_mc.split(".");
aTemp.splice(0, 1);
sTarget_mc = aTemp.join(".");
var x = 0;
while (x < propsAry.length) {
var p = propsAry[x];
var key = ((sTarget_mc + ".") + p);
var o = ((obj[key] = new Object()));
o.prop = p;
o.value = target_mc[p];
o.key = (sTarget_mc + ".") + p;
o.sExecute = (((sTarget_mc + ".") + p) + " = ") + target_mc[p];
x++;
}
var bSent = send("_xray_conn", "updateHistory", obj);
}
function allowDomain(sendingDomain) {
return(true);
}
function onStatus(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
}
}
function initConnection() {
fpsMeter = com.blitzagency.xray.FPSMeter.getInstance();
isConnected = connect("_xray_remote_conn");
return(isConnected);
}
}
Symbol 56 MovieClip [__Packages.com.blitzagency.xray.XrayTrace] Frame 0
class com.blitzagency.xray.XrayTrace
{
var _recursionCount, recursionCheck, _sViewInfo, _sViewInfoClean, _queInterval, sendSI, _separator, sendAry, dispatchEvent, iViewColCount;
function XrayTrace () {
com.blitzagency.events.GDispatcher.initialize(this);
separator = (" :: ");
_recursionCount = 0.003;
recursionCheck = com.blitzagency.util.RecursionCheck.getInstance();
}
function get sViewInfo() {
return(_sViewInfo);
}
function set sViewInfo(newValue) {
_sViewInfo = newValue;
//return(sViewInfo);
}
function get sViewInfoClean() {
return(_sViewInfoClean);
}
function set sViewInfoClean(newValue) {
_sViewInfoClean = newValue;
//return(sViewInfoClean);
}
function get queInterval() {
return(_queInterval);
}
function set queInterval(newValue) {
_queInterval = newValue;
clearInterval(sendSI);
sendSI = setInterval(this, "sendData", newValue);
//return(queInterval);
}
function get separator() {
return(_separator);
}
function set separator(newValue) {
_separator = newValue;
//return(separator);
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.xray.XrayTrace();
}
return(_instance);
}
function sendData() {
var _local2 = sendAry.shift();
if (_local2) {
dispatchEvent({type:"onSendData", info:_local2.sViewInfo, last:_local2.bLast});
}
}
function examineObj(obj) {
var _local5 = "";
var _local6 = "";
var _local4 = 0;
while (_local4 < iViewColCount) {
_local5 = _local5 + " ";
_local6 = _local6 + " ";
_local4++;
}
if (!recursionCheck.isMember(obj).exists) {
recursionCheck.addMember(obj);
}
for (var _local7 in obj) {
var _local3 = false;
if ((_local7 != "getRecursionChecked") && (_local7 != "__recursionCheck")) {
sViewInfo = sViewInfo + ((((((_local5 + "<font size=\"12\" color=\"#0000FF\">") + _local7) + "</font>") + " = ") + obj[_local7]) + newline);
sViewInfoClean = sViewInfoClean + ((((_local6 + _local7) + " = ") + obj[_local7]) + newline);
}
if ((typeof(obj[_local7]) == "object") || (obj[_local7] instanceof Array)) {
if ((Math.floor(obj[_local7].__recursionCheck) != Math.floor(com.blitzagency.xray.Xray.recursionControl)) || (obj[_local7].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount))) {
if (Math.floor(obj[_local7].__recursionCheck) == Math.floor(com.blitzagency.xray.Xray.recursionControl)) {
obj[_local7].__recursionCheck = obj[_local7].__recursionCheck + 0.001;
}
if ((obj[_local7].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount)) || (obj[_local7].__recursionCheck == undefined)) {
iViewColCount = iViewColCount + 4;
if (typeof(obj[_local7]) == "object") {
_local3 = examineObj(obj[_local7]);
}
if (obj[_local7] instanceof Array) {
_local3 = examineAry(obj[_local7]);
}
if (!_local3) {
return(true);
}
}
}
}
}
iViewColCount = iViewColCount - 4;
sViewInfo = sViewInfo + newline;
sViewInfoClean = sViewInfoClean + newline;
return(true);
}
function examineAry(obj) {
var _local7 = "";
var _local8 = "";
var _local6 = 0;
while (_local6 < iViewColCount) {
_local7 = _local7 + " ";
_local8 = _local8 + " ";
_local6++;
}
if (!recursionCheck.isMember(obj).exists) {
recursionCheck.addMember(obj);
}
var _local2 = 0;
while (_local2 < obj.length) {
var _local5 = false;
var _local4 = obj[_local2];
if ((_local4 != "getRecursionChecked") && (_local4 != "__recursionCheck")) {
sViewInfo = sViewInfo + ((((((_local7 + "<font size=\"12\" color=\"#0000FF\">") + _local4) + "</font>") + " = ") + obj[_local2]) + newline);
sViewInfoClean = sViewInfoClean + ((((_local8 + _local4) + " = ") + obj[_local2]) + newline);
}
if ((typeof(obj[_local2]) == "object") || (obj[_local2] instanceof Array)) {
if ((Math.floor(obj[_local2].__recursionCheck) != Math.floor(com.blitzagency.xray.Xray.recursionControl)) || (obj[_local2].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount))) {
if (Math.floor(obj[_local2].__recursionCheck) == Math.floor(com.blitzagency.xray.Xray.recursionControl)) {
obj[_local2].__recursionCheck = obj[_local2].__recursionCheck + 0.001;
}
if ((obj[_local2].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount)) || (obj[_local2].__recursionCheck == undefined)) {
iViewColCount = iViewColCount + 4;
if (typeof(obj[_local2]) == "object") {
_local5 = examineObj(obj[_local2]);
}
if (obj[_local2] instanceof Array) {
_local5 = examineAry(obj[_local2]);
}
if (!_local5) {
return(true);
}
}
}
}
_local2++;
}
iViewColCount = iViewColCount - 4;
sViewInfo = sViewInfo + newline;
sViewInfoClean = sViewInfoClean + newline;
return(true);
}
function trace() {
sViewInfo = ("");
sViewInfoClean = ("");
recursionCheck.clear();
var _local4 = 0;
while (_local4 < arguments.length) {
if (typeof(arguments[_local4]) == "object") {
sViewInfo = sViewInfo + newline;
sViewInfoClean = sViewInfoClean + newline;
iViewColCount = 2;
dispatchEvent({type:"onStatus", code:"Trace.object"});
com.blitzagency.xray.Xray.recursionControl = com.blitzagency.xray.Xray.recursionControl + 1;
examineObj(arguments[_local4]);
} else if (arguments[_local4] instanceof Array) {
sViewInfo = sViewInfo + newline;
sViewInfoClean = sViewInfoClean + newline;
iViewColCount = 2;
dispatchEvent({type:"onStatus", code:"Trace.object"});
com.blitzagency.xray.Xray.recursionControl = com.blitzagency.xray.Xray.recursionControl + 1;
examineAry(arguments[_local4]);
} else if (_local4 > 0) {
sViewInfo = sViewInfo + (arguments[_local4] + " :: ");
sViewInfoClean = sViewInfoClean + (arguments[_local4] + " :: ");
}
_local4++;
}
if (sViewInfo.substring(sViewInfo.length - 4, sViewInfo.length) == " :: ") {
sViewInfo = (sViewInfo.substring(0, sViewInfo.length - 4));
}
if (sViewInfoClean.substring(sViewInfoClean.length - 4, sViewInfoClean.length) == " :: ") {
sViewInfoClean = (sViewInfoClean.substring(0, sViewInfoClean.length - 4));
}
var _local7 = (((("(" + getTimer()) + ") ") + arguments[0]) + ": ") + sViewInfoClean;
if (com.blitzagency.xray.Xray.lc_info) {
if (_local7 != undefined) {
if (_local7.length > 5000) {
_local4 = 0;
while (_local4 < _local7.length) {
var _local5 = _local7.substring(_local4, _local4 + 5000);
var _local8 = (((_local4 + 5000) >= _local7.length) ? true : false);
sendAry.push({sViewInfo:_local5, bLast:_local8});
_local4 = _local4 + 5000;
}
} else {
sendAry.push({sViewInfo:_local7, bLast:true});
}
}
}
_global.trace((((("(" + getTimer()) + ") ") + arguments[0]) + ": ") + sViewInfoClean);
dispatchEvent({type:"onTrace", sInfo:_local7});
if ((com.blitzagency.xray.Xray.lc_info && (!queInterval)) && (!_global.isLivePreview)) {
queInterval = (50);
sendAry = new Array();
}
return(_local7);
}
static var _instance = null;
}
Symbol 57 MovieClip [__Packages.com.blitzagency.xray.LoggerConnection] Frame 0
class com.blitzagency.xray.LoggerConnection extends LocalConnection
{
var send, xrayTrace, isConnected, connect;
function LoggerConnection () {
super();
com.blitzagency.events.GDispatcher.initialize(this);
}
function setViewInfo(obj) {
var _local2 = send("_xray_view_conn", "setViewInfo", obj.info, obj.last);
}
function setTrace(obj) {
var _local3 = send("_xray_view_conn", "setTrace", obj.trace, obj.level, obj.package);
}
function getTraceValue(traceValue) {
var sInfo = xrayTrace.trace("XrayTrace", eval (traceValue));
}
function allowDomain(sendingDomain) {
return(true);
}
function onStatus(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
}
}
function initConnection() {
xrayTrace = com.blitzagency.xray.XrayTrace.getInstance();
xrayTrace.addEventListener("onSendData", com.blitzagency.util.Delegate.create(this, setViewInfo));
isConnected = connect("_xray_view_remote_conn");
return(isConnected);
}
}
Symbol 58 MovieClip [__Packages.com.blitzagency.util.PointConverter] Frame 0
class com.blitzagency.util.PointConverter
{
function PointConverter () {
com.blitzagency.events.GDispatcher.initialize(this);
_global.localToLocal = function () {
com.blitzagency.util.PointConverter.localToLocal.apply(com.blitzagency.util.PointConverter, arguments);
};
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.util.PointConverter();
}
return(_instance);
}
static function localToLocal(from, to) {
var _local1 = {x:0, y:0};
from.localToGlobal(_local1);
to.globalToLocal(_local1);
return(_local1);
}
static var _instance = null;
}
Symbol 59 MovieClip [__Packages.com.blitzagency.xray.FunctionName] Frame 0
class com.blitzagency.xray.FunctionName
{
var dispatchEvent;
function FunctionName () {
com.blitzagency.events.GDispatcher.initialize(this);
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.xray.FunctionName();
}
return(_instance);
}
function traceFunction(ary, obj) {
_global.ASSetPropFlags(obj, null, 0, 7);
for (var _local10 in obj) {
if ((typeof(obj[_local10]) == "function") && (obj[_local10] == ary.callee)) {
var _local4 = {method:_local10, className:obj.className};
dispatchEvent({type:"onTraceFunction", functionName:_local10, className:obj.className});
return(_local4);
}
}
return(null);
}
static var _instance = null;
}
Symbol 32 MovieClip [Xray Connector] Frame 1
#initclip 305
com.blitzagency.xray.Xray.init();
this.onLoad = function () {
com.blitzagency.xray.Xray.initConnections(this);
if (!com.blitzagency.xray.Xray.packagesInitialized) {
com.blitzagency.xray.Xray.addPackages();
}
};
#endinitclip
if (!_global.isLivePreview) {
label._visible = false;
if (this.classPackages.length > 1) {
com.blitzagency.xray.Xray.addPackages(this.classPackages);
} else {
com.blitzagency.xray.Xray.addPackages(com.blitzagency.xray.Xray.basePackages);
}
if (this.showFPS) {
com.blitzagency.xray.Xray.createFPSMeter(this, this.fpsColor);
}
}
Symbol 115 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 15
stop();
Symbol 130 MovieClip [mc.block.bomb] Frame 1
stop();
Symbol 130 MovieClip [mc.block.bomb] Frame 5
stop();
Symbol 135 MovieClip [mc.block.conveyor] Frame 1
stop();
Symbol 135 MovieClip [mc.block.conveyor] Frame 21
gotoAndPlay ("active_right");
Symbol 135 MovieClip [mc.block.conveyor] Frame 42
gotoAndPlay ("active_left");
Symbol 138 MovieClip [mc.block.electromagnet] Frame 1
stop();
Symbol 138 MovieClip [mc.block.electromagnet] Frame 2
stop();
Symbol 147 MovieClip [mc.block.escalator] Frame 1
stop();
Symbol 147 MovieClip [mc.block.escalator] Frame 21
gotoAndPlay ("active");
Symbol 160 MovieClip [mc.ball] Frame 1
stop();
Symbol 160 MovieClip [mc.ball] Frame 5
stop();
Symbol 161 MovieClip [mc.block.finish] Frame 1
stop();
Symbol 161 MovieClip [mc.block.finish] Frame 11
stop();
host.onCallback();
Symbol 164 MovieClip [mc.block.foam] Frame 1
stop();
Symbol 168 MovieClip [mc.block.gate] Frame 1
stop();
Symbol 168 MovieClip [mc.block.gate] Frame 11
stop();
Symbol 174 MovieClip [mc.block.iron] Frame 1
stop();
Symbol 174 MovieClip [mc.block.iron] Frame 11
stop();
Symbol 188 MovieClip [mc.block.peltonwheel] Frame 1
stop();
Symbol 188 MovieClip [mc.block.peltonwheel] Frame 11
stop();
Symbol 195 MovieClip [mc.block.rubber] Frame 1
stop();
Symbol 200 MovieClip [mc.block.seesaw] Frame 1
stop();
Symbol 200 MovieClip [mc.block.seesaw] Frame 7
stop();
Symbol 200 MovieClip [mc.block.seesaw] Frame 13
stop();
Symbol 202 MovieClip [mc.block.solar] Frame 1
stop();
Symbol 202 MovieClip [mc.block.solar] Frame 11
stop();
Symbol 205 MovieClip [mc.block.spring] Frame 1
stop();
Symbol 208 MovieClip [mc.block.start] Frame 1
stop();
Symbol 208 MovieClip [mc.block.start] Frame 25
stop();
host.onCallback();
Symbol 215 MovieClip [mc.block.steamturbine] Frame 1
stop();
Symbol 215 MovieClip [mc.block.steamturbine] Frame 11
stop();
Symbol 220 MovieClip [mc.block.switch] Frame 1
stop();
Symbol 220 MovieClip [mc.block.switch] Frame 2
stop();
Symbol 222 MovieClip [mc.block.tesla] Frame 1
stop();
Symbol 222 MovieClip [mc.block.tesla] Frame 11
stop();
Symbol 232 MovieClip [mc.block.turbine] Frame 1
stop();
Symbol 232 MovieClip [mc.block.turbine] Frame 11
stop();
Symbol 237 MovieClip [mc.block.water] Frame 1
stop();
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 2
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
stop();
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
stop();
Symbol 300 MovieClip Frame 3
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 2
stop();
Symbol 524 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 1
edge.onEnterFrame = function () {
rndCrackle = Math.round(Math.random() * 400) + 400;
this.gotoAndPlay(rndCrackle);
};
Symbol 537 MovieClip [mc.effect.bolts] Frame 1
stop();
Symbol 537 MovieClip [mc.effect.bolts] Frame 2
stop();
Symbol 537 MovieClip [mc.effect.bolts] Frame 3
stop();
Symbol 541 MovieClip Frame 45
stop();
Symbol 547 MovieClip Frame 1
stop();
Symbol 547 MovieClip Frame 8
stop();
Symbol 547 MovieClip Frame 13
this.gotoAndStop(1);
Symbol 571 MovieClip [mc.interface.button.test] Frame 1
stop();
Symbol 571 MovieClip [mc.interface.button.test] Frame 2
stop();
Symbol 571 MovieClip [mc.interface.button.test] Frame 3
stop();
Symbol 571 MovieClip [mc.interface.button.test] Frame 4
stop();
Symbol 571 MovieClip [mc.interface.button.test] Frame 5
stop();
Symbol 571 MovieClip [mc.interface.button.test] Frame 6
stop();
Symbol 576 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 2
stop();
Symbol 583 MovieClip Frame 1
stop();
Symbol 583 MovieClip Frame 2
stop();
Symbol 588 MovieClip Frame 1
stop();
Symbol 588 MovieClip Frame 2
stop();
Symbol 595 MovieClip Frame 1
stop();
Symbol 595 MovieClip Frame 2
stop();
Symbol 609 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 2
stop();
Symbol 620 MovieClip Frame 1
stop();
Symbol 620 MovieClip Frame 2
stop();
Symbol 620 MovieClip Frame 3
stop();
Symbol 620 MovieClip Frame 4
stop();
Symbol 627 MovieClip Frame 1
stop();
Symbol 627 MovieClip Frame 2
stop();
Symbol 693 MovieClip [mc.button.replay] Frame 1
stop();
Symbol 693 MovieClip [mc.button.replay] Frame 2
stop();
Symbol 693 MovieClip [mc.button.replay] Frame 3
stop();
Symbol 701 MovieClip [mc.ui.screen.cns.tabber.pc.play] Frame 1
#initclip 314
Object.registerClass("mc.ui.screen.cns.tabber.pc.play", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 701 MovieClip [mc.ui.screen.cns.tabber.pc.play] Frame 5
stop();
Symbol 701 MovieClip [mc.ui.screen.cns.tabber.pc.play] Frame 10
stop();
Symbol 705 MovieClip [mc.ui.screen.cns.tabber.pc.create] Frame 1
#initclip 306
Object.registerClass("mc.ui.screen.cns.tabber.pc.create", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 705 MovieClip [mc.ui.screen.cns.tabber.pc.create] Frame 5
stop();
Symbol 705 MovieClip [mc.ui.screen.cns.tabber.pc.create] Frame 10
stop();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 1
stop();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 10
stop();
onAnimCallback();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 20
stop();
onAnimCallback();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 29
stop();
onAnimCallback();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 30
stop();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 40
stop();
onAnimCallback();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 50
stop();
onAnimCallback();
Symbol 706 MovieClip [mc.ui.screen.cns.tabber.pc] Frame 60
stop();
onAnimCallback();
Symbol 708 MovieClip [mc.ui.screen.levels.tabber.tae.training] Frame 1
#initclip 307
Object.registerClass("mc.ui.screen.levels.tabber.tae.training", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 708 MovieClip [mc.ui.screen.levels.tabber.tae.training] Frame 5
stop();
Symbol 708 MovieClip [mc.ui.screen.levels.tabber.tae.training] Frame 10
stop();
Symbol 710 MovieClip [mc.ui.screen.levels.tabber.tae.advanced] Frame 1
#initclip 308
Object.registerClass("mc.ui.screen.levels.tabber.tae.advanced", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 710 MovieClip [mc.ui.screen.levels.tabber.tae.advanced] Frame 5
stop();
Symbol 710 MovieClip [mc.ui.screen.levels.tabber.tae.advanced] Frame 10
stop();
Symbol 712 MovieClip [mc.ui.screen.levels.tabber.tae.extras] Frame 1
#initclip 309
Object.registerClass("mc.ui.screen.levels.tabber.tae.extras", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 712 MovieClip [mc.ui.screen.levels.tabber.tae.extras] Frame 5
stop();
Symbol 712 MovieClip [mc.ui.screen.levels.tabber.tae.extras] Frame 10
stop();
Symbol 714 MovieClip [mc.ui.screen.levels.tabber.tae] Frame 1
#initclip 310
Object.registerClass("mc.ui.screen.levels.tabber.tae", com.preloaded.scimus.launchpad.ui.Screens.tabber.TabberBase);
#endinitclip
Symbol 716 MovieClip [mc.ui.screen.levels.tabber.cns.create] Frame 1
#initclip 311
Object.registerClass("mc.ui.screen.levels.tabber.cns.create", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 716 MovieClip [mc.ui.screen.levels.tabber.cns.create] Frame 5
stop();
Symbol 716 MovieClip [mc.ui.screen.levels.tabber.cns.create] Frame 10
stop();
Symbol 718 MovieClip [mc.ui.screen.levels.tabber.cns.share] Frame 1
#initclip 312
Object.registerClass("mc.ui.screen.levels.tabber.cns.share", com.preloaded.scimus.launchpad.ui.Screens.tabber.Tab);
#endinitclip
stop();
Symbol 718 MovieClip [mc.ui.screen.levels.tabber.cns.share] Frame 5
stop();
Symbol 718 MovieClip [mc.ui.screen.levels.tabber.cns.share] Frame 10
stop();
Symbol 719 MovieClip [mc.ui.screen.levels.tabber.cns] Frame 1
#initclip 313
Object.registerClass("mc.ui.screen.levels.tabber.cns", com.preloaded.scimus.launchpad.ui.Screens.tabber.TabberBase);
#endinitclip
Symbol 721 MovieClip [goal.fireworks] Frame 77
stop();
Symbol 748 MovieClip Frame 121
stop();
Symbol 772 MovieClip Frame 174
stop();
Symbol 776 MovieClip Frame 208
stop();
Symbol 795 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 2
stop();
Symbol 800 MovieClip Frame 1
stop();
Symbol 800 MovieClip Frame 2
stop();
Symbol 812 MovieClip Frame 1
stop();
Symbol 812 MovieClip Frame 2
stop();
Symbol 816 MovieClip Frame 1
stop();
Symbol 816 MovieClip Frame 2
stop();
Symbol 816 MovieClip Frame 3
stop();
Symbol 834 MovieClip Frame 1
stop();
Symbol 834 MovieClip Frame 2
stop();
Symbol 849 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 2
stop();
Symbol 876 MovieClip [mc.ui.sandbox.button.advance] Frame 1
stop();
Symbol 876 MovieClip [mc.ui.sandbox.button.advance] Frame 2
stop();
Symbol 878 MovieClip [mc.ui.sandbox.button.back] Frame 1
stop();
Symbol 878 MovieClip [mc.ui.sandbox.button.back] Frame 2
stop();
Symbol 920 MovieClip [mc.ui.screen.levels.training.thumbnail] Frame 1
stop();
Symbol 920 MovieClip [mc.ui.screen.levels.training.thumbnail] Frame 7
stop();
Symbol 953 MovieClip Frame 1
stop();
Symbol 953 MovieClip Frame 9
stop();
Symbol 953 MovieClip Frame 15
gotoAndStop (1);
Symbol 965 MovieClip Frame 1
stop();
Symbol 965 MovieClip Frame 2
stop();
Symbol 985 MovieClip Frame 1
stop();
Symbol 985 MovieClip Frame 2
stop();
Symbol 1009 MovieClip Frame 1
stop();
Symbol 1009 MovieClip Frame 2
stop();
Symbol 1012 MovieClip Frame 1
stop();
Symbol 1012 MovieClip Frame 2
stop();
Symbol 1019 MovieClip Frame 1
stop();
Symbol 1019 MovieClip Frame 2
stop();
Symbol 1030 MovieClip Frame 1
stop();
Symbol 1030 MovieClip Frame 2
stop();
Symbol 1034 MovieClip Frame 1
stop();
Symbol 1034 MovieClip Frame 2
stop();
Symbol 1067 MovieClip Frame 1
stop();
Symbol 1067 MovieClip Frame 2
stop();
Symbol 1072 MovieClip Frame 1
stop();
Symbol 1072 MovieClip Frame 2
stop();
Symbol 1092 MovieClip Frame 1
stop();
Symbol 1092 MovieClip Frame 7
stop();
Symbol 1098 MovieClip Frame 1
stop();
Symbol 1098 MovieClip Frame 7
stop();
Symbol 1104 MovieClip Frame 1
stop();
Symbol 1104 MovieClip Frame 7
stop();
Symbol 1118 MovieClip Frame 1
stop();
Symbol 1118 MovieClip Frame 2
stop();
Symbol 1152 MovieClip Frame 1
stop();
Symbol 1163 MovieClip Frame 1
speedSwitch = true;
var lastX1 = ball_mc._x;
var lastY1 = ball_mc._y;
var lastX2 = ball_mc._x;
var lastY2 = ball_mc._y;
var lastX3 = ball_mc._x;
var lastY3 = ball_mc._y;
var lastX4 = ball_mc._x;
var lastY4 = ball_mc._y;
ball_mc.onEnterFrame = function () {
duplicate1 = this.duplicateMovieClip("trace1", 0, {_x:lastX2, _y:lastY2, _alpha:40});
duplicate2 = this.duplicateMovieClip("trace2", 1, {_x:lastX4, _y:lastY4, _alpha:20});
vectorX = Math.abs(this._x - lastX1);
vectorY = Math.abs(this._y - lastY1);
velocity = Math.sqrt(Math.pow(vectorX, 2) + Math.pow(vectorY, 2));
lastX4 = lastX3;
lastY4 = lastY3;
lastX3 = lastX2;
lastY3 = lastY2;
lastX2 = lastX1;
lastY2 = lastY1;
lastX1 = this._x;
lastY1 = this._y;
};
Instance of Symbol 1152 MovieClip "spring2" in Symbol 1163 MovieClip Frame 1
on (press) {
play();
}
Symbol 1163 MovieClip Frame 45
spring1.play();
Symbol 1163 MovieClip Frame 65
rubber1.play();
Symbol 1163 MovieClip Frame 81
spring2.play();
Symbol 1163 MovieClip Frame 160
trace1._alpha = 0;
trace2._alpha = 0;
Symbol 1167 MovieClip Frame 1
stop();
Symbol 1167 MovieClip Frame 7
stop();
Symbol 1175 MovieClip Frame 1
slopeguide._visible = false;
Symbol 1176 MovieClip Frame 1
guide._visible = false;
Symbol 1176 MovieClip Frame 15
stop();
Symbol 1178 MovieClip Frame 1
guide._visible = false;
Symbol 1178 MovieClip Frame 15
stop();
Symbol 1179 MovieClip Frame 1
guide._visible = false;
Symbol 1179 MovieClip Frame 15
stop();
Symbol 1180 MovieClip Frame 1
guide._visible = false;
Symbol 1180 MovieClip Frame 15
stop();
Symbol 1181 MovieClip Frame 1
guide._visible = false;
Symbol 1181 MovieClip Frame 15
stop();
Symbol 1182 MovieClip Frame 1
guide._visible = false;
Symbol 1182 MovieClip Frame 15
stop();
Symbol 1184 MovieClip Frame 30
stop();
Symbol 1189 MovieClip Frame 1
stop();
Symbol 1189 MovieClip Frame 7
stop();