User Guide
1202 TextArea component
You first add an instance of the TextArea component to the Stage and name it my_ta; then
add the following code to Frame 1:
/**
Requires:
- TextArea instance on Stage (instance name: my_ta)
*/
my_ta.setSize(320, 240);
my_ta.move(10, 10);
var lorem_lv:LoadVars = new LoadVars();
lorem_lv.onData = function(src:String):Void {
my_ta.text = src;
}
lorem_lv.load("http://www.helpexamples.com/flash/lorem.txt");
my_ta.addEventListener("scroll", doScroll);
function doScroll(evt_obj:Object):Void {
trace("target: " + evt_obj.target);
trace("type: " + evt_obj.type);
trace("direction: " + evt_obj.direction);
trace("position: " + evt_obj.position);
trace("");
}
See also
EventDispatcher.addEventListener()
TextArea.styleSheet
Availability
Flash Player 7.
Usage
textAreaInstance.styleSheet = TextFieldStyleSheetObject
Description
Property; attaches a style sheet to the TextArea component specified by TextAreaInstance.
For information on creating style sheets, see “Formatting text with Cascading Style Sheet
styles” in Learning ActionScript 2.0 in Flash.