all groups > flash actionscript > september 2005 >
You're in the

flash actionscript

group:

converting text to html



Re: converting text to html kglad
9/19/2005 12:00:00 AM
flash actionscript:
Re: converting text to html Dan NO[at]SPAM SEBTS
9/19/2005 12:00:00 AM
umm, these fields have html = true but when i type in the html code it comes up
as text rather then formatting the text. I want to basically create a little
WYSIWYG editor with buttons for bold and italics and color and stuff that will
show it as formatted text and then send it out as code.
Re: converting text to html had3z
9/19/2005 12:00:00 AM
why would you want to type your own html code? you could use TextFormat to
format the text, or type your code and have a "preview" button, which should
move the text you typed in another textbox as htmlText . but that will hurt.

ps: there are also free text editor components, i believe actionscript.org has
a pretty good one

Re: converting text to html kglad
9/19/2005 12:00:00 AM
converting text to html Dan NO[at]SPAM SEBTS
9/19/2005 1:07:23 PM
I was wondering if there is a way to take text that is formatted in flash and
send it out somewhere else as html code rather then plain text. Basically, if I
have some text in Flash that I have made bold can I send it out to a database
with <b></b> tags? Any help would be greatly appreciated. Thank you.
-Dan
Re: converting text to html Motion Maker
9/20/2005 9:42:10 PM
In MX 2004 I tried this:
a_txt.text = "ABC"
my_fmt = new TextFormat()
my_fmt.color = 0xff0000
my_fmt.italic = true
a_txt.setTextFormat(my_fmt)
a_txt.html = true
trace(a_txt.htmlText)

Output window =
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_typewriter" SIZE="12"
COLOR="#FF0000"><B><I>ABC</I></B></FONT></P></TEXTFORMAT>

--
Lon Hosford
http://www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
I was wondering if there is a way to take text that is formatted in flash
and
send it out somewhere else as html code rather then plain text. Basically,
if I
have some text in Flash that I have made bold can I send it out to a
database
with <b></b> tags? Any help would be greatly appreciated. Thank you.
-Dan

AddThis Social Bookmark Button