as3.0 Dynamic Text Properties Daquan

Source: Internet
Author: User

var my_fmt = new TextFormat ();//Common style My_fmt.align = "center"; my_fmt.blockindent = 50; Chunk indent my_fmt.bold = True;my_fmt.bullet = True;my_fmt.color = 0xff0000;my_fmt.font = "Blackbody"; my_fmt.indent = 50; First word indent my_fmt.italic = True;my_fmt.kerning = true; Kerning my_fmt.leading = 2; Line spacing my_fmt.letterspacing = 10; Word spacing My_fmt.leftmargin = 10;my_fmt.rightmargin = 10;my_fmt.size = 20;my_fmt.underline = True;my_fmt.target = "Blank" text field _ Detail Properties: accessibilityproperties:accessibilityproperties The current accessibility options for this display object. Alpha:number indicates the Alpha transparency value of the specified object. Alwaysshowselection:boolean if set to True and the text field has no focus, Flash Player highlights the selection in the text field in gray. Antialiastype:string the anti-aliasing type used for this text field. autosize:string controls the automatic sizing and alignment of text fields. Background:boolean Specifies whether the text field has a background fill. Backgroundcolor:uint the color of the background of the text field. A value in the Blendmode:string Blendmode class that specifies the blending mode to use. Border:boolean Specifies whether the text field has a border. Bordercolor:uint the color of the text field border. Bottomscrollv:int [Read-only] An integer (1-based index) that indicates the last line that is currently visible in the specified text field. Cacheasbitmap:boolean if set to True, Flash Player caches the internal bit chart of the display objectDisplay form. Caretindex:int [Read-only] The index of the insertion point (caret) position. Condensewhite:boolean A Boolean value that specifies whether additional whitespace (spaces, line breaks, and so on) in text fields with HTML text should be deleted. Constructor:object a reference to a class object or constructor for a given object instance. CONTEXTMENU:CONTEXTMENU Specifies the context menu associated with this object. DEFAULTTEXTFORMAT:TEXTFORMAT Specifies the format that is applied to the newly inserted text (for example, text inserted using the Replaceselectedtext () method or text entered by the user). Displayaspassword:boolean Specifies whether the text field is a password text field. Doubleclickenabled:boolean Specifies whether this object receives DoubleClick events. Embedfonts:boolean Specifies whether to render using an embedded font outline. Filters:array contains an indexed array of each filter object currently associated with the display object. FOCUSRECT:OBJECT Specifies whether this object displays the focus rectangle. Gridfittype:string the type of mesh fixation used for this text field. Height:number indicates the height, in pixels, of the display object. Htmltext:string contains the HTML representation of the contents of the Text field. Length:int the number of characters in the [Read-only] text field. Loaderinfo:loaderinfo [read-only] Returns a Loaderinfo object that contains information about loading the file to which this display object belongs. Mask:displayobject invokes the display object masked by the specified mask object. Maxchars:int the maximum number of characters that can be contained in a text field (that is, the number of characters entered by the user). Maxscrollh:int the maximum value of the [Read-only] Scrollh. Maxscrollv:int the maximum value of the [Read-only] ScrollV. Mouseenabled:boolean Specifies whether this object receives mouse messages. Mousewheelenabled:boolean A Boolean value that indicates when the user clicks a text field and the user scrolls the mouse wheel, Flash Player If the multiline text field should be scrolled automatically. Mousex:number [Read-only] indicates the x-coordinate of the mouse position, in pixels. Mousey:number [Read-only] indicates the y-coordinate of the mouse position, in pixels. Multiline:boolean Indicates whether the text field is a multiline text field. Name:string indicates the instance name of the Displayobject. Numlines:int [Read-only] defines the number of lines of text in a multiline text field. OPAQUEBACKGROUND:OBJECT Specifies whether the display object is opaque because of a background color. Parent:displayobjectcontainer [Read-only] indicates the Displayobjectcontainer object that contains this display object. Prototype:object [Static] a reference to the prototype object of a class or function object. Restrict:string indicates the character set that the user can enter into a text field. Root:displayobject [read-only] for the display object in the loaded SWF file, the root property is the top-level display object in the Display list tree structure section represented by this SWF file. Rotation:number indicates the degree of rotation of the Displayobject instance from its original direction, in degrees. Scale9grid:rectangle the currently active zoom mesh. Scalex:number indicates the horizontal scale (in percent) of the object that is applied from the registration point. Scaley:number indicates the vertical scale (in percent) of the object that is applied from the object registration point. Scrollh:int the current horizontal scroll position. Scrollrect:rectangle displays the range of scroll rectangles for the object. Scrollv:int the vertical position of the text in the text field. Selectable:boolean A Boolean value that indicates whether the text field is optional. Selectionbeginindex:int [Read-only] The zero-based character index value of the first character in the current selection. Selectionendindex:int [Read-only] The zero-based character index value of the last character in the current selection. Sharpness:number the sharpness of the font edges in this text field. Stage:stage [Read-only] Displays the scene of the object. Stylesheet:stylesheet attaches a style sheet to a text field. Tabenabled:boolean Specifies whether this object follows the Tab order. Tabindex:int the objects in the specified SWF file in the Tab order. Text:string A string that is the current text in the Text field. Textcolor:uint the color of the text in the text field (in hexadecimal format). Textheight:number the height of the [read-only] text, in pixels. Textwidth:number the width of the [read-only] text, in pixels. Thickness:number the thickness of the font edge in this text field. Transform:transform an object that has properties related to the display object's matrix, color conversion, and pixel range. Type:string the type of the text field. Userichtextclipboard:boolean Specifies whether the formatting is copied and pasted when the text is copied and pasted. Visible:boolean displays whether the object is visible. Width:number indicates the width of the display object, in pixels. Wordwrap:boolean A Boolean value that indicates whether the text field wraps automatically. X:number indicates the x-coordinate of the displayobject instance relative to the parent Displayobjectcontainer local coordinates. Y:number indicates the y-coordinate of the displayobject instance relative to the parent Displayobjectcontainer local coordinates. var my_txt = new TextField ();//Common Properties My_txt.defaulttextformat = My_fmt;my_txt.type = Textfieldtype.input;my_txt.x = STAGE.STAGEWIDTH/2 -50;my_txt.y = Stage.stageheight/2-50;my_txt.height = 300;my_txt.width = 300;my_txt.background = tr Ue;my_txt.backgroundcolor = 0xf5f5f5;my_txt.border = True; my_txt.bordercolor = 0x0000ff;my_txt.autosize = Textfieldautosize.left;my_txt.displayaspassword = true;//password My_ Txt.multiline = True;my_txt.wordwrap = True;my_txt.scalex = 0.5;my_txt.scaley = 1.5;my_txt.selectable = True;my_ Txt.textcolor = 0x000000;my_txt.visible = True;var A = new Object (); a.fontstyle = "italic"; var style = new StyleSheet (); St Yle.setstyle (". A", a); My_txt.stylesheet = Style;my_txt.htmltext = "<a href= ' http://baidu.com ' class= ' a ' >123< /a> 123123123 "//my_txt.text=" This is my first Test Field object text. "; Import Flash.filters.blurfilter;var Txt_blur = new Blurfilter (0, 0, 0);  My_txt.filters = [Txt_blur];my_txt.alpha = 0.5; Dynamic text transparency with filters is valid for TextFormat object settings:

  

as3.0 Dynamic Text Properties Daquan

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.