03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

See also<br />

attachMovie (MovieClip.attachMovie method)<br />

createTextField (MovieClip.createTextField method)<br />

public createTextField(instanceName:String, depth:Number, x:Number,<br />

y:Number, width:Number, height:Number) : TextField<br />

Creates a new, empty text field as a child of the movie clip on which you call this method. You<br />

can use the createTextField() method to create text fields while a SWF file plays. The<br />

depth parameter determines the new text field's depth level (z-order position) in the movie<br />

clip. Each depth level can contain only one object. If you create a new text field on a depth<br />

that already has a text field, the new text field replaces the existing text field. To avoid<br />

overwriting existing text fields, use MovieClip.getInstanceAtDepth() method to<br />

determine whether a specific depth is already occupied, or the<br />

MovieClip.getNextHighestDepth() method to determine the highest unoccupied depth.<br />

The text field is positioned at (x, y) with dimensions width by height. The x <strong>and</strong> y<br />

parameters are relative to the container movie clip; these parameters correspond to the _x <strong>and</strong><br />

_y properties of the text field. The width <strong>and</strong> height parameters correspond to the _width<br />

<strong>and</strong> _height properties of the text field.<br />

The default properties of a text field are as follows:<br />

type = "dynamic"<br />

border = false<br />

background = false<br />

password = false<br />

multiline = false<br />

html = false<br />

embedFonts = false<br />

selectable = true<br />

wordWrap = false<br />

mouseWheelEnabled = true<br />

condenseWhite = false<br />

restrict = null<br />

variable = null<br />

maxChars = null<br />

styleSheet = undefined<br />

tabInded = undefined<br />

A text field created with createTextField() receives the following default TextFormat<br />

object settings:<br />

font = "Times New Roman" // "Times" on Mac OS<br />

size = 12<br />

color = 0x000000<br />

bold = false<br />

italic = false<br />

862 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!