A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: javascript string workaround/question

  1. #1
    Join Date
    Feb 2002
    I've figured out a workaround on the javascript string-handling routine problems in 3.6. For now, I'm just treating each of the top ten names and scores as different variables (name1, name2, score1, score2). The number is added to each variable name in the while loop on the server side. I have ten edit boxes for the names and 10 for the scores in 3dfa. I load the values into a name array and a score array in 3dfa, so they can be sent back to the server one at a time as "name" and "score." The "get variables" routine on the server side uses a SORT BY score DESC argument to determine the top ten in descending order. Simple! I just update the Mid (id variable) when the scores are sent back to the server. So far it's working great - now for the question.

    Q: I notice when I send values back to the server, the PHP script will echo back the updated variables almost right away, but the 3dfa-generated .swf running in the browser will not update the variables until I close the browser and then reload the .swf file. Is this a normal thing? (not a big deal, but I'm curious).

  2. #2
    Senior Member
    Join Date
    Jul 2001
    hmm... it sounds vaguely familiar, but i cant put my finger on it. I used a similar method for highscores on InsaneLander, and your question rung a bell.

    I cant say this is it for sure, but I do recall having an issue once when both the server call and the editbox assignment actions take place on the very first frame of the first scene - it doesn't have time to update the variables before the server returns the values, so the values are null until its refreshed. Try calling the server variables on a few frames *after* the initial frame (or a few seconds after).

    know what i mean ?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center