How can I add new line to a dynamic text in Flash using AS3
A:
Use "\n" for a newline (or maybe <br /> if the textfield is htmltext). Make sure it is set to multiline though.
Simon Groenewolt
2009-09-08 13:01:46
A:
if you want the textfield to automatically go to multiple lines set wordWrap to true and define the tf width
Oliver
2009-09-08 14:21:16
A:
Actually the problem is I am reading the text from XML file, example:
<filename>02.jpg</filename>
<str1>Well-trained legs \n polycarbonate blends</str1>
<str2>Secure his ski-glide</str2>
"\n" and "
" is not working so that the only solution that I found is passing the my text to this small function
function textMan(str:String):String{
return str.replace("\\n", "\n");}
Thanks
Zajil
2009-09-09 09:15:04