Hi - I wonder if anyone can help me.
I have created a new TextField within an AS3 class…
private function setupNotes():void
{
notes = new TextField();
notes.selectable = false;
notes.x=myColumnStart+5;
notes.y=10;
notes.width = myWidth - myColumnStart - 10 ;
notes.wordWrap = true;
notes.textColor = 0x3c8421;
notes.text = “Notes…”;
notes.height = myHeight-15;
notes.multiline = true;
notes.background = true;
notes.backgroundColor = 0x5AA23F;
notes.name = “notesField”;
}
(I addChild(notes) within another method).
This sets up a TextField as a message field.
I am trying, basically to have a notes TextField on the rhs of my stage. When the notes get bigger than the height, I want it to automatically scroll.
What I am getting though is the text messages that I am generating (from various MouseEvents etc) filling up the box, and then I get no scroll or a one line scroll and jump back.
I am using the following lines to generate a new message, append it to the notes field and then scroll one line on…
notes.appendText("
"+e.target.name);//for example
notes.scrollV++;
So whatever i have going on, I wish at the end of a movement or drag (say) to send off a message and then scroll the notes TextField box one line down to see the latest message (the earliest message then disappearing up).
However, all I am getting is the notes field filling up as i want, then, when a new line is added, it adds allright, but the whole field jumps back up one line.