• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

TextField Object

TextField Object

Method Description Parameters
addListener (whatListener ) Registers a Listener object to the TextField object. whatListener , an object assigned with an event handler
getDepth() Returns the depth level of a text field 
getFontList() Returns an array whose elements are the names of all the fonts on the viewer’s computer. Use TextField.getFontList() to call the method. 
getNewTextFormat() Returns a copy of the TextFormat object of newly inserted text in a text field. 
getTextFormat() or getTextFormat(index ) or getTextFormat (beginIndex, endIndex ) Returns a TextFormat object of an entire text field, a single character, or a span of characters. index , the position of a character in a text field.

beginIndex , the starting position of a span of characters

endIndex , the end position of a span of characters
removeListener (whatListener ) Removes a Listener object whatListener , an object assigned with an event handler
removeTextField() Removes a text field created with the createTextField() method 
replaceSel(text ) Replaces the current selection in a text field with new text text , the new replacement text
setNewTextFormat (textFormat ) Formats newly inserted text according to a text format object. textFormat , a text format object.
setTextFormat (textFormat ) or setTextFormat (index, textFormat ) or setTextFormat (beginIndex, endIndex, textFormat ) Formats an entire text field, a single character, or a span of characters according to a text format object. textFormat , a text format object. index , the position of a character in a text field. beginIndex , the starting position of a span of characters endIndex , the end position of a span of characters
Property Description
autosize Automatic alignment and sizing so a text field shrinks or grows to accommodate text (“none”, “left”, “center”, or “right”).
background Background fill, either true or false.
backgroundColor Color of the background as a hex code.
border Border, either true or false.
borderColor Color of the border as a hex code.
bottomscroll Bottom line visible in the text field (read-only)
embedFonts Font symbol embedded, true or false.
hscroll Horizontal scrolling position of a text field.
html Render as HTML, either true or false.
htmlText Contents of an HTML-rendered text field.
length Number of characters in a text field (read-only)
maxChars Maximum number of characters allowable.
maxhscroll Maximum value for the hscroll property (read-only)
maxscroll Maximum value for the scroll property (read-only)
multiline Text allowable on more than one line, either true or false.
password Input text is disguised, either true or false.
restrict Allowable characters in the text field
scroll Top line visible in the text field
selectable Contents selectable by the viewer, either true or false.
tabEnabled Text field can receive focus from the Tab key, true or false.
tabIndex Order of focus when receiving focus from the Tab key.
text Contents of the text field
textColor Color of the text as a hex code.
textHeight Height of the text (read-only)
textWidth Width of the text (read-only)
type Type of text field (“dynamic” or “input”)
variable Name of the text field variable
wordWrap Text automatically breaks on multiple lines, either true or false.
_alpha Transparency from 0 (transparent) to 100 (opaque)
_focusrect Visibility of the yellow rectangle around a focused text field, either true or false
_height Vertical dimension in pixels
_name Name of the text field instance
_rotation Rotation in degrees, clockwise from 12 o’clock
_target Target path of the text field instance (read-only)
_visible Visibility, either true or false
_width Horizontal dimension, in pixels
_x x position
_xscale Percentage of the horizontal dimension
_y y position
_yscale Percentage of the vertical dimension



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint