views:

490

answers:

2

Flash has a scrollbar class, documented here:

http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/controls/ScrollBar.html

However, besides listing functions and variables, there's no real explanation of how to hook an instance of this class to a textfield.

Everything I've tried either ends up in errors or the scrollbar not showing. The documentation lacks a clear way of how you should bind the textfield and the scrollbar toghether, and CS4 isn't providing any help either.

Can someone explain, or link to an example of how scrollbars work with textfield?

A: 

if your question is how to attach scrollbar to textfiled in design view then just add textfiled to the stage, make sure the textfiled is multiline drag a scrollbar component over it, add some lines to the textfiled then run it.

isa
"Drag over it" you say?
WebDevHobo
Yes, with a textfield already placed on the stage, click your mouse on the 'scrollbar' component in the components toolbax, drag it over to the textfield, and then release it on the textfield. It should attach to it and then "just work".
davr
Posting on the internet say you may also need to right-click the textfield and choose "Scrollable"
davr
A: 

If you just want a textfield with a scrollbar attached, you can use the premade "TextArea" component which already provides this functionality.

davr
So, a textfield does not have a scrollbar built in, but a TextArea does?
WebDevHobo
That is correct.
davr