Monday 15 February 2010

Parse URL (ActionScript 3.0) -



Parse URL (ActionScript 3.0) -

i know how 1 parse url.

protocol://mydomain.com/something/morethings/this_is_what_i_want/even_if_it_has_slashes

i need "this_is_what_i_want/even_if_it_has_slashes"

how should this?

thanks!

try :

var u:string = 'protocol://mydomain.com/something/morethings/this_is_what_i_want/even_if_it_has_slashes', a:array = u.split('/'), s:string = '' for(var i=0; i<a.length; i++){ if(i > 3){ s += '/'+a[i] } } trace(s) // gives : /morethings/this_is_what_i_want/even_if_it_has_slashes

actionscript-3 url

No comments:

Post a Comment