PDA

View Full Version : UIScrollBar auto-scroll



goto()
March 24th, 2008, 02:42 AM
Hi everybody,
Im working on a chat system based on the PHP sockets + Flash tutorial on kirupa, but translated to AS3. Everything is working fine but I have an issue with the UIScrollBar that canīt figure out.

As you can see on any chat system, or messenger system, the scroller is continusly moving to the end of the text container if a message incomes. I need the scroller keep moving and show automatically the last message pushed in the htmlText field associated with it, but its always static.

Thanks in advance for your help.

amarghosh
March 24th, 2008, 02:58 AM
set scrollV property of TextField class

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html#scrollV

goto()
March 24th, 2008, 03:21 AM
Thank you amarghosh, I dont know why dindt see that property before :)
just this solved the problem


msgArea.scrollV=msgArea.maxScrollV;
sbar.update();