ASP and Flash 5

I have an asp that does some computations then writes back this

Response.Write “first1=”& first
Response.Write “&operand1=”& operand
Response.Write “&second1=”& second

if i activate it with an html page i get back this

first1=987&operand1=j&second1=987

the numbers are generated from user input

I activate from flash i get back garbage

if i just use
Response.Write “first1=”& “A string of some sort”

its fed back to my movie

I can also echo back whats was in the input box like if i have

big = Request.form(“txtmain”) ’ txtmain being the input box in the flash movie

and then

Response.Write “first1=”& big

this works , the contents of the input box are echoed back

I tried casting my other variables using the cstr() but it still doesn’t work

is there some way variables have to be encoded for the flash movie to read them,

I am also messing around with ASP and Flash at the moment, and having a few problems in actually returning anything to Flash.

Perhaps you can have a look at my thread, you may be able to help seen as you are actually getting values returned to Flash.

The thread is here: http://www.kirupaforum.com/showthread.php?s=&threadid=8842

I think the reason why you are getting garbage back is that Flash does not know how to handle concatentated strings.

To overcome this you should use the ASP built in function Server.URLEncode.

Try code similar to this and see if it works:

Response.Write “first1=”&Server.URLEncode(first)
Response.Write “&operand1=”&Server.URLEncode(operand)
Response.Write “&second1=”&Server.URLEncode(second)

Let me know how you get on.