on (release) {
//top class
pieces = ["white", "black"];
pieces.white = ["whitePawns", "whiteBack"];
pieces.black = ["blackPawns", "blackBack"];
//white pieces
pieces.white.whitePawns =["wpa", "wpb", "wpc", "wpd", "wpe", "wpf", "wpg", "wph"];
pieces.white.whiteBack = ["wra", "wnb", "wbc","wq","wk","wbf", "wng", "wrh"];
//black pieces
pieces.black.blackPawns= ["bpa","bpb","bpc","bpd","bpe","bpf","bpg","bph"];
pieces.black.blackBack = ["bra","bnb","bbc","bq","bk","bbf","bng","brh"];
//_x adjustment var
right = 31.25;
//runs through setting pieces x,y
for (i=0; i<=7; i++) {
setProperty(pieces.white.whitePawns[i], _y, 406.25);
setProperty(pieces.white.whitePawns[i], _x, right);
setProperty(pieces.white.whiteBack[i], _y, 468.75);
setProperty(pieces.white.whiteBack[i], _x, right);
setProperty(pieces.black.blackPawns[i], _y, 93.75);
setProperty(pieces.black.blackPawns[i], _x, right);
setProperty(pieces.black.blackBack[i], _y, 31.25);
setProperty(pieces.black.blackBack[i], _x, right);
right += 62.5;
}}
The problem is with the black king and bishops - bk, bbc and bbf.
Those 3 jump out of position in a wierd way.
I think it's because the x,y of those 3 movie clips is kindof stuck on the upper left of the mc and it's relatively centered on the other 29 mcs. You know what I mean?
I could have just asked that and not posted the code, but maybe cause I'm new at this I wanted to show my code to someone and hear thoughts bout how I'm controlling these chess pieces here.