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:
trace("type:
trace("direction: " + evt_obj.direction);
trace("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
For information on creating style sheets, see "Formatting text with Cascading Style Sheet
styles" in Learning ActionScript 2.0 in Flash.
1202
TextArea component
" + evt_obj.target);
" + evt_obj.type);
" + evt_obj.position);
.
TextAreaInstance
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers