TextField various properties and methods

Source: Internet
Author: User
Tags border color

Today, there is a need to use TextField, because there is no self-help hint, I found a master on the Internet as a summary of the collection as a search, share with you

TextField object-related properties and methods, the content is very rich, the following several tables:

table One methods for TextField objects

Method description
Textfield.addlistener joins a listener that receives a trigger event, such as a change in the content of a text field or a scrolling change, and the triggering event can be see the last table.
Textfield.getdepth returns the depth depth of the text field.
Textfield.getnewtextformat the default text format for the latest added text.
Textfield.removelistener Delete the Listener object.
Textfield.removetextfield Delete a text field created using Movieclip.createtextfield.
Textfield.setnewtextformat set the newly added text to the new format.
Textfield.replacesel replaces the currently selected content.
Textfield.settextformat set the newly added text to the default format.

Table two properties of TextField objects

Property Description
Textfield._alpha the transparency value of a text field instance.
Textfield.autosize controls the Text field size and automatic alignment.
Textfield.background the logical attribute, true if the text field has a background, or false.
Textfield.backgroundcolor the logical attribute if the text field has a background color of true, otherwise false.
Textfield.border the logical attribute, true if the text field has a boundary, false otherwise.
Textfield.bordercolor the logical attribute, true if the text field has a border color, or false.
Textfield.bottomscroll A read-only property that returns the value of the lowest line in the text field.
Textfield.embedfonts the logical attribute, true if the text field uses an inline font outer box, or FALSE otherwise.
Textfield._highquality returns the playback quality of the movie, which can be 0, 1, and 2,2 to indicate the highest quality.
Textfield._height The pixel height of the text instance.
Textfield.hscroll a logical variable to get the value of the horizontal scrollbar, which is 1, and 0 is not.
Textfield.html returns whether the text box contains markup for HTML usage or text that contains HTML if true, otherwise it is not HTML-free.
Textfield.htmltext contains the HTML code in the TextField.
Textfield.length the length of the characters in TextField.
The maximum number of characters that can be contained in Textfield.maxchars TextField.
Textfield.maxhscroll the read-only property to get the maximum value of Textfield.hscroll.
Textfield.maxscroll the read-only property to get the maximum value of Textfield.scroll.
Textfield.multiline A logical variable that identifies whether the TextField is multiple lines.
Textfield._name gets the instance name of the TextField instance.
Textfield._parent points to the MovieClip or object that contains this TextField.
Textfield.password whether the input is in the form of a password.
Textfield._quality returns the playback quality of the movie, which can be low, Medium, high, or best.
Textfield.restrict sets the character that restricts the input.
Textfield._rotation the degree of rotation of the TextField instance.
The vertical position of the Textfield.scroll TextField is commonly used to achieve scrolling.
Textfield.selectable Flag TextField content is optional.
Textfield._soundbuftime the number of seconds to download before the format sound starts playing.
The textfield.tabenabled flag is valid for the TAB key.
Textfield.tabindex the order in which the TAB key is marked.
Textfield.text the text in the current TextField.
Textfield.textcolor the color of the current TextField Chinese text.
Textfield.textheight the height of the TextField box.
Textfield.textwidth the width of the TextField box.
Textfield.type whether the tag TextField is input or dynamic text.
Textfield._url the URL address of the SWF file that created the TextField.
Textfield.variable the TextField variable.
Textfield._visible a logical value that marks whether the TextField is visible.
Textfield._width the width of the TextField instance, in pixels.
Textfield.wordwrap marks whether the TextField wraps automatically.
The x-coordinate of the textfield._x TextField in the instance that contains it.
Textfield._xmouse The x-coordinate of the TextField relative to the mouse.
Textfield._xscale TextField The horizontal direction of the magnification factor.
Textfield._y the y-coordinate of the TextField in the instance that contains it.
Textfield._ymouse the y-coordinate of the TextField relative to the mouse.
Textfield._yscale TextField the magnification of the vertical direction.

Table three TextField object triggering events

Method description
Textfield.onchanged called when TextField is changed.
Textfield.onkillfocus called when TextField loses focus (aggregation).
Textfield.onscroller called when TextField's scroll, Maxscroll, HScroll, Maxhscroll, or Bottomscroll properties change.
Textfield.onsetfocus called when TextField gets the focus (aggregation).

Table four monitoring of TextField objects

Method description
textfield.onchanged triggers when TextField changes.
Textfield.onscroller triggered when the scroll or Maxscroll attribute of the TextField is changed.

TextField various properties and methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.