I'd like build a Text Editor but the TextArea don't accept setTextFormat method.
I try to create a TextField end bind the htmlText property to TextArea.htmlText and apply the TextFormat in the TextField component.
But this simple example returns: undefined
var my_txt:TextField = new TextField();
my_txt.text = "teste"; 
alert("" + my_txt.text);
 
Thanks,
Bruno Martins.
Sorry about my english.
 
This example works in flash:
 
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "Arial";
my_fmt.color = 0xFF9900;

var my_fmt2:TextFormat = new TextFormat();
my_fmt2.bold = false;
my_fmt2.font = "Arial";
my_fmt2.color = 0xFF0000;

this.createTextField("my_txt", 10999, 0, 0, 400, 300);
my_txt.wordWrap = true;
my_txt.multiline = true;
my_txt.border = true;
my_txt.type = "input";
my_txt.setNewTextFormat(my_fmt);
my_txt.text = "Oranges are a good source of vitamin C";
my_txt.html = true;
trace("" + my_txt.htmlText)

my_txt.setTextFormat(0,7,my_fmt2);

trace("" + my_txt.htmlText)



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to