Chess Board
I'm just trying to construct a chess board, using one square movie clip which has two frames labelled, black and white.
The code i have now returns the board but all the squares are black, can anyone help.
code: makeBoard();
function makeBoard(){
var row, col, name, mc, count=1, colStat, rowStat;
for(row=0; row<8; row++){ for(col=0; col<8; col++){ // loops used to iterate code 64 times
name = "board" + row + "_" + col; // constructs instance names for pieces duplicateMovieClip("square", name, count++); //adds new square mc = eval(name); //asigns instance name
if(col % 2 == 0){ colStat = "even"; }else{ colStat = "odd"; } //checks if the column number is even
if(row % 2 == 0){ rowStat = "even"; }else{ rowStat = "odd"; } //checks if the row number is even
if(colStat != rowStat){ mc.goToAndStop("white"); } //all white squares have one odd number and one even, so if the two don't match set the piece to white mc._x = col * 45 +36; mc._y = row * 45 +36; //aligns pieces } } }
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-17-2005, 02:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Chess Board
hello
i need help with this animation i need to make
i have a chess board and a simple form, lets say a circle, my problem is that i need to change the color of the part of the cell while the circle pass, so when the cicrle is in a black cell part of the cell becomes white and the next white cell should be change to white
thanks alot for you help
Notice Board / Message Board / Guest Book
I am trying to create a message board in Flash, one that would pretty much work like a guest book. It would ideally work off a text file, writing and reading to it as people visited the site and left messages.
I don't want to use a database, i know that is the most common answer, i only want to use a text file or something which doesn't require a DB connection.
I have looked around to find something similar in the flash movie files but can;t seem to find anyting close. Maybe i am just looking for something which is known or called something totally different.
Any help or ideas on how to do something like this would be greatly Appreciated.
Thanks,
Make This Drawing Board Write Only On Board Area?
First of all sorry for the long post...
I need to make this drawing board (works good) to write ONLY
in a 450 x 300 px area. Actually if you select the pencil it draws
as long as you drag but anywhere else on the movie..
You can download the fla in
http://www.soccerschool.com.ar/f/drawingBroadmx.zip
This code is attached to frame 1 and the movie has other action
on the mclip of the board itself:
CODE of mclip:
onClipEvent (load) {
function setColors() {
C = new Color(_root.Panel.bgfc);
C.setRGB(_root.frontColor);
}
}
-----
CODE of frame 1:
_root.P = 0;
_root.level = 1000;
_root.tmpx = -1;
_root.tmpy = -1;
_root.count = 0;
_root.isMouseDown = false;
_root.frontColor = 0x000000;
//default tamaño del pincel
_root.pt = 6;
_root.tool = "pen";
md = new Object();
mm = new Object();
mu = new Object();
actionList = new Array();
Number.prototype.HEXtoRGB = function() {
return {rb:this >> 16, gbthis >> 8) & 0xff, bb:this & 0xff};
};
Color.prototype.blendRGB = function(c1, c2, t) {
if (arguments.length == 2) {
t = c2;
c2 = this.getRGB();
}
if (t<-1) {
t = -1;
} else if (t>1) {
t = 1;
}
if (t<0) {
t = 1+t;
}
c1 = c1.HEXtoRGB();
c2 = c2.HEXtoRGB();
var ct = (c1.rb+(c2.rb-c1.rb)*t) << 16 | (c1.gb+(c2.gb-c1.gb)*t) << 8 | (c1.bb+(c2.bb-c1.bb)*t);
this.setRGB(ct);
return ct;
};
md.onMouseDown = function() {
if (_root.paintMode) {
a = new Object();
a.start = _root.P;
actionList.push(a);
_root.isMouseDown = true;
if (_root.tool == "del") {
for (i=0; i<_root.P; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
break;
}
}
}
if (_root.tool == "sqr") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "ova") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "pen") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).beginFill(_root.frontColor, 100);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
if (_root.tool == "mak") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).duplicateMovieClip(eval("P"+_roo t.P)._name+"shadow", _root.P+_root.level-500);
sn = eval("P"+_root.P)._name;
eval("P"+_root.P).onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
eval(sn+"shadow").beginFill(_root.frontColor, 10);
eval(sn+"shadow").drawCircle((pt), 0, 0);
eval(sn+"shadow").endFill();
eval("P"+_root.P).beginFill(_root.frontColor*10, 5);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
};
md.onMouseUp = function() {
if (_root.isMouseDown == true) {
_root.isMouseDown = false;
if (_root.tool == "sqr") {
_root.P++;
}
if (_root.tool == "ova") {
_root.P++;
}
actionList[actionList.length-1].end = _root.P;
}
_root.tmpx = -1;
_root.tmpy = -1;
_root.level += 1000;
_root.count = 0;
};
mm.onMouseMove = function() {
_root.paintMode = !(Panel.hitTest(_root._xmouse, _root._ymouse, true));
if (_root.paintMode) {
//Mouse.hide();
_root.cursor._visible = 1;
if (_root.tool == "del") {
for (i=0; i<_root.P && _root.isMouseDown; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
}
}
}
if (_root.tool == "sqr") {
if (_root.isMouseDown) {
sqr = eval("P"+(_root.P));
sqr.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
sqr.globalToLocal(point);
toX = point.x;
toY = point.y;
sqr.beginFill(_root.frontColor, 100);
sqr.moveTo(0, 0);
sqr.lineTo(toX, 0);
sqr.lineTo(toX, toY);
sqr.lineTo(0, toY);
sqr.endFill();
}
}
if (_root.tool == "ova") {
if (_root.isMouseDown) {
ova = eval("P"+(_root.P));
ova.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
ova.globalToLocal(point);
toX = point.x;
toY = point.y;
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
ova.beginFill(_root.frontColor, 100);
ova.drawCircle(far, 0, 0);
ova.endFill();
}
}
if (_root.tool == "pen") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%4 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
if (_root.tool == "mak") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%2 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawNeonLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
} else {
Mouse.show();
_root.cursor._visible = 0;
}
};
Mouse.addListener(md);
Mouse.addListener(mm);
Mouse.addListener(mu);
//
MovieClip.prototype.drawCircle = function(r, x, y) {
this.moveTo(x+r, y);
a = Math.tan(22.5*Math.PI/180);
for (var angle = 45; angle<=360; angle += 45) {
// endpoint:
var endx = r*Math.cos(angle*Math.PI/180);
var endy = r*Math.sin(angle*Math.PI/180);
// control:
// (angle-90 is used to give the correct sign)
var cx = endx+r*a*Math.cos((angle-90)*Math.PI/180);
var cy = endy+r*a*Math.sin((angle-90)*Math.PI/180);
this.curveTo(cx+x, cy+y, endx+x, endy+y);
}
};
MovieClip.prototype.drawLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
this.beginFill(_root.frontColor, 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
MovieClip.prototype.drawNeonLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
this.duplicateMovieClip(this._name+"shadow", _root.P+_root.level-500);
this.onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
eval(this._name+"shadow").beginFill(_root.frontCol or, 10);
eval(this._name+"shadow").drawCircle((pt), nx, ny);
eval(+this._name+"shadow").endFill();
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
c = new Color(this);
c.setRGB(_root.frontColor);
c.blendRGB(0xffffff, .2);
this.beginFill(c.getRGB(), 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
function cursorReflesh() {
this.createEmptyMovieClip("cursor", 100001);
c = new Color(this.cursor);
c.setRGB(_root.frontColor);
if (_root.frontColor>(0xffffff/2)) {
c.blendRGB(0x000000, -0.3);
} else {
c.blendRGB(0xffffff, -0.5);
}
this.cursor.lineStyle(1, 0xffffff, 100);
this.cursor.drawCircle(pt/2, 0, 0);
this.cursor.startDrag(true);
}
function undo() {
if (actionList.length>0) {
a = actionList.pop();
if (a.start == undefined) {
C = new Color(this.Background);
C.setRGB(a);
C2 = new Color(this.Panel.bubg);
C2.setRGB(a);
} else {
for (i=a.start; i<=a.end; i++) {
eval("P"+i).removeMovieClip();
}
_root.P = a.start;
}
}
}
cursorReflesh();
Make This Drawing Board Write Only On Board Area?
First of all sorry for the long post...
I need to make this drawing board (works good) to write ONLY
in a 450 x 300 px area. Actually if you select the pencil it draws
as long as you drag but anywhere else on the movie..
You can download the fla in
http://www.soccerschool.com.ar/f/drawingBroadmx.zip
This code is attached to frame 1 and the movie has other action
on the mclip of the board itself:
CODE of mclip:
onClipEvent (load) {
function setColors() {
C = new Color(_root.Panel.bgfc);
C.setRGB(_root.frontColor);
}
}
-----
CODE of frame 1:
_root.P = 0;
_root.level = 1000;
_root.tmpx = -1;
_root.tmpy = -1;
_root.count = 0;
_root.isMouseDown = false;
_root.frontColor = 0x000000;
//default tamaño del pincel
_root.pt = 6;
_root.tool = "pen";
md = new Object();
mm = new Object();
mu = new Object();
actionList = new Array();
Number.prototype.HEXtoRGB = function() {
return {rb:this >> 16, gbthis >> 8) & 0xff, bb:this & 0xff};
};
Color.prototype.blendRGB = function(c1, c2, t) {
if (arguments.length == 2) {
t = c2;
c2 = this.getRGB();
}
if (t<-1) {
t = -1;
} else if (t>1) {
t = 1;
}
if (t<0) {
t = 1+t;
}
c1 = c1.HEXtoRGB();
c2 = c2.HEXtoRGB();
var ct = (c1.rb+(c2.rb-c1.rb)*t) << 16 | (c1.gb+(c2.gb-c1.gb)*t) << 8 | (c1.bb+(c2.bb-c1.bb)*t);
this.setRGB(ct);
return ct;
};
md.onMouseDown = function() {
if (_root.paintMode) {
a = new Object();
a.start = _root.P;
actionList.push(a);
_root.isMouseDown = true;
if (_root.tool == "del") {
for (i=0; i<_root.P; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
break;
}
}
}
if (_root.tool == "sqr") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "ova") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "pen") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).beginFill(_root.frontColor, 100);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
if (_root.tool == "mak") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).duplicateMovieClip(eval("P"+_roo t.P)._name+"shadow", _root.P+_root.level-500);
sn = eval("P"+_root.P)._name;
eval("P"+_root.P).onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
eval(sn+"shadow").beginFill(_root.frontColor, 10);
eval(sn+"shadow").drawCircle((pt), 0, 0);
eval(sn+"shadow").endFill();
eval("P"+_root.P).beginFill(_root.frontColor*10, 5);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
};
md.onMouseUp = function() {
if (_root.isMouseDown == true) {
_root.isMouseDown = false;
if (_root.tool == "sqr") {
_root.P++;
}
if (_root.tool == "ova") {
_root.P++;
}
actionList[actionList.length-1].end = _root.P;
}
_root.tmpx = -1;
_root.tmpy = -1;
_root.level += 1000;
_root.count = 0;
};
mm.onMouseMove = function() {
_root.paintMode = !(Panel.hitTest(_root._xmouse, _root._ymouse, true));
if (_root.paintMode) {
//Mouse.hide();
_root.cursor._visible = 1;
if (_root.tool == "del") {
for (i=0; i<_root.P && _root.isMouseDown; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
}
}
}
if (_root.tool == "sqr") {
if (_root.isMouseDown) {
sqr = eval("P"+(_root.P));
sqr.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
sqr.globalToLocal(point);
toX = point.x;
toY = point.y;
sqr.beginFill(_root.frontColor, 100);
sqr.moveTo(0, 0);
sqr.lineTo(toX, 0);
sqr.lineTo(toX, toY);
sqr.lineTo(0, toY);
sqr.endFill();
}
}
if (_root.tool == "ova") {
if (_root.isMouseDown) {
ova = eval("P"+(_root.P));
ova.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
ova.globalToLocal(point);
toX = point.x;
toY = point.y;
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
ova.beginFill(_root.frontColor, 100);
ova.drawCircle(far, 0, 0);
ova.endFill();
}
}
if (_root.tool == "pen") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%4 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
if (_root.tool == "mak") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%2 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawNeonLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
} else {
Mouse.show();
_root.cursor._visible = 0;
}
};
Mouse.addListener(md);
Mouse.addListener(mm);
Mouse.addListener(mu);
//
MovieClip.prototype.drawCircle = function(r, x, y) {
this.moveTo(x+r, y);
a = Math.tan(22.5*Math.PI/180);
for (var angle = 45; angle<=360; angle += 45) {
// endpoint:
var endx = r*Math.cos(angle*Math.PI/180);
var endy = r*Math.sin(angle*Math.PI/180);
// control:
// (angle-90 is used to give the correct sign)
var cx = endx+r*a*Math.cos((angle-90)*Math.PI/180);
var cy = endy+r*a*Math.sin((angle-90)*Math.PI/180);
this.curveTo(cx+x, cy+y, endx+x, endy+y);
}
};
MovieClip.prototype.drawLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
this.beginFill(_root.frontColor, 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
MovieClip.prototype.drawNeonLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
this.duplicateMovieClip(this._name+"shadow", _root.P+_root.level-500);
this.onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
eval(this._name+"shadow").beginFill(_root.frontCol or, 10);
eval(this._name+"shadow").drawCircle((pt), nx, ny);
eval(+this._name+"shadow").endFill();
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
c = new Color(this);
c.setRGB(_root.frontColor);
c.blendRGB(0xffffff, .2);
this.beginFill(c.getRGB(), 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
function cursorReflesh() {
this.createEmptyMovieClip("cursor", 100001);
c = new Color(this.cursor);
c.setRGB(_root.frontColor);
if (_root.frontColor>(0xffffff/2)) {
c.blendRGB(0x000000, -0.3);
} else {
c.blendRGB(0xffffff, -0.5);
}
this.cursor.lineStyle(1, 0xffffff, 100);
this.cursor.drawCircle(pt/2, 0, 0);
this.cursor.startDrag(true);
}
function undo() {
if (actionList.length>0) {
a = actionList.pop();
if (a.start == undefined) {
C = new Color(this.Background);
C.setRGB(a);
C2 = new Color(this.Panel.bubg);
C2.setRGB(a);
} else {
for (i=a.start; i<=a.end; i++) {
eval("P"+i).removeMovieClip();
}
_root.P = a.start;
}
}
}
cursorReflesh();
Chess Fla
Do you knowe some good chess fla online? It seems i seen it before but i cannot find some now, if you know some links, please post, no multiplayer or comupter stuff(altought that would be great ) but simple 2 player flash chess and fla so i can see how to do it and make my own
thanx
Flash Chess
This was completed with MX scripting any guesses on how?
http://www.media-division.com/flashchess.htm#
Multiplayer Chess
I am looking for a person that can build a multiplayer chess game for www.chesskit.com in flash or other.
Basically what is required is a lobby, where everyone can chat, and tables where people can sit down and specify info on time etc.
Similar to yahoo.com or zone.com/chess
Please email webmaster@chesskit.com if you are interested.
Chess Game
I started to do a chess game.
I've drawn the figures and the board.
The figures are moved like this:
There is a button inside each movie clip of a figure that does this:
code: on (press) {
startDrag("_parent", true);
}
on (release) {
stopDrag();
}
My questions are:
1. How do I define the legal moves?
2. How do I make that when the figures are released, they snap to the center of the square?
Chess Problem
I only need the idea, not the actionscript.
I have a n*n chess board and a knight (chess knight). The knight has to move to all of the squares without touching one two times so that it will, in the end, cover all of the board. Any ideas ?
Chess Program Help
I want to make a chess program in Flash MX 2004 (or Flash 5.0).
Is there a good tutorial out there to start with?
Chess Program Help
I want to make a chess program in Flash MX 2004 (or Flash 5.0).
Is there a good tutorial out there to start with?
Need A Yahoo Chess Booster
hi i would really apprecitate it if someone could give me a yahoo chess booster, i dont have any money, and i would greatly appreciate it if you would help me out, my yahoo id is, circleofpawns
email me or yahoo message me if im not online then i will recieve an offline message, please help
Chess Source Code?
Anyone know where I can find source code for an action script based chess game?
MSN Chess | Hmm Strange | How Did They Do That | Maybe A Tough One?
Hi,
MSN chess is a great online chess game made with macromedia flash when you go there, they ask you to download an activex control to be able to play the games.
Now this is very strange, I wanted to see those swf files offline in my cache but its impossible and I am unable to locate them, I have seen cab files and some swf's but these swf have nothing to do with the actual game. So my question is are the swf's embeded inside these cab files??? and if so how did they do that or how are they able to extract the swf in memory and not to the user's cache and still allow him to view and play the game?
you can check it out here, you will need to have a normal hotmail account to login.
http://zone.msn.com/en/chess/default.htm
so can someone please explain how this activex control the we have to download allow this to happen? or I am missing something?
Thanks in advance
MSN Chess | Hmm Strange | How Did They Do That | Maybe A Tough One?
Hi,
MSN chess is a great online chess game made with macromedia flash when you go there, they ask you to download an activex control to be able to play the games.
Now this is very strange, I wanted to see those swf files offline in my cache but its impossible and I am unable to locate them, I have seen cab files and some swf's but these swf have nothing to do with the actual game. So my question is are the swf's embeded inside these cab files??? and if so how did they do that or how are they able to extract the swf in memory and not to the user's cache and still allow him to view and play the game?
you can check it out here, you will need to have a normal hotmail account to login.
http://zone.msn.com/en/chess/default.htm
so can someone please explain how this activex control the we have to download allow this to happen? or I am missing something?
Thanks in advance
Chess Puzzle Problems
Hello,
I'm new to this forum and quite new to the Actionscript programming language. I've got some experience programming in PHP and Java though.
The reason why I post here, is that I'm trying to make this Chess Puzzle game in Flash and I've encountered some problems.
So, why not ask the Experts here?
Description:
This is a brief idea how the game will work:
1. When the game starts, the boards is drawn using a for-loop.
I got graphic symbols named white_square.gif and black_square.gif.
Each sqaure is given an exact x,y coordinate, so that
a1 = 50,500 (white square)
a2 = 100, 500 (black square)
a3 = 150, 500 (white square)
etc.
b1 = 50,450 (black square)
Mayby the positions could be read from an array?
There are 8 rows and 8 columns total - 64 Squares. Each row start with the opposite color, f.instance a1 - white square, b1 - black square. c1 - white square
Q: How do I code this?
2. After the board is drawn the different pieces are inserted on top of the board.
I've made transparent Movieclips of all the Black and White pieces -
King, Queen, Rook, Bishop, Knight and Pawn.
Each movieclip should be placed on top of one of the squares - f.instance place the white Queen on top of Square a7, then place the Black king on h8 and so on..
Q: How can I solve this issue and how do I copy a movieclip from the Library and place it on the scene?
3. I would like to save the position of all the pieces in a textdocument.
Q: How can I load the this information from the textdocument and use it to place the pieces correctly?
4. When the pieces are placed correctly it should be possible to move all white pieces (black pieces are standing still).
However, only one piece is the "correct" piece to move, the others are false.
The "false" movieclips should contain #include "Move_rules.as"
"move_rules.as" contain StartDrag("") and on(release) -> go back to original position.
The "correct" (or true) movieclip however, should include code to check if the piece is moved correctly from one squre to another - f.instance Rook H2 to Rook H8.
Q: How do I code this?
If the rook is moved to the correct square, H8, then a Motiontween should be triggered on a black piece - f.instance the Black King.
Q: How do I copy a Movieclip from the Library, place it on an exact position and use Motiontween to move it to another position?
After the Black King has moved, white once again can move his pieces, but this time the "correct" piece to move is another piece - like the Queen.
I'm trying to save the piece_positon and piece_moves into tables on a MySql database, but first I want to check it out with textfiles.
Hope you can help.
Online Chess With Flash
I need some help. I need to build a site that can feature online peer to peer chess.
I want to use flash to build the game but I need help with the ip to ip part of it. Can I use actionsript?
Please Help!!!
Scripts For A Chess Game?
I'm planning to make a simple chess game using Macromedia Flash. Can anyone provide me some scripts on how to get started?
It will only be a prototype so I don't need a complete script..
AS2 - Chess Search Algorithms
This my flash chess.
I'm trying to develop AI.
How can I build search tree (like this).
I'm thinking about 2dimensional array for chess nodes tree.
Any suggestions?
Ideas/concepts For MX Chess
hey, i am going to attempt to create a chess game with fMX , but i dont know where to start, im in no rush to get this done, its just a side thing im doing for my own site.. i want to know if anyone has any good ideas, or concepts, that might be helpfull, im not really big on back-end programming, and im trying to be, so i need something like this to make me learn.. Im not even sure on how im gonna start this whole thing, so right this second.. im just drawing out the pieces and the board and what now until i figure out how im gonna make this_**** work with two players.. like, i have seen many flash chat rooms, so im sure that it is possible to have piece coordinates relayed between two players online.
ANY RESPONSES ARE GREATLY APPRECIATED, EVEN STUPID ONES.. AN IDEA IS AN IDEA , SO **** IT...
Chess Game In Colour -help Wanted
i am a painter-photographer who's been working for several years on a new type of chess game that's played in colour. i managed to get a general idea on my website, but would appreciate if somebody could give me some help to make the game more interactive.(i'm fairly new to gamedesign)
here's the link
--played with coloured pieces
http://www.theapplegallery.com/drag%...y11-transp.htm
--played with little carpets
http://www.theapplegallery.com/drag%20and%20drop+.htm
i managed to show things with the drag and drop system but need help with-(1)how could i put the pieces straight on top of the carpets?
(2)is there a way of counting the moves people make?
(3)any help or idea to make it more interactive
(4)i have seen somewhere a chess game in flash where the moves pieces made, where shown
here's the link http://www.newsandentertainment.com/zfchess.html
could i use something similar ?
--
website
http://www.theapplegallery.com/
Chess Game In Colour - Help Wanted
i am a painter-photographer who's been working for several years on a new type of chess game that's played in colour. i managed to get a general idea on my website, but would appreciate if somebody could give me some help to make the game more interactive.(i'm fairly new to gamedesign)
here's the link
--played with coloured pieces
http://www.theapplegallery.com/drag%...y11-transp.htm
--played with little carpets
http://www.theapplegallery.com/drag%20and%20drop+.htm
--more info
http://www.theapplegallery.com/chess...omebasics.html
i managed to show things with the drag and drop system but need help with
-(1)how could i put the pieces straight on top of the carpets?
-(2)is there a way of counting the moves people make?
-(3)any help or idea to make it more interactive
-(4)i have seen somewhere a chess game in flash where the moves pieces made, where shown
here's the link http://wickedgoodgames.com/flash3/chess.html
could i use something similar ?
the basic difference between this game and normal chess is
that the nature of the game is not one of attacking but of helping eachother
(i'm at present working (writing) on some form of play (story) where "WAR IS OVER" and the two clans are invited to a wedding (hence they need to get there as soon as possible)
my initial idea was (still is)to play the game with coloured lights (additive colour)when for example (in the theatre)you shine red+blue+green toghether on the stage it will make white. so having 2 opposites would make a white light(RIGHT MOVE)), while for example green and red would create just another colour (-yellow) so (WRONG MOVE)
the players need to find their opposite colour ( that could be made easy or difficult)+ you can change the whole setup
over the years i have been applying different forms how this game could be played
(for example the game with the carpets i made with the help of a whole village in india and works on the same principle- finding their opposite player) same as the other game with the coloured squares . i also used numbers to make it a bit easier to understand (opposite players need to make nr "7")
the moves used are exactly the same as in chess (horse,bishop,etc...)
deedebee
website
http://www.theapplegallery.com/
Check King In Chinese's Chess
I've a problem while coding this game. Check King, I done, but check to Win or not, I can't. Please give me your help. thanks in advandce
Help Hero Movement Like A Chess Game
Hy
I want to make the hero.mc available to move with the mouse when you click down and then you drag where you want to position the hero.mc example like in a chees game
Thanks for any info
Attach Code
var tiles:Object = new Object({width:52, height:26}); // The size of the 'flat' tile. Tiles are allowed to be different dimentions, to give the '3D' effect.
var offset:Object = new Object({x:400, y:100}); // Este objeto ayuda a centrar el 'slotmachine' en el stage.
var hero:Object = new Object({x:1, y:1}); // La posicion inicial del 'slotmachine'
var canvas:Object = new Object({mc:_root.createEmptyMovieClip("canvas", _root.getNextHighestDepth())}); // Contains the primary movie clip and map information.
canvas.map = new Array( // Determina la Topografia del mapa
new Array(200,200,200,200,200,200,200,200,200),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100),
new Array(200,100,100,100,100,100,100,100,100)
);
onLoad = function():Void
{
initmap(canvas.map); // Draw the map
initplayer(); // Draw the player
return;
};
_root.onEnterFrame = function():Void
{
input(); // Handle keyboard movement
return;
};
function input():Void // Modifies the 'hero' object, handles collision detection ('hero' and wall)
{
// Any tile less then 200 is walkable, anything above is not.
// No need to change this code handle more tiles, just name the tiles a number.
// (not the best way to do this but simple, quick, and easy to do)
if(Key.isDown(Key.LEFT) && canvas.map[hero.y - 1][hero.x] < 200) hero.y--;
else if(Key.isDown(Key.RIGHT) && canvas.map[hero.y + 1][hero.x] < 200) hero.y++;
else if(Key.isDown(Key.UP) && canvas.map[hero.y][hero.x - 1] < 200) hero.x--;
else if(Key.isDown(Key.DOWN) && canvas.map[hero.y][hero.x + 1] < 200) hero.x++;
move();
return;
};
function move():Void // Moves the background and the hero
{
// These three lines handle swapping the tile depths to give the '3D' effect
var d:Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
hero.mc.swapDepths(d);
canvas.mc["tile_" + hero.y + "_" + hero.x].swapDepths(d - 1);
// Move the hero in the opposite direction the environment moves
hero.mc._x = (tiles.width / 2) * (hero.y - hero.x) + offset.x;
hero.mc._y = (tiles.height / 2) * (hero.y + hero.x) + offset.y;
return;
};
function initplayer():Void // Self-expalanatory
{
var d:Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
hero.mc = canvas.mc.attachMovie("hero", "hero_mc", d + 1, {_x:hero.x * tiles.width, _y:hero.y * tiles.height});
move();
return;
};
function initmap(map:Array):Void // Render map
{
var map_height:Number = map.length; // Determine height of the map
var map_width:Number = map[0].length; // Determine width of the map
for(var y = 0; y < map_height; y++)
{
for(var x = 0; x < map_width; x++)
{
// Movieclip depth is everything when doing an isometric game
var depth:Number = (y * tiles.height) + (x * tiles.width) + y;
// Attach tile to 'canvas'
var tile:MovieClip = canvas.mc.attachMovie("tile" + map[y][x], "tile_" + y + "_" + x, depth);
tile._x = (tiles.width / 2) * (y - x) + offset.x;
tile._y = (tiles.height / 2) * (y + x) + offset.y;
};
};
return;
};
Making Chess Puzzle In Flash
Hi guys!
I'm pretty new to Flash, but I love chess and would like to make chess puzzles in Flash to get more familiar with the program. I've looked in my CS3 book and browsed google for tutorials, but didn't find any on chess. Then I figured that maybe some nice people at these forums would help me out!
I have a board and my pieces, and I imagine it like, say, 4 squares will be highlighted, and then the user can drag a chess piece onto any of them, but only one will be right (the others produce failure messages). Then when they find the right square, I make the game make a move, and then they have to find the next move, then the game moves, and then they have to find the mating move.
Frankly, I don't know what to type in my actionscript for this to happen.
Help me out a bit?
Thanks, Carina
www.carlinart.net (<-- home to my other chess art ;))
Newbie - How To Create Chess Game?
Hi there,
I am a newbie who don't know a thing about scripting... However I want to create a simple board game with no AI. It will be as simple as the player will click on the empty area to make a black seed appear, on the next click it will turns white, then on the next click it will turn empty.
Original board:
+++++
+++++
+++++
+++++
Click once:
+++++
+++++
++B++
+++++
Click again:
+++++
+++++
++W++
+++++
Click again:
+++++
+++++
+++++
+++++
Click click click click....
+++++
++BB+
+BBB+
++B++
Click click ....
+++++
++BW+
+BWB+
++B++
Click ....
+++++
++BW+
+B+B+
++B++
i hope you can understand from the draft above... Thats mean the game does not need to process all the rules in the game, but the player will play the game with the rules he knows.
Please help!
Somone Reply (yahoo Chess Booster)
i need a yahoo chess booster, if you happened to have one for free i would appreciate it, please send me an email, circleofpawns@yahoo.com, or yahoo message me thanks alot please reply someone, i will do what i can for you in return
If Any One Is Board.....
could they please make a turtorial on text boxs and forums for the turtorial section it would be a great help.
Regards
New To This Board
hi everybody im new here i just figured out how to get to the message boards could someone help me with a game tutorial and a play button tutorial??
X Board
Anyone figured out a solution to making a tag board of some sort using flash? Any help in any direction would be beneficial?
If only you could save to a .txt....
What CPU/board/RAM Do I Go With?
Hi!
Sorry if I shouldn't post this in here, I wasn't sure what was more suitable
I'm going to be upgrading my PC very soon and wanted to ask a few questions before making the final moves
My current PC is:
AMD64 3500+ 2.2ghz
1gb RAM
Abit AV8-3rd Eye (Socket 939)
NVIDIA 6800GT 256mb
This PC doesnt seem to be up for the task anymore it crashes all the time using programs like AE/Flash & Photoshop and I would like to upgrade.
After some research I am interested in building a new computer using Intel Core 2 Quad Q6600 2.4GHz (Socket LGA775). This really looks to me the best value for money processor right now.
I want to spend around £500 (1006.85 US$)
Is Q6600 the best value for money processor I can get in this budget? How much of a speed increase would I see over my current processor in programs like After Effects?
How much and what RAM do I go for? I do a lot of video editing
What motherboards do you recommend? (I have always used AMD processors in the past so I'm pretty clueless here)
Will my new motherboard support my AGP 6800GT? (I want PCI graphic card support)
Hope I've made sense! I have built four computers before, but as you might notice I'm not the most technical savvy guy in the world
Thanks for any help!
Schmutz,
Tag Board
Any one know how to Insert a TagBoard? into a Flash Website. I want to do this so that people can well tag, I just want to display the tags not the submiting bit. Basically I want to create a variable that goes to the html site where the tags go. Any help would be great. It would probably better to create a forum but I like this better . Thx
Board
Hello,
Has anyone here ever made a message board.
Cheers,
Billy
Board
scuse me i'm french and i don't speak english well.
so
do you know if we can built a board with actionscript?
and if it's possible,
if we can load info into each line?
PHP Score Board
Hi
Can any one point me in the right direction of a PHP score board. I have a flash game which I want to parse the 'score' and 'name' variable to a PHP script which then displays a score board. I have MySQL installed on the server so it should work fine but I'm struggling to find the script.
Any help welcome!
Thanks
K
Message Board
Can you help me? I need a message board tutorials or someone who knows how to do it.
Message Board
Does anyone know where i can find an open movie of a message board or forum in flash...
Thanks
Message Board
I really want to add a flash message board to my site but I have absofreakinlutely no flippin idea how to do it. I have a site that allows php and I do have cgi access but no clue on how to do it. I've looked at all the free message boards out there and none of them are what i'm looking for. I really want one that's on my fave bands official site but i'm not sure asp extentions will work with it.
Can anybody Please help me?
Thanks in advance.
Anita
Is Something Wrong With The Board ?
is anyone else having trouble with posting, or reading posts???
I cant seem to access ANYTHING anymore, I keep geting errors, from flashkit??!!?!?!?! and losing half the posts & replies I submit, I don't even know if this one will go through??
I hate to say it, but, this is getting to be more trouble than it is worth??
where is the reliability?? is there some tweak that I can do to my browser (IE5) to make things go more smoothly ??
I am on a DSL which is very fast and reliable in every other aspect/site. . .
Is there any help on this ? or are the boards just overloaded sometimes??
darin
Message Board?
Do you know where I can I find a free message board?
and btw, which is better a pre-made one, like alxtool.com
or opensource ones?
Problem With The Board?
Is there a problem with the board tonight. I am not able to post replys. Keep getting error no subject or linked subject found.
Grafitti Board
i wonder if it was possible to create a grafitti board in flash. where it is basically a guestbook except they can drag where their text wants to be and it'll save it. is it possible?
Message Board
how do you set up the login/password on your site?? can you set this up with a message board and if so how?? thanks for any imput.
Bulletin Board
Hi everybody,
i am tying to create a bulletin board where people will be able to post their messages (just like a guestbook)...
But the difficult part is the code that will tell my server to refresh it every 6 hours...
Any help will be really great...
Message Board
I am trying to create a message board in Flash, one that would pretty much work like a guest book. It would ideally work off a text file writing and reading to it as people visited the site and left messages.
I don't want to use a database, i know that is the common answer. I don't even know if it is possible. I have looked around to find something similar in the flash movie files but can;t seem to find anyting close. Maybe i am just looking for something which is known or called something totally different.
Any help or ideas on how to do something like this would be greatly Appreciated.
Thanks,
Dave
A Message Board?
i wonna make a message board in flash.
i know that u can make guest books....so does anyone know of a tutorial somewhere?
tahnks!!
To All Board Member HELP
How can I create a MC in another level. If not how can I move it to level 1 and a specific location. If you have any suggestions please feel free to post them.
|