Use a callLater. I've used a doLater in the
past and she worked pretty well. So like:
function log ( s )
{
debug.text += s +
"\n";
callLater ( scrollIt
);
}
function scrollIt()
{
debug.verticalScrollPosition =
debug.maxVerticalScrollPosition;
}
If that doesn't work, make scrollIt call itself
recursively 1 time, via a counter. If that doesn't work, make it 2,
etc. I promise it won't be over 10!
----- Original Message -----
From: Pan
Troglodytes
To: flexcoders
Sent: Thursday, July 13, 2006 12:23 PM
Subject: [flexcoders] best general purpose way to keep textarea
scrolled to bottom private function log(s:Object):void { debug.text += "\n" + s.toString(); debug.verticalScrollPosition = debug.maxVerticalScrollPosition; } Unfortunately, it seems that the max position isn't updated yet at this point. I've tried hooking into change/dataChange and other events without luck. It's always scrolled ALMOST to the bottom. What's the best way to solve this? -- Jason __._,_.___ -- 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
|
- Re: [flexcoders] best general purpose way to keep textare... JesterXL
- Re: [flexcoders] best general purpose way to keep te... Pan Troglodytes
- Re: [flexcoders] best general purpose way to keep te... Darron J. Schall
- Re: [flexcoders] best general purpose way to kee... Pan Troglodytes
- Re: [flexcoders] best general purpose way to keep te... Daniel Nelson