myTextField.filters = myFilters;
The following example changes the
example works only if at least one filter object has been associated with the
field).
var myList:Array = myTextField.filters;
myList[0].quality = 15;
myTextField.filters = myList;
See also
getDepth (TextField.getDepth method)
public getDepth() : Number
Returns the depth of a text field.
Availability: ActionScript 1.0; Flash Player 6
Returns
- An integer that represents the depth of the text field.
Number
Example
The following example demonstrates text fields that reside at different depths. Create a
dynamic text field on the Stage and add the following ActionScript code to your FLA or AS
file. The code dynamically creates two text fields at runtime and outputs their depths.
this.createTextField("first_mc", this.getNextHighestDepth(), 10, 10, 100,
22);
this.createTextField("second_mc", this.getNextHighestDepth(), 10, 10, 100,
22);
for (var prop in this) {
if (this[prop] instanceof TextField) {
var this_txt:TextField = this[prop];
trace(this_txt._name+" is a TextField at depth: "+this_txt.getDepth());
}
}
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
setting of the first filter in the array to 15 (this
quality
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
text
myTextField
method.
TextField
1179
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?