ActionScript urldecode/urlencode

Ugh… After coding in Flash for sometime I started forgetting basics… terrible! Sometimes reading manuals actually helps…

Looking for PHPish urldecode/urlencode functions in Flash ActionScript? Checkout unescape/escape function in ActionScript refence

In short both take String as a parameter and will give you unescaped/escaped string back.

For exampe:

var test_string = "your unescaped string";

/* this will urlencode give you a string that = "your+unescaped+string" */
var escaped_string = escape(test_string); 

/* will urldecode and give you your unescaped string back  */
var unescaped_string = unescape(escaped_string);