PDA

View Full Version : Trying to Fix Game


moveover
01-31-2005, 12:12 PM
I found a checkers game on this website (http://www.javafile.com/games/checkers/checkers.php) and tried to customize it to use on mine. When I change the url to the images and I open the game in my browser it looks fine until when I click on one of the pieces a small x appears and the pieces that move are no longer visable.

Would anyone have any idea what I've missed - I've been looking for quite some time now.

Thanks!

RysChwith
01-31-2005, 01:16 PM
Probably what's happened at that point is that it's switching to a different image, and you don't have that image. So you'd need to make an image for a selected piece (in the example, it'd be the image with the yellow background) and alter the code to call that image.

Rys

RysChwith
01-31-2005, 01:25 PM
After looking at the script in a little more detail, make sure that you follow the same naming convention he uses. The basic names "me" and "you," and those are really the only parts you'd want to change. The code depends on a certain naming format, so if you decided to name the "me" knight piece something like "redKnight" instead of "redk," it would break.

Rys

moveover
01-31-2005, 02:03 PM
Hi Rys,

Thanks for your comments.

I haven't changed a thing except the path to where the images are located. As I'm not familiar with javascript so I make sure I change only what's necessary.

This has got me stumped. I tried playing the game and it's moving the pieces properly but as I mentioned the image disappear after the first move.

Anyway, I'm gonna keep looking and if you come up with any other suggestions let me know.

Thank you!

moveover
01-31-2005, 02:23 PM
Hey Rys,

I decided to start from scratch again...and I realized that I needed to put the pieces in the same folder as the web page..Ok, that's not funny :D :D I only spent a day trying to figure it out.

thanks for your help anyway!

RysChwith
01-31-2005, 04:31 PM
That would also do it. Congrats on figuring it out. And don't worry about feeling foolish about such things. We all have stories about spending days hunting down errors, only to discover that they were incorrect capitalization, or a misspelled word, or something similar.

Rys