I was playing around with the chess app from the book "flash mx 2004 demystified" and I had a question. When I open 2 separate flash movies on my computer and login, the game works fine if the person who creates the game is the first person to log in. Strangely though, the game does not work if the second person to log in creates the game.
When I create a game using the second person, I notice that the blackPlayer_txt and whitePlayer_txt are correct for the creator of the game, but incorrect for the person who joins the game. The second person's blackPlayer_txt and whitePlayer_txt are the same.
This leads me to believe that there is an error in the way the second player to join the game (first player to login) is handling the myNum var. I looked over the server side script, but the loop that controls the numbering process seems to be perfect.
Is it possible that there is a naming conflict with the way that the myNum variable is used between the lobby and the game or some sort of problem with the order in which the functions are called (For example, the player who joins the game retains his number from the lobby thereby populating the whitePlayer_txt with his name and then calls the es.function which tells him that he is the second player to join, resulting in his name occupying the second player slot as well. This doesn't seem likely since the myNum var is set before the text fields are populated. It seems more likely that the first player to login (second player to join the game) is having his myNum stored as a persistent var for the first spot in the lobby and then when the game function is called, it only returns him as the second person resulting in the persistent var saying that he is the first person and the local var saying that he is the second person. If this were the case, it's reasonable that his name would populate both text fields.
Quite frankly, I'm guessing at what the error could be and would greatly appreciate any help on why this is occurring. Also, if this problem is just occurring with my copy or if you have updated the game, is it possible that I could get a copy?
I too have noticed this problem. I was wondering if any guidance can be provided on this situation. ^_^.
Tags for this Thread