Btw one more question ... is there a way to convert & (and other special chars) NOT to be converted when shown in a Flash HTML textfield? I've tried it with str.split("&").join(\\%26amp;) but it just would trace out the whole string plus the \%26. Are there any char codes for this that doesn't get translated in a html textfield?

Thanks,
Sascha


----- Original Message ----- From: "Adrian Lynch" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Friday, January 20, 2006 11:19 PM
Subject: RE: [Flashcoders] Converting &amp; in a URL?


Are you outputting these URLs or using them in getURL()?

That should work in getURL(). But if you're outputting them, one way to
convert them is to use HTML text fields.

Or, if you can't change the text fields, try this:

str = "Sometext with an &amp; in.";

function convert(str, from, to) {
return str.split(from).join(to);
}

trace(convert(str, "&amp;", "&"));

Adrian

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Sascha
Balkau
Sent: 20 January 2006 14:10
To: flashcoders
Subject: [Flashcoders] Converting &amp; in a URL?


Hi list,

does ActionScript have any facilities to convert special characters like
&amp; into just &? I have one Flash movie that reads URLs from an RDF file
where all URLs are written with &amp; inside the adress. My client would
like these special chars to be converted to '&'. Does Flash has anything to do that automatically (haven't found anything so far) or do I have to write
my own convert method?

Thanks for help,
Sascha

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to