MetaArt wrote:
I'm developing a standalone Flash appl, to apply some format to text. The
appl will work on user's desktop, so I can't use php or any other
server-side language.
In php, to allow users insert a break row just typing the Enter key, I use
this code:
<?php
echo nl2br($message)
?>
where $message is the text to which apply the conversion between Enter key
action and html <br> tag.
How can I achieve this in AS, so the same result come within Flash appl?
I hope I got it right and you want to replace line breaks with <br/> tag?
If so use something like
str = "a\nb\nc\n";
trace(str);
str = str.split("\n").join("<br/>");
trace(str);
--
Michael "Antares" Klishin,
Email: [EMAIL PROTECTED]
Web: www.novemberain.com
Non progredi est regredi
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders