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);

2 thoughts on “ActionScript urldecode/urlencode

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>