A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Waiting for server response

  1. #1
    Junior Member
    Join Date
    Jun 2000
    Posts
    1
    I've been working on a dynamic User-Poll that receives the value of a question and multiple answers from an ASP script. After the user selects an answer and it is submitted to the script for processing, I haven't been able to get my result values to display the first time around. After I refresh the page and select an answer again, the values are there. They just don't show up the first time. I even have a check in place where I poll a variable called "complete" to see if it contains a string before I display the results. But still, nuttin'!

    So, I tried plan b and broke everything into different MCs, read the Q & As, sent the user's response, and then read in the results from a text file that my script updated, and everthing worked! I'd rather do plan a, which is to have my script serve everything to my SWF, but it's not working right.

    Any thoughts?

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    234
    could it be the server response time is taking to long?

    try delaying the swf movie(insert a few empty frames or something)
    i had the same problem and this worked...
    hope it does for u to

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Posts
    13
    To add some frames isn't the most beautiful sollution. What
    if the server decides to wait a little longer to respond.

    The best way to wait is to loop over the frame until your
    variable contains a string.


    // on frame x
    if (var ne "")
    // show the results
    else
    go to and play(x-1)
    end if

    remeber to go one frame back, and not the same frame,
    because then the actionscript won't be executed again.

    This will work no matter how long it takes for the server
    to respond.

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