Monday, February 9, 2009

//Action tag #0

function bodyTypesLoaded(bodyTypes, restart)
{
selector = this.attachMovie("bodyTypePicker", "selector", 1);
selector.init(bodyTypes, restart);
selector._alpha = 0;
selector._x = Stage.width / 2;
selector._y = 300;
}
function beginGetInta(bodyTypes)
{
myBodyTypes = bodyTypes;
spiderman._y = spiderman._y - 40;
spiderman.slideTo("0", spiderman._y + 40, time * 2, ease2, delay);
spiderman.lineMask.slideTo("0", spiderman.outline._y, time, ease1, delay);
delay = delay + time;
spiderman.whiteMask.slideTo("0", spiderman.whiteFill._y, time, ease1, delay);
delay = delay + time;
spiderman.whiteFill.fadeOut(time, ease1, delay);
delay = delay + time;
spiderman.outline.fadeOut(time, ease1, delay);
spiderman.colorFill.fadeIn(time, ease1, delay);
delay = delay - time * 1.5;
if (moveIn)
{
ironman._x = ironman._x - outerOS;
ironman.slideTo(ironman._x + outerOS, "0", time * 2, ease2, delay);
}
ironman.lineMask.slideTo("0", ironman.outline._y, time, ease1, delay);
delay = delay + time;
ironman.whiteMask.slideTo("0", ironman.whiteFill._y, time, ease1, delay);
delay = delay + time;
ironman.whiteFill.fadeOut(time, ease1, delay);
delay = delay + time;
ironman.outline.fadeOut(time, ease1, delay);
ironman.colorFill.fadeIn(time, ease1, delay);
delay = delay - time * 1.5;
if (moveIn)
{
hulk._x = hulk._x + outerOS;
hulk.slideTo(hulk._x - outerOS, "0", time * 2, ease2, delay);
}
hulk.lineMask.slideTo("0", hulk.outline._y, time, ease1, delay);
delay = delay + time;
hulk.whiteMask.slideTo("0", hulk.whiteFill._y, time, ease1, delay);
delay = delay + time;
hulk.whiteFill.fadeOut(time, ease1, delay);
delay = delay + time;
hulk.outline.fadeOut(time, ease1, delay);
hulk.colorFill.fadeIn(time, ease1, delay);
delay = delay - time * 1.5;
if (moveIn)
{
wolverine._x = wolverine._x - innerOS;
wolverine.slideTo(wolverine._x + innerOS, "0", time * 2, ease2, delay);
}
wolverine.lineMask.slideTo("0", wolverine.outline._y - 5, time, ease1, delay);
delay = delay + time;
wolverine.whiteMask.slideTo("0", wolverine.whiteFill._y - 5, time, ease1, delay);
delay = delay + time;
wolverine.whiteFill.fadeOut(time, ease1, delay);
delay = delay + time;
wolverine.outline.fadeOut(time, ease1, delay);
wolverine.colorFill.fadeIn(time, ease1, delay);
delay = delay - time * 1.5;
if (moveIn)
{
sue._x = sue._x + innerOS;
sue.slideTo(sue._x - innerOS, "0", time * 2, ease2, delay);
}
sue.lineMask.slideTo("0", sue.outline._y, time, ease1, delay);
delay = delay + time;
sue.whiteMask.slideTo("0", sue.whiteFill._y, time, ease1, delay);
delay = delay + time;
sue.whiteFill.fadeOut(time, ease1, delay);
delay = delay + time;
sue.outline.fadeOut(time, ease1, delay);
sue.colorFill.fadeIn(time, ease1, delay);
delay = delay + time * 3;
time = time * 2;
beginButton._y = beginButton._y - 40;
beginButton.slideTo("0", beginButton._y + 40, time, ease2, delay);
beginButton.beginBG.fadeIn(time, ease1, delay);
delay = delay + time / 2;
beginButton.beginText.fadeIn(time, ease1, delay, setBeginButton);
}
function setBeginButton()
{
trace("=============== get outta");
beginButton.flash1X = beginButton.flash1._x;
beginButton.flash2X = beginButton.flash2._x;
beginButton.bMask.onPress = beginPress;
beginButton.bMask.onRollOver = beginOver;
beginButton.bMask.onRollOut = beginOut;
beginButton.bMask.onRelease = beginRelease;
beginButton.bMask.onReleaseOutside = beginOut;
}
function beginOver()
{
beginButton.flash1.slideTo(beginButton.flash2X, 0.25, "easeOutQuad");
beginButton.flash2.slideTo(beginButton.flash1X, 0.25, "easeOutQuad");
}
function beginOut()
{
beginButton.flash1.slideTo(beginButton.flash1X, 0.25, "easeOutQuad");
beginButton.flash2.slideTo(beginButton.flash2X, 0.25, "easeOutQuad");
beginButton.beginText.alphaTo(100, 0.25, "easeOutQuad");
}
function beginPress()
{
beginButton.beginText.alphaTo(200, 0.1, "easeOutQuad");
}
function beginRelease()
{
beginButton.beginText._alpha = 100;
beginGetOutta();
}
function beginGetOutta(info, reBuild)
{
sueCX = Stage.width / 2 - sue._width / 2;
wolverineCX = Stage.width / 2 - wolverine._width / 2;
ironmanCX = Stage.width / 2 - ironman._width / 2;
hulkCX = Stage.width / 2 - hulk._width / 2;
trace(sueCX + " = " + Stage.width / 2 + " - " + sue._width / 2);
time = 0.15;
delay = 0;
beginButton.fadeOut(time, ease3, delay);
beginButton.slideTo("0", beginButton._y - 40, time, ease4, delay);
delay = delay + time;
wolverine.colorFill.brightOffsetTo(100, time, ease4, delay);
wolverine.outline.swapDepths(wolverine.getNextHighestDepth());
wolverine.outline.fadeIn(time, ease1, delay);
delay = delay + 0.1;
sue.colorFill.brightOffsetTo(100, time, ease4, delay);
sue.outline.swapDepths(sue.getNextHighestDepth());
sue.outline.fadeIn(time, ease1, delay);
delay = delay + 0.1;
ironman.colorFill.brightOffsetTo(100, time, ease4, delay);
ironman.outline.swapDepths(ironman.getNextHighestDepth());
ironman.outline.fadeIn(time, ease1, delay);
delay = delay + 0.1;
hulk.colorFill.brightOffsetTo(100, time, ease4, delay);
hulk.outline.swapDepths(hulk.getNextHighestDepth());
hulk.outline.fadeIn(time, ease1, delay);
delay = delay + 0.1;
spiderman.colorFill.brightOffsetTo(100, time, ease4, delay);
spiderman.outline.swapDepths(spiderman.getNextHighestDepth());
spiderman.outline.fadeIn(time, ease1, delay);
delay = delay + time;
time = 0.25;
wolverine.slideTo(wolverineCX, "0", time, ease4, delay);
sue.slideTo(sueCX, "0", time, ease4, delay);
ironman.slideTo(ironmanCX, "0", time, ease4, delay);
hulk.slideTo(hulkCX, "0", time, ease4, delay);
delay = delay + time / 2;
hulk.fadeOut(time, ease1, delay);
ironman.fadeOut(time, ease1, delay);
sue.fadeOut(time, ease1, delay);
wolverine.fadeOut(time, ease1, delay);
spiderman.fadeOut(time, ease1, delay);
delay = delay - time / 2;
introComplete = true;
whiteBG._x = Stage.width / 2;
whiteBG._alpha = 0;
introComplete = true;
var __reg1 = new com.mosesSupposes.fuse.Fuse();
__reg1.push([{target: vRuleL, x: Stage.width / 2, seconds: 0.3, ease: ease3, delay: delay}, {target: vRuleR, x: Stage.width / 2, seconds: 0.3, ease: ease3, delay: delay}, {target: introMask, width: 1, x: Stage.width / 2, seconds: 0.3, ease: ease3, delay: delay, func: changeToSelector, args: [info, reBuild]}]);
__reg1.start();
}
function changeToSelector(info, reBuild)
{
whiteBG._alpha = 100;
if (!introComplete)
{
debug.trace("introComplete " + introComplete);
beginGetOutta(info, reBuild);
return;
}
if (reBuild)
{
var __reg2 = new com.mosesSupposes.fuse.Fuse();
__reg2.push({target: _root.selector, y: 0, alpha: 0, ease: "easeInBack", seconds: 0.5});
__reg2.push([{target: vRuleL, x: Stage.width / 2, seconds: 0.3, ease: ease3, delay: 0}, {target: vRuleR, x: Stage.width / 2, seconds: 0.3, ease: ease3, delay: 0}, {target: whiteBG, width: 0, x: Stage.width / 2, seconds: 0.3, ease: ease3, delay: 0, func: bodySelected, args: [info, reBuild]}]);
__reg2.start();
return;
}
__reg2 = new com.mosesSupposes.fuse.Fuse();
__reg2.push([{target: vRuleL, x: Stage.width / 2 - whiteW / 2, seconds: 0.3, ease: ease3, delay: 0}, {target: vRuleR, x: Stage.width / 2 + whiteW / 2, seconds: 0.3, ease: ease3, delay: 0}, {target: whiteBG, width: whiteW, x: Stage.width / 2 - whiteW / 2, seconds: 0.3, ease: ease3, delay: 0}]);
__reg2.push({target: selector, y: 200, alpha: 100, seconds: 0.3, ease: ease1, delay: 0});
__reg2.start();
}
function bodySelected(bodyInfo, reBuild)
{
var __reg6 = undefined;
if (reBuild)
{
debug.trace("rebuild with id " + bodyInfo.attributes.body_type_id);
heroData = new com.i33.marvel.HeroData(bodyInfo.attributes.body_type_id);
heroData.bodyId = bodyInfo.attributes.body_type_id;
heroData.heroId = bodyInfo.attributes.hero_id;
heroData.name = bodyInfo.attributes.name;
__reg6 = bodyInfo.attributes.body_type_id;
hero = _root.attachMovie("Hero", "hero", 7, heroData);
hero.rebuild(bodyInfo, true);
}
else
{
heroData = new com.i33.marvel.HeroData(bodyInfo);
__reg6 = bodyInfo;
hero = this.attachMovie("Hero", "hero", 7, heroData);
}
hero._alpha = 0;
hero._xscale = heroScale;
hero._yscale = heroScale;
hero._x = 385;
hero._y = 50;
var __reg5 = hero.createEmptyMovieClip("gradBox", hero.getNextHighestDepth());
var __reg12 = new com.i33.marvel.GradLine(__reg5, hero.outline._width, hero.outline._height);
__reg5._x = hero.outline._x;
__reg5._y = hero.outline._y;
__reg5.swapDepths(hero.color1);
__reg5.setMask(hero.color1);
var __reg7 = new com.mosesSupposes.fuse.Fuse();
__reg7.push({target: hero, Blur_blur: 0, _yscale: 130, ease: "easeInBack", seconds: 0});
__reg7.start(true);
com.mosesSupposes.fuse.FuseFMP.setFilterProps(hero.body, "Glow", {Glow_color: 16777215});
closeSelector(__reg6);
categories = new com.i33.marvel.AssetCategories(_global.host + "assets/" + __reg6 + ".xmlz");
}
function assetCategoriesLoaded(assetCategoriesArray)
{
assetMenu = this.attachMovie("menu", "assetMenu", 2);
assetMask = this.createEmptyMovieClip("assetMask", 3);
assetMask.beginFill(16711680);
assetMask.lineTo(110, 0);
assetMask.lineTo(110, 400);
assetMask.lineTo(0, 400);
assetMask._y = (Stage.height - assetMask._height) / 2;
assetMenu._x = 9;
assetMenu._y = 250;
assetMenu._alpha = 100;
debug.trace("categories loaded starting menu...");
assetMenu.assetCategoriesArray = assetCategoriesArray;
assetMenu.setMask(assetMask);
toolBar = attachMovie("toolButtons_MC", "toolBar", 9, {homeX: 970, homeY: 350, animDelay: 1.5});
toolBarListener.addListener(toolBar);
}
function closeSelector(id)
{
marginL = 110;
marginM = 385;
marginR = 950;
heroHomeX = 385;
hero._x = heroHomeX;
hero._y = heroHomeY;
com.mosesSupposes.fuse.ZigoEngine.doTween({target: selector, _y: 0, _alpha: 0, ease: "easeInBack", seconds: 0.5, func: createSmallHero, args: id});
}
function createSmallHero(b)
{
selector._y = 0 - selector._height;
smallHolder = _root.createEmptyMovieClip("smallHolder", 10);
smallHolder._alpha = 100;
smallHero = smallHolder.attachMovie("Hero", "smallHero", smallHolder.getNextHighestDepth());
startOver = smallHolder.attachMovie("startOver", "SO", smallHolder.getNextHighestDepth());
myMCL = new MovieClipLoader();
myMCL.onLoadInit = function (targ)
{
trace("@@@loaded small hero");
setSmallHero();
startOver._y = smallHolder._height + 5;
smallHeroHit = smallHolder.createEmptyMovieClip("smallHit", smallHolder.getNextHighestDepth());
smallHeroHit._alpha = 0;
smallHeroHit.moveTo(0, 0);
smallHeroHit.beginFill(16711680);
smallHeroHit.lineTo(110, 0);
smallHeroHit.lineTo(110, smallHolder._height);
smallHeroHit.lineTo(0, smallHolder._height);
}
;
myMCL.addListener(this);
trace("loading " + _global.host + "bodyTypes/" + b + ".swf");
myMCL.loadClip(_global.host + "bodyTypes/" + b + ".swf", smallHero);
heroTransitionIn();
}
function setSmallHero()
{
function smallRollOver()
{
smallHolder.smallHero.color2.filters = smallFilters;
startOver.startText.colorTo(276874, 0);
}
trace("setting small hero " + smallHero);
smallHero._xscale = 20;
smallHero._yscale = 20;
smallHero._x = 0;
smallHero._y = 0;
smallColor = new Color(smallHero.color1);
smallColor.setRGB(15921906);
smallFilters = new Array();
glow = new flash.filters.GlowFilter(16777215, 0.9, 3, 3, 5, 3, false, false);
dropShadow = new flash.filters.DropShadowFilter(0, 0, 0, 0.8, 6, 6, 0.8, 3, false, false, false);
smallFilters.push(glow, dropShadow);
smallHolder.onRollOver = mx.utils.Delegate.create(this, smallRollOver);
smallHolder.onRollOut = smallHolder.onDragOut = function ()
{
this.smallHero.color2.filters = null;
startOver.startText.colorTo(10066329, 0);
}
;
smallHolder.onPress = function ()
{
_global.rebuild = false;
showMessageWindow("You will lose all changes made since last save.", true, restart);
}
;
}
function heroTransitionIn()
{
duplicateMovieClip(vRuleL, "vRuleM", 16384);
vRuleM._alpha = 0;
var __reg1 = new com.mosesSupposes.fuse.Fuse();
__reg1.push([{target: vRuleL, x: marginL, seconds: 0.2, ease: "easeInBack"}, {target: vRuleR, x: marginR, seconds: 0.2, ease: "easeInBack"}, {target: whiteBG, x: marginL, _alpha: 100, _width: marginR - marginL, seconds: 0.2, ease: "easeInBack"}]);
__reg1.push({target: smallHolder, alpha: 100, ease: "easeInBack", seconds: 0.2});
__reg1.push({target: hero, Blur_blur: 0, alpha: 100, _yscale: heroScale, ease: "easeInBack", seconds: 0.5});
__reg1.push({target: hero.body, Glow_color: 3753306, Glow_alpha: 0.2, Glow_blurX: 20, Glow_blurY: 20, Glow_strength: 2, time: 0.3, ease: "easeInQuad", func: changeToBuilder});
__reg1.start();
}
function changeToBuilder()
{
cursor = _root.attachMovie("mouseCursor", "cursor", 100);
var __reg11 = _root.attachMovie("panelReveal", "panelReveal", 5, {_x: marginL + 3, _y: 180, _alpha: 0});
var __reg4 = _root.attachMovie("NameYourCharacterBox_MC", "nameBox", 6, {_x: marginL + 3, _y: 250, _alpha: 0});
var __reg2 = _root.attachMovie("colorWindow", "colorBox", 8, {_x: marginL + 3, _y: 250, _alpha: 0});
var __reg5 = __reg2.attachMovie("ToolBar", "tools", __reg2.getNextHighestDepth());
__reg5._x = __reg2._width + 7;
var __reg3 = new com.mosesSupposes.fuse.Fuse();
__reg3.push({target: vRuleM, x: 385, alpha: 100, ease: "easeInBack", seconds: 0.3});
__reg3.push([{target: __reg4, y: 50, _alpha: 100, ease: "easeInOutExpo", seconds: 0.75}, {target: __reg2, y: 539, _alpha: 50, ease: "easeInOutExpo", seconds: 0.75, func: checkRebuild}]);
__reg3.start();
assetMenu.buildMenu();
}
function checkRebuild()
{
if (_global.rebuild)
{
_root.colorBox.tools.enableTools();
}
}
function startUp()
{
_root.loadBodyTypes = new com.i33.marvel.LoadBodyTypes();
}
function openMyCharacters()
{
debug.trace("openMyCharacters");
characterWindow = this.attachMovie("MyCharacterWindow_MC", "characterWindow", 16);
characterWindow.createGallery();
debug.trace("MyCharacterWindow_MC pressed");
popupIn();
}
function showMessageWindow(message, cnclBtn, cbk)
{
debug.trace("showMessageWindow");
messageWindow = this.attachMovie("messageWindow", "messageWindow", 16);
messageWindow.text = message;
messageWindow.cbk = cbk;
if (cnclBtn)
{
messageWindow.addCncl();
}
popupIn();
}
function popupIn()
{
showWhiteOut = true;
whiteOut = _root.attachMovie("whiteBox", "whiteOut", 15);
whiteOut._alpha = 0;
com.mosesSupposes.fuse.ZigoEngine.doTween({target: whiteOut, _alpha: 80, seconds: 0.25, ease: "easeOutQuad"});
whiteOut._width = Stage.width;
whiteOut._height = Stage.height;
whiteOut.useHandCursor = false;
whiteOut.onPress = function ()
{
}
;
}
function popupOut(doCallback)
{
trace("removing popup");
var __reg2 = new Object();
if (doCallback)
{
__reg2.func = popupOutOver;
_global.toolbarCallback.call(_global.toolbarScope, true);
return;
}
com.mosesSupposes.fuse.ZigoEngine.doTween({target: whiteOut, _alpha: 0, seconds: 0.25, ease: "easeOutQuad"});
delete whiteOut.onPress;
showWhiteOut = false;
}
function popupOutOver()
{
trace("popup over");
delete whiteOut.onPress;
_global.toolbarCallback = null;
_global.toolbarScope = null;
}
function maskAndLoad(a)
{
panelReveal.spinner.startAnim();
if (_root.hero.name == undefined)
{
_root.nameBox.heroname = _global.heroName;
debug.trace("_root.hero.name == undefined " + _global.heroName);
}
else
{
_root.nameBox.heroName = _root.hero.name;
}
com.mosesSupposes.fuse.ZigoEngine.doTween({target: panelReveal, _alpha: 100, seconds: 0.5, ease: "easeInQuad", delay: 0, func: fillBank, args: [a]});
}
function fillBank(a)
{
_root.bank.removeMovieClip();
var __reg2 = _root.attachMovie("assetPanel", "bank", 4);
__reg2._x = 113;
__reg2._y = 189;
__reg2.init(a);
}
function revealBank()
{
panelReveal.spinner.stopAnim();
panelReveal.alphaTo(0, 0.5);
}
function openRegisterWindow()
{
debug.trace("register");
register = _root.attachMovie("RegisterWindow_MC", "register", 16);
popupIn();
}
function renameWindow(buttonText)
{
debug.trace("_global.defaultName :" + _global.defaultName);
if (_root.nameBox.heroName == _global.defaultName || _root.nameBox.heroName == "")
{
popupIn();
this.attachMovie("SaveHero_MC", "nameHero", 16, {action: buttonText});
return;
}
_global.toolbarCallback.call(_global.toolbarScope);
}
function sendToAFriend()
{
debug.trace("main - send to a friend");
this.attachMovie("SendToFriend_MC", "sendToAFriend", 16);
popupIn();
}
function printHero(reDirect)
{
if (!reDirect)
{
popupIn();
}
printFrame = _root.attachMovie("printFrame", "printFrame", 16, {printing: true});
printFrame._alpha = 0;
com.mosesSupposes.fuse.ZigoEngine.doTween({target: printFrame, alpha: 100, seconds: 0.3, delay: 1});
com.i33.util.Positions.centerOnStage(printFrame);
hero.copyHero(printFrame, 400);
}
function publish(heroXML)
{
trace("publish in main called");
popupIn();
_root.publishFrame = _root.attachMovie("publishFrame", "publishFrame", 16, {_x: 1000});
_root.publishFrame.publishHero = _root.publishFrame.attachMovie("Hero", "publishHero", 10, {publishing: true});
_root.publishFrame.publishHero.rebuildInFrame(heroXML, _root.publishFrame, 700);
}
function downloadHero()
{
popupIn();
com.i33.util.Positions.centerOnStage(printFrame);
printFrame = _root.attachMovie("downloadFrame", "printFrame", 16, {printing: false});
hero.copyHero(printFrame, 475);
printFrame.heroCopy.addEventListener("heroComplete", heroComplete);
}
function heroComplete()
{
debug.trace("I see that your hero is complete");
_root.printFrame.heroCopy._y = _root.printFrame.heroCopy._y + 25;
}
function restart(info, reBuild)
{
trace("+====== restarting");
com.i33.util.MovieClipUtils.remove(panelReveal);
nf = new com.mosesSupposes.fuse.Fuse();
nf.push({target: hero, alpha: 0, seconds: 0.2, delay: 0.5});
nf.push({target: assetMenu, alpha: 0, seconds: 0.2});
nf.push({target: toolBar, alpha: 0, seconds: 0.2});
nf.push({target: bank, alpha: 0, seconds: 0.2});
nf.push({target: smallHolder, alpha: 0, seconds: 0.2});
nf.push([{target: nameBox, y: 250, alpha: 0, ease: "easeInOutExpo", seconds: 0.5}, {target: colorBox, y: 250, alpha: 0, ease: "easeInOutExpo", seconds: 0.5, func: clearItems, args: [info, reBuild]}]);
nf.push({target: vRuleM, x: 110, alpha: 0, seconds: 0.2});
nf.start();
}
function clearItems(info, reBuild)
{
trace("+====== clearing");
Mouse.show();
_global.heroName = _gloabl.defaultName;
com.i33.util.MovieClipUtils.remove(cursor);
com.i33.util.MovieClipUtils.remove(hero);
com.i33.util.MovieClipUtils.remove(assetMenu);
com.i33.util.MovieClipUtils.remove(assetMask);
com.i33.util.MovieClipUtils.remove(bank);
com.i33.util.MovieClipUtils.remove(nameBox);
com.i33.util.MovieClipUtils.remove(toolBar);
com.i33.util.MovieClipUtils.remove(colorBox);
com.i33.util.MovieClipUtils.remove(smallHolder);
_root.changeToSelector(info, reBuild);
}
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseItem, com.mosesSupposes.fuse.Fuse);
this._lockroot = true;
var debug = new com.i33.util.debug("cyos");
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseItem, com.mosesSupposes.fuse.Fuse);
var time = 0.15;
var delay = 1;
var introComplete = false;
ease1 = "easeOutQuad";
ease2 = "easeOutBack";
ease3 = "easeInQuad";
ease4 = "easeInBack";
ease5 = "easeInQuint";
whiteW = 546;
moveIn = true;
innerOS = 10;
outerOS = 20;
mainBG._alpha = 0;
mainBG.fadeIn(time * 3, ease1, delay / 2);
myBodyTypes;
_focusrect = false;
_global.rebuild = false;
MovieClip.prototype.useHandCursor = Button.prototype.useHandCursor = false;
_global.userTest = false;
_global.noHost = false;
_global.sampleColor = 13209;
_global.toolbarCallback;
_global.toolbarScope;
_global.assetAction = "paint";
var heroScale = 75;
if (_level0.FVhost != undefined)
{
_global.host = _level0.FVhost;
}
if (_root._url.indexOf("file") >= 0)
{
_global.host = "http://192.168.100.106/wasabi/";
}
if (_root._url.indexOf("marvel-dev") >= 0)
{
if (_root._url.indexOf("net") > 0)
{
_global.host = "http://marvel-dev.i33.net/";
}
else
{
_global.host = "http://marvel-dev.i33.com/";
}
}
debug.trace("running with \n" + _global.host);
if (_level0.FVnoHost == "true")
{
_global.noHost = true;
}
if (_level0.FVuserId == undefined)
{
_global.userId = 0;
}
else
{
_global.userId = _level0.FVuserId;
}
if (_level0.FVmemberName == undefined)
{
_global.memberName = "";
}
else
{
_global.memberName = _level0.FVmemberName;
}
debugText._visible = false;
if (_level0.debugWindow == "true")
{
_global.showWhatInWindow = new Array("Hero", "cyos", "Login", "RegisterWindow");
_root.debugText._visible = true;
_root.debugText.text = _root.debugText.text + ("_level0.debugWindow = " + _level0.debugWindow);
_root.debugText.text = _root.debugText.text + ("\nhost = " + _global.host);
_root.debugText.text = _root.debugText.text + ("\n_level0.FVnoHost = " + _level0.FVnoHost);
_root.debugText.text = _root.debugText.text + ("\nnoHost = " + _global.noHost);
_root.debugText.text = _root.debugText.text + ("\n_level0.FVuserTest = " + _level0.FVuserTest);
_root.debugText.text = _root.debugText.text + ("\nuserTest = " + _global.userTest);
_root.debugText.text = _root.debugText.text + ("\nuserId = " + _level0.userId);
_root.debugText.text = _root.debugText.text + ("\nusername = " + _level0.username);
_root.debugText.text = _root.debugText.text + ("\n_global.userId = " + _global.userId);
_root.debugText.text = _root.debugText.text + ("\n_global.memberName = " + _global.memberName);
}
var categories;
_global.characterArray;
_global.heroName = _global.defaultName;
var login = this.attachMovie("login", "login", 14, {x: 100, y: 100});
debug.trace("loaded login " + login);
_global.listenForEnter = false;
keyListener = new Object();
keyListener.onKeyDown = function ()
{
if (Key.isDown(13))
{
debug.trace("pressed enter");
if (_global.listenForEnter)
{
login.authenticate();
}
}
}
;
Key.addListener(keyListener);
startUp();

No comments:

Post a Comment