ActionScript 2.0 Components Language Reference |
|
|
|
| TextArea component > TextArea.editable | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
textAreaInstance.editable
Property; a Boolean value that indicates whether the component is editable (true) or not (false). The default value is true.
The following example sets the editable property to false to prevent the user from editing the text that it loads into the TextArea instance called my_ta.
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);
my_ta.editable = false;
// 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;
} else {
my_ta.text = "Error loading text.";
}
};
my_lv.load("http://www.helpexamples.com/flash/lorem.txt");
|
|
|
|