If you have two text fields and want to devide text content between those, how can you keep the HTML formatting? I use [COLOR=blue]getLineText()[/COLOR] to get the not visible text in the first text field and put it in the second field, but [COLOR=blue]getLineText()[/COLOR] don´t return the HTML formatting…
You can trace(text.htmlText) this will return you the whole text including the html tags. If you want to split the text bw two text fields then you can put a special character and then read the text upto that chatacter into one array and assign that to textField.htmText and read the text after that charater and put into other
textField2.htmlText.
I need to split the text between the text fields at runtime. They are editable so it must update while typing. So how to do this in realtime?
Okay I am not really getting what you are saying here but from what I can see now is that you have a text field say txt1 with some text and do you want user to do something first to split the text or is your programme splitting it.
Can you please explain me a bit more cuz this is possible?
I have two text fields - txt1 and txt2. At program start I got a long text to divide between those fields. The text content that doesn´t seat in txt1 flows over to txt2.
[AS]
var myLongText:String = “Loooong text goes here.”;
txt1.htmlText = myLongText;
txt2.htmlText = myLongText;
var Right:String = “”;
for (var i:int = txt1.bottomScrollV; i < (txt1.bottomScrollV + txt1.maxScrollV - 1); i++)
{
Right += myText1.getLineText(i);
}
txt2.htmlText = Right;
[/AS]
Both text fields are editable. So when typing something in txt1 it should update the text content txt2. This works fine, but when updating txt2 It don´t keep the HTML formatting. How to keep it?
Edit:
Look at Adobe InDesign. When having two text fields (columns). There you can leash them and the text content flows automatically.