Input textarea scrolling, once and for all

Hi,

so I’m trying to create and input textarea with a scrollbar. No scrolling buttons needed. The app will be a font previewing app, where the user can change fonts, sizes etc. kinda like www.ourtype.be (hit try on any font).

Everything works fine until the user wants to add some text. I’ve got an easing scrollbar thing going, which almost work, but the problem is in updating the scrollbar’s position after the user has typed something in (tested using onSetFocus and onKillfocus). This scroller works with a mask and the x, y and height value of the masked clip.

So I started looking into scroll and thought I’d use that. Now I’m so puzzled that I can’t figure out the best way to scroll and input textarea, so that the scrollbar’s position would update according to the cursor’s position in the text.

Anyone got and idea on this? Thanks in advance.

p.s. and yes, I did search the forums, for over an hour.