rather than copy the text of the control you copy the textflow which is the text and its formatting.
How would you do it without the new text layout framework though? I'm assuming that requires the users to have flash player ver. 10 and I want it compatible with older versions as well.
You can use htmlText instead of text. This will keep any formatting.
Thanks, that works if I want to copy the entirety of the text area to another, but I want to be able to pick apart the original text box and copy just certain portions of it, along with its style formatting, to the target text box (which I realize I probably didn't make clear in my original post).
I've tried copying the htmltext to a intermediary invisible textarea and then slicing off the text that i don't want copied into the target textarea but this hasn't worked for me so far. I've tried different approaches such as using the textfield methods replace and append but apparently they don't really work with htmltext.
Essentially, I haven't been able to find a way to just take a portion of a text area's htmltext (and it's accompanying style information). It's an all or nothing thing and while I can understand that's probably because of the nature of html markup, there must be a way around this. It seems like a pretty basic thing to be able to copy a portion of a text area along with that portion's individual style information into another text area.
Also, if I were to parse the original text box to find out which individual characters were bold, and then re-apply it to the copied over text in the target text box, I'm not sure how I would do that. Is there any way to determine the individual styles of the characters in a text box (i.e. using getStyle)?