Frame 1
function init() {
MAX_POLISH = 5;
current_index = 1;
current_select = "";
current_bottle = "";
paused = false;
dragging = true;
rings_used = {left_0:0, left_1:0, left_2:0, left_3:0, left_4:0, right_0:0, right_1:0, right_2:0, right_3:0, right_4:0};
gotoAndStop (29);
printable_mc.character_mc.gotoAndStop(character);
game_mc.left_mc.hand_mc.gotoAndStop(character);
game_mc.right_mc.hand_mc.gotoAndStop(character);
set_colors();
set_airbrushes();
game_mc.controller = this;
game_mc.onEnterFrame = function () {
if ((((this.controller.current_select == "") || (this.controller.current_select == null)) || (this.controller.paused)) || (!this.controller.dragging)) {
this.drag_mc._x = (this.drag_mc._y = -1000);
return(undefined);
}
this.drag_mc._x = this._xmouse;
this.drag_mc._y = this._ymouse;
this.drag_mc.gotoAndStop(this.controller.current_select);
if (this.controller.current_select == "ring") {
this.drag_mc.show_mc.gotoAndStop(this.controller.current_index);
this.drag_mc.show_mc.ring_mc.gotoAndStop(1);
} else {
this.drag_mc.show_mc.gotoAndStop(this.controller.current_index + 1);
}
if (this.controller.current_select == "gem") {
this.drag_mc.show_mc.gem_mc.gotoAndStop(1);
this.drag_mc.show_mc.gem_mc.shine_mc.gotoAndStop(1);
}
};
}
function new_game() {
character = 0;
gotoAndStop (19);
}
function character_select(num_char) {
character = num_char;
init();
}
function set_colors() {
var num_colors = game_mc.color_0.bottle_mc._totalframes;
var temp_array = new Array();
var i = 1;
while (i <= num_colors) {
temp_array.push(i);
i++;
}
var j = 0;
while (j < MAX_POLISH) {
var rand_num = random(temp_array.length);
game_mc["color_" + j].bottle_mc.gotoAndStop(temp_array[rand_num]);
temp_array.splice(rand_num, 1);
j++;
}
}
function set_airbrushes() {
var num_colors = game_mc.airbrush_0.bottle_mc._totalframes;
var temp_array = new Array();
var i = 1;
while (i <= num_colors) {
temp_array.push(i);
i++;
}
var j = 0;
while (j < MAX_POLISH) {
var rand_num = random(temp_array.length);
game_mc["airbrush_" + j].bottle_mc.gotoAndStop(temp_array[rand_num]);
temp_array.splice(rand_num, 1);
j++;
}
}
function select_remover() {
current_select = "remover";
sound_mc.gotoAndPlay("remove_click");
select_bottle("");
}
function select_length(iFrame) {
var i = 0;
while (i < MAX_POLISH) {
var left_mc = game_mc.left_mc["nail_" + i];
var right_mc = game_mc.right_mc["nail_" + i];
var print_left = printable_mc["left_" + i];
var print_right = printable_mc["right_" + i];
left_mc.gotoAndStop(iFrame);
print_left.gotoAndStop(iFrame);
left_mc[left_mc.type + "_mc"].gotoAndStop(left_mc.polish);
print_left[left_mc.type + "_mc"].gotoAndStop(left_mc.polish);
trace("print_left is: " + print_left);
right_mc.gotoAndStop(iFrame);
print_right.gotoAndStop(iFrame);
right_mc[right_mc.type + "_mc"].gotoAndStop(right_mc.polish);
print_right[right_mc.type + "_mc"].gotoAndStop(right_mc.polish);
i++;
}
}
function select_color(iFrame, bottle_mc) {
dragging = true;
current_select = "color";
current_index = iFrame;
sound_mc.gotoAndPlay("polish_click");
select_bottle(bottle_mc);
}
function select_airbrush(iFrame, bottle_mc) {
dragging = true;
current_select = "airbrush";
current_index = iFrame;
sound_mc.gotoAndPlay("polish_click");
select_bottle(bottle_mc);
}
function select_bottle(mcRef) {
if ((mcRef != "") && (mcRef != null)) {
mcRef.gotoAndStop("on");
}
if ((current_bottle != "") || (current_bottle != null)) {
current_bottle.gotoAndStop("off");
}
trace("current_bottle is: " + current_bottle);
current_bottle = mcRef;
}
function select_gem(iFrame) {
current_select = "gem";
current_index = iFrame;
sound_mc.gotoAndPlay("gem_click");
select_bottle("");
}
function select_ring(iFrame) {
current_select = "ring";
current_index = iFrame;
sound_mc.gotoAndPlay("gem_click");
select_bottle("");
}
function nail_click(target_mc) {
var target_str = String(target_mc);
var hand = "";
if (target_str.indexOf("left") != -1) {
hand = "left";
} else if (target_str.indexOf("right") != -1) {
hand = "right";
}
var index = target_str.lastIndexOf("_");
var nail = target_str.substr(index + 1, 1);
var print_mc = printable_mc[(hand + "_") + nail];
if (current_select == "color") {
target_mc.airbrush_mc.gotoAndStop(1);
target_mc.color_mc.gotoAndStop(current_index + 1);
target_mc.type = "color";
target_mc.polish = current_index + 1;
print_mc.color_mc.gotoAndStop(current_index + 1);
print_mc.airbrush_mc.gotoAndStop(1);
sound_mc.gotoAndPlay("apply_polish");
} else if (current_select == "airbrush") {
target_mc.color_mc.gotoAndStop(1);
target_mc.airbrush_mc.gotoAndStop(current_index + 1);
target_mc.type = "airbrush";
target_mc.polish = current_index + 1;
print_mc.airbrush_mc.gotoAndStop(current_index + 1);
print_mc.color_mc.gotoAndStop(1);
sound_mc.gotoAndPlay("apply_polish");
} else if (current_select == "remover") {
remove_polish(target_mc, print_mc);
} else if (current_select == "gem") {
target_mc.gems_mc.gotoAndStop(current_index + 1);
print_mc.gems_mc.gotoAndStop(current_index + 1);
sound_mc.gotoAndPlay("apply_gem");
}
}
function finger_click(target_mc, num_finger, hand) {
var finger = num_finger;
if ((current_select != null) && (current_select != "")) {
if (current_select == "remover") {
if (target_mc["ring_" + num_finger]._currentframe > 1) {
target_mc["ring_" + num_finger].gotoAndStop(1);
rings_used[(hand + "_") + num_finger] = 0;
} else if (num_finger > 0) {
if (target_mc["ring_" + (num_finger - 1)]._currentframe == target_mc["ring_" + (num_finger - 1)]._totalframes) {
target_mc["ring_" + (num_finger - 1)].gotoAndStop(1);
rings_used[(hand + "_") + (num_finger - 1)] = 0;
}
}
return(undefined);
}
if (current_select != "ring") {
return(undefined);
}
}
if (current_index == "double") {
if (finger == 4) {
return(undefined);
}
if (finger == 3) {
finger = 2;
trace("finger is: " + finger);
}
target_mc["ring_" + (finger + 1)].gotoAndStop(1);
rings_used[(hand + "_") + (finger + 1)] = 0;
}
if (target_mc["ring_" + (finger - 1)].current_index == "double") {
target_mc["ring_" + (finger - 1)].gotoAndStop(1);
}
target_mc["ring_" + finger].gotoAndStop(current_index);
target_mc["ring_" + finger].current_index = current_index;
rings_used[(hand + "_") + finger] = current_index;
sound_mc.gotoAndPlay("apply_gem");
}
function remove_polish(target_mc, print_mc) {
target_mc.airbrush_mc.gotoAndStop(1);
target_mc.color_mc.gotoAndStop(1);
target_mc.gems_mc.gotoAndStop(1);
print_mc.airbrush_mc.gotoAndStop(1);
print_mc.color_mc.gotoAndStop(1);
print_mc.gems_mc.gotoAndStop(1);
target_mc.polish = 1;
target_mc.type = null;
sound_mc.gotoAndPlay("remove");
}
function show_end() {
gotoAndStop (39);
characters_mc.gotoAndStop(character);
var i = 0;
while (i < 5) {
end_nails["left_" + i].gotoAndStop(printable_mc["left_" + i]._currentframe);
end_nails["right_" + i].gotoAndStop(printable_mc["right_" + i]._currentframe);
end_nails["left_" + i].gems_mc.gotoAndStop(printable_mc["left_" + i].gems_mc._currentframe);
end_nails["right_" + i].gems_mc.gotoAndStop(printable_mc["right_" + i].gems_mc._currentframe);
end_nails["left_" + i].color_mc.gotoAndStop(printable_mc["left_" + i].color_mc._currentframe);
end_nails["right_" + i].color_mc.gotoAndStop(printable_mc["right_" + i].color_mc._currentframe);
end_nails["left_" + i].airbrush_mc.gotoAndStop(printable_mc["left_" + i].airbrush_mc._currentframe);
end_nails["right_" + i].airbrush_mc.gotoAndStop(printable_mc["right_" + i].airbrush_mc._currentframe);
i++;
}
var num_double = 0;
var ring_array = [];
for (var prop in rings_used) {
if (rings_used[prop] == "double") {
num_double++;
delete rings_used[prop];
} else if (rings_used[prop] == 0) {
delete rings_used[prop];
}
}
for (var i in rings_used) {
ring_array.push(rings_used[i]);
}
if (num_double == 0) {
var i = 0;
while (i < ring_array.length) {
printable_mc["ring_" + i].gotoAndStop(ring_array[i]);
i++;
}
} else if (num_double == 1) {
printable_mc.ring_0.gotoAndStop("double");
var i = 0;
while (i < 8) {
printable_mc["ring_" + (i + 2)].gotoAndStop(ring_array[i]);
i++;
}
} else if (num_double == 2) {
printable_mc.ring_0.gotoAndStop("double");
printable_mc.ring_3.gotoAndStop("double");
printable_mc.ring_2.gotoAndStop(ring_array[0]);
printable_mc.ring_5.gotoAndStop(ring_array[1]);
printable_mc.ring_6.gotoAndStop(ring_array[2]);
printable_mc.ring_7.gotoAndStop(ring_array[3]);
printable_mc.ring_8.gotoAndStop(ring_array[4]);
printable_mc.ring_9.gotoAndStop(ring_array[5]);
} else if (num_double == 3) {
printable_mc.ring_0.gotoAndStop("double");
printable_mc.ring_3.gotoAndStop("double");
printable_mc.ring_6.gotoAndStop("double");
printable_mc.ring_2.gotoAndStop(ring_array[0]);
printable_mc.ring_5.gotoAndStop(ring_array[1]);
printable_mc.ring_8.gotoAndStop(ring_array[2]);
printable_mc.ring_9.gotoAndStop(ring_array[3]);
} else if (num_double == 4) {
printable_mc.ring_0.gotoAndStop("double");
printable_mc.ring_3.gotoAndStop("double");
printable_mc.ring_6.gotoAndStop("double");
printable_mc.ring_9.gotoAndStop("double");
printable_mc.ring_2.gotoAndStop(ring_array[0]);
printable_mc.ring_5.gotoAndStop(ring_array[1]);
printable_mc.ring_8.gotoAndStop(ring_array[2]);
}
var i = 0;
while (i < 6) {
_root["ring_" + i].gotoAndStop(printable_mc["ring_" + i]._currentframe);
i++;
}
}
function print_manicure(target_mc) {
printAsBitmap (target_mc, "bframe");
}
function preload() {
dp = new DataProviderClass();
dp.addItem({loadTarget:_root});
pb.setChangeHandler("checkPreload");
pb.setDataProvider(dp);
pb.progressBar_mc.setDisplayText(false);
}
function checkPreload(c) {
if (c.getSelectedIndex() == c.getLength()) {
play();
}
}
this.__getServer = function () {
url = _root._url;
if (url.indexOf("everythinggirl.com") != -1) {
return("http://www.everythinggirl.com");
}
if (url.indexOf("mattel.net") != -1) {
return("http://everythinggirl.mattel.net");
}
if (url.indexOf("eshq.mattel.com") != -1) {
return("http://estwr-12-82.eshq.mattel.com");
}
if (url.indexOf("file") != -1) {
return("http://estwr-12-82.eshq.mattel.com");
}
if (url.indexOf("origin") != -1) {
return("http://origin.everythinggirl.com");
}
return("http://www.everythinggirl.com");
};
_global.server = this.__getServer();
var flava_so = SharedObject.getLocal("FlavaSettings", "/");
var flavaSettings = flava_so.data;
var flavaName = ((flavaSettings.username == undefined) ? "FlavaFriend" : (flavaSettings.username));
globalStyleFormat.darkshadow = 16752570 /* 0xFF9FBA */;
globalStyleFormat.shadow = 16761298 /* 0xFFC1D2 */;
globalStyleFormat.highlight = 16761298 /* 0xFFC1D2 */;
globalStyleFormat.highlight3D = 16752570 /* 0xFF9FBA */;
globalStyleFormat.face = 16777215 /* 0xFFFFFF */;
globalStyleFormat.scrollTrack = 16737937 /* 0xFF6691 */;
globalStyleFormat.applyChanges();
preload();
stop();
Frame 9
function updateRadioSettings(radioObj) {
flavaSettings.beauty.musicEnabled = radioObj.getEnabled() || (radioObj.isLoading());
}
if (flavaSettings.beauty == undefined) {
trace("flavaSettings.beauty undefined");
var f = ((flavaSettings.beauty = new Object()));
var musicEnabled = ((f.musicEnabled = true));
} else {
trace("flavaSettings.beauty defined, enabled: " + flavaSettings.beauty.musicEnabled);
var musicEnabled = flavaSettings.beauty.musicEnabled;
}
musicToggle_mc.setChangeHandler("updateRadioSettings", this);
musicToggle_mc.setEnabled(musicEnabled);
uName_tb.text = flavaName + "!";
exit_btn.onRelease = function () {
getURL ("/home/index.aspx?section=glitz");
};
logo_mc.onRelease = function () {
getURL ("/home/index.aspx");
};
stop();
Instance of Symbol 83 MovieClip [MusicToggleSymbol] "musicToggle_mc" in Frame 9
//component parameters
onClipEvent (initialize) {
musicSource = "/audio/beauty_sound.swf";
isExternalSource = true;
musicOn = true;
}
Frame 19
stop();
Frame 29
stop();
Frame 39
stop();
sound_mc.gotoAndPlay("end");
egPointsNotice_mc.partName = "nails.swf";
egPointsNotice_mc.setComplete();
Symbol 14 MovieClip Frame 12
stop();
Symbol 69 MovieClip [FPointsNoticeSymbol] Frame 1
#initclip 4
function getNetDebugVersion() {
return(1);
}
function NetDebugConfig() {
}
function attachNetDebugConfigFunctions(ndc) {
ndc.setDebug = function (setval) {
this.m_debug = setval;
};
ndc.getDebug = function () {
return(this.m_debug);
};
for (var prop in ndc) {
if (typeof(ndc[prop]) == "object") {
attachNetDebugConfigFunctions(ndc[prop]);
}
}
}
function getDefaultNetDebugConfig(iscontroller) {
if (_global.netDebugConfigSO == undefined) {
var soName = "TestMovie_Config_Info";
if (iscontroller) {
soName = "Controller_Config_Info";
}
_global.netDebugConfigSO = SharedObject.getLocal(soName);
}
if (_global.netDebugConfigSO.data.config == undefined) {
_global.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_global.netDebugConfigSO.flush();
return(_global.netDebugConfigSO.data.config);
}
function getRealDefaultNetDebugConfig() {
var defaultConfig = new NetDebugConfig();
defaultConfig.m_debug = true;
defaultConfig.client = new NetDebugConfig();
defaultConfig.client.m_debug = true;
defaultConfig.client.trace = true;
defaultConfig.client.recordset = true;
defaultConfig.client.http = true;
defaultConfig.client.rtmp = true;
defaultConfig.realtime_server = new NetDebugConfig();
defaultConfig.realtime_server.m_debug = true;
defaultConfig.realtime_server.trace = true;
defaultConfig.app_server = new NetDebugConfig();
defaultConfig.app_server.m_debug = true;
defaultConfig.app_server.trace = true;
defaultConfig.app_server.error = true;
defaultConfig.app_server.recordset = true;
defaultConfig.app_server.httpheaders = false;
defaultConfig.app_server.amf = false;
defaultConfig.app_server.amfheaders = false;
defaultConfig.app_server.coldfusion = true;
return(defaultConfig);
}
function NetDebugEvent() {
}
function NetDebugErrorEvent(dataobj) {
this.init();
this.EventType = "NetDebugError";
this.Error = dataobj;
}
function NetDebugTraceEvent(traceobj) {
this.init();
this.EventType = "Trace";
this.Trace = traceobj;
}
function NetDebugTraceNetServicesEvent(w, s, n, m) {
this.init();
this.EventType = "NetServicesTrace";
this.Trace = m;
this.Who = w;
this.Severity = s;
this.Number = n;
}
function NetDebugNCEvent() {
}
function NetDebugResultEvent(resultobj) {
this.init();
this.EventType = "Result";
this.Result = resultobj;
}
function NetDebugStatusEvent(statusobj) {
this.init();
this.EventType = "Status";
this.Status = statusobj;
}
function NetDebugConnectEvent(args) {
this.init();
this.EventType = "Connect";
this.ConnectString = args[0];
if (args[1] != null) {
this.UserName = args[1];
}
if (args[2] != null) {
this.Password = args[2];
}
}
function NetDebugCallEvent(args) {
this.init();
this.EventType = "Call";
this.MethodName = args[0];
this.Parameters = new Array();
var i = 2;
while (i < args.length) {
this.Parameters[i - 2] = args[i];
i++;
}
}
function NetDebugCloseEvent() {
this.init();
this.EventType = "Close";
}
function NetDebugAddHeaderEvent(args) {
this.init();
this.EventType = "AddHeader";
this.HeaderName = args[0];
this.MustUnderstand = args[1];
if (args[2] != null) {
this.HeaderObject = args[2];
}
}
function NetDebugRtmpLogEvent(infoobj) {
this.initDate();
this.EventType = "Trace";
this.Source = "RealTime";
this.Info = infoobj;
this.Trace = infoobj.description;
}
function NetDebugDuplicateNCDErrorEvent() {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.Message = "NCD_ALREADY_RUNNING";
}
function NetDebugFailedSendErrorEvent(ev) {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.OriginalEvent = ev;
this.Message = "NCD_FAILED_TO_SEND_EVENT";
}
function NetDebugInfoErrorEvent(infoobj, mes) {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.Info = infoobj;
if (mes != null) {
this.Message = mes;
}
}
function NetDebugReceiveCallEvent(mName, args) {
this.init();
this.EventType = "ReceivedCall";
this.MethodName = mName;
this.Parameters = args;
}
function netDebugProxyConnect() {
this.attachDebug();
var proto = arguments[0].substr(0, 4);
if ((proto == "http") || (proto == "rtmp")) {
this.m_Protocol = proto;
} else {
this.m_Protocol = "http";
}
this.sendClientEvent(new NetDebugConnectEvent(arguments));
if (this.isRealTime()) {
this.m_ConnectString = arguments[0];
getNetDebug().sendCommand(new StartRTMPTraceCommand(arguments[0]));
var ret = this.realconnect.apply(this, arguments);
this.realcall("@getClientID", new RTMPClientIDResponse(arguments[0], this));
return(ret);
}
return(this.realconnect.apply(this, arguments));
}
function netDebugProxyCall() {
this.attachDebug();
this.sendClientEvent(new NetDebugCallEvent(arguments));
this.addNetDebugHeader();
if (this.m_Config.app_server) {
arguments[1] = new NetDebugResponseProxy(this, arguments[1]);
return(this.realcall.apply(this, arguments));
}
return(this.realcall.apply(this, arguments));
}
function netDebugProxyClose() {
this.attachDebug();
this.sendClientEvent(new NetDebugCloseEvent());
if (this.isRealTime()) {
getNetDebug().sendCommand(new StopRTMPTraceCommand(this.m_ConnectString, this.m_ClientId));
}
var ret = this.realclose();
getNetDebug().removeNetConnection(this);
return(ret);
}
function netDebugProxyAddHeader() {
this.attachDebug();
this.sendClientEvent(new NetDebugAddHeaderEvent(arguments));
return(this.realaddHeader.apply(this, arguments));
}
function RTMPClientIDResponse(cs, nc) {
this.m_ConnectString = cs;
this.m_NC = nc;
}
function NetDebugResponseProxy(source, original) {
this.m_SourceNC = source;
this.m_OriginalNR = original;
}
function GlobalLocalConnection(iscontroller, receiver, domainname) {
this.maxConnections = 10;
var sToMovie = "_NetDebugLocalToDebugMovie";
var sToController = "_NetDebugLocalToController";
var connectname = null;
if (iscontroller) {
connectname = sToController;
this.sendnames = new Array();
this.sendnames.push(sToMovie);
var i = 0;
while (i < this.maxConnections) {
this.sendnames.push(sToMovie + i);
i++;
}
this.maxConnections = 0;
} else {
connectname = sToMovie;
this.sendnames = new Array();
this.sendnames.push(sToController);
}
this.setDomainName(domainname);
if (_global.g_NetDebugLocalConnection == undefined) {
_global.g_NetDebugLocalConnection = new LocalConnection();
_global.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_global.g_NetDebugLocalConnection.m_Receiver = receiver;
_global.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_global.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_global.g_NetDebugLocalConnection.connect(connectname)) {
var connected = false;
var i = 0;
while (i < this.maxConnections) {
if (_global.g_NetDebugLocalConnection.connect(connectname + i)) {
connected = true;
break;
}
i++;
}
if (!connected) {
if (iscontroller) {
receiver.onReceiveError(new NetDebugDuplicateNCDErrorEvent());
}
}
}
}
}
function LocalCommand() {
}
function UpdateNetDebugConfigCommand(dataobj) {
this.init("updateConfig", dataobj);
}
function GetConfigCommand() {
this.init("getConfig", null);
}
function StartRTMPTraceCommand(cs) {
var connectinfo = new Object();
connectinfo.connectstring = cs;
connectinfo.url = _root._url;
this.init("startRealTimeTrace", connectinfo);
}
function AddRTMPClientCommand(cs, cid) {
var connectinfo = new Object();
connectinfo.connectstring = cs;
connectinfo.url = _root._url;
connectinfo.clientid = cid;
this.init("addRealTimeClient", connectinfo);
}
function StopRTMPTraceCommand(cs, cid) {
var connectinfo = new Object();
connectinfo.connectstring = cs;
connectinfo.url = _root._url;
connectinfo.clientid = cid;
this.init("stopRealTimeTrace", connectinfo);
}
function NetDebug() {
this.m_ncs = new Array();
this.m_Config = getDefaultNetDebugConfig();
this.m_glc = new GlobalLocalConnection(false, this);
this.m_glc.sendCommand(new GetConfigCommand());
this.m_NextNewId = 0;
}
function getNetDebug() {
return(_global.netDebugInstance);
}
_global.RsDataProviderClass = function () {
this.init();
};
RsDataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
};
RsDataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var eventObj = {event:"updateAll"};
viewRef.modelChanged(eventObj);
};
RsDataProviderClass.prototype.addItemAt = function (index, value) {
if (!this.checkLocal()) {
return(undefined);
}
if (index < 0) {
return(undefined);
}
if (index < this.getLength()) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
}
this.items[index].__ID__ = this.uniqueID++;
var eventObj = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
};
RsDataProviderClass.prototype.addItem = function (value) {
if (!this.checkLocal()) {
return(undefined);
}
this.addItemAt(this.getLength(), value);
};
RsDataProviderClass.prototype.removeItemAt = function (index) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var tmpItm = this.items[index];
this.items.splice(index, 1);
var eventObj = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
return(tmpItm);
};
RsDataProviderClass.prototype.removeAll = function () {
if (!this.checkLocal()) {
return(undefined);
}
this.items = new Array();
this.updateViews({event:"deleteRows", firstRow:0, lastRow:this.getLength() - 1});
};
RsDataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var tmpID = this.getItemID(index);
this.items[index] = itemObj;
this.items[index].__ID__ = tmpID;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
RsDataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
RsDataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
RsDataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
RsDataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({event:"sort"});
};
RsDataProviderClass.prototype.updateViews = function (eventObj) {
var i = 0;
while (i < this.views.length) {
this.views[i].modelChanged(eventObj);
i++;
}
};
_global.RecordSet = function (columnNames) {
if (this.mTitles != null) {
this.views = new Array();
return(undefined);
}
this.init();
if (this.serverInfo == null) {
this.mTitles = columnNames;
return(undefined);
}
if (this.serverInfo.version != 1) {
NetServices.trace("RecordSet", "warning", 100, "Received incompatible recordset version from server");
return(undefined);
}
this.mTitles = this.serverInfo.columnNames;
this.mRecordsAvailable = 0;
this.setData(((this.serverInfo.cursor == null) ? 0 : (this.serverInfo.cursor - 1)), this.serverInfo.initialData);
if (this.serverInfo.initialData.length != this.serverInfo.totalCount) {
this.mRecordSetId = this.serverInfo.id;
if (this.mRecordSetId != null) {
this.serviceName = ((this.serverInfo.serviceName == null) ? "RecordSet" : (this.serverInfo.serviceName));
this.mTotalCount = this.serverInfo.totalCount;
this.mDeliveryMode = "ondemand";
this.mAllNotified = false;
this.mOutstandingRecordCount = 0;
} else {
NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no recordset id");
}
}
this.serverInfo = null;
};
RecordSet.prototype = new RsDataProviderClass();
Object.registerClass("RecordSet", RecordSet);
RecordSet.prototype._setParentService = function (service) {
this.gateway_conn = service.nc;
};
RecordSet.prototype.getRecordSetService = function () {
if (this.mRecordSetService == null) {
if (this.gateway_conn == null) {
this.gateway_conn = NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
this.gateway_conn = this.gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
this.gateway_conn.setupRecordset();
this.gateway_conn.setDebugId("RecordSet " + this.mRecordSetId);
}
this.mRecordSetService = this.gateway_conn.getService(this.serviceName, this);
if (this.mRecordSetService == null) {
NetServices.trace("RecordSet", "warning", 101, "Failed to create recordset service");
this.mRecordSetService = 0;
}
}
return(this.mRecordSetService);
};
RecordSet.prototype.getColumnNames = function () {
return(this.mTitles);
};
RecordSet.prototype.getLength = function () {
if (this.mRecordSetID != null) {
return(this.mTotalCount);
}
return(this.items.length);
};
RecordSet.prototype.getItemAt = function (index) {
if (this.mRecordSetId == null) {
return(this.items[index]);
}
if ((index < 0) || (index >= this.getLength())) {
NetServices.trace("RecordSet", "warning", 104, ("getItemAt(" + index) + ") index out of range");
return(null);
}
this.requestRecord(index);
var result = this.items[index];
if (result == 1) {
return("in progress");
}
return(result);
};
RecordSet.prototype.setField = function (index, fieldName, value) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
this.items[index][fieldName] = value;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
RecordSet.prototype.filter = function (filterFunction, context) {
if (!this.checkLocal()) {
return(undefined);
}
var result = new RecordSet(this.mTitles);
var i = 0;
while (i < this.getLength()) {
var item = this.getItemAt(i);
if (((item != null) && (item != 1)) && (filterFunction(item, context))) {
result.addItem(item);
}
i++;
}
return(result);
};
RecordSet.prototype.sort = function (compareFunc) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sort(compareFunc);
this.updateViews({event:"sort"});
};
RecordSet.prototype.isLocal = function () {
return(this.mRecordSetID == null);
};
RecordSet.prototype.isFullyPopulated = function () {
return(this.isLocal());
};
RecordSet.prototype.getNumberAvailable = function () {
if (this.isLocal()) {
return(this.getLength());
}
return(this.mRecordsAvailable);
};
RecordSet.prototype.setDeliveryMode = function (mode, pagesize, numPrefetchPages) {
this.mDeliveryMode = mode;
this.stopFetchAll();
if (mode == "ondemand") {
return(undefined);
}
if (pagesize == null) {
pagesize = this.views[0].getRowCount();
if (pagesize == null) {
pagesize = 25;
}
}
if (mode == "page") {
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
this.mPageSize = pagesize;
this.mNumPrefetchPages = numPrefetchPages;
} else if (mode == "fetchall") {
this.stopFetchAll();
this.startFetchAll(pagesize);
} else {
NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
};
RecordSet.prototype.getRecords_Result = function (info) {
this.setData(info.Cursor - 1, info.Page);
this.mOutstandingRecordCount = this.mOutstandingRecordCount - info.Page.length;
this.updateViews({event:"updateRows", firstRow:info.Cursor - 1, lastRow:((info.Cursor - 1) + info.Page.length) - 1});
if ((this.mRecordsAvailable == this.mTotalCount) && (!this.mAllNotified)) {
this.updateViews({event:"allRows"});
this.mRecordSetService.release();
this.mAllNotified = true;
this.mRecordSetID = null;
this.mRecordSetService = null;
}
};
RecordSet.prototype.release_Result = function () {
};
RecordSet.prototype.arrayToObject = function (anArray) {
if (this.mTitles == null) {
NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var result = new Object();
var i = 0;
while (i < anArray.length) {
var title = this.mTitles[i];
if (title == null) {
title = ("column" + i) + 1;
}
result[title] = anArray[i];
i++;
}
return(result);
};
RecordSet.prototype.setData = function (start, dataArray) {
var i = 0;
while (i < dataArray.length) {
var index = (i + start);
var rec = this.items[index];
if ((rec != null) && (rec != 1)) {
NetServices.trace("RecordSet", "warning", 106, "Already got record # " + recordIndex);
} else {
this.mRecordsAvailable = this.mRecordsAvailable + 1;
}
this.items[index] = this.arrayToObject(dataArray[i]);
this.items[index].__ID__ = this.uniqueID++;
i++;
}
};
RecordSet.prototype.requestOneRecord = function (index) {
if (this.items[index] == null) {
this.getRecordSetService().getRecords(this.mRecordSetId, index + 1, 1);
this.mOutstandingRecordCount++;
this.items[index] = 1;
this.updateViews({event:"fetchRows", firstRow:index, lastRow:index});
}
};
RecordSet.prototype.requestRecord = function (index) {
if (this.mDeliveryMode != "page") {
this.requestOneRecord(index);
return(undefined);
}
var firstIndex = (int(index / this.mPageSize) * this.mPageSize);
var lastIndex = ((firstIndex + (this.mPageSize * (this.mNumPrefetchPages + 1))) - 1);
this.requestRecordRange(firstIndex, lastIndex);
};
RecordSet.prototype.requestRecordRange = function (index, lastIndex) {
var highestRequested = -1;
if (index < 0) {
index = 0;
}
if (lastIndex >= this.getLength()) {
lastIndex = this.getLength() - 1;
}
while (index <= lastIndex) {
while ((index <= lastIndex) && (this.items[index] != null)) {
index++;
}
var first = index;
while ((index <= lastIndex) && (this.items[index] == null)) {
this.mOutstandingRecordCount++;
this.items[index] = 1;
index++;
}
var last = (index - 1);
if (first <= last) {
this.getRecordSetService().getRecords(this.mRecordSetId, first + 1, (last - first) + 1);
highestRequested = last;
this.updateViews({event:"fetchRows", firstRow:first, lastRow:last});
}
}
return(highestRequested);
};
RecordSet.prototype.startFetchAll = function (pagesize) {
this.mDataFetcher.disable();
this.mDataFetcher = new RsDataFetcher(this, pagesize);
};
RecordSet.prototype.stopFetchAll = function () {
this.mDataFetcher.disable();
this.mDataFetcher = null;
};
RecordSet.prototype.checkLocal = function () {
if (this.isLocal()) {
return(true);
}
NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(false);
};
_global.RsDataFetcher = function (recordSet, increment) {
this.mRecordSet = recordSet;
this.mRecordSet.addView(this);
this.mIncrement = increment;
this.mNextRecord = 0;
this.mEnabled = true;
this.doNext();
};
RsDataFetcher.prototype.disable = function () {
this.mEnabled = false;
this.mRecordSet.removeView(this);
};
RsDataFetcher.prototype.doNext = function () {
if (!this.mEnabled) {
return(undefined);
}
while (true) {
if (this.mNextRecord >= this.mRecordSet.getLength()) {
return(undefined);
}
this.mHighestRequested = this.mRecordSet.requestRecordRange(this.mNextRecord, (this.mNextRecord + this.mIncrement) - 1);
this.mNextRecord = this.mNextRecord + this.mIncrement;
if (this.mHighestRequested > 0) {
return(undefined);
}
}
};
RsDataFetcher.prototype.modelChanged = function (eventObj) {
if (((eventObj.event == "updateRows") && (eventObj.firstRow <= this.mHighestRequested)) && (eventObj.lastRow >= this.mHighestRequested)) {
this.doNext();
}
if (eventObj.event == "allRows") {
this.disable();
}
};
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder.prototype.onResult = function (result) {
var client = this.service.client;
result._setParentService(this.service);
var func = (this.methodName + "_Result");
if (typeof(client[func]) == "function") {
client[func](result);
} else if (typeof(client.onResult) == "function") {
client.onResult(result);
} else {
NetServices.trace("NetServices", "info", 1, (func + " was received from server: ") + result);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var client = this.service.client;
var func = (this.methodName + "_Status");
if (typeof(client[func]) == "function") {
client[func](result);
} else if (typeof(client.onStatus) == "function") {
client.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
NetServices.trace("NetServices", "info", 2, (((func + " was received from server: ") + result.class) + " ") + result.description);
}
};
Object.registerClass("NetServiceProxy", NetServiceProxy);
_global.NetServiceProxy = function (nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
};
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var f = function () {
if (this.client != null) {
arguments.unshift(new NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(f);
};
NetConnection.prototype.getService = function (serviceName, client) {
var result = new NetServiceProxy(this, serviceName, client);
return(result);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
this.addHeader(info.name, info.mustUnderstand, info.data);
};
NetConnection.prototype.ReplaceGatewayUrl = function (newUrl) {
this.connect(newUrl);
};
NetConnection.prototype.clone = function () {
var nc = new NetConnection();
nc.connect(this.uri);
return(nc);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices.gatewayUrl = gatewayUrl;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
if (NetServices.isHttpUrl(_root._url)) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
if (url != undefined) {
if (NetServices.isHttpUrl(url)) {
var firstSlashPos = url.indexOf("/", 8);
if (firstSlashPos >= 0) {
url = url.substring(firstSlashPos);
}
}
var hostUrl = NetServices.getHostUrl();
if (hostUrl != null) {
url = hostUrl + url;
}
}
}
} else {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var nc = new NetConnection();
nc.connect(url);
return(nc);
};
NetServices.getHostUrl = function () {
if (!NetServices.isHttpUrl(_root._url)) {
return(null);
}
var firstSlashPos = _root._url.indexOf("/", 8);
if (firstSlashPos < 0) {
return(null);
}
return(_root._url.substring(0, firstSlashPos));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var fullMessage = ((((((who + " ") + severity) + " ") + number) + ": ") + message);
trace(fullMessage);
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
_global.copyProperties = function (to, from) {
for (var prop in from) {
if ((prop == "__proto__") || (prop == "function")) {
continue;
}
if (typeof(from[prop]) == "object") {
if (to[prop] == undefined) {
to[prop] = new from[prop].__proto__.constructor();
}
copyProperties(to[prop], from[prop]);
} else {
to[prop] = from[prop];
}
}
};
_global.copyObject = function (obj) {
if (typeof(obj) == "object") {
var ret = (new obj.__proto__.constructor());
copyProperties(ret, obj);
return(ret);
}
return(obj);
};
_global.objectToStringTree = function (obj, openstr, typesepstr, valuesepstr, closestr) {
var st = new StringLineAdder(obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
return(st.getString());
};
_global.objectToListboxTree = function (listbox, obj, openstr, typesepstr, valuesepstr, closestr) {
new ListLineAdder(listbox, obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
};
_global.StringLineAdder = function (obj, renderer) {
this.linerenderer = renderer;
this.output = "";
nestedObjectDump(0, null, obj, this);
};
StringLineAdder.prototype.getString = function () {
return(this.output);
};
StringLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var line = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (line != null) {
this.output = this.output + (line + newline);
}
return(true);
};
_global.ListLineAdder = function (listbox, obj, renderer) {
this.linerenderer = renderer;
this.output_lb = listbox;
nestedObjectDump(0, null, obj, this);
};
ListLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var line = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (line != null) {
this.output_lb.addItem(line);
}
return(true);
};
_global.TreeLineRenderer = function (pre, typedelim, valuedelim, post) {
this.init(pre, typedelim, valuedelim, post);
};
TreeLineRenderer.prototype.init = function (pre, typedelim, valuedelim, post) {
this.prechar = pre;
this.typechar = typedelim;
this.valuechar = valuedelim;
this.postchar = post;
};
TreeLineRenderer.prototype.getLine = function (level, objname, objtype, objvalue, objnum) {
var sAdd = "";
var i = 0;
while (i < level) {
sAdd = sAdd + "\t";
i++;
}
var valuedelim = this.valuechar;
if ((objname != null) && (objtype != "object")) {
sAdd = sAdd + (((this.prechar + objtype) + this.typechar) + objname);
} else if (objtype == "object") {
if (typeof(objvalue) == "number") {
sAdd = sAdd + (((this.prechar + objtype) + this.typechar) + objname);
sAdd = sAdd + ((valuedelim + "object#") + objvalue);
objvalue = null;
} else {
sAdd = sAdd + (((((this.prechar + objtype) + "#") + objnum) + this.typechar) + objname);
}
} else {
sAdd = sAdd + (this.prechar + objtype);
valuedelim = this.typechar;
}
if (objvalue != null) {
sAdd = sAdd + (valuedelim + objvalue);
}
sAdd = sAdd + this.postchar;
return(sAdd);
};
_global.nestedObjectDump = function (level, objname, obj, lineadder) {
if (level == 0) {
nestedObjectDump.callcount++;
nestedObjectDump.objcount = -1;
}
if (obj == null) {
return(lineadder.addLine(level, objname, "undefined"));
}
if (typeof(obj) == "function") {
return(lineadder.addLine(level, objname, "function"));
}
if (typeof(obj) == "object") {
if ((obj.__nestedObjectDump_id != undefined) && (obj.__nestedObjectDump_ref == nestedObjectDump.callcount)) {
return(lineadder.addLine(level, objname, "object", obj.__nestedObjectDump_id));
}
nestedObjectDump.objcount++;
if (lineadder.addLine(level, objname, "object", null, nestedObjectDump.objcount) == nestedObjectDump.skip) {
return(nestedObjectDump.proceed);
}
obj.__nestedObjectDump_id = nestedObjectDump.objcount;
obj.__nestedObjectDump_ref = nestedObjectDump.callcount;
var props = new Array();
var objs = new Array();
for (var prop in obj) {
if (((prop == "__proto__") || (prop == "__nestedObjectDump_id")) || (prop == "__nestedObjectDump_ref")) {
continue;
}
if (typeof(obj[prop]) == "object") {
objs.push(prop);
} else {
props.push(prop);
}
}
if ((objs.length == 0) && (props.length == 0)) {
if ((typeof(obj.toString) == "function") && (obj.toString() != "")) {
return(lineadder.addLine(level + 1, null, "string", obj.toString()));
}
if (lineadder.noProps != undefined) {
lineadder.noProps(level + 1);
return(nestedObjectDump.proceed);
}
}
props.sort();
objs.sort();
var bret = true;
var i = 0;
while (i < props.length) {
if (nestedObjectDump(level + 1, props[i], obj[props[i]], lineadder) == nestedObjectDump.stop) {
bret = false;
break;
}
i++;
}
if (bret) {
var i = 0;
while (i < objs.length) {
if (!nestedObjectDump(level + 1, objs[i], obj[objs[i]], lineadder)) {
bret = false;
}
i++;
}
}
return(nestedObjectDump.proceed);
}
return(lineadder.addLine(level, objname, typeof(obj), obj));
};
nestedObjectDump.proceed = 1;
nestedObjectDump.skip = 2;
nestedObjectDump.stop = 3;
nestedObjectDump.callcount = 0;
nestedObjectDump.objcount = 0;
Object.registerClass("NetDebugConfig", NetDebugConfig);
NetDebugEvent.prototype.init = function () {
this.EventType = "DebugEvent";
this.Source = "Client";
this.MovieUrl = unescape(_root._url);
this.initDate();
};
NetDebugEvent.prototype.initDate = function () {
var now = new Date();
this.Date = now;
this.Time = now.getTime();
};
NetDebugErrorEvent.prototype = new NetDebugEvent();
NetDebugTraceEvent.prototype = new NetDebugEvent();
NetDebugTraceNetServicesEvent.prototype = new NetDebugEvent();
NetDebugNCEvent.prototype = new NetDebugEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
NetDebugStatusEvent.prototype = new NetDebugNCEvent();
NetDebugConnectEvent.prototype = new NetDebugNCEvent();
NetDebugCallEvent.prototype = new NetDebugNCEvent();
NetDebugCloseEvent.prototype = new NetDebugNCEvent();
NetDebugAddHeaderEvent.prototype = new NetDebugNCEvent();
NetDebugRtmpLogEvent.prototype = new NetDebugNCEvent();
NetDebugDuplicateNCDErrorEvent.prototype = new NetDebugNCEvent();
NetDebugFailedSendErrorEvent.prototype = new NetDebugNCEvent();
NetDebugInfoErrorEvent.prototype = new NetDebugNCEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
_global.StripNCDEventToMinmal = function (ev) {
var ret = new Object();
if (ev.EventType != null) {
ret.EventType = ev.EventType;
}
if (ev.Source != null) {
ret.Source = ev.Source;
}
if (ev.MovieUrl != null) {
ret.MovieUrl = ev.MovieUrl;
}
if (ev.Date != null) {
ret.Date = ev.Date;
}
if (ev.Time != null) {
ret.Time = ev.Time;
}
if (ev.Protocol != null) {
ret.Protocol = ev.Protocol;
}
if (ev.DebugId != null) {
ret.DebugId = ev.DebugId;
}
return(ret);
};
NetConnection.prototype.attachDebug = function () {
if (!this.m_Attached) {
this.m_Attached = true;
this.m_HeaderAdded = false;
this.m_Config = new NetDebugConfig();
copyProperties(this.m_Config, getNetDebug().m_Config);
this.m_Protocol = "none";
this.m_Id = getNetDebug().addNetConnection(this);
}
};
NetConnection.prototype.sendDebugEvent = function (eventobj) {
eventobj.Protocol = this.m_Protocol;
eventobj.DebugId = this.m_Id;
return(getNetDebug().onEvent(eventobj));
};
NetConnection.prototype.sendServerEvent = function (eventobj) {
eventobj.MovieUrl = unescape(_root._url);
if (!this.sendDebugEvent(eventobj)) {
}
};
NetConnection.prototype.sendClientEvent = function (eventobj) {
if (this.m_Config.m_debug && (this.m_Config.client.m_debug)) {
if ((this.m_Config.client.http && (this.m_Protocol == "http")) || (this.m_Config.client.rtmp && (this.m_Protocol == "rtmp"))) {
if (!this.sendDebugEvent(eventobj)) {
}
}
}
};
NetConnection.prototype.addNetDebugHeader = function () {
if (!this.m_HeaderAdded) {
this.m_HeaderAdded = true;
if ((this.m_Config.m_debug && (this.m_Config.app_server.m_debug)) && (this.m_Protocol == "http")) {
this.realaddHeader("amf_server_debug", true, this.m_Config.app_server);
} else {
this.realaddHeader("amf_server_debug", true, undefined);
}
}
};
NetConnection.prototype.updateConfig = function (config) {
this.attachDebug();
copyProperties(this.m_Config, config);
this.m_HeaderAdded = false;
};
NetConnection.prototype.isRealTime = function () {
return((this.m_Config.m_debug && (this.m_Config.realtime_server.m_debug)) && (this.m_Protocol == "rtmp"));
};
NetConnection.prototype.setupRecordset = function () {
this.attachDebug();
this.m_Config.client.http = this.m_Config.client.recordset;
};
NetConnection.prototype.setDebugId = function (id) {
this.attachDebug();
this.m_Id = id;
};
NetConnection.prototype.getDebugId = function () {
this.attachDebug();
return(this.m_Id);
};
NetConnection.prototype.trace = function (traceobj) {
this.attachDebug();
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
this.sendDebugEvent(new NetDebugTraceEvent(traceobj));
}
};
NetConnection.prototype.getDebugConfig = function () {
this.attachDebug();
return(this.m_Config);
};
if (!NetConnection.prototype.netDebugProxyFunctions) {
NetConnection.prototype.netDebugProxyFunctions = true;
NetConnection.prototype.realconnect = NetConnection.prototype.connect;
NetConnection.prototype.realcall = NetConnection.prototype.call;
NetConnection.prototype.realclose = NetConnection.prototype.close;
NetConnection.prototype.realaddHeader = NetConnection.prototype.addHeader;
NetConnection.prototype.connect = netDebugProxyConnect;
NetConnection.prototype.call = netDebugproxyCall;
NetConnection.prototype.close = netDebugproxyClose;
NetConnection.prototype.addHeader = netDebugproxyAddHeader;
}
RTMPClientIDResponse.prototype.onResult = function (cid) {
this.m_NC.m_ClientId = cid;
getNetDebug().sendCommand(new AddRTMPClientCommand(this.m_ConnectString, cid));
};
NetDebugResponseProxy.prototype.onDebugEvents = function (debugevents) {
var i = 0;
while (i < debugevents.length) {
this.m_SourceNC.sendServerEvent(debugevents[i]);
i++;
}
};
NetDebugResponseProxy.prototype.onResult = function (resultobj) {
this.m_SourceNC.sendClientEvent(new NetDebugResultEvent(resultobj));
this.m_OriginalNR.onResult(resultobj);
};
NetDebugResponseProxy.prototype.onStatus = function (statusobj) {
this.m_SourceNC.sendClientEvent(new NetDebugStatusEvent(statusobj));
if (this.m_OriginalNR.onStatus != undefined) {
this.m_OriginalNR.onStatus(statusobj);
} else {
_global.System.onStatus(statusobj);
}
};
NetDebugResponseProxy.prototype.__resolve = function (name) {
trace("NetDebugResponseProxy.prototype.__resolve name: " + name);
this.m_SourceNC.sendClientEvent(new NetDebugReceiveCallEvent(name, arguments));
this.m_OriginalNR[name].apply(arguments);
};
GlobalLocalConnection.prototype.setDomainName = function (domainname) {
if ((domainname != null) && (domainname != "")) {
this.sendPrefix = domainname + ":";
} else {
this.sendPrefix = "";
}
};
GlobalLocalConnection.prototype.send = function (dataobj) {
return(this.sendRaw("onData", dataobj));
};
GlobalLocalConnection.prototype.sendCommand = function (commandobj) {
return(this.sendRaw("onCommand", commandobj));
};
GlobalLocalConnection.prototype.sendRaw = function (functionname, obj) {
var suc = true;
var i = 0;
while (i < this.sendnames.length) {
suc = suc & _global.g_NetDebugLocalConnection.send(this.sendPrefix + this.sendnames[i], functionname, obj);
i++;
}
return(suc);
};
LocalCommand.prototype.init = function (commandname, dataobj) {
this.command = commandname;
this.data = dataobj;
};
UpdateNetDebugConfigCommand.prototype = new LocalCommand();
GetConfigCommand.prototype = new LocalCommand();
StartRTMPTraceCommand.prototype = new LocalCommand();
AddRTMPClientCommand.prototype = new LocalCommand();
StopRTMPTraceCommand.prototype = new LocalCommand();
NetDebug.prototype.addNetConnection = function (nc) {
this.m_ncs.push(nc);
return(this.m_NextNewId++);
};
NetDebug.prototype.removeNetConnection = function (nc) {
var i = 0;
while (i < this.m_ncs.length) {
if (nc == this.m_ncs[i]) {
this.m_ncs.splice(i, 1);
return;
}
i++;
}
};
NetDebug.prototype.sendDebugEvent = function (eventobj) {
if (!this.m_glc.send(eventobj)) {
this.m_glc.send(new NetDebugFailedSendErrorEvent(StripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
};
NetDebug.prototype.sendCommand = function (commandobj) {
return(this.m_glc.sendCommand(commandobj));
};
NetDebug.prototype.requestNewConfig = function () {
return(this.sendCommand(new GetConfigCommand()));
};
NetDebug.prototype.updateConfig = function (config) {
copyProperties(this.m_Config, config);
var i = 0;
while (i < this.m_ncs.length) {
if (this.m_ncs[i] != null) {
this.m_ncs[i].updateConfig(config);
}
i++;
}
};
NetDebug.prototype.sendStatus = function (statusobj) {
if (this.m_Config.m_debug && (this.m_Config.client.m_debug)) {
return(this.m_glc.send(new NetDebugStatusEvent(statusobj)));
}
};
NetDebug.prototype.onEvent = function (eventobj) {
return(this.sendDebugEvent(eventobj));
};
NetDebug.prototype.onEventError = function (errorobj) {
return(this.sendDebugEvent(new NetDebugErrorEvent(errorobj)));
};
NetDebug.prototype.onReceiveCommand = function (commandobj) {
this[commandobj.command](commandobj.data);
};
NetDebug.prototype.onReceiveError = function (errorobj) {
this.sendDebugEvent(new NetDebugErrorEvent(errorobj));
};
NetDebug.prototype.traceNetServices = function (who, severity, number, message) {
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
if (!this.sendDebugEvent(new NetDebugTraceNetServicesEvent(who, severity, number, message))) {
}
}
};
NetDebug.prototype.trace = function (traceobj) {
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
if (!this.sendDebugEvent(new NetDebugTraceEvent(traceobj))) {
}
}
};
if (_global.netDebugInstance == undefined) {
_global.netDebugInstance = new NetDebug();
}
NetDebug.trace = function (obj) {
getNetDebug().trace(obj);
};
NetDebug.traceNetServices = function (who, severity, number, message) {
getNetDebug().traceNetServices(who, severity, number, message);
};
NetDebug.getVersion = function () {
return(getNetDebugVersion());
};
NetDebug.globalOnStatus = function (statusobj) {
getNetDebug().sendStatus(statusobj);
};
if (_global.System.onStatus == undefined) {
_global.System.onStatus = NetDebug.globalOnStatus;
}
_global.DataGlue = function (dataProvider) {
this.dataProvider = dataProvider;
};
_global.DataGlue.bindFormatStrings = function (dataConsumer, dataProvider, labelString, dataString) {
var proxy = new DataGlue(dataProvider);
proxy.labelString = labelString;
proxy.dataString = dataString;
proxy.getItemAt = _global.DataGlue.getItemAt_FormatString;
dataConsumer.setDataProvider(proxy);
};
_global.DataGlue.bindFormatFunction = function (dataConsumer, dataProvider, formatFunction) {
var proxy = new DataGlue(dataProvider);
proxy.formatFunction = formatFunction;
proxy.getItemAt = _global.DataGlue.getItemAt_FormatFunction;
dataConsumer.setDataProvider(proxy);
};
_global.DataGlue.prototype.addView = function (viewRef) {
return(this.dataProvider.addView(viewRef));
};
_global.DataGlue.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
_global.DataGlue.prototype.format = function (formatString, record) {
var tokens = formatString.split("#");
var result = "";
var i = 0;
while (i < tokens.length) {
result = result + tokens[i];
result = result + ((tokens[i + 1] == "") ? "#" : (record[tokens[i + 1]]));
i = i + 2;
}
return(result);
};
_global.DataGlue.getItemAt_FormatString = function (index) {
var record = this.dataProvider.getItemAt(index);
if ((record == "in progress") || (record == undefined)) {
return(record);
}
return({label:this.format(this.labelString, record), data:((this.dataString == null) ? (record) : (this.format(this.dataString, record)))});
};
_global.DataGlue.getItemAt_FormatFunction = function (index) {
var record = this.dataProvider.getItemAt(index);
if ((record == "in progress") || (record == undefined)) {
return(record);
}
return(this.formatFunction(record));
};
_global.DataGlue.prototype.getItemID = function (index) {
return(this.dataProvider.getItemID(index));
};
_global.DataGlue.prototype.addItemAt = function (index, value) {
return(this.dataProvider.addItemAt(index, value));
};
_global.DataGlue.prototype.addItem = function (value) {
return(this.dataProvider.addItem(value));
};
_global.DataGlue.prototype.removeItemAt = function (index) {
return(this.dataProvider.removeItemAt(index));
};
_global.DataGlue.prototype.removeAll = function () {
return(this.dataProvider.removeAll());
};
_global.DataGlue.prototype.replaceItemAt = function (index, itemObj) {
return(this.dataProvider.replaceItemAt(index, itemObj));
};
_global.DataGlue.prototype.sortItemsBy = function (fieldName, order) {
return(this.dataProvider.sortItemsBy(fieldName, order));
};
EventBroadcaster = function () {
this.init();
};
EventBroadcaster.prototype.init = function () {
this.$listeners = new Array();
};
EventBroadcaster.prototype.addEventListener = function (ev, obj, evHand) {
if (!this.eventListenerExists()) {
this.$listeners.push({ev:ev, obj:obj, evHand:evHand});
return(true);
}
return(false);
};
EventBroadcaster.prototype.removeEventListener = function (ev, obj, evHand) {
var idx = this.$indexOfEventListener(ev, obj, evHand);
if (idx != -1) {
this.$listeners.splice(idx, 1);
return(true);
}
return(false);
};
EventBroadcaster.prototype.addListener = function (obj) {
return(this.addEventListener("ALL", obj));
};
EventBroadcaster.prototype.removeListener = function (obj) {
return(this.removeEventListener("ALL", obj));
};
EventBroadcaster.prototype.removeAllEventListeners = function (ev) {
if (ev == null) {
this.$listeners = new Array();
} else {
var currObj;
var i;
for (i in this.$listeners) {
currObj = this.$listeners[i];
if (currObj.ev == ev) {
this.$listeners.splice(i, 1);
}
}
}
};
EventBroadcaster.prototype.eventListenerExists = function (ev, obj, evHand) {
return(this.$indexOfEventListener(ev, obj, evHand) != -1);
};
EventBroadcaster.prototype.notify = function () {
var ev = arguments.shift();
var currObj;
var i;
for (i in this.$listeners) {
currObj = this.$listeners[i];
if ((currObj.ev == ev) || (currObj.ev == "ALL")) {
if (currObj.evHand == null) {
currObj.obj[ev].apply(currObj.obj, arguments);
} else {
currObj.obj[currObj.evHand].apply(currObj.obj, arguments);
}
}
}
};
EventBroadcaster.prototype.$indexOfEventListener = function (ev, obj, evHand) {
var currObj;
var i;
for (i in this.$listeners) {
currObj = this.$listeners[i];
if (((currObj.ev == ev) && (currObj.obj == obj)) && (currObj.evHand == evHand)) {
return(i);
}
}
return(-1);
};
EventBroadcaster.initialize = function (obj) {
var eb = new EventBroadcaster();
var i;
for (i in eb) {
obj[i] = eb[i];
}
};
if (EventBroadcaster == null) {
trace("UserServices: Cannot find EventBroadcaster. It is required for this class.");
}
UserServices = function () {
this.init.apply(this, arguments);
};
UserServices.prototype = new EventBroadcaster();
UserServices.prototype.init = function (connection, altService) {
super.init();
this.user_service = connection.getService(((altService == null) ? "Mattel.EverythingGirl.ServiceInterfaces.UserServices" : (altService)), this);
this.userID = -1;
this.avatar = "";
this.background = "";
this.emailAddressUser = "";
this.emailAddressParent = "";
this.lastBirthdayEmailSentDate = new Date();
this.countedBirthdayYear = -1;
this.userHint = "";
};
UserServices.prototype.logIn = function (userName, password) {
this.user_service.LogIn(userName, password);
};
UserServices.prototype.logOut = function () {
this.userID = -1;
this.notify("onLogOut", this);
};
UserServices.prototype.join = function (userName, password, passwordClueID, userEmail, parentEmail) {
this.user_service.Join(userName, password, passwordClueID, userEmail, parentEmail);
};
UserServices.prototype.getLoggedInUserID = function () {
this.lvData = new LoadVars();
this.lvData.controller = this;
this.lvData.onLoad = function () {
this.controller.userID = this.userID;
this.controller.notify("onLoggedInUserID", this.userID);
};
this.lv = new LoadVars();
this.lv.randID = Math.random();
this.lv.sendAndLoad(_global.server + "/common/getauthcookie.aspx", this.lvData);
};
UserServices.prototype.getUserInfo = function (userID, flag) {
if (flag == null) {
this.user_service.GetUserInfo(int(userID));
} else {
this.user_service.GetUserInfo(int(userID), flag);
}
};
UserServices.prototype.addExistingUser = function (userID, userEmail, parentEmail) {
this.user_service.AddExistingUser(userID, userEmail, parentEmail);
};
UserServices.prototype.sendNickName = function (email) {
this.user_service.SendNickName(email);
};
UserServices.prototype.getUserHint = function (nickname) {
this.user_service.UserHint(nickname);
};
UserServices.prototype.hintList = function () {
this.user_service.HintList();
};
UserServices.prototype.getPrettyPage = function (userid) {
this.user_service.GetPrettyPage(userid);
};
UserServices.prototype.setPrettyPage = function (userID, avatarID, backgroundID, birthdayYear, linksSelected) {
this.user_service.SetPrettyPage(userID, avatarID, backgroundID, birthdayYear, linksSelected);
};
UserServices.prototype.parentOptOutService = function (encUID) {
this.user_service.ParentOptOutService(encUID);
};
UserServices.prototype.checkCrankyEmail = function (useremail, parentemail) {
this.user_service.CheckCrankyEmail(useremail, parentemail);
};
UserServices.prototype.LogIn_Result = function (result) {
var t = result.Table.getItemAt(0);
var t2 = result.Table1.getItemAt(0);
this.userID = t.UserId;
if (int(t2.UserID) == -1) {
this.userID = t2.UserID;
}
this.nickname = t.Nickname;
this.avatar = t.Avatar;
this.background = t.Background;
this.backgroundID = t.BackgroundID;
this.emailAddressUser = t.EmailAddressUser;
this.emailAddressParent = t.EmailAddressParent;
this.lastBirthdayEmailSentDate = t.LastBirthdayEmailSentDate;
this.countedBirthdayYear = t.CountBirthdayYear;
this.faveLinks = result.Table2;
this.elloPoints = t.ElloPoints;
this.notify("onLogIn", this);
};
UserServices.prototype.Join_Result = function (result) {
var t = result.Table.getItemAt(0);
this.userID = t.UserId;
this.avatar = t.Avatar;
this.background = t.Background;
this.emailAddressUser = t.EmailAddressUser;
this.emailAddressParent = t.EmailAddressParent;
this.lastBirthdayEmailSentDate = t.LastBirthdayEmailSentDate;
this.countedBirthdayYear = t.CountBirthdayYear;
this.newName = t.NewName;
this.notify("onJoin", t);
};
UserServices.prototype.AddExistingUser_Result = function (result) {
this.notify("onAddExistingUser", result);
};
UserServices.prototype.SendNickName_Result = function (result) {
this.notify("onSendNickName", result);
};
UserServices.prototype.UserHint_Result = function (result) {
this.userHint = result;
this.notify("onUserHint", result);
};
UserServices.prototype.HintList_Result = function (result) {
var t = result.Table;
this.hintList = t;
this.notify("onHintList", t);
};
UserServices.prototype.GetPrettyPage_Result = function (result) {
this.avatarFileList = result.Table;
this.faveLinkList = result.Table1;
this.backgroundList = result.Table2;
this.newsletterList = result.Table3;
this.notify("onPrettyPage", this);
};
UserServices.prototype.SetPrettyPage_Result = function (result) {
this.notify("onSetPrettyPage", result);
};
UserServices.prototype.ParentOptOutService_Result = function (result) {
this.notify("onParentOptOut", result);
};
UserServices.prototype.CheckCrankyEmail_Result = function (result) {
this.whoIsCranky = result;
this.notify("onNextClick", this);
};
UserServices.prototype.handleBirthday = function (userid) {
this.user_service.HandleBirthdayEmail(userid);
};
UserServices.prototype.GetUserInfo_Result = function (result) {
var t = result.Table.getItemAt(0);
this.userID = t.UserId;
this.nickname = t.Nickname;
this.avatar = t.Avatar;
this.background = t.Background;
this.backgroundID = t.BackgroundID;
this.emailAddressUser = t.EmailAddressUser;
this.emailAddressParent = t.EmailAddressParent;
this.lastBirthdayEmailSentDate = t.LastBirthdayEmailSentDate;
this.countedBirthdayYear = t.CountBirthdayYear;
this.faveLinks = result.Table2;
this.elloPoints = t.ElloPoints;
this.notify("onUserInfo", t);
};
if (EventBroadcaster == null) {
trace("PointsServices: Cannot find EventBroadcaster. It is required for this class.");
}
PointsServices = function () {
this.init.apply(this, arguments);
};
PointsServices.prototype = new EventBroadcaster();
PointsServices.prototype.init = function (connection, altService) {
super.init();
this.points_service = connection.getService(((altService == null) ? "Mattel.EverythingGirl.ServiceInterfaces.PointsServices" : (altService)), this);
this.totalEarned = 0;
this.totalCharms = 0;
this.pointsToNextCharm = 0;
this.promotionPart = -1;
};
PointsServices.prototype.getPointsCharmData = function (userID) {
this.points_service.GetPointsCharmData(userID);
};
PointsServices.prototype.getAwardPoints = function (userID, partName) {
this.points_service.GetAwardPoints(userID, partName);
};
PointsServices.prototype.awardTransferPoints = function (userID, partOne, partTwo) {
this.points_service.AwardTransferPoints(userID, partOne, partTwo);
};
PointsServices.prototype.getPromotionPart = function (partName) {
this.points_service.GetPromotionPart(partName);
};
PointsServices.prototype.getHighScores = function () {
this.points_service.GetHighScores();
};
PointsServices.prototype.GetPointsCharmData_Result = function (result) {
var r = result.Table.getItemAt(0);
this.totalEarned = r.Total_Earned;
this.totalCharms = r.Total_Charms;
this.pointsToNextCharm = r.Points_To_Next_Charm;
this.notify("onPointsCharmData", this);
};
PointsServices.prototype.GetAwardPoints_Result = function (result) {
var t = result.Table.getItemAt(0);
this.points = t.Points;
this.partID = t.PartID;
this.charmSetName = t.CharmSet_Name;
this.haveInSet = t.Have_In_Set;
this.totalInSet = t.Total_In_Set;
this.tourLabel = t.Tour_Label;
this.nameOfPart = t.Name_of_Part;
this.totalCharms = t.Total_Charms;
this.totalEarned = t.Total_Earned;
this.pointsToNextCharm = t.Points_To_Next_Charm;
this.charmID = t.CharmID;
this.charmSetID = t.CharmSetID;
this.description = t.Description;
this.charmName = t.Charm_Name;
this.dayComplete = t.Day_Complete;
this.tourComplete = t.Tour_Complete;
this.charmFile = t.CharmFile;
this.notify("onAwardPoints", this);
};
PointsServices.prototype.AwardTransferPoints_Result = function (result) {
var t = result.Table.getItemAt(0);
this.points = t.Points;
this.partID = t.PartID;
this.charmSetName = t.CharmSet_Name;
this.haveInSet = t.Have_In_Set;
this.totalInSet = t.Total_In_Set;
this.tourLabel = t.Tour_Label;
this.nameOfPart = t.Name_of_Part;
this.totalCharms = t.Total_Charms;
this.totalEarned = t.Total_Earned;
this.pointsToNextCharm = t.Points_To_Next_Charm;
this.charmID = t.CharmID;
this.charmSetID = t.CharmSetID;
this.description = t.Description;
this.charmName = t.Charm_Name;
this.dayComplete = t.Day_Complete;
this.tourComplete = t.Tour_Complete;
this.charmFile = t.CharmFile;
this.secpoints = t.Sec_Points;
this.secPartName = t.Sec_Part_Name;
this.notify("onAwardTransferPoints", this);
};
PointsServices.prototype.GetPromotionPart_Result = function (result) {
this.promotionPart = result;
this.notify("onPromotionPart", this);
};
PointsServices.prototype.GetHighScores_Result = function (result) {
this.highScores = result.Table;
this.notify("onHighScores", this.highScores);
};
FPointsNoticeClass = function () {
this.partName = _root._url.split("/");
this.partName = this.partName[this.partName.length - 1].split("?");
this.partName = this.partName[0];
NetServices.setDefaultGatewayURL("/gateway.aspx");
connection = NetServices.createGatewayConnection();
this.myUserServices = new UserServices(connection, "Mattel.EverythingGirl.Data.EG_UserService");
this.myUserServices.addListener(this);
this.myUserServices.getLoggedInUserID();
this.myPointsServices = new PointsServices(connection, "Mattel.EverythingGirl.Data.EG_PointService");
this.myPointsServices.addListener(this);
this.stop();
};
FPointsNoticeClass.prototype = new MovieClip();
Object.registerClass("FPointsNoticeSymbol", FPointsNoticeClass);
FPointsNoticeClass.prototype.onLoggedInUserID = function (userID) {
this.userID = int(userID);
if (this.userID != -1) {
this.myUserServices.getUserInfo(this.userID, "N");
}
};
FPointsNoticeClass.prototype.onPromotionPart = function (c) {
if (c.promotionPart != -1) {
this.myPointsServices.getAwardPoints(this.userID, this.partName);
}
};
FPointsNoticeClass.prototype.onAwardPoints = function (c) {
if (c.points == -1) {
return(undefined);
}
if (this.userID == -1) {
this.gotoAndStop(2);
} else if (c.dayComplete == "Y") {
this.gotoAndStop(5);
} else if (c.charmID > 0) {
this.gotoAndStop(4);
} else if (c.charmID <= 0) {
this.gotoAndStop(3);
}
};
FPointsNoticeClass.prototype.setComplete = function () {
this.myPointsServices.getPromotionPart(this.partName);
};
#endinitclip
stop();
Symbol 69 MovieClip [FPointsNoticeSymbol] Frame 2
egLink.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/");
};
login_btn.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/Registration/login.aspx?partName=" + this._parent.partName);
};
join_btn.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/Registration/join.aspx?partName=" + this._parent.partName);
};
close_btn.onRelease = function () {
this._parent.gotoAndStop(1);
};
Symbol 69 MovieClip [FPointsNoticeSymbol] Frame 3
nickname.text = myUserServices.nickname;
points_number.text = myPointsServices.points;
actpoints1_number.text = myPointsServices.points;
activity1.text = myPointsServices.nameOfPart;
done_btn.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/");
};
close_btn.onRelease = function () {
this._parent.gotoAndStop(1);
};
egLink.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/");
};
Symbol 69 MovieClip [FPointsNoticeSymbol] Frame 4
nickname.text = myUserServices.nickname;
name_charm.text = myPointsServices.charmName;
set_charm.text = myPointsServices.charmSetName;
message_charm.text = myPointsServices.description;
charmsEarned_number.text = myPointsServices.haveInSet;
charmsNeeded_number.text = myPointsServices.haveInSet;
mycharms_btn.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/CharmsManager/");
};
close_btn.onRelease = function () {
this._parent.gotoAndStop(1);
};
egLink.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/");
};
Symbol 69 MovieClip [FPointsNoticeSymbol] Frame 5
nickname.text = myUserServices.nickname;
points_number.text = myPointsServices.points;
actpoints1_number.text = myPointsServices.points;
egLink.onRelease = function () {
getURL ("http://estwr-12-82.eshq.mattel.com/");
};
close_btn.onRelease = function () {
this._parent.gotoAndStop(1);
};
Symbol 72 MovieClip [FLabelSymbol] Frame 1
#initclip 1
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 73 MovieClip [FUIComponentSymbol] Frame 1
#initclip 2
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 74 MovieClip [FPointsNoticeLoaderSymbol] Frame 1
#initclip 8
FPointsNoticeLoaderClass = function () {
this.init();
};
FPointsNoticeLoaderClass.prototype = new MovieClip();
Object.registerClass("FPointsNoticeLoaderSymbol", FPointsNoticeLoaderClass);
FPointsNoticeLoaderClass.prototype.init = function () {
this.loadMovie(_global.server + "/ActivityOverlay/PointsNotice_v2.swf");
};
#endinitclip
Symbol 83 MovieClip [MusicToggleSymbol] Frame 1
#initclip 6
_global.MusicToggleClass = function () {
this.init.apply(this, arguments);
};
MusicToggleClass.prototype = new FUIComponentClass();
Object.registerClass("MusicToggleSymbol", MusicToggleClass);
MusicToggleClass.prototype.init = function () {
super.init();
if (this.musicSource == undefined) {
this.musicSource = "";
}
if (this.musicOn == undefined) {
this.musicOn = true;
}
if (this.isExternalSource == undefined) {
this.isExternalSource = false;
}
this.musicLoading = false;
this.setSource(this.musicSource);
this.cdAnim_mc.stop();
};
MusicToggleClass.prototype.setSource = function (path) {
this.musicSource = path;
if (this.musicOn) {
this._enable();
}
};
MusicToggleClass.prototype.getSource = function () {
return(this.musicSource);
};
MusicToggleClass.prototype.setEnabled = function (bool) {
this.playMusic(bool);
};
MusicToggleClass.prototype.getEnabled = function () {
return(this.musicOn);
};
MusicToggleClass.prototype.playMusic = function (bool) {
if (bool || (bool == undefined)) {
if ((!this.musicLoading) && (!this.musicOn)) {
this._enable();
}
} else {
this._disable();
}
};
MusicToggleClass.prototype.getSourceExternal = function () {
return(this.isExternalSource);
};
MusicToggleClass.prototype.isLoading = function () {
return(this.musicLoading);
};
MusicToggleClass.prototype._enable = function () {
if (this.musicSource != "") {
if (this.isExternalSource) {
this.musicLoading = true;
this.createEmptyMovieClip("musicSource_mc", 77);
this.musicSource_mc.loadMovie(this.musicSource);
this._checkSourceLoad();
this.gotoAndStop("loading");
} else {
this.musicOn = true;
this.soundObj = new Sound();
this.soundObj.attachSound(this.musicSource);
this.soundObj.start(0, 99999);
this.gotoAndStop("on");
this.cdAnim_mc.play();
}
}
};
MusicToggleClass.prototype._disable = function () {
this.musicOn = false;
this.musicLoading = false;
this.soundObj.stop();
this.musicSource_mc.removeMovieClip();
this.gotoAndStop("off");
this.cdAnim_mc.stop();
};
MusicToggleClass.prototype._checkSourceLoad = function () {
this.loadInt = setInterval(this, "_loadCheckLoop", 20);
};
MusicToggleClass.prototype._loadCheckLoop = function () {
var bL = this.musicSource_mc.getBytesLoaded();
var bT = this.musicSource_mc.getBytesTotal();
if ((bL > 500) && (bL == bT)) {
this.musicOn = true;
this.soundObj = new Sound(this.musicSource_mc);
this.gotoAndStop("on");
this.cdAnim_mc.play();
this.musicLoading = false;
clearInterval(this.loadInt);
}
};
MusicToggleClass.prototype.onPress = function () {
this.playMusic(!this.musicOn);
this.executeCallBack();
};
#endinitclip
this.cdAnim_mc.stop();
stop();
Symbol 83 MovieClip [MusicToggleSymbol] Frame 6
this.cdAnim_mc.play();
Symbol 83 MovieClip [MusicToggleSymbol] Frame 11
this.cdAnim_mc.stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 15
stop();
Symbol 139 MovieClip Frame 36
stop();
Symbol 145 MovieClip Frame 21
stop();
Symbol 154 MovieClip Frame 21
stop();
Symbol 161 MovieClip Frame 23
stop();
Symbol 182 MovieClip Frame 17
stop();
Symbol 196 MovieClip Frame 11
stop();
Symbol 207 MovieClip Frame 14
stop();
Symbol 217 MovieClip Frame 13
stop();
Symbol 218 MovieClip Frame 21
stop();
Symbol 229 MovieClip Frame 25
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 11
play();
Symbol 241 MovieClip Frame 110
gotoAndStop (1);
Symbol 246 MovieClip Frame 23
stop();
Symbol 249 MovieClip Frame 12
stop();
Symbol 250 MovieClip Frame 12
stop();
Symbol 251 MovieClip Frame 12
stop();
Symbol 255 MovieClip Frame 12
stop();
Symbol 259 MovieClip Frame 12
stop();
Symbol 267 MovieClip Frame 1
play();
Symbol 267 MovieClip Frame 56
stop();
Symbol 270 MovieClip Frame 1
play();
Symbol 270 MovieClip Frame 46
stop();
Instance of Symbol 267 MovieClip in Symbol 271 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._parent._name != "sparkle_mc") {
if (!this.done) {
if ((_root.current_select != null) && (_root.current_select != "")) {
this.gotoAndStop(1);
this.done == true;
}
}
}
}
Instance of Symbol 270 MovieClip in Symbol 271 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._parent._name != "sparkle_mc") {
if (!this.done) {
if ((_root.current_select != null) && (_root.current_select != "")) {
this.gotoAndStop(1);
this.done == true;
}
}
}
}
Symbol 278 MovieClip Frame 1
stop();
Symbol 279 Button
on (release) {
var target_mc = this;
_root.nail_click(target_mc);
}
Symbol 285 MovieClip Frame 17
stop();
Symbol 286 MovieClip Frame 21
stop();
Symbol 304 MovieClip Frame 21
stop();
Symbol 307 MovieClip Frame 22
stop();
Symbol 312 MovieClip Frame 27
stop();
Symbol 315 MovieClip Frame 21
stop();
Symbol 329 MovieClip Frame 28
stop();
Symbol 344 MovieClip Frame 31
stop();
Symbol 347 MovieClip Frame 37
stop();
Symbol 374 MovieClip Frame 33
stop();
Symbol 383 MovieClip Frame 23
stop();
Symbol 394 MovieClip Frame 33
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 398 MovieClip Frame 1
stop();
Symbol 399 Button
on (release) {
_root.finger_click(this, 0, "left");
}
Symbol 400 Button
on (release) {
_root.finger_click(this, 1, "left");
}
Symbol 401 Button
on (release) {
_root.finger_click(this, 2, "left");
}
Symbol 402 Button
on (release) {
_root.finger_click(this, 3, "left");
}
Symbol 403 Button
on (release) {
_root.finger_click(this, 4, "left");
}
Symbol 413 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 2
stop();
Symbol 415 MovieClip Frame 13
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 2
stop();
Symbol 424 MovieClip Frame 13
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 2
stop();
Symbol 431 MovieClip Frame 13
stop();
Symbol 438 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 13
stop();
Symbol 443 MovieClip Frame 1
stop();
Symbol 443 MovieClip Frame 2
stop();
Symbol 445 MovieClip Frame 13
stop();
Symbol 453 MovieClip Frame 13
stop();
Symbol 459 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 2
stop();
Symbol 461 MovieClip Frame 13
stop();
Symbol 468 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 2
stop();
Symbol 470 MovieClip Frame 13
stop();
Symbol 475 MovieClip Frame 13
stop();
Symbol 483 MovieClip Frame 1
stop();
Symbol 483 MovieClip Frame 2
stop();
Symbol 485 MovieClip Frame 13
stop();
Symbol 486 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 508 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(face_mc, "face");
Symbol 513 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 517 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(trackLeftCap, "scrollTrack");
Symbol 519 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(trackMiddle, "scrollTrack");
Symbol 521 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(track, "scrollTrack");
Symbol 526 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 526 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 529 MovieClip [FProgressBarSymbol] Frame 1
#initclip 5
function ProgressBarClass() {
this.init();
if (this.displayBar == undefined) {
this.displayBar = true;
this.kBTally = true;
}
this.maxV = 100;
this.minV = 0;
this.value = 0;
this.oldValue = 0;
this.width = this._xscale;
this._xscale = (this._yscale = 100);
this.boundingBox_mc._visible = false;
this.setChangeHandler(this.changeHandler);
if (this.displayBar) {
this.attachMovie("Track", "track", 0);
}
this.setDisplayText(this.kBTally);
this.setSize(this.width);
}
Object.registerClass("FProgressBarSymbol", ProgressBarClass);
ProgressBarClass.prototype = new FUIComponentClass();
ProgressBarClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.stretchToSize(w, this.track.leftTrack, this.track.midTrack, this.track.rightTrack);
this.KBText._x = this.track._x;
this.KBText._y = (this.track._y + this.track._height) + 0;
this.KBText.setSize(w);
this.renderBar();
};
ProgressBarClass.prototype.setLoadTarget = function (mcRef) {
this.loadTarget = mcRef;
this.createEmptyMovieClip("loadPoller", 10);
this.loadPoller.onEnterFrame = function () {
var comp = this._parent.loadTarget;
this._parent.setProgress(comp.getBytesLoaded(), comp.getBytesTotal());
if ((this._parent.getPercentComplete() >= 100) && (this._parent.getValue() > 4)) {
delete this.onEnterFrame;
}
};
};
ProgressBarClass.prototype.getLoadTarget = function () {
return(this.loadTarget);
};
ProgressBarClass.prototype.setValue = function (v) {
this.value = v;
this.invalidate("renderBar");
};
ProgressBarClass.prototype.getValue = function () {
return(this.value);
};
ProgressBarClass.prototype.setMinimum = function (m) {
this.minV = m;
};
ProgressBarClass.prototype.getMinimum = function () {
return(this.minV);
};
ProgressBarClass.prototype.setMaximum = function (m) {
this.maxV = m;
this.invalidate("renderBar");
};
ProgressBarClass.prototype.getMaximum = function () {
return(this.maxV);
};
ProgressBarClass.prototype.setDisplayText = function (tOrF) {
if (tOrF) {
this.KBText = this.attachMovie("FLabelSymbol", "KBT", 4, {hostComponent:this});
this.setStyleProperty("textAlign", "center");
} else {
this.KBText.removeMovieClip();
this.KBText = undefined;
}
};
ProgressBarClass.prototype.setDisplayGraphics = function (tOrF) {
this.displayBar = tOrF;
if (!tOrF) {
this.growBar.removeMovieClip();
this.growBar = undefined;
this.track.removeMovieClip();
} else {
this.attachMovie("Track", "track", 0);
this.setSize(this.width);
}
};
ProgressBarClass.prototype.getPercentComplete = function () {
return(Math.round(((this.value - this.minV) / this.maxV) * 100));
};
ProgressBarClass.prototype.setPercentComplete = function (p) {
this.value = ((this.maxV * p) / 100) + this.minV;
this.invalidate("renderBar");
};
ProgressBarClass.prototype.setProgress = function (v, t) {
this.value = v;
this.maxV = t;
this.invalidate("renderBar");
};
ProgressBarClass.prototype.stretchToSize = function (w, leftCap, mid, rightCap) {
var stretchWidth = Math.max(0, (w - leftCap._width) - rightCap._width);
mid._width = stretchWidth;
mid._x = leftCap._x + leftCap._width;
rightCap._x = mid._x + mid._width;
};
ProgressBarClass.prototype.renderBar = function () {
if ((this.maxV == 0) || (this.value == 0)) {
this.growBar.removeMovieClip();
return(undefined);
}
this.value = Math.min(this.maxV, this.value);
if (this.value != this.oldValue) {
this.executeCallBack();
}
if ((this.growBar == undefined) && (this.displayBar)) {
this.growBar = this.attachMovie("GrowBar", "gBar", 2);
}
var barSize = ((this.getPercentComplete() * (this.width - 2)) / 100);
this.stretchToSize(barSize, this.growBar.leftBar, this.growBar.midBar, this.growBar.rightBar);
this.oldValue = this.value;
this.KBText.setLabel(((Math.round(this.getValue() / 1024) + " / ") + Math.round(this.maxV / 1024)) + " KB");
};
#endinitclip
Symbol 530 MovieClip [DataProviderSymbol] Frame 1
#initclip 3
_global.DataProviderClass = function () {
this.init();
};
DataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
};
DataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var eventObj = {event:"updateAll"};
viewRef.modelChanged(eventObj);
};
DataProviderClass.prototype.addItemAt = function (index, value) {
if (index < this.getLength()) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
} else {
this.items[index].label = value;
}
this.items[index].__ID__ = this.uniqueID++;
var eventObj = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var tmpItm = this.items[index];
this.items.splice(index, 1);
var eventObj = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
return(tmpItm);
};
DataProviderClass.prototype.removeAll = function () {
this.items = new Array();
this.updateViews({event:"deleteRows", firstRow:0, lastRow:this.getLength() - 1});
};
DataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var tmpID = this.getItemID(index);
if (typeof(itemObj) == "object") {
this.items[index] = itemObj;
} else {
this.items[index].label = itemObj;
}
this.items[index].__ID__ = tmpID;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
DataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
DataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
DataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
DataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({event:"sort"});
};
DataProviderClass.prototype.updateViews = function (eventObj) {
var i = 0;
while (i < this.views.length) {
this.views[i].modelChanged(eventObj);
i++;
}
};
#endinitclip
Symbol 531 MovieClip [FAdvancedProgressBarSymbol] Frame 1
#initclip 7
function FAdvancedProgressBarClass() {
this.init();
}
FAdvancedProgressBarClass.prototype = new FUIComponentClass();
Object.registerClass("FAdvancedProgressBarSymbol", FAdvancedProgressBarClass);
FAdvancedProgressBarClass.prototype.init = function () {
super.setSize(this._width, this._height);
this._xscale = (this._yscale = 100);
this.progressBar_mc.setSize(this.width, this.height);
super.init();
this.setSize();
};
FAdvancedProgressBarClass.prototype.setDataProvider = function (obj) {
if (obj instanceof Array) {
this.dataProvider = new DataProviderClass();
var i = 0;
while (i < obj.length) {
this.dataProvider.addItem(obj[i]);
i++;
}
} else {
this.dataProvider = obj;
}
this.dataProvider.addView(this);
};
FAdvancedProgressBarClass.prototype.setSize = function () {
this.progressBar_mc.setChangeHandler("checkProgress", this);
this.selectedIndex = 0;
if (this.getLength() > 0) {
var currObj = this.getItemAt(this.selectedIndex);
if (currObj.url != null) {
currObj.loadTarget.loadMovie(currObj.url);
}
this.progressBar_mc.setLoadTarget(currObj.loadTarget);
}
};
FAdvancedProgressBarClass.prototype.checkProgress = function (c) {
if (c.getPercentComplete() == 100) {
this.selectedIndex++;
if (this.selectedIndex < this.getLength()) {
var currObj = this.getItemAt(this.selectedIndex);
if (currObj.url != null) {
currObj.loadTarget.loadMovie(currObj.url);
}
this.progressBar_mc.setLoadTarget(currObj.loadTarget);
}
this.executeCallback();
}
};
FAdvancedProgressBarClass.prototype.setStyleProperty = function (p, v) {
this.progressBar_mc.setStyleProperty(p, v);
};
FAdvancedProgressBarClass.prototype.getPercentComplete = function () {
return(this.progressBar_mc.getPercentComplete());
};
FAdvancedProgressBarClass.prototype.getSelectedIndex = function () {
return(this.selectedIndex);
};
FAdvancedProgressBarClass.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
FAdvancedProgressBarClass.prototype.getItemAt = function (idx) {
return(this.dataProvider.getItemAt(idx));
};
FAdvancedProgressBarClass.prototype.modelChanged = function () {
this.invalidate("setSize");
};
#endinitclip
Instance of Symbol 529 MovieClip [FProgressBarSymbol] "progressBar_mc" in Symbol 531 MovieClip [FAdvancedProgressBarSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
displayBar = true;
kBTally = false;
changeHandler = "";
}
Instance of Symbol 530 MovieClip [DataProviderSymbol] in Symbol 531 MovieClip [FAdvancedProgressBarSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 572 Button
on (release) {
_root.new_game();
}
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 5
play();
Symbol 582 MovieClip Frame 7
gotoAndStop (1);
Symbol 582 MovieClip Frame 15
play();
Symbol 582 MovieClip Frame 17
gotoAndStop (1);
Symbol 582 MovieClip Frame 23
play();
Symbol 582 MovieClip Frame 25
gotoAndStop (1);
Symbol 582 MovieClip Frame 30
play();
Symbol 582 MovieClip Frame 32
gotoAndStop (1);
Symbol 582 MovieClip Frame 40
play();
Symbol 582 MovieClip Frame 42
gotoAndStop (1);
Symbol 582 MovieClip Frame 49
play();
Symbol 582 MovieClip Frame 51
gotoAndStop (1);
Symbol 582 MovieClip Frame 57
play();
Symbol 582 MovieClip Frame 59
gotoAndStop (1);
Symbol 608 Button
on (release) {
character_select(3);
}
Symbol 620 Button
on (release) {
character_select(4);
}
Symbol 625 MovieClip Frame 30
stop();
Symbol 627 Button
on (release) {
character_select(1);
}
Symbol 644 MovieClip Frame 22
stop();
Symbol 646 Button
on (release) {
character_select(2);
}
Symbol 666 MovieClip Frame 1
stop();
Symbol 666 MovieClip Frame 2
stop();
Symbol 669 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 2
stop();
Symbol 670 Button
on (release) {
var ring = 2;
_root.select_ring(ring);
}
on (rollOver) {
ring_0.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_0.gotoAndStop(1);
_root.dragging = true;
}
Symbol 671 Button
on (release) {
var ring = 3;
_root.select_ring(ring);
}
on (rollOver) {
ring_1.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_1.gotoAndStop(1);
_root.dragging = true;
}
Symbol 672 Button
on (release) {
var ring = 4;
_root.select_ring(ring);
}
on (rollOver) {
ring_2.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_2.gotoAndStop(1);
_root.dragging = true;
}
Symbol 673 Button
on (release) {
var ring = 5;
_root.select_ring(ring);
}
on (rollOver) {
ring_3.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_3.gotoAndStop(1);
_root.dragging = true;
}
Symbol 674 Button
on (release) {
var ring = 6;
_root.select_ring(ring);
}
on (rollOver) {
ring_4.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_4.gotoAndStop(1);
_root.dragging = true;
}
Symbol 675 Button
on (release) {
var ring = 7;
_root.select_ring(ring);
}
on (rollOver) {
ring_5.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_5.gotoAndStop(1);
_root.dragging = true;
}
Symbol 676 Button
on (release) {
var ring = 8;
_root.select_ring(ring);
}
on (rollOver) {
ring_6.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_6.gotoAndStop(1);
_root.dragging = true;
}
Symbol 677 Button
on (release) {
var ring = 9;
_root.select_ring(ring);
}
on (rollOver) {
ring_7.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_7.gotoAndStop(1);
_root.dragging = true;
}
Symbol 678 Button
on (release) {
var ring = 10;
_root.select_ring(ring);
}
on (rollOver) {
ring_8.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_8.gotoAndStop(1);
_root.dragging = true;
}
Symbol 679 Button
on (release) {
var ring = "double";
_root.select_ring(ring);
}
on (rollOver) {
ring_9.gotoAndStop(2);
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
ring_9.gotoAndStop(1);
_root.dragging = true;
}
Symbol 688 Button
on (release) {
_root.select_length("short");
}
on (rollOver) {
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
_root.dragging = true;
}
Symbol 691 Button
on (release) {
_root.select_length("long");
}
on (rollOver) {
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
_root.dragging = true;
}
Symbol 704 Button
on (release) {
_root.select_remover();
}
on (rollOver) {
_root.dragging = false;
}
on (rollOut, dragOut, releaseOutside) {
_root.dragging = true;
}
Symbol 711 MovieClip Frame 1
stop();
Symbol 712 MovieClip Frame 1
stop();
Symbol 713 MovieClip Frame 1
stop();
Symbol 714 MovieClip Frame 1
stop();
Symbol 715 MovieClip Frame 1
stop();
Symbol 716 Button
on (release) {
var gem = 1;
_root.select_gem(gem);
}
on (rollOver) {
gem_0.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_0.gotoAndStop("off");
}
Symbol 717 Button
on (release) {
var gem = 2;
_root.select_gem(gem);
}
on (rollOver) {
gem_1.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_1.gotoAndStop("off");
}
Symbol 718 Button
on (release) {
var gem = 3;
_root.select_gem(gem);
}
on (rollOver) {
gem_2.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_2.gotoAndStop("off");
}
Symbol 719 Button
on (release) {
var gem = 4;
_root.select_gem(gem);
}
on (rollOver) {
gem_3.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_3.gotoAndStop("off");
}
Symbol 720 Button
on (release) {
var gem = 5;
_root.select_gem(gem);
}
on (rollOver) {
gem_4.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_4.gotoAndStop("off");
}
Symbol 721 MovieClip Frame 1
stop();
_root.dragging = true;
Instance of Symbol 707 MovieClip "button_mc" in Symbol 721 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop("over");
}
}
}
Symbol 721 MovieClip Frame 6
stop();
_root.dragging = false;
Instance of Symbol 710 MovieClip "button_mc" in Symbol 721 MovieClip Frame 6
onClipEvent (enterFrame) {
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop("off");
}
}
Symbol 723 MovieClip Frame 1
stop();
Symbol 724 Button
on (release) {
var gem = 6;
_root.select_gem(gem);
}
on (rollOver) {
gem_0.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_0.gotoAndStop("off");
}
Symbol 725 Button
on (release) {
var gem = 7;
_root.select_gem(gem);
}
on (rollOver) {
gem_1.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_1.gotoAndStop("off");
}
Symbol 726 Button
on (release) {
var gem = 8;
_root.select_gem(gem);
}
on (rollOver) {
gem_2.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_2.gotoAndStop("off");
}
Symbol 727 Button
on (release) {
var gem = 9;
_root.select_gem(gem);
}
on (rollOver) {
gem_3.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_3.gotoAndStop("off");
}
Symbol 728 Button
on (release) {
var gem = 10;
_root.select_gem(gem);
}
on (rollOver) {
gem_4.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_4.gotoAndStop("off");
}
Symbol 729 MovieClip Frame 1
stop();
_root.dragging = true;
Instance of Symbol 707 MovieClip "button_mc" in Symbol 729 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop("over");
}
}
}
Symbol 729 MovieClip Frame 6
stop();
_root.dragging = false;
Instance of Symbol 710 MovieClip "button_mc" in Symbol 729 MovieClip Frame 6
onClipEvent (enterFrame) {
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop("off");
}
}
Symbol 732 MovieClip Frame 1
stop();
Symbol 733 MovieClip Frame 1
stop();
Symbol 734 Button
on (release) {
var gem = 11;
_root.select_gem(gem);
}
on (rollOver) {
gem_0.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_0.gotoAndStop("off");
}
Symbol 735 Button
on (release) {
var gem = 12;
_root.select_gem(gem);
}
on (rollOver) {
gem_1.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_1.gotoAndStop("off");
}
Symbol 736 Button
on (release) {
var gem = 13;
_root.select_gem(gem);
}
on (rollOver) {
gem_2.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_2.gotoAndStop("off");
}
Symbol 737 Button
on (release) {
var gem = 14;
_root.select_gem(gem);
}
on (rollOver) {
gem_3.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_3.gotoAndStop("off");
}
Symbol 738 Button
on (release) {
var gem = 15;
_root.select_gem(gem);
}
on (rollOver) {
gem_4.gotoAndStop("over");
}
on (rollOut, dragOut, releaseOutside) {
gem_4.gotoAndStop("off");
}
Symbol 739 MovieClip Frame 1
stop();
_root.dragging = true;
Instance of Symbol 707 MovieClip "button_mc" in Symbol 739 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop("over");
}
}
}
Symbol 739 MovieClip Frame 6
stop();
_root.dragging = false;
Instance of Symbol 710 MovieClip "button_mc" in Symbol 739 MovieClip Frame 6
onClipEvent (enterFrame) {
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop("off");
}
}
Symbol 757 MovieClip Frame 1
stop();
Symbol 758 Button
on (release) {
_root.select_color(bottle_mc._currentframe, this);
}
on (rollOver) {
if ((_root.current_select != "color") && (_root.current_select != "airbrush")) {
_root.dragging = false;
}
gotoAndStop (6);
}
on (rollOut, dragOut, releaseOutside) {
_root.dragging = true;
gotoAndStop (1);
}
Symbol 759 MovieClip Frame 1
stop();
bottle_mc.lid_mc._visible = true;
Symbol 759 MovieClip Frame 6
stop();
Symbol 759 MovieClip Frame 11
stop();
bottle_mc.lid_mc._visible = false;
Symbol 782 MovieClip Frame 1
stop();
Symbol 783 Button
on (release) {
_root.select_airbrush(bottle_mc._currentframe, this);
}
on (rollOver) {
if ((_root.current_select != "color") && (_root.current_select != "airbrush")) {
_root.dragging = false;
}
gotoAndStop (6);
}
on (rollOut, dragOut, releaseOutside) {
_root.dragging = true;
gotoAndStop (1);
}
Symbol 784 MovieClip Frame 1
stop();
bottle_mc.lid_mc._visible = true;
Symbol 784 MovieClip Frame 6
stop();
Symbol 784 MovieClip Frame 11
stop();
bottle_mc.lid_mc._visible = false;
Symbol 786 Button
on (release) {
_root.finger_click(this, 3, "right");
}
Symbol 787 Button
on (release) {
_root.finger_click(this, 2, "right");
}
Symbol 788 Button
on (release) {
_root.finger_click(this, 1, "right");
}
Symbol 789 Button
on (release) {
_root.finger_click(this, 0, "right");
}
Symbol 790 Button
on (release) {
_root.finger_click(this, 4, "right");
}
Symbol 794 MovieClip Frame 1
stop();
Symbol 797 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 1
stop();
Symbol 876 MovieClip Frame 1
stop();
Symbol 882 MovieClip Frame 1
stop();
Symbol 887 MovieClip Frame 1
stop();
Symbol 893 MovieClip Frame 1
stop();
Symbol 900 MovieClip Frame 1
stop();
Symbol 905 Button
on (release) {
_root.paused = true;
help_mc.gotoAndStop("on");
}
Symbol 908 Button
on (release) {
_root.show_end();
}
Symbol 909 Button
on (rollOver) {
nextFrame();
}
Symbol 910 Button
on (rollOver) {
prevFrame();
}
Symbol 914 MovieClip Frame 1
stop();
Symbol 914 MovieClip Frame 2
stop();
Symbol 921 Button
on (release) {
_root.paused = false;
gotoAndStop (1);
}
Symbol 922 MovieClip Frame 1
stop();
Symbol 922 MovieClip Frame 6
stop();
Symbol 947 MovieClip Frame 36
stop();
Symbol 968 MovieClip Frame 32
stop();
Symbol 980 MovieClip Frame 35
stop();
Symbol 993 MovieClip Frame 24
stop();
Symbol 994 MovieClip Frame 1
stop();
Symbol 1005 Button
on (release) {
_root.new_game();
}
Symbol 1007 Button
on (release) {
_root.print_manicure(_root.printable_mc);
}