Frame 1
function onConfigLoaded(listUrl) {
if (listUrl == Disney.styleUrl) {
_global.Loader.loadList(Disney.layoutUrl);
return(undefined);
}
if (listUrl == Disney.layoutUrl) {
_global.Loader.removeListener(this);
delete onConfigLoaded;
return(undefined);
}
}
function init() {
var _local1 = _global;
Stage.scaleMode = "noScale";
Stage.align = "TL";
_focusrect = false;
System.security.allowDomain("http://disney.go.com");
System.security.allowDomain("http://www.disney.go.com");
System.security.allowDomain("http://psc.disney.go.com");
System.security.allowDomain("http://smashingideas.com");
System.security.allowDomain("http://anvil.smashingideas.com");
System.security.allowDomain("http://intern.smashingideas.com");
System.security.allowDomain("http://robo.smashingideas.com");
System.security.allowDomain("http://dev.smashingideas.com");
System.security.allowDomain("log.go.com", "adimages.go.com", "adimages.disney.go.com");
Object.registerClass("com.tokenzone.User", com.tokenzone.User);
Object.registerClass("com.tokenzone.Offer", com.tokenzone.Offer);
Object.registerClass("com.tokenzone.Token", com.tokenzone.Token);
Object.registerClass("com.tokenzone.TokenSetStatus", com.tokenzone.TokenSetStatus);
_local1.LOWEST_DEPTH = -16384;
_local1.$swfVersion = 6;
if (_local1.Disney == undefined) {
_local1.Disney = {};
}
Disney.layoutUrl = (((_level0.layoutUrl != null) && (_level0.layoutUrl != "")) ? (_level0.layoutUrl) : "index.xml");
if ((_level0.styleUrl != null) && (_level0.styleUrl != "")) {
Disney.styleUrl = _level0.styleUrl;
}
if (_local1.globalStyleFormat == undefined) {
_local1.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_local1._focusControl = {};
_local1._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_local1._focusControl);
}
if (gContents_mc == null) {
gContents_mc = createEmptyMovieClip("gContents_mc", 100);
gContents_mc.nLevel = 0;
}
_local1.FrameTick = this.FrameTick;
var _local2 = (_local1.Loader = new SI.MovieLoader(gContents_mc));
_local2.addListener(this);
if (Disney.styleUrl != null) {
_local2.loadList(Disney.styleUrl);
} else {
_local2.loadList(Disney.layoutUrl);
}
_local1.EventBroadcaster = SI.EventBroadcaster;
delete init;
}
_global.traceDebug = function (trace_str) {
var _local1 = new LocalConnection();
_local1.send("_SILCtrace", "trace", trace_str);
_local1.close();
trace(trace_str);
};
init();
Symbol 3 MovieClip [ContentSpaceSymbol] Frame 1
#initclip 11
ContentSpaceClass = function () {
this._visible = false;
};
ContentSpaceClass.prototype = new MovieClip();
Object.registerClass("ContentSpaceSymbol", ContentSpaceClass);
#endinitclip
Symbol 4 MovieClip [SI.FrameTick] Frame 1
#initclip 10
Object.registerClass("SI.FrameTick", SI.FrameTick);
#endinitclip
Symbol 5 MovieClip [__Packages.com.tokenzone.TokenSetStatus] Frame 0
class com.tokenzone.TokenSetStatus
{
function TokenSetStatus () {
}
}
Symbol 6 MovieClip [__Packages.com.tokenzone.Token] Frame 0
class com.tokenzone.Token
{
var id, name, qty;
function Token () {
}
function getId() {
return(id);
}
function getNname() {
return(name);
}
function getQty() {
return(qty);
}
function setId(id) {
this.id = id;
}
function setName(name) {
this.name = name;
}
function setQty(qty) {
this.qty = qty;
}
}
Symbol 7 MovieClip [__Packages.SI.EventBroadcaster] Frame 0
class SI.EventBroadcaster
{
static var __instance;
var _listeners;
function EventBroadcaster () {
}
static function initialize(obj) {
var _local1 = obj;
if (!__classInitialized) {
__initClass();
}
_local1._listeners = [];
_local1.broadcastMessage = __instance.broadcastMessage;
_local1.addListener = __instance.addListener;
_local1.removeListener = __instance.removeListener;
}
function broadcastMessage() {
var eventName = arguments.shift();
var _local2 = _listeners;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1][eventName].apply(_local2[_local1], arguments);
_local1++;
}
}
function addListener(obj) {
removeListener(obj);
_listeners.push(obj);
return(true);
}
function removeListener(obj) {
var _local3 = obj;
var _local2 = _listeners;
var _local1 = _local2.length;
while (_local1--) {
if (_local2[_local1] == _local3) {
_local2.splice(_local1, 1);
return(true);
}
}
return(false);
}
static function __initClass() {
__instance = new SI.EventBroadcaster();
__classInitialized = true;
}
static var __classInitialized = false;
}
Symbol 8 MovieClip [__Packages.SI.MovieLoader] Frame 0
class SI.MovieLoader
{
var __contents, pq, curPriority, curFile, broadcastMessage, oLoadWatch;
function MovieLoader (contents_mc) {
var _local1 = this;
if (!__classInitialized) {
__initClass();
}
_local1.bConfigLoaded = false;
_local1.resetQueue();
_local1.__set__contents(contents_mc);
}
function resetQueue() {
var _local1 = this;
_local1.bLoadDone = false;
if (_local1.bLoading) {
delete _local1.curFile;
delete _local1.curPriority;
_global.FrameTick.removeListener(_local1.oLoadWatch);
delete _local1.oLoadWatch;
}
_local1.bLoading = false;
_local1.pq = new SI.PQueue();
_local1.oFileMap = {};
_local1.resetProgress();
}
function set contents(mc) {
__contents = mc;
//return(contents);
}
function get contents() {
return(__contents);
}
function loadList(listUrl) {
var _local2 = this;
_local2.listUrl_str = listUrl;
var xmlController = _local2;
var _local1 = new XML();
_local1.ignoreWhite = true;
_local1.onLoad = function (bSuccess) {
if (bSuccess) {
xmlController.onLoadList(this.firstChild);
} else {
_global.traceDebug(((("Loader: load xml failed: " + listUrl) + newline) + "xml status: ") + this.status);
var _local1 = new LoadVars();
_local1.onData = function (rawData) {
_global.traceDebug("dumping URL\r" + rawData);
};
_local1.load(listUrl);
}
};
_local1.load(listUrl);
}
function addItem(item, priority) {
var _local1 = this;
var _local2 = item.target;
_local1.removeItem(_local2);
var _local3 = _local1.pq.insert(item, priority);
_local1.oFileMap[_local2] = _local3;
if (priority != Number.MAX_VALUE) {
_local1.nRequiredTotal++;
}
if (_local1.bConfigLoaded && (!_local1.bLoading)) {
_local1.loadNext();
}
}
function removeItem(target) {
var _local2 = this;
var _local1 = _local2.oFileMap[target];
if (_local1 == null) {
} else {
if (_local2.pq.isQueued(_local1)) {
var _local3 = _local2.pq.getPriority(_local1);
if (_local3 != Number.MAX_VALUE) {
_local2.nRequiredTotal--;
}
_local2.pq.remove(_local1);
}
delete _local2.oFileMap[target];
}
}
function resetProgress() {
nRequiredTotal = 0;
nRequiredLoaded = 0;
}
function loadNext() {
if (pq.isEmpty()) {
loadDone();
return(undefined);
}
curPriority = pq.getTop();
curFile = pq.removeTop();
var targetClip;
if ((curFile.target == null) || (eval (String(curFile.target)) == null)) {
targetClip = __contents.createEmptyMovieClip("clip" + __contents.nLevel, __contents.nLevel);
__contents.nLevel++;
} else if (typeof(curFile.target) == "movieclip") {
targetClip = curFile.target;
} else {
targetClip = eval (String(curFile.target));
}
curFile.clip = targetClip;
if (curFile.loadOnce.toLowerCase() == "true") {
if ((targetClip.getBytesLoaded() > 50) && (targetClip.getBytesLoaded() == targetClip.getBytesTotal())) {
initClip();
if (curPriority != Number.MAX_VALUE) {
nRequiredLoaded++;
}
loadNext();
return(undefined);
}
}
broadcastMessage("onLoadNext", {src:curFile.src, target:curFile.target});
targetClip.loadMovie(curFile.src);
bLoading = true;
oLoadWatch = {};
var controller = this;
oLoadWatch.onEnterFrame = function () {
var _local1 = targetClip.getBytesLoaded();
if ((((_local1 > 10) && (targetClip._totalframes > 0)) && (targetClip._currentframe > 0)) && (targetClip._framesloaded > 0)) {
controller.onLoading(_local1, targetClip.getBytesTotal());
}
};
_global.FrameTick.addListener(oLoadWatch);
}
function onLoading(nBytesLoaded, nBytesTotal) {
var _local1 = this;
_local1.broadcastProgress(nBytesLoaded / nBytesTotal);
if (nBytesLoaded == nBytesTotal) {
_local1.waitFrame++;
if (_local1.waitFrame < 2) {
} else {
_local1.waitFrame = 0;
_global.FrameTick.removeListener(_local1.oLoadWatch);
delete _local1.oLoadWatch;
_local1.initClip();
if (_local1.curPriority != Number.MAX_VALUE) {
_local1.nRequiredLoaded++;
}
_local1.loadNext();
}
}
}
function initClip() {
var _local1 = this;
var _local2 = _local1.curFile.clip;
if (_local2.onClipLoaded != null) {
_local2.onClipLoaded(_local1.curFile);
} else {
for (var _local3 in _local1.curFile) {
_local2[_local3] = _local1.curFile[_local3];
}
}
}
function broadcastProgress(nCurrentRatio) {
var _local1 = this;
var _local2 = (_local1.nRequiredLoaded + nCurrentRatio) / _local1.nRequiredTotal;
var _local3 = {nCurrentRatio:nCurrentRatio, nRequiredRatio:_local2, nRequiredLoaded:_local1.nRequiredLoaded, nRequiredTotal:_local1.nRequiredTotal, attributes:_local1.curFile};
_local1.broadcastMessage("onLoadProgress", _local3);
}
function loadDone() {
var _local1 = this;
delete _local1.curFile;
delete _local1.curPriority;
_local1.bLoading = false;
_local1.bLoadDone = true;
_local1.broadcastMessage("onLoadDone");
}
function onLoadList(node_xml) {
var _local3 = this;
if (node_xml.nodeName.toLowerCase() != "site") {
} else {
_local3.siteElements = [];
var aNodes = node_xml.childNodes;
var cNodes = aNodes.length;
var node;
var name;
var _local2;
var _local1 = 0;
while (_local1 < cNodes) {
node = aNodes[_local1];
name = node.nodeName.toLowerCase();
_local2 = _local3["convert" + name];
if ((_local2 != null) && (typeof(_local2) == "function")) {
_local3.siteElements.push({node:node, method:_local2});
}
_local1++;
}
_global.FrameTick.addListener(_local3);
_local3.convertNextElement();
}
}
function convertNextElement() {
var _local1 = this;
if (_local1.siteElements.length == 0) {
_local1.onConvertDone();
}
delete _local1.onEnterFrame;
var _local2 = _local1.siteElements.shift();
_local1.curSiteNode = _local2.node;
_local2.method.apply(_local1);
}
function onConvertDone() {
var _local1 = this;
delete _local1.onEnterFrame;
delete _local1.siteElements;
delete _local1.curSiteNode;
delete _local1.aList;
delete _local1.cList;
delete _local1.iList;
delete _local1.bConverted;
_global.FrameTick.removeListener(_local1);
_local1.bConfigLoaded = true;
_local1.broadcastMessage("onConfigLoaded", _local1.listUrl_str);
delete _local1.listUrl_str;
if (!_local1.bLoading) {
_local1.loadNext();
}
}
function convertfiles() {
var _local1 = this;
_local1.bConverted = false;
_local1.aList = _local1.curSiteNode.childNodes;
_local1.cList = _local1.aList.length;
_local1.iList = 0;
if (_local1.cList > 0) {
_local1.onEnterFrame = _local1.onConvertFiles;
} else {
_local1.convertNextElement();
}
}
function onConvertFiles() {
var _local1 = this;
var nEndTime = (getTimer() + 100);
var curNode;
var _local2;
var _local3;
var nPriority;
while ((getTimer() < nEndTime) && (!_local1.bConverted)) {
curNode = _local1.aList[_local1.iList];
if (curNode.nodeName.toLowerCase() == FILE_NODE_NAME) {
_local2 = {};
for (_local3 in curNode.attributes) {
_local2[_local3] = curNode.attributes[_local3];
}
if ((_local2.priority != null) && (!isNaN(_local2.priority))) {
nPriority = Number(_local2.priority);
} else if (_local2.priority.toLowerCase() == REQUIRED) {
nPriority = REQUIRED_VALUE;
} else {
nPriority = Number.MAX_VALUE;
}
_local1.addItem(_local2, nPriority);
}
_local1.iList++;
if (_local1.iList >= _local1.cList) {
_local1.bConverted = true;
break;
}
}
if (_local1.bConverted) {
_local1.convertNextElement();
}
}
function convertstyles() {
var _local1 = this;
_local1.bConverted = false;
_local1.aList = _local1.curSiteNode.childNodes;
_local1.cList = _local1.aList.length;
_local1.iList = 0;
if (_local1.cList > 0) {
_local1.onEnterFrame = _local1.onConvertStyles;
} else {
_local1.convertNextElement();
}
}
function onConvertStyles() {
var _local3 = this;
var nEndTime = (getTimer() + 100);
var _local2;
var attrib;
var nPriority;
var cur_style;
var style_name;
var _local1;
if (_global.styles == null) {
_global.styles = {};
}
var styles = _global.styles;
while ((getTimer() < nEndTime) && (!_local3.bConverted)) {
_local2 = _local3.aList[_local3.iList];
if (_local2.nodeName.toLowerCase() == STYLE_NODE_NAME) {
style_name = _local2.attributes.name;
if (_global[style_name] != null) {
cur_style = _global[style_name];
} else {
if (styles[style_name] == null) {
styles[style_name] = new _global.FStyleFormat();
}
cur_style = styles[style_name];
}
delete _local2.attributes.name;
for (attrib in _local2.attributes) {
_local1 = _local2.attributes[attrib];
if (!isNaN(_local1)) {
_local1 = Number(_local1);
} else if (_local1.indexOf("#") == 0) {
_local1 = Number("0x" + _local1.substr(1));
} else if (_local1.toLowerCase() == "true") {
_local1 = true;
} else if (_local1.toLowerCase() == "false") {
_local1 = false;
}
cur_style[attrib] = _local1;
}
}
_local3.iList++;
if (_local3.iList >= _local3.cList) {
_local3.bConverted = true;
break;
}
}
if (_local3.bConverted) {
_local3.convertNextElement();
}
}
static function __initClass() {
SI.EventBroadcaster.initialize(SI.MovieLoader.prototype);
__classInitialized = true;
}
var bConfigLoaded = false;
var bLoadDone = false;
var bLoading = false;
var nRequiredTotal = 0;
var nRequiredLoaded = 0;
var waitFrame = 0;
static var REQUIRED = "required";
static var REQUIRED_VALUE = 1;
static var FILE_NODE_NAME = "file";
static var STYLE_NODE_NAME = "style";
static var __classInitialized = false;
var bConverted = false;
}
Symbol 9 MovieClip [__Packages.SI.PQueue] Frame 0
class SI.PQueue
{
var heap, idInc, map;
function PQueue () {
var _local1 = this;
_local1.heap = [];
_local1.map = {};
_local1.idInc = 0;
}
function insert(obj, priority) {
if (priority == null) {
priority = Number.MAX_VALUE;
}
var _local3 = heap.length;
var _local1 = new Object();
var _local2 = idInc++;
_local1.priority = priority;
_local1.data = obj;
_local1.id = _local2;
_local1.pos = _local3;
map[_local2] = _local1;
heap[_local3] = _local1;
$filterUp(_local3);
return(_local2);
}
function getTop() {
return(heap[0].priority);
}
function removeTop() {
var _local1 = this;
if (_local1.heap.length > 0) {
var _local2 = _local1.heap[0].data;
delete _local1.map[_local1.heap[0].id];
delete _local1.heap[0];
_local1.heap[0] = _local1.heap[_local1.heap.length - 1];
_local1.heap[0].pos = 0;
_local1.heap.splice(_local1.heap.length - 1, 1);
_local1.$filterDown(0);
return(_local2);
}
return(false);
}
function setPriority(id, value) {
var _local1 = map[id];
var _local2 = _local1.pos;
var _local3 = _local1.priority;
_local1.priority = value;
if (_local3 > _local1.priority) {
$filterUp(_local2);
} else {
$filterDown(_local2);
}
}
function getPriority(id) {
return(map[id].priority);
}
function isEmpty() {
return(heap.length == 0);
}
function getTopPriority() {
return(heap[0].priority);
}
function isQueued(id) {
return(map[id] != null);
}
function remove(id) {
var _local1 = this;
var _local3 = id;
if (_local1.isQueued(_local3)) {
var _local2 = _local1.map[_local3].pos;
delete _local1.map[_local3];
delete _local1.heap[_local2];
_local1.heap[_local2] = _local1.heap[_local1.heap.length - 1];
_local1.heap[0].pos = 0;
_local1.heap.splice(_local1.heap.length - 1, 1);
return(true);
}
return(false);
}
function $filterUp(index) {
var _local2 = this;
var _local1 = index;
while ((_local1 > 0) && (_local2.heap[int((_local1 - 1) / 2)].priority > _local2.heap[_local1].priority)) {
var _local3 = int((_local1 - 1) / 2);
var temp = _local2.heap[_local1];
_local2.heap[_local1] = _local2.heap[_local3];
_local2.heap[_local3] = temp;
_local2.heap[_local1].pos = _local1;
_local2.heap[_local3].pos = _local3;
_local1 = _local3;
}
}
function $filterDown(i) {
var _local1 = this;
var _local3 = i;
var left;
var right;
var _local2;
if (_local3 < ((_local1.heap.length - 1) / 2)) {
left = (2 * _local3) + 1;
right = (2 * _local3) + 2;
if (right >= _local1.heap.length) {
_local2 = left;
right = left;
} else if (_local1.heap[left].priority < _local1.heap[right].priority) {
_local2 = left;
} else if (_local1.heap[left].priority == _local1.heap[right].priority) {
if (_local1.heap[left].id < _local1.heap[right].id) {
_local2 = left;
} else {
_local2 = right;
}
} else {
_local2 = right;
}
if (_local1.heap[_local3].priority > _local1.heap[_local2].priority) {
var temp = _local1.heap[_local3];
_local1.heap[_local3] = _local1.heap[_local2];
_local1.heap[_local2] = temp;
_local1.heap[_local3].pos = _local3;
_local1.heap[_local2].pos = _local2;
_local1.$filterDown(_local2);
} else if (_local1.heap[_local3].priority == _local1.heap[_local2].priority) {
if (_local1.heap[_local3].id > _local1.heap[_local2].id) {
var temp = _local1.heap[_local3];
_local1.heap[_local3] = _local1.heap[_local2];
_local1.heap[_local2] = temp;
_local1.heap[_local3].pos = _local3;
_local1.heap[_local2].pos = _local2;
_local1.$filterDown(_local2);
}
}
}
}
}
Symbol 10 MovieClip [__Packages.FStyleFormat] Frame 0
class FStyleFormat
{
var nonStyles;
function FStyleFormat () {
var _local1 = arguments;
var _local2 = this;
_local2.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true, clearDeadListeners:true};
_local2.listeners = {};
_local2.isGlobal = false;
if (_local1.length > 0) {
for (var _local3 in _local1[0]) {
_local2[_local3] = _local1[0][_local3];
}
}
allStyles.push(_local2);
}
static function clearAllDeadListeners() {
var _local2 = allStyles.length;
var _local1 = 0;
while (_local1 < _local2) {
allStyles[_local1].clearDeadListeners();
_local1++;
}
}
function addListener() {
var _local1 = this;
var _local3 = 0;
while (_local3 < arguments.length) {
var _local2 = arguments[_local3];
_local1.listeners[_local2] = _local2;
for (var i in _local1) {
if (_local1.isAStyle(i)) {
_local2.updateStyleProperty(_local1, i.toString());
}
}
_local3++;
}
}
function removeListener(component) {
var _local1 = this;
var _local2 = component;
delete _local1.listeners[_local2];
for (var prop in _local1) {
if (_local1.isAStyle(prop)) {
if (_local2.styleTable[prop].useGlobal == _local1.isGlobal) {
_local2.styleTable[prop].useGlobal = true;
var _local3 = (_local1.isGlobal ? undefined : (_global.globalStyleFormat[prop]));
_local2.setStyleProperty(prop, _local3, true);
}
}
}
}
function applyChanges() {
var _local1 = this;
var _local2 = arguments;
var count = 0;
for (var i in _local1.listeners) {
var _local3 = _local1.listeners[i];
if (_local2.length > 0) {
var j = 0;
while (j < _local2.length) {
if (_local1.isAStyle(_local2[j])) {
_local3.updateStyleProperty(_local1, _local2[j]);
}
j++;
}
} else {
for (var j in _local1) {
if (_local1.isAStyle(j)) {
_local3.updateStyleProperty(_local1, j.toString());
}
}
}
}
}
function clearDeadListeners() {
var _local1 = this;
for (var _local2 in _local1.listeners) {
if (_local1.listeners[_local2] == undefined) {
delete _local1.listeners[_local2];
}
}
}
function isAStyle(name) {
return((nonStyles[name] ? false : true));
}
static var allStyles = [];
}
Symbol 11 MovieClip [__Packages.com.tokenzone.User] Frame 0
class com.tokenzone.User
{
var id, username, auth;
function User () {
}
function getId() {
return(id);
}
function getUsername() {
return(username);
}
function getAuth() {
return(auth);
}
function setId(id) {
this.id = id;
}
function setUsername(username) {
this.username = username;
}
function setAuth(auth) {
this.auth = auth;
}
}
Symbol 12 MovieClip [__Packages.com.tokenzone.Offer] Frame 0
class com.tokenzone.Offer
{
var id, status, sender, recipient, dateCreated, dateUpdated, messageId, tokensOffered, tokensRequested;
function Offer () {
}
function getId() {
return(id);
}
function setId(id) {
this.id = id;
}
function getStatus() {
return(status);
}
function setStatus(status) {
this.status = status;
}
function getSender() {
return(sender);
}
function setSender(sender) {
this.sender = sender;
}
function getRecipient() {
return(recipient);
}
function setRecipient(recipient) {
this.recipient = recipient;
}
function getDateCreated() {
return(dateCreated);
}
function setDateCreated(dateCreated) {
this.dateCreated = dateCreated;
}
function getDateUpdated() {
return(dateUpdated);
}
function setDateUpdated(dateUpdated) {
this.dateUpdated = dateUpdated;
}
function getMessageId() {
return(messageId);
}
function setMessageId(messageId) {
this.messageId = messageId;
}
function getTokensOffered() {
return(tokensOffered);
}
function setTokensOffered(tokensOffered) {
this.tokensOffered = tokensOffered;
}
function getTokensRequested() {
return(tokensRequested);
}
function setTokensRequested(tokensRequested) {
this.tokensRequested = tokensRequested;
}
}
Symbol 13 MovieClip [__Packages.SI.FrameTick] Frame 0
class SI.FrameTick extends MovieClip
{
var broadcastMessage;
function FrameTick () {
super();
if (!__classInitialized) {
__initClass();
}
}
function onEnterFrame() {
broadcastMessage("onEnterFrame");
}
static function __initClass() {
SI.EventBroadcaster.initialize(SI.FrameTick.prototype);
__classInitialized = true;
}
static var __classInitialized = false;
}