Using the UIScrollBar Component
1. Create a text field on the Stage using the Text tool. Using the text field’s handles, try and resize the text field instance to approximately 200 pixels wide by 300 pixels high.
2. Give the text field an instance name of news_txt using the Property inspector.
3. Drag an instance of the UIScrollBar component from the Components panel onto the Stage.
4. Give the UIScrollBar component an instance name of news_sb. In either the Property inspector or Component Inspector panel set the _targetInstanceName property to news_txt.
5. Drag the news_sb instance so that is snaps to the upper left corner of the news_txt text field.
6. Before you can test the Flash document you’ll need to populate the text field with enough content that it will scroll. Create a new layer at the very top of the Timeline and enter the following line of ActionScript:
textfield_mc.news_txt.htmlText = "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>";
7. At this point you should be able to test the current Flash document and see scrollbars attached to the text field on the Stage. You’ll notice that the scroll bar extends the entire height of the text field it is bound to. If there wasn’t enough text within the text field you’d also notice that no buttons appear on the scrollbar as well as no slider.
Next… using the UIScrollBar component with a dynamically created text field.
it doesn't work
nor the scrollbar
nor the text is filled in the text field