Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URL encode variable in AS3?

I get the following error when trying to pass variables via URLRequestMethod.POST;

Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.

Is there a method for string URL Encoding?

like image 882
dd . Avatar asked Aug 15 '10 13:08

dd .


2 Answers

There are escape() and unescape() as top level functions of ActionScript 3 for URL encoding/decoding.

like image 54
Valentin Avatar answered Oct 06 '22 19:10

Valentin


Solution to this problem is: You have to set URLLoaderDataFormat to URLLoaderDataFormat.TEXT not URLLoaderDataFormat.VARIABLES. Because VARIABLES means different types of data, not multiple items in URLVariables.

like image 24
shure Avatar answered Oct 06 '22 21:10

shure