Frame 1
border.swapdepths(5000);
index.swapdepths(4998);
notification.swapdepths(1000);
local_so = sharedobject.getlocal("NG");
fscommand ("allowscale", "false");
stop();
connect_status = "disconnect";
client_nc = new netConnection();
client_nc.onStatus = function (info) {
trace(((("Level: " + info.level) + newline) + "Code: ") + info.code);
if (info.code == "NetConnection.Connect.Success") {
_root.chatroom();
login.status = "success";
login.gotoandplay("end");
btns.nextFrame();
_root.connect_status = "chatroom";
_root.gotoandstop("chatroom");
} else if (((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) || (info.code == "NetConnection.Connect.Closed")) {
if (_root.connect_status == "disconnect") {
if (info.code == "NetConnection.Connect.Rejected") {
if (info.application != null) {
login.reject = info.application;
} else {
login.reject = "Server full! Please try again later.";
}
} else if (info.code == "NetConnection.Connect.Failed") {
login.reject = "Connection failed! Please try again.";
}
login.status = "failed";
login.gotoandplay("end");
} else if (_root.connect_status == "chatroom") {
_root.connect_status = "disconnect";
_root.parent_window.chat.gotoandplay("close");
for (var i in _root.parent_window) {
if (i != "user_window") {
_root.parent_window[i].gotoandplay("remove");
}
}
login.gotoandplay(2);
btns.gotoandstop(1);
} else if (_root.connect_status == "game") {
_root.connect_status = "disconnect";
i = 1;
while (i <= 16) {
removeMovieClip("redpiece" + i);
removeMovieClip("blackpiece" + i);
i++;
}
_root.gotoandstop("chatroom");
}
}
};
client_nc.declare_name = function (user) {
_root.name = user;
};
client_nc.challenge = function (user) {
_root.parent_window[user].gotoandstop("challenge");
_root.parent_window[user].swapdepths(_root.depths++);
_root.parent_window.chat.History.htmltext = _root.parent_window.chat.History.htmltext + (("<b><font color ='#FF9900'>" + user) + " has challenged you!</font></b>\n");
_root.parent_window.chat.History.scroll = _root.parent_window.chat.History.maxscroll;
_root.parent_window.chat.historyScroll.setScrollTarget(_root.parent_window.chat.History);
_root.parent_window.chat.historyScroll.setScrollPosition(_root.parent_window.chat.History.maxscroll);
};
client_nc.decline = function () {
_root.challenge_copy.gotoandplay("decline");
};
client_nc.ChallengerStart = function (msg, j, tempname) {
_root.first_turn = j;
_root.home_name = tempname;
_root.challenger_name = _root.name;
_root.so_number = msg;
_root[_root.so_number] = SharedObject.getRemote("chess" + so_number, _root.client_nc.uri, false);
_root[_root.so_number].connect(_root.client_nc);
_root[_root.so_number].msgFromSrvr = function (msg) {
_root.chat_window.History.text = _root.chat_window.History.text + msg;
_root.chat_window.History.scroll = _root.chat_window.History.maxscroll;
historyScroll.setScrollTarget(_root.chat_window.History);
historyScroll.setScrollPosition(_root.chat_window.History.maxscroll);
};
_root[_root.so_number].onSync = function () {
_root[_root.so_number].data.challenge = "yes";
if ((_root[_root.so_number].data.challenge == "yes") && (_root[_root.so_number].data.home == "yes")) {
_root.client_nc.call("enter_game", null, _root.so_number);
_root.parent_window.chat.gotoandplay("close");
emi_so.close();
current_users.close();
for (var i in _root.parent_window) {
if (i != "user_window") {
_root.parent_window[i].gotoandplay("remove");
}
}
_root.challenge_copy.gotoandplay("accept");
_root.gotoandstop("game");
if (_root.users_so.data[_root.name].win != null) {
_root.users_so.data[_root.name].loss++;
}
}
};
if (j < 0.5) {
_root.turn = 0;
} else {
_root.turn = 1;
}
_root.a = 1;
_root.b = 1;
_root.c = 2;
};
client_nc.HomeStart = function (msg, tempname) {
_root.home_name = _root.name;
_root.challenger_name = tempname;
_root.so_number = msg;
_root[_root.so_number] = SharedObject.getRemote("chess" + so_number, _root.client_nc.uri, false);
_root[_root.so_number].connect(_root.client_nc);
_root[_root.so_number].msgFromSrvr = function (msg) {
_root.chat_window.History.text = _root.chat_window.History.text + msg;
_root.chat_window.History.scroll = _root.chat_window.History.maxscroll;
historyScroll.setScrollTarget(_root.chat_window.History);
historyScroll.setScrollPosition(_root.chat_window.History.maxscroll);
};
_root[_root.so_number].onSync = function () {
_root[_root.so_number].data.home = "yes";
if ((_root[_root.so_number].data.challenge == "yes") && (_root[_root.so_number].data.home == "yes")) {
_root.client_nc.call("enter_game", null, _root.so_number);
_root.parent_window.chat.gotoandplay("close");
emi_so.close();
current_users.close();
for (var i in _root.parent_window) {
if (i != "user_window") {
_root.parent_window[i].gotoandplay("remove");
}
}
_root.gotoandstop("game");
if (_root.users_so.data[_root.name].win != null) {
_root.users_so.data[_root.name].loss++;
}
}
};
if (_root.first_turn < 0.5) {
_root.turn = 0;
} else {
_root.turn = 1;
}
_root.a = 0;
_root.b = 2;
_root.c = 1;
};
client_nc.ban = function () {
local_so.data.ban = "yes";
_root.client_nc.close();
};
Frame 7
function doConnect(user, password, email, avatar, register) {
client_nc.connect("rtmp://hanamifx.uvault.com/western/", user, password, email, avatar, register, _root.room, "0312", "0318");
users_so = SharedObject.getRemote("users_so", _root.client_nc.uri, true);
users_so.connect(_root.client_nc);
}
function chatroom() {
emi_so = SharedObject.getRemote("emi_so_" + _root.room, _root.client_nc.uri, false);
emi_so.connect(_root.client_nc);
current_users = SharedObject.getRemote("current_users_" + _root.room, _root.client_nc.uri, false);
current_users.connect(_root.client_nc);
emi_so.msgFromSrvr = function (msg) {
_root.parent_window.chat.History.htmltext = _root.parent_window.chat.History.htmltext + msg;
_root.parent_window.chat.History.scroll = _root.parent_window.chat.History.maxscroll;
_root.parent_window.chat.historyScroll.setScrollTarget(_root.parent_window.chat.History);
_root.parent_window.chat.historyScroll.setScrollPosition(_root.parent_window.chat.History.maxscroll);
};
current_users.onSync = function () {
ver = 30;
hor = 110;
for (var i in current_users.data) {
if (ver >= 500) {
hor = hor + 198;
ver = 30;
}
if ((_root.parent_window[i] == null) && (i != null)) {
_root.parent_window.user_window.duplicateMovieClip(i, _root.depths++);
_root.parent_window[i].name = i;
}
_root.parent_window[i].xfinal = hor;
_root.parent_window[i].yfinal = ver;
ver = ver + 60;
}
};
current_users.away_in = function (user) {
if (user != _root.name) {
_root.parent_window[user].gotoandstop("away");
}
_root.parent_window[user]._alpha = 50;
};
current_users.away_out = function (user) {
if (user != _root.name) {
_root.parent_window[user].gotoandstop("others");
}
_root.parent_window[user]._alpha = 100;
};
emi_so.onSync = function () {
_root.parent_window.chat.head.text = emi_so.data.user_number;
};
current_users.RemoveWindow = function (user) {
_root.parent_window[user].gotoandplay("remove");
};
_root.parent_window.chat_window.duplicateMovieClip("chat", _root.depths++);
}
function doDisconnect() {
client_nc.close();
chat_window.play();
for (var i in myusers) {
_root[myusers[i]].gotoandplay("remove");
}
_root[name].gotoandplay("remove");
}
stop();
depths = 5;
if (connect_status == "game") {
_root.client_nc.close();
}
loadMovie ("http://www.fishingwithrod.com/Larson/chess/western.swf", "news");
Frame 8
function follow() {
_root.opponent = "yes";
if (_root.board[x][y] != 0) {
if (_root.board[x][y] == 1) {
i = 1;
while (i <= 16) {
if ((_root["redpiece" + i].row == x) && (_root["redpiece" + i].col == y)) {
_root.choice = "eaten";
_root["redpiece" + i].gotoandplay("transparent");
_root["redpiece" + i].row = null;
_root["redpiece" + i].col = null;
return(undefined);
}
i++;
}
} else {
i = 1;
while (i <= 16) {
if ((_root["blackpiece" + i].row == x) && (_root["blackpiece" + i].col == y)) {
_root.choice = "eaten";
_root["blackpiece" + i].gotoandplay("transparent");
_root["blackpiece" + i].row = null;
_root["blackpiece" + i].col = null;
return(undefined);
}
i++;
}
}
} else {
_root.choice = "move";
_root[_root.currentpiece].gotoandplay("transparent");
}
}
function update() {
_root[so_number].data.currentpiece = _root.currentpiece;
_root[so_number].data.x = _root.x;
_root[so_number].data.y = _root.y;
_root[so_number].data.newx = _root.newx;
_root[so_number].data.newy = _root.newy;
_root[so_number].data.newrow = _root.newrow;
_root[so_number].data.newcol = _root.newcol;
_root[so_number].data.depth = _root.depth;
}
connect_status = "game";
_root.index.gotoandstop(1);
_root[so_number].onSync = function (list) {
var i = 0;
while (i < list.length) {
if ((list[i].name == "currentpiece") && (list[i].code != "success")) {
_root.currentpiece = _root[so_number].data.currentpiece;
_root.x = _root[so_number].data.x;
_root.y = _root[so_number].data.y;
_root.newx = _root[so_number].data.newx;
_root.newy = _root[so_number].data.newy;
_root.newrow = _root[so_number].data.newrow;
_root.newcol = _root[so_number].data.newcol;
_root.depth = _root[so_number].data.depth;
_root.follow();
}
i++;
}
};
_root[so_number].msgFromSrvr = function (msg) {
_root.chat_window.History.text = _root.chat_window.History.text + msg;
_root.chat_window.History.scroll = _root.chat_window.History.maxscroll;
historyScroll.setScrollTarget(_root.chat_window.History);
historyScroll.setScrollPosition(_root.chat_window.History.maxscroll);
};
_root[so_number].draw = function (user) {
if (user != _root.name) {
_root.countdown.gotoandstop(5);
}
};
_root[_root.so_number].update_record = function (user) {
if (_root[_root.so_number].data.gameover == null) {
_root.dummy.gotoAndStop("end");
if (_root.users_so.data[_root.name].win != null) {
countdown.gotoandstop(3);
if (user == "amybebe") {
_root.users_so.data[_root.name].loss--;
} else if (user != _root.name) {
_root.users_so.data[_root.name].win++;
_root.users_so.data[_root.name].loss--;
}
} else {
countdown.gotoandstop(4);
}
_root[_root.so_number].data.gameover = 0;
}
};
function castle(piece) {
if (piece == "redpiece1") {
_root[piece].swapdepths(103);
_root[piece]._x = 192.3;
_root[piece]._y = 335.3;
_root[piece].row = 7;
_root[piece].col = 3;
_root.board[7][0] = 0;
_root.board[7][3] = 1;
} else if (piece == "redpiece8") {
_root[piece].swapdepths(105);
_root[piece]._x = 268.95;
_root[piece]._y = 388;
_root[piece].row = 7;
_root[piece].col = 5;
_root.board[7][7] = 0;
_root.board[7][5] = 1;
} else if (piece == "blackpiece1") {
_root[piece].swapdepths(33);
_root[piece]._x = 462.95;
_root[piece]._y = 157;
_root[piece].row = 0;
_root[piece].col = 3;
_root.board[0][0] = 0;
_root.board[0][3] = 2;
} else if (piece == "blackpiece8") {
_root[piece].swapdepths(35);
_root[piece]._x = 539.95;
_root[piece]._y = 206;
_root[piece].row = 0;
_root[piece].col = 5;
_root.board[0][7] = 0;
_root.board[0][5] = 2;
}
}
stop();
board = new Array(8);
i = 0;
while (i <= 7) {
board[i] = new Array(8);
i++;
}
i = 0;
while (i <= 7) {
j = 0;
while (j <= 7) {
board[i][j] = 0;
j++;
}
i++;
}
i = 0;
while (i <= 7) {
board[6][i] = 1;
i++;
}
i = 0;
while (i <= 7) {
board[7][i] = 1;
i++;
}
i = 0;
while (i <= 7) {
board[0][i] = 2;
i++;
}
i = 0;
while (i <= 7) {
board[1][i] = 2;
i++;
}
i = 1;
while (i <= 9) {
if ((i == 1) || (i == 8)) {
redche.duplicateMovieClip("redpiece" + i, 99 + i);
blackche.duplicateMovieClip("blackpiece" + i, 29 + i);
} else if ((i == 2) || (i == 7)) {
redma.duplicateMovieClip("redpiece" + i, 99 + i);
blackma.duplicateMovieClip("blackpiece" + i, 29 + i);
} else if ((i == 3) || (i == 6)) {
redxiang.duplicateMovieClip("redpiece" + i, 99 + i);
blackxiang.duplicateMovieClip("blackpiece" + i, 29 + i);
} else if (i == 4) {
redshi.duplicateMovieClip("redpiece" + i, 99 + i);
blackshi.duplicateMovieClip("blackpiece" + i, 29 + i);
} else if (i == 5) {
redshuai.duplicateMovieClip("redpiece" + i, 99 + i);
blackshuai.duplicateMovieClip("blackpiece" + i, 29 + i);
}
setProperty("redpiece" + i, _x , 37.9 + (38.6 * i));
setProperty("redpiece" + i, _y , 232.9 + (25.6 * i));
setProperty("blackpiece" + i, _x , 308.85 + (38.6 * i));
setProperty("blackpiece" + i, _y , 54.9 + (25.6 * i));
_root["redpiece" + i].col = i - 1;
_root["redpiece" + i].row = 7;
_root["blackpiece" + i].col = i - 1;
_root["blackpiece" + i].row = 0;
i++;
}
i = 9;
while (i <= 16) {
redbing.duplicateMovieClip("redpiece" + i, 81 + i);
blackbing.duplicateMovieClip("blackpiece" + i, 31 + i);
setProperty("redpiece" + i, _x , -232.9 + (38.6 * i));
setProperty("redpiece" + i, _y , 2.2 + (25.7 * i));
setProperty("blackpiece" + i, _x , -39.95 + (38.6 * i));
setProperty("blackpiece" + i, _y , -125.8 + (25.7 * i));
_root["redpiece" + i].col = i - 9;
_root["blackpiece" + i].col = i - 9;
_root["redpiece" + i].row = 6;
_root["blackpiece" + i].row = 1;
i++;
}
Instance of Symbol 381 MovieClip "chat_window" in Frame 8
onClipEvent (keyDown) {
if (Key.getCode() == 13) {
dosend();
}
}
Instance of Symbol 386 MovieClip "challenger_icon" in Frame 8
onClipEvent (load) {
name = _root.challenger_name;
gotoAndStop (2);
}
Instance of Symbol 386 MovieClip "home_icon" in Frame 8
onClipEvent (load) {
name = _root.home_name;
gotoAndStop (2);
}
Symbol 13 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 24 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 33 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 34 MovieClip [DownArrow] Frame 1
stop();
Symbol 34 MovieClip [DownArrow] Frame 2
stop();
Symbol 34 MovieClip [DownArrow] Frame 3
stop();
Symbol 41 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 48 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 53 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 54 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 62 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 70 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 78 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 79 MovieClip [UpArrow] Frame 1
stop();
Symbol 79 MovieClip [UpArrow] Frame 2
stop();
Symbol 79 MovieClip [UpArrow] Frame 3
stop();
Symbol 80 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
Object.registerClass("FUIComponentSymbol", FUIComponentClass);
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.hasOwnProperty("hostStyle")) {
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();
};
}
};
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;
with (this.focusRect) {
lineStyle(1, outer);
moveTo(x, y);
lineTo(x + w, y);
lineTo(x + w, y + h);
lineTo(x, y + h);
lineTo(x, y);
lineStyle(1, inner);
moveTo(x + 1, y + 1);
lineTo((x + w) - 1, y + 1);
lineTo((x + w) - 1, (y + h) - 1);
lineTo(x + 1, (y + h) - 1);
lineTo(x + 1, y + 1);
}
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
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._parent.localToGlobal({x:this._x, y:this._y});
this.drawFocusRect();
}
this.tabFocused = true;
};
FUIComponentClass.prototype.myOnKillFocus = function () {
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) {
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 (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 83 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 84 MovieClip [FScrollBarSymbol] Frame 1
#initclip 2
FScrollBarClass = function () {
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this._yscale * this.scrollTrack_mc._height) / 100;
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var tmp = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
tmp = Math.min(tmp, this.maxPos);
this.setScrollPosition(Math.max(tmp, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollPosition = pos;
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var wasEnabled = this.enable;
if (enabledFlag && (!wasEnabled)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.isAKludge = undefined;
} else if ((!enabledFlag) && (wasEnabled)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.isAKludge == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.isAKludge = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var delt = this.smallScroll;
if (inc != "one") {
delt = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var newPos = (this.getScrollPosition() + (mode * delt));
if (newPos > this.maxPos) {
newPos = this.maxPos;
} else if (newPos < this.minPos) {
newPos = this.minPos;
}
this.setScrollPosition(newPos);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var c = this.controller;
c.scrollPosition = Math.round(((c.maxPos - c.minPos) * (this._y - c.scrollTop)) / c.trackHeight) + c.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = (this.textField.bottomScroll - this.textField.scroll);
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Instance of Symbol 80 MovieClip [FUIComponentSymbol] in Symbol 84 MovieClip [FScrollBarSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 50
_root.play();
Symbol 95 MovieClip Frame 5
var t = _root.getBytesTotal();
var c = _root.getBytesLoaded();
if (t > 0) {
preloader.gotoandstop(math.floor((50 * c) / t));
}
Symbol 95 MovieClip Frame 6
var t = _root.getBytesTotal();
var c = _root.getBytesLoaded();
if (t > 0) {
preloader.gotoandstop(math.floor((50 * c) / t));
if (c < t) {
gotoAndPlay (5);
}
}
Symbol 95 MovieClip Frame 7
gotoAndPlay (5);
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 240
_parent.gotoandplay("appear");
Symbol 104 MovieClip Frame 1
if (((_root.current_users.data[_parent.name].avatar != null) && (_root.current_users.data[_parent.name].avatar != "http://")) && (_root.current_users.data[_parent.name].avatar.slice(-3).toLowerCase() == "jpg")) {
loadMovie (_root.current_users.data[_parent.name].avatar, "avatar");
} else {
loadMovie ("http://www.fishingwithrod.com/Larson/chess/guestwestern.jpg", "avatar");
}
Symbol 104 MovieClip Frame 5
var t = avatar.getBytesTotal();
var c = avatar.getBytesLoaded();
if (t > 0) {
preloader.gotoandstop(math.floor((240 * c) / t));
}
Symbol 104 MovieClip Frame 6
var t = avatar.getBytesTotal();
var c = avatar.getBytesLoaded();
if (t > 0) {
preloader.gotoandstop(math.floor((240 * c) / t));
if (c < t) {
gotoAndPlay (5);
}
}
Symbol 104 MovieClip Frame 7
gotoAndPlay (5);
Symbol 104 MovieClip Frame 17
stop();
Symbol 109 Button
on (release) {
_root.client_nc.call("challenge", null, name);
_root.challenge.duplicateMovieClip("challenge_copy", 3000);
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("challenge");
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 118 Button
on (release) {
_root.first_turn = math.random();
gotoAndStop (5);
_root.client_nc.call("accept", null, name, _root.first_turn);
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("accept");
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 121 Button
on (release) {
gotoAndStop (5);
_root.client_nc.call("decline", null, name);
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("decline");
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 123 MovieClip Frame 240
_root.client_nc.call("decline", null, _parent.name);
_parent.gotoAndStop("others");
Symbol 126 Button
on (release) {
if (away != "yes") {
_root.current_users.data[name].away = "yes";
_root.current_users.send("away_in", _root.name);
away = "yes";
} else {
_root.current_users.data[name].away = "no";
_root.current_users.send("away_out", _root.name);
away = "no";
}
}
on (rollOver) {
if (away != "yes") {
startDrag ("_root.index", true);
_root.index.gotoAndStop("away");
} else {
startDrag ("_root.index", true);
_root.index.gotoAndStop("back");
}
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 127 MovieClip Frame 1
if (this.name == "user_window") {
_visible = "false";
}
Symbol 127 MovieClip Frame 4
if (name == _root.name) {
gotoAndStop (8);
} else {
gotoAndStop (5);
}
if (_root.current_users.data[name].away == "yes") {
gotoAndStop (7);
this._alpha = 50;
}
Symbol 127 MovieClip Frame 5
dummy.useHandCursor = false;
if (_root.current_users.data[name].win != null) {
record.text = (_root.current_users.data[name].win + " / ") + _root.current_users.data[name].loss;
} else {
record.text = "no record";
}
Symbol 127 MovieClip Frame 6
if (name == null) {
gotoAndStop (14);
} else {
stop();
}
dummy.useHandCursor = false;
this._alpha = 100;
Symbol 127 MovieClip Frame 7
record.text = "Away / Busy";
Symbol 127 MovieClip Frame 8
if (name == null) {
gotoAndStop (14);
} else {
stop();
}
dummy.useHandCursor = false;
if (_root.current_users.data[name].win != null) {
record.text = (_root.current_users.data[name].win + " / ") + _root.current_users.data[name].loss;
} else {
record.text = "no record";
}
Symbol 127 MovieClip Frame 13
removeMovieClip(this);
Symbol 136 Button
on (release) {
if (_root.users_so.data[_root.name] != null) {
if (avatar_change.text != "") {
_root.users_so.data[_root.name].avatar = avatar_change.text;
avatar_change.text = "Submitted! Please relogin!";
}
}
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 4
_parent.Message.text = "";
Symbol 147 Button
on (release) {
if (_root.users_so.data[_root.name] != null) {
_root.users_so.data[_root.name].avatar = "http://www.fishingwithrod.com/Larson/chess/avatar/avatar1.jpg";
}
}
Symbol 148 Button
on (release) {
if (_root.users_so.data[_root.name] != null) {
_root.users_so.data[_root.name].avatar = "http://www.fishingwithrod.com/Larson/chess/avatar/avatar2.jpg";
}
}
Symbol 149 Button
on (release) {
if (_root.users_so.data[_root.name] != null) {
_root.users_so.data[_root.name].avatar = "http://www.fishingwithrod.com/Larson/chess/avatar/avatar3.jpg";
}
}
Symbol 150 Button
on (release) {
if (_root.users_so.data[_root.name] != null) {
_root.users_so.data[_root.name].avatar = "http://www.fishingwithrod.com/Larson/chess/avatar/avatar4.jpg";
}
}
Symbol 152 MovieClip Frame 1
if (_name != "chat") {
stop();
this._visible = false;
}
Symbol 152 MovieClip Frame 2
swapdepths(_root.depths++);
Symbol 152 MovieClip Frame 5
function doSend() {
if ((length(Message.text) > 0) && (Message.text != String.fromCharCode(13))) {
msg = Message.text.split("&").join("&").split("<").join("<").split(String.fromCharCode(13)).join("");
msg = ((("<b><font color ='#FF9900'>" + _root.name) + ":</font></b> ") + msg) + newline;
_root.emi_so.send("msgFromSrvr", msg);
} else {
Message.text = "";
}
clear.play();
}
Message.onSetFocus = function () {
swapdepths(_root.depths++);
};
stop();
dummy.useHandCursor = false;
head.text = _root.emi_so.data.user_number;
if (_root.room == 1) {
history.htmltext = "<b><font color = '#FF9900'>Welcome to the Playground!</font></b>\n";
} else if (_root.room == 2) {
history.htmltext = "<b><font color = '#FF9900'>Welcome to the Guest Lounge!</font></b>\n";
} else if (_root.room == 3) {
history.htmltext = "<b><font color = '#FF9900'>Welcome to the Training Room!</font></b>\n";
}
history.htmltext = history.htmltext + "<b><a href='http://www.newgrounds.com/portal/view.php?id=152859' target='_blank'>Click here for Chinese chess!</a></b><br><b><a href='mailto:ldh6@cornell.edu' target='_blank'>Click here to send me feedback</a></b><br><b>Click on other people's avatar to challenge!</b>\n";
Instance of Symbol 84 MovieClip [FScrollBarSymbol] "historyScroll" in Symbol 152 MovieClip Frame 5
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "dummy";
horizontal = false;
}
Symbol 152 MovieClip Frame 8
removeMovieClip(this);
Instance of Symbol 127 MovieClip "user_window" in Symbol 153 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + ((xfinal - _x) / 3));
_y = (_y + ((yfinal - _y) / 3));
}
Instance of Symbol 152 MovieClip "chat_window" in Symbol 153 MovieClip Frame 1
onClipEvent (keyDown) {
if (Key.getCode() == 13) {
dosend();
}
}
onClipEvent (load) {
xfinal = _x;
yfinal = _y;
}
onClipEvent (enterFrame) {
if (drag) {
x = _root._xmouse + xd;
y = _root._ymouse + yd;
} else {
x = xfinal + xd;
y = yfinal + yd;
}
_x = (_x + ((x - _x) / 3));
_y = (_y + ((y - _y) / 3));
if ((_x < 0) | (_x > 750)) {
xfinal = 350;
}
if ((_y < 80) | (_y > 550)) {
yfinal = 250;
}
}
Symbol 198 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 2
play();
Symbol 198 MovieClip Frame 6
stop();
Symbol 198 MovieClip Frame 7
play();
Symbol 198 MovieClip Frame 11
stop();
Symbol 198 MovieClip Frame 12
play();
Symbol 198 MovieClip Frame 16
stop();
Symbol 198 MovieClip Frame 17
play();
Symbol 198 MovieClip Frame 21
stop();
Symbol 198 MovieClip Frame 22
play();
Symbol 198 MovieClip Frame 26
stop();
Symbol 198 MovieClip Frame 27
play();
Symbol 198 MovieClip Frame 31
stop();
Symbol 198 MovieClip Frame 32
play();
Symbol 198 MovieClip Frame 36
stop();
Symbol 198 MovieClip Frame 37
play();
Symbol 198 MovieClip Frame 41
stop();
Symbol 198 MovieClip Frame 42
play();
Symbol 198 MovieClip Frame 46
stop();
Symbol 198 MovieClip Frame 47
play();
Symbol 198 MovieClip Frame 51
stop();
Symbol 198 MovieClip Frame 52
play();
Symbol 198 MovieClip Frame 56
stop();
Symbol 198 MovieClip Frame 57
play();
Symbol 198 MovieClip Frame 61
stop();
Symbol 198 MovieClip Frame 62
play();
Symbol 198 MovieClip Frame 66
stop();
Symbol 198 MovieClip Frame 67
play();
Symbol 198 MovieClip Frame 71
stop();
Symbol 198 MovieClip Frame 72
play();
Symbol 198 MovieClip Frame 76
stop();
Symbol 198 MovieClip Frame 77
play();
Symbol 198 MovieClip Frame 81
stop();
Symbol 198 MovieClip Frame 82
play();
Symbol 198 MovieClip Frame 86
stop();
Symbol 198 MovieClip Frame 87
play();
Symbol 198 MovieClip Frame 91
stop();
Symbol 198 MovieClip Frame 92
play();
Symbol 198 MovieClip Frame 96
stop();
Symbol 198 MovieClip Frame 97
play();
Symbol 198 MovieClip Frame 101
stop();
Symbol 198 MovieClip Frame 102
play();
Symbol 198 MovieClip Frame 106
stop();
Symbol 198 MovieClip Frame 107
play();
Symbol 198 MovieClip Frame 111
stop();
Symbol 198 MovieClip Frame 112
play();
Symbol 198 MovieClip Frame 116
stop();
Symbol 198 MovieClip Frame 117
play();
Symbol 198 MovieClip Frame 121
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 52
gotoAndStop (1);
Symbol 204 MovieClip Frame 111
gotoAndStop (1);
Symbol 219 Button
on (release) {
destiny = "register";
play();
}
Symbol 222 Button
on (release) {
destiny = "login";
play();
}
Symbol 225 Button
on (release) {
function autodisconnect() {
if (_root.connect_status == "chatroom") {
_root.client_nc.close();
}
}
_root.room = 3;
user_name = "guest";
password = "amybebe";
register = "no";
destiny = "connecting";
play();
guest_time = setInterval(autodisconnect, 90000);
}
Symbol 241 Button
on (release, keyPress "<Enter>") {
tryConnect();
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("connect");
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 243 Button
on (release) {
destiny = "start";
play();
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("cancel");
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 244 MovieClip Frame 10
function tryConnect() {
if ((((user_name.text == "") || (user_name.text == "User login name required")) || (user_name.text == "Password required")) || (user_name.text == "Password not confirmed")) {
user_name.text = "User login name required";
} else if (password.text == "") {
user_name.text = "Password required";
} else if (confirm.text != password.text) {
user_name.text = "Password not confirmed";
} else {
_root.room = 3;
_parent.user_name = user_name.text;
_parent.password = password.text;
_parent.email = email.text;
_parent.avatar = avatar.text;
_parent.register = "yes";
destiny = "connecting";
play();
}
}
stop();
Symbol 244 MovieClip Frame 20
_parent.gotoandplay(destiny);
Symbol 251 Button
on (release) {
_root.room = 3;
play();
}
Symbol 254 Button
on (release) {
_root.room = 2;
play();
}
Symbol 258 Button
on (release, keyPress "<Enter>") {
tryConnect();
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("connect");
}
on (rollOut, press, release) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 267 MovieClip Frame 1
if (_root.connect_status == "disconnect") {
play();
} else {
stop();
}
Symbol 267 MovieClip Frame 12
stop();
if (_root.local_so.data.ban == "yes") {
loadMovieNum ("http://www.fishingwithrod.com/Larson/chess/ban.swf", 0);
}
Symbol 267 MovieClip Frame 18
gotoAndPlay(destiny);
Symbol 267 MovieClip Frame 19
stop();
Symbol 267 MovieClip Frame 27
stop();
Symbol 267 MovieClip Frame 33
gotoAndPlay (47);
Symbol 267 MovieClip Frame 40
function tryConnect() {
if (((user_name_input.text == "") || (user_name_input.text == "User login name required")) || (user_name_input.text == "Password required")) {
user_name_input.text = "User login name required";
} else if (password_input.text == "") {
user_name_input.text = "Password required";
} else {
user_name = user_name_input.text;
password = password_input.text;
register = "no";
play();
}
}
stop();
Symbol 267 MovieClip Frame 46
gotoAndPlay (47);
Symbol 267 MovieClip Frame 52
stop();
_root.room = 3;
_root.DoConnect(user_name, password, email, avatar, register);
Symbol 267 MovieClip Frame 56
gotoAndPlay(status);
Symbol 267 MovieClip Frame 120
gotoAndPlay (6);
Symbol 267 MovieClip Frame 181
gotoAndPlay (6);
Symbol 267 MovieClip Frame 191
stop();
_root.users_number.data.room++;
Symbol 268 Button
on (release) {
_root.client_nc.close();
}
on (rollOver) {
startDrag ("_root.index", true);
_root.index.gotoAndStop("disconnect");
}
on (rollOut, press) {
_root.index.gotoAndStop(1);
stopDrag();
}
Symbol 270 MovieClip Frame 1
if (_root.connect_status == "disconnect") {
stop();
}
Symbol 274 MovieClip Frame 362
_parent.gotoandplay("decline");
Symbol 276 MovieClip Frame 1
if (_name != "challenge_copy") {
stop();
_visible = false;
}
Symbol 276 MovieClip Frame 2
dummy.useHandCursor = false;
Symbol 276 MovieClip Frame 22
gotoAndPlay (16);
Symbol 276 MovieClip Frame 66
removeMovieClip(this);
Symbol 281 Button
on (release) {
function illegalCheck() {
check = false;
count = 0;
temp = _root.board[x][y];
temprow = _root[_root.currentpiece].row;
tempcol = _root[_root.currentpiece].col;
if (_root.turn == 0) {
_root.board[x][y] = 1;
_root.board[temprow][tempcol] = 0;
_root[_root.currentpiece].row = x;
_root[_root.currentpiece].col = y;
i = 1;
while (i <= 16) {
if ((_root["blackpiece" + i].isValid(_root.redpiece5.row, _root.redpiece5.col) && (_root["blackpiece" + i]._visible == true)) && (!((_root["blackpiece" + i].row == x) && (_root["blackpiece" + i].col == y)))) {
check = true;
}
if (check == true) {
break;
}
i++;
}
_root.board[x][y] = temp;
_root.board[temprow][tempcol] = 1;
_root[_root.currentpiece].row = temprow;
_root[_root.currentpiece].col = tempcol;
} else {
_root.board[x][y] = 2;
_root.board[temprow][tempcol] = 0;
_root[_root.currentpiece].row = x;
_root[_root.currentpiece].col = y;
i = 1;
while (i <= 16) {
if ((_root["redpiece" + i].isValid(_root.blackpiece5.row, _root.blackpiece5.col) && (_root["redpiece" + i]._visible)) && (!((_root["redpiece" + i].row == x) && (_root["redpiece" + i].col == y)))) {
check = true;
}
if (check == true) {
break;
}
i++;
}
_root.board[x][y] = temp;
_root.board[temprow][tempcol] = 2;
_root[_root.currentpiece].row = temprow;
_root[_root.currentpiece].col = tempcol;
}
return(check);
}
if (_root["" + _root.currentpiece].isValid(x, y) && (!illegalCheck())) {
_root.countdown.gotoandstop(1);
_root.depth = depth;
_root.newrow = x;
_root.newcol = y;
_root.newx = _x;
_root.newy = _y;
_root.x = x;
_root.y = y;
if (_root.board[x][y] != 0) {
if (_root.board[x][y] == 1) {
i = 1;
while (i <= 16) {
if ((_root["redpiece" + i].row == x) && (_root["redpiece" + i].col == y)) {
_root.choice = "eaten";
_root["redpiece" + i].gotoandplay("transparent");
_root["redpiece" + i].row = null;
_root["redpiece" + i].col = null;
return(undefined);
}
i++;
}
} else {
i = 1;
while (i <= 16) {
if ((_root["blackpiece" + i].row == x) && (_root["blackpiece" + i].col == y)) {
_root.choice = "eaten";
_root["blackpiece" + i].gotoandplay("transparent");
_root["blackpiece" + i].row = null;
_root["blackpiece" + i].col = null;
return(undefined);
}
i++;
}
}
} else {
_root.choice = "move";
_root[_root.currentpiece].gotoandplay("transparent");
}
} else {
_root.notification.gotoandplay("illegal");
_root.dummy.play();
}
}
Symbol 282 Button
on (release) {
_root.dummy.play();
}
on (rollOver) {
_root.index.gotoandstop("cancel");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
Symbol 283 MovieClip Frame 1
if (_root["" + _root.currentpiece].isValid(x, y)) {
gotoAndPlay (2);
} else if ((x == _root["" + _root.currentpiece].row) && (y == _root["" + _root.currentpiece].col)) {
gotoAndStop (8);
} else {
gotoAndStop (9);
}
Symbol 283 MovieClip Frame 7
stop();
Symbol 284 MovieClip Frame 1
if (_root.turn == _root.a) {
i = 1;
while (i <= 16) {
_root["redpiece" + i].gotoAndStop(_root.b);
_root["blackpiece" + i].gotoAndStop(_root.c);
i++;
}
_root.countdown.gotoandstop(2);
}
stop();
Symbol 284 MovieClip Frame 2
i = 1;
while (i <= 16) {
_root["redpiece" + i].gotoAndstop(1);
_root["blackpiece" + i].gotoAndstop(1);
i++;
}
Symbol 284 MovieClip Frame 3
stop();
i = 0;
while (i <= 9) {
j = 0;
while (j <= 8) {
_root.dummy[(("board" + i) + "") + j].x = i;
_root.dummy[(("board" + i) + "") + j].y = j;
_root.dummy[(("board" + i) + "") + j].depth = ((i * 10) + j) + 30;
j++;
}
i++;
}
Symbol 284 MovieClip Frame 4
if (_root.redpiece5._visible == false) {
_root.gameover.play("Black");
} else if (_root.blackpiece5._visible == false) {
_root.gameover.play("Red");
}
_root.index.gotoandstop(1);
gotoAndPlay (1);
Symbol 284 MovieClip Frame 5
stop();
i = 1;
while (i <= 16) {
_root["redpiece" + i].gotoAndStop(1);
_root["blackpiece" + i].gotoAndStop(1);
i++;
}
Symbol 288 Button
on (rollOver) {
_root.index.gotoandstop("rook");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 289 MovieClip Frame 1
function isValid(r, c) {
if (((r == row) && (c != col)) && (_root.board[r][c] != 2)) {
if (c > col) {
i = col + 1;
while (i < c) {
if (_root.board[row][i] != 0) {
return(false);
}
i++;
}
}
if (c < col) {
i = col - 1;
while (i > c) {
if (_root.board[row][i] != 0) {
return(false);
}
i--;
}
}
return(true);
}
if (((r != row) && (c == col)) && (_root.board[r][c] != 2)) {
if (r > row) {
i = row + 1;
while (i < r) {
if (_root.board[i][col] != 0) {
return(false);
}
i++;
}
}
if (r < row) {
i = row - 1;
while (i > r) {
if (_root.board[i][col] != 0) {
return(false);
}
i--;
}
}
return(true);
}
return(false);
}
stop();
if (this._name == "blackche") {
this._visible = false;
}
Symbol 289 MovieClip Frame 2
stop();
Symbol 289 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 289 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
castling = "yes";
Symbol 293 Button
on (rollOver) {
_root.index.gotoandstop("knight");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 294 MovieClip Frame 1
function isValid(r, c) {
if ((((Math.abs(row - r) == 2) && (Math.abs(col - c) == 1)) || ((Math.abs(row - r) == 1) && (Math.abs(col - c) == 2))) && (_root.board[r][c] != 2)) {
return(true);
}
return(false);
}
stop();
if (this._name == "blackma") {
this._visible = false;
}
Symbol 294 MovieClip Frame 2
stop();
Symbol 294 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 294 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 298 Button
on (rollOver) {
_root.index.gotoandstop("advisor");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 299 MovieClip Frame 1
function isValid(r, c) {
if ((Math.abs(row - r) == Math.abs(col - c)) && (_root.board[r][c] != 2)) {
j = col;
if (((r - row) > 0) && ((c - col) > 0)) {
i = row + 1;
while (i < r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) > 0) && ((c - col) < 0)) {
i = row + 1;
while (i < r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) < 0) && ((c - col) > 0)) {
i = row - 1;
while (i > r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
if (((r - row) < 0) && ((c - col) < 0)) {
i = row - 1;
while (i > r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
return(true);
}
return(false);
}
stop();
if (this._name == "blackxiang") {
_visible = false;
}
Symbol 299 MovieClip Frame 2
stop();
Symbol 299 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 299 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 303 Button
on (rollOver) {
_root.index.gotoandstop("guard");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 304 MovieClip Frame 1
function isValid(r, c) {
if (((r == row) && (c != col)) && (_root.board[r][c] != 2)) {
if (c > col) {
i = col + 1;
while (i < c) {
if (_root.board[row][i] != 0) {
return(false);
}
i++;
}
}
if (c < col) {
i = col - 1;
while (i > c) {
if (_root.board[row][i] != 0) {
return(false);
}
i--;
}
}
return(true);
}
if (((r != row) && (c == col)) && (_root.board[r][c] != 2)) {
if (r > row) {
i = row + 1;
while (i < r) {
if (_root.board[i][col] != 0) {
return(false);
}
i++;
}
}
if (r < row) {
i = row - 1;
while (i > r) {
if (_root.board[i][col] != 0) {
return(false);
}
i--;
}
}
return(true);
}
if ((Math.abs(row - r) == Math.abs(col - c)) && (_root.board[r][c] != 2)) {
j = col;
if (((r - row) > 0) && ((c - col) > 0)) {
i = row + 1;
while (i < r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) > 0) && ((c - col) < 0)) {
i = row + 1;
while (i < r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) < 0) && ((c - col) > 0)) {
i = row - 1;
while (i > r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
if (((r - row) < 0) && ((c - col) < 0)) {
i = row - 1;
while (i > r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
return(true);
}
return(false);
}
stop();
if (this._name == "blackshi") {
this._visible = false;
}
Symbol 304 MovieClip Frame 2
stop();
Symbol 304 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 304 MovieClip Frame 11
play();
Symbol 304 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 308 Button
on (rollOver) {
_root.index.gotoandstop("general");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 309 MovieClip Frame 1
function isValid(r, c) {
if (((Math.abs(row - r) <= 1) && (Math.abs(col - c) <= 1)) && (_root.board[r][c] != 2)) {
return(true);
}
if (((r == 0) && (_root.blackpiece5.castling == null)) && (_root.move.check != true)) {
if (((((c == 2) && (_root.blackpiece1.castling == null)) && (_root.board[0][2] == 0)) && (_root.board[0][3] == 0)) && (_root.board[0][1] == 0)) {
return(true);
}
if ((((c == 6) && (_root.blackpiece8.castling == null)) && (_root.board[0][6] == 0)) && (_root.board[0][5] == 0)) {
return(true);
}
return(false);
}
return(false);
}
stop();
if (this._name == "blackshuai") {
_visible = false;
}
Symbol 309 MovieClip Frame 2
stop();
Symbol 309 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 309 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
castling = "yes";
Symbol 313 Button
on (rollOver) {
_root.index.gotoandstop("cannon");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 314 MovieClip Frame 1
function isValid(r, c) {
returnvalue = true;
count = 0;
if (((r == row) && (c != col)) && (_root.board[r][c] != 2)) {
if (c > col) {
i = col + 1;
while (i <= c) {
if (_root.board[row][i] != 0) {
returnvalue = false;
count++;
}
i++;
}
}
if (c < col) {
i = col - 1;
while (i >= c) {
if (_root.board[row][i] != 0) {
returnvalue = false;
count++;
}
i--;
}
}
if ((count == 2) && (_root.board[r][c] == 1)) {
return(true);
}
return(returnvalue);
}
if (((r != row) && (c == col)) && (_root.board[r][c] != 2)) {
if (r > row) {
i = row + 1;
while (i <= r) {
if (_root.board[i][col] != 0) {
returnvalue = false;
count++;
}
i++;
}
}
if (r < row) {
i = row - 1;
while (i >= r) {
if (_root.board[i][col] != 0) {
returnvalue = false;
count++;
}
i--;
}
}
if ((count == 2) && (_root.board[r][c] == 1)) {
return(true);
}
return(returnvalue);
}
return(false);
}
stop();
if (this._name == "blackpao") {
this._visible = false;
}
Symbol 314 MovieClip Frame 2
stop();
Symbol 314 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 314 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 318 Button
on (rollOver) {
_root.index.gotoandstop("pawn");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 319 MovieClip Frame 1
function isValid(r, c) {
if ((((((row == 1) && (r <= 3)) && (r > 1)) && (c == col)) && (_root.board[2][c] == 0)) && (_root.board[r][c] == 0)) {
return(true);
}
if (((r == (row + 1)) && (c == col)) && (_root.board[r][c] == 0)) {
return(true);
}
if (((r == (row + 1)) && ((c == (col - 1)) || (c == (col + 1)))) && (_root.board[r][c] == 1)) {
return(true);
}
return(false);
}
stop();
if (this._name == "blackbing") {
this._visible = false;
}
Symbol 319 MovieClip Frame 2
stop();
Symbol 319 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 319 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 323 Button
on (rollOver) {
_root.index.gotoandstop("pawn");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 324 MovieClip Frame 1
function isValid(r, c) {
if ((((((row == 6) && (r >= 4)) && (r < 6)) && (c == col)) && (_root.board[5][c] == 0)) && (_root.board[r][c] == 0)) {
return(true);
}
if (((r == (row - 1)) && (c == col)) && (_root.board[r][c] == 0)) {
return(true);
}
if (((r == (row - 1)) && ((c == (col - 1)) || (c == (col + 1)))) && (_root.board[r][c] == 2)) {
return(true);
}
return(false);
}
stop();
if (this._name == "redbing") {
this._visible = false;
}
Symbol 324 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 324 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 328 Button
on (rollOver) {
_root.index.gotoandstop("cannon");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 329 MovieClip Frame 1
function isValid(r, c) {
returnvalue = true;
count = 0;
if (((r == row) && (c != col)) && (_root.board[r][c] != 1)) {
if (c > col) {
i = col + 1;
while (i <= c) {
if (_root.board[row][i] != 0) {
returnvalue = false;
count++;
}
i++;
}
}
if (c < col) {
i = col - 1;
while (i >= c) {
if (_root.board[row][i] != 0) {
returnvalue = false;
count++;
}
i--;
}
}
if ((count == 2) && (_root.board[r][c] == 2)) {
return(true);
}
return(returnvalue);
}
if (((r != row) && (c == col)) && (_root.board[r][c] != 1)) {
if (r > row) {
i = row + 1;
while (i <= r) {
if (_root.board[i][col] != 0) {
returnvalue = false;
count++;
}
i++;
}
}
if (r < row) {
i = row - 1;
while (i >= r) {
if (_root.board[i][col] != 0) {
returnvalue = false;
count++;
}
i--;
}
}
if ((count == 2) && (_root.board[r][c] == 2)) {
return(true);
}
return(returnvalue);
}
return(false);
}
stop();
if (this._name == "redpao") {
this._visible = false;
}
Symbol 329 MovieClip Frame 2
stop();
Symbol 329 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 329 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 333 Button
on (rollOver) {
_root.index.gotoandstop("rook");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 334 MovieClip Frame 1
function isValid(r, c) {
if (((r == row) && (c != col)) && (_root.board[r][c] != 1)) {
if (c > col) {
i = col + 1;
while (i < c) {
if (_root.board[row][i] != 0) {
return(false);
}
i++;
}
}
if (c < col) {
i = col - 1;
while (i > c) {
if (_root.board[row][i] != 0) {
return(false);
}
i--;
}
}
return(true);
}
if (((r != row) && (c == col)) && (_root.board[r][c] != 1)) {
if (r > row) {
i = row + 1;
while (i < r) {
if (_root.board[i][col] != 0) {
return(false);
}
i++;
}
}
if (r < row) {
i = row - 1;
while (i > r) {
if (_root.board[i][col] != 0) {
return(false);
}
i--;
}
}
return(true);
}
return(false);
}
stop();
if (this._name == "redche") {
this._visible = false;
}
Symbol 334 MovieClip Frame 2
stop();
Symbol 334 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 334 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
castling = "yes";
Symbol 338 Button
on (rollOver) {
_root.index.gotoandstop("knight");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 339 MovieClip Frame 1
function isValid(r, c) {
if ((((Math.abs(row - r) == 2) && (Math.abs(col - c) == 1)) || ((Math.abs(row - r) == 1) && (Math.abs(col - c) == 2))) && (_root.board[r][c] != 1)) {
return(true);
}
return(false);
}
stop();
if (this._name == "redma") {
this._visible = false;
}
Symbol 339 MovieClip Frame 2
stop();
Symbol 339 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 339 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 343 Button
on (rollOver) {
_root.index.gotoandstop("advisor");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 344 MovieClip Frame 1
function isValid(r, c) {
if ((Math.abs(row - r) == Math.abs(col - c)) && (_root.board[r][c] != 1)) {
j = col;
if (((r - row) > 0) && ((c - col) > 0)) {
i = row + 1;
while (i < r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) > 0) && ((c - col) < 0)) {
i = row + 1;
while (i < r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) < 0) && ((c - col) > 0)) {
i = row - 1;
while (i > r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
if (((r - row) < 0) && ((c - col) < 0)) {
i = row - 1;
while (i > r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
return(true);
}
return(false);
}
stop();
if (this._name == "redxiang") {
_visible = false;
}
Symbol 344 MovieClip Frame 2
stop();
Symbol 344 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 344 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 348 Button
on (rollOver) {
_root.index.gotoandstop("guard");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 349 MovieClip Frame 1
function isValid(r, c) {
if (((r == row) && (c != col)) && (_root.board[r][c] != 1)) {
if (c > col) {
i = col + 1;
while (i < c) {
if (_root.board[row][i] != 0) {
return(false);
}
i++;
}
}
if (c < col) {
i = col - 1;
while (i > c) {
if (_root.board[row][i] != 0) {
return(false);
}
i--;
}
}
return(true);
}
if (((r != row) && (c == col)) && (_root.board[r][c] != 1)) {
if (r > row) {
i = row + 1;
while (i < r) {
if (_root.board[i][col] != 0) {
return(false);
}
i++;
}
}
if (r < row) {
i = row - 1;
while (i > r) {
if (_root.board[i][col] != 0) {
return(false);
}
i--;
}
}
return(true);
}
if ((Math.abs(row - r) == Math.abs(col - c)) && (_root.board[r][c] != 1)) {
j = col;
if (((r - row) > 0) && ((c - col) > 0)) {
i = row + 1;
while (i < r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) > 0) && ((c - col) < 0)) {
i = row + 1;
while (i < r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i++;
}
}
if (((r - row) < 0) && ((c - col) > 0)) {
i = row - 1;
while (i > r) {
j++;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
if (((r - row) < 0) && ((c - col) < 0)) {
i = row - 1;
while (i > r) {
j--;
if (_root.board[i][j] != 0) {
return(false);
}
i--;
}
}
return(true);
}
return(false);
}
stop();
if (this._name == "redshi") {
this._visible = false;
}
Symbol 349 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 349 MovieClip Frame 11
play();
Symbol 349 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
Symbol 353 Button
on (rollOver) {
_root.index.gotoandstop("general");
startDrag (_root.index, true);
}
on (rollOut, press) {
_root.index.gotoandstop(1);
stopDrag();
}
on (release) {
_root.currentpiece = this._name;
_root.dummy.play();
}
Symbol 354 MovieClip Frame 1
function isValid(r, c) {
if (((Math.abs(row - r) <= 1) && (Math.abs(col - c) <= 1)) && (_root.board[r][c] != 1)) {
return(true);
}
if (((r == 7) && (_root.redpiece5.castling == null)) && (_root.move.check != true)) {
if (((((c == 2) && (_root.redpiece1.castling == null)) && (_root.board[7][2] == 0)) && (_root.board[7][3] == 0)) && (_root.board[7][1] == 0)) {
return(true);
}
if ((((c == 6) && (_root.redpiece8.castling == null)) && (_root.board[7][6] == 0)) && (_root.board[7][5] == 0)) {
return(true);
}
return(false);
}
return(false);
}
stop();
if (this._name == "redshuai") {
_visible = false;
}
Symbol 354 MovieClip Frame 2
stop();
Symbol 354 MovieClip Frame 10
if (_root.choice == "eaten") {
this._visible = false;
_root[_root.currentpiece].gotoandplay("transparent");
_root.choice = "move";
} else if (_root.choice == "move") {
_root.move.play();
}
Symbol 354 MovieClip Frame 20
_root.dummy.gotoandplay("loop");
castling = "yes";
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 2
_root.board[_root["" + _root.currentpiece].row][_root["" + _root.currentpiece].col] = 0;
if (_root.turn == 0) {
_root.board[_root.newrow][_root.newcol] = 1;
} else {
_root.board[_root.newrow][_root.newcol] = 2;
}
if (((_root.currentpiece == "redpiece5") && (_root[_root.currentpiece].castling == null)) && (_root.newrow == 7)) {
if ((_root.redpiece1.castling == null) && (_root.newcol == 2)) {
_root.castle("redpiece1");
} else if ((_root.redpiece8.castling == null) && (_root.newcol == 6)) {
_root.castle("redpiece8");
}
} else if (((_root.currentpiece == "blackpiece5") && (_root[_root.currentpiece].castling == null)) && (_root.newrow == 0)) {
if ((_root.blackpiece1.castling == null) && (_root.newcol == 2)) {
_root.castle("blackpiece1");
} else if ((_root.blackpiece8.castling == null) && (_root.newcol == 6)) {
_root.castle("blackpiece8");
}
}
i = 9;
while (i <= 16) {
if ((_root.currentpiece == ("redpiece" + i)) && (_root.newrow == 0)) {
_root[_root.currentpiece].removeMovieClip();
_root.redshi.duplicateMovieClip(_root.currentpiece, _root.depth);
break;
}
if ((_root.currentpiece == ("blackpiece" + i)) && (_root.newrow == 7)) {
_root[_root.currentpiece].removeMovieClip();
_root.blackshi.duplicateMovieClip(_root.currentpiece, _root.depth);
break;
}
i++;
}
_root["" + _root.currentpiece].row = _root.newrow;
_root["" + _root.currentpiece].col = _root.newcol;
_root[_root.currentpiece].swapdepths(_root.depth);
_root[_root.currentpiece]._x = _root.newx + _root.dummy._x;
_root[_root.currentpiece]._y = _root.newy + _root.dummy._y;
_root[_root.currentpiece].gotoandplay("appear");
check = false;
if (_root.turn != _root.a) {
if (_root.turn == 0) {
i = 1;
while (i <= 16) {
if (_root["redpiece" + i].isValid(_root.blackpiece5.row, _root.blackpiece5.col) && (_root["redpiece" + i]._visible == true)) {
check = true;
}
if (check == true) {
break;
}
i++;
}
} else {
i = 1;
while (i <= 16) {
if (_root["blackpiece" + i].isValid(_root.redpiece5.row, _root.redpiece5.col) && (_root["blackpiece" + i]._visible == true)) {
check = true;
}
if (check == true) {
break;
}
i++;
}
}
if (check == true) {
_root[_root.so_number].send("msgFromSrvr", "-- Check!!! --\n");
}
}
_root.turn++;
if (_root.turn == 2) {
_root.turn = 0;
}
_root.update();
Symbol 361 MovieClip Frame 2161
_parent.game_over();
Symbol 362 Button
on (release) {
game_over();
}
Symbol 363 Button
on (release) {
_root[_root.so_number].send("draw", _root.name);
}
Symbol 368 Button
on (release) {
_root.client_nc.close();
}
Symbol 370 Button
on (release) {
_root.client_nc.call("chatroom", null, _root.room);
_root.chatroom();
_root.connect_status = "chatroom";
i = 1;
while (i <= 16) {
removeMovieClip(_root["redpiece" + i]);
removeMovieClip(_root["blackpiece" + i]);
i++;
}
_root[_root.so_number].data.gameover++;
_root[_root.so_number].close();
_root.gotoandstop("chatroom");
}
Symbol 373 MovieClip Frame 720
_root.client_nc.close();
Symbol 376 Button
on (release) {
draw();
}
Symbol 377 MovieClip Frame 1
function game_over() {
_root[_root.so_number].send("msgFromSrvr", ("-- " + _root.name) + " has forfieted! --\n");
_root[_root.so_number].send("update_record", _root.name);
}
function draw() {
_root[_root.so_number].send("msgFromSrvr", "-- Draw game! --\n");
_root[_root.so_number].send("update_record", "amybebe");
}
stop();
Instance of Symbol 361 MovieClip "countdown" in Symbol 377 MovieClip Frame 2
onClipEvent (enterFrame) {
time.text = math.ceil((90 - (_currentframe / 24)) * 100);
}
Symbol 381 MovieClip Frame 10
function doSend() {
if (length(Message.text) > 0) {
_root[_root.so_number].send("msgFromSrvr", ((_root.name + ": ") + Message.text) + newline);
}
clear.play();
}
if (_root.turn == _root.a) {
history.text = "-- You will make the first move --\n";
} else {
history.text = "-- Your opponent will make the first move --\n";
}
stop();
Symbol 383 Button
on (release) {
if (name != _root.name) {
email = _root.users_so.data[name].email;
getURL ("mailto:" + email);
}
}
on (rollOver) {
if (name != _root.name) {
_root.index.gotoandstop("email");
startDrag (_root.index, true);
}
}
on (rollOut, press) {
if (name != _root.name) {
_root.index.gotoandstop(1);
stopDrag();
}
}
Symbol 386 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 2
if (((_root.users_so.data[name].avatar != null) && (_root.users_so.data[name].avatar != "http://")) && (_root.users_so.data[name].avatar.slice(-3).toLowerCase() == "jpg")) {
loadMovie (_root.users_so.data[name].avatar, "avatar");
} else {
loadMovie ("http://www.fishingwithrod.com/Larson/chess/guestwestern.jpg", "avatar");
}
if (name == _root.name) {
contact.useHandCursor = false;
}