User Guide
TextArea.vPosition 1205
TextArea.vPosition
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
textAreaInstance.vPosition
Description
Property; defines the vertical scroll position of text in a text area. This property is useful for
directing users to a specific paragraph in a long passage, or creating scrolling text areas. You
can get and set this property. The default value is 0.
Example
The following example loads text into the TextArea called my_ta and sets the vPosition
property to display the text at the bottom.
You must 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)
*/
var my_ta:mx.controls.TextArea;
my_ta.setSize(320, 240);
// Load text to display and define onData handler.
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
if (src != undefined) {
my_ta.text = src;
my_ta.vPosition = my_ta.maxVPosition;
} else {
trace("Error loading text.");
}
};
my_lv.load("http://www.helpexamples.com/flash/lorem.txt")