1 Reply Latest reply on Apr 24, 2010 1:17 PM by Grif_22

    Sending a variable to a web page

    Grif_22

      Hi,

       

      I am trying to post the score that the player achieves to a database. I have set a web page "highScores.aspx" which gets a query string variable "webScore" and puts it in a database. This works fine as tested in a browser.

       

      The problem I have is getting the correct information into the query string variable. I have:

       

      form.loadVariables("http://www.rightjustified.co.uk/highScores.aspx", "GET");

       

      where the text in question is located inside "form" (which is a movie clip). I've been following this tutorial http://www.kirupa.com/developer/actionscript/flash_php_email.htm and while not really relevant, it's got me further than anything else. The problem with this tutorial is it relies on the user entering text, whereas I am just displaying out the score in some dynamic text. This means that in output I get the following error:

       

      Error opening URL 'http://www.rightjustified.co.uk/highScores.aspx?webScore=%3CTEXTFORMAT+LEADING%3D%222%22%3 E%3CP+ALIGN%3D%22CENTER%22%3E%3CFONT+FACE%3D%22HelveticaNeueLT+Pro+33+ThEx%22+SIZE%3D%2293 %22+COLOR%3D%22%23FFFFFF%22+LETTERSPACING%3D%220%22+KERNING%3D%220%22%3E0%3C%2FFONT%3E%3C% 2FP%3E%3C%2FTEXTFORMAT%3E'

       

      I should point out, I do not need to read the text to get the value as it is stored in a variable beforehand, I just display it to the player via some dynamic text, but I'm not sure how to use this to my advantage.

       

      Many thanks,

       

      Chris