View Full Version : Newline character ignored in htmlText for Flash Player 6?
diesel5599
06-27-2006, 11:17 PM
Is the newline character "\n" ignored in Flash Player 6 when it is included in an html text box? I'm testing backwards compatibility for my completed site with Flash Player 6 and none of the newline characters or tab characters are working if the text box has the html property set to true. All of the text boxes work fine in Flash Player 8.
Is there a different character I need to use? Or is it just not supported for Flash Player 6?
oldnewbie
06-28-2006, 01:08 AM
Is this read from a text file, or defined through actionscript?
mooska
06-28-2006, 10:13 AM
It works fine
field.html = true;
field.htmlText = "<b>some <br> text"+newline+" some \n text \r some more</b>";
diesel5599
06-28-2006, 01:55 PM
After more testing I've found that both newline and \n are ignored if an <a href immediately follows the commands in Flash Player 6. You have to use <br> immediately preceeding <a href> for it to make a new line in Flash Player 6. It must be a bug in Flash player 6. Below is an example:
Example_txt.html = true;
Example_txt.htmlText = "<b>Links</b>\n" +
"<a href='this.example.link.html'>Example Link</a>";
Output in Flash Player 6 would be:
LinksExample Links
Output in Flash Player 8 would be:
Links
Example Links
This works for Flash Player 6:
Example_txt.html = true;
Example_txt.htmlText = "<b>Links</b><br>" +
"<a href='this.example.link.html'>Example Link</a>";
I've also noticed that in Flash Player 6, text boxes must have their html property set to true, otherwise the html tags are ignored. In Flash Player 8, the text box automatically reads the tags if the text is assigned to the text box via the htmlText property.
Now I have to figure out how to get the tabs (\t) to work as well. I have a lot of pages with external and asfunction links that have \n and \t in front of them. All of them broke when I exported to Flash player 6.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.