This content has been marked as final. Show 9 replies
Flash doesn't create cookies, like browsers do. It's similar but different. Flash Player does NOT store the "shared object"
or "cookie" in the temp folder but in the Flash Player #Shared Objects folder within the Flash Player folder of Document and Setting folder within the Current Users Folder under Application Data -> Macromedia -> Flash Player -> #SharedObjects -> SXCBJSF -> local
And then the file in many cases is not readable by human eyes and is NOT in a browser standard cookie format. Some are human readable but compare one to a cookie placed from a browser and you will see they are NOT the same.
At least that is what I have discovered. If I am wrong, which is possible, someone let me know so I can update my knowledge on this.
getURL(" http://www.custombrackets.com/scripts/cart.asp?cartArray="+_global.cartArray, "_self"); in flash
tempArray = Request.QueryString("cartArray") in asp.
but this only worked in firefox, and not in internet explorer.
What is cartArray? An Array? If so, how is it serialized? (changed into a string) Did you urlencode it?
Generally the code you gave is ok, there is no reason why it shouldn't work in IE for a single piece of data, e.g. a number.
here is the complete code i am using in flash and asp (i am sending a number array from flash to asp)
In Flash:getURL(" http://www.custombrackets.com/scripts/cart.asp?cartArray="+_global.cartArray, "_self");
(where cartArray is an array of numbers such as: cartArray = (12,33,128,222)
tempArray = Request.QueryString("cartArray")
tempArray = Split(tempArray, ",")
for j = 0 to uBound(tempArray)
if isNumeric(tempArray(j)) then
You rely far too much on implicit conversions.
In Flash create a
var cartString:String = _global.cartArray.join();
instead of _global.cartArray use escape(cartString) in the getURL call.
I think the Request.QueryString function of ASP does automatic url-decoding, but I'm not sure. Better look that up.
PS of course, you have a syntax error in your ASP code (double "end if"), but this is probably because you typed it from memory...
the escape does not work, i had to use tempArray = unescape("cartString") in asp.
Now it does not work in firefox either. At least the querystring worked in firefox, but the excape works nowhere
I think you need to do a bit of "tracing" here and tell us the results. I would first make copy of the asp script and change it so that it only shows the query string.
This should be urlencoded, so the escape has to work.
Your query string should look like this:
using the example of (12,33,128,222) you gave above.
If it does look like this, the problem is in ASP or more generally on the server side
if it doesn't look like this, it's in Flash
Then you unescape this in ASP, split it into a tempArray, and Response.Write this array. (My suspicion is you get non-numeric values and this causes a problem with the next loop)
Then you do your loop and Response.Write in your addItem() function
Of course, if the problem is in Flash, we need to look somewhere else. But I don't think that's the case.
PS: I just tested this by hand: I entered above query string (both urlencoded=escaped and with commas) by hand into IE, and your asp script returned "Your shopping cart is empty". Did you change anything in between?
Before you play with Flash, make sure it works from the browser's adress bar first.