User Guide
MovieClip.createTextField() 567
MovieClip.createTextField()
Availability
Flash Player 6.
Usage
my_mc.createTextField(instanceName:String,
depth:Number, x:Number, y:Number,
width:Number, height:Number) : Void
Parameters
instanceName
A string that identifies the instance name of the new text field.
depth A positive integer that specifies the depth of the new text field.
x An integer that specifies the x coordinate of the new text field.
y An integer that specifies the y coordinate of the new text field.
width A positive integer that specifies the width of the new text field.
height A positive integer that specifies the height of the new text field.
Returns
Nothing.
Description
Method; creates a new, empty text field as a child of the movie clip specified by my_mc. You can
use
createTextField() to create text fields while a SWF file plays. The depth parameter
determines the new text field’s z-order position in the movie clip. Each position in the z-order can
contain only one object. If you create a new text field on a depth that already has a text field, the
new text field will replace the existing text field. To avoid overwriting existing text fields, use the
MovieClip.getInstanceAtDepth() to determine whether a specific depth is already occupied,
or
MovieClip.getNextHighestDepth(), to determine the highest unoccupied depth. The text
field is positioned at (
x, y) with dimensions width by height. The x and y parameters are relative
to the container movie clip; these parameters correspond to the
_x and _y properties of the text
field. The
width and height parameters correspond to the _width and _height properties of the
text field.
The default properties of a text field are as follows:
type = "dynamic"
border = false
background = false
password = false
multiline = false
html = false
embedFonts = false
selectable = true
wordWrap = false
mouseWheelEnabled = true
condenseWhite = false
restrict = null