Frames 

 No Frames

Previous Element
Edges

Next Element
EmptyFrame


EditField

This defines a powerful text symbol with many properties including editability, selectable text, html support. Flash 8 also introduces a new antialias attribute.

Attributes

id A unique name for the symbol within the movie.
TypeString
bounds The bounding rectangle of the text symbol specified as 'bounds( minX, minY, maxX, maxY)'. This should be large enough to display any necessary text. A good rule of thumb for calculating this manually is to allow lineSpacing + fontSize +2 in height for each line displayed and to allow 2 + fontSize * length for the width of the field. The field should be anchored at ( -2, -2) relative to the actual relative location you wish the text to be displayed at. This attribute is ignored if the autosize property is enabled and should be set to 'bounds(0, 0, 0, 0)'.
Value Template bounds(Coord, Coord, Coord, Coord)
TypeFloat
fieldName Optional name for the symbol. When set, this field can be referenced in ActionScript using the specified name. All placed instances of the symbol are updated together. If different EditField symbols have the same fieldName then the initial text will be the first field placed in the movie. If no fieldName is specified the contents of the field can still be accessed using the 'text' property of the placed object provided the EditField is given a name when placed on the timeline.
TypeString
fontID The name of the Font symbol or FontDefinition symbol used to render the text.
TypeString
fontSize The size of the font used to render the text.
TypeFloat
Default Value8
lineSpacing Optional number of pixels from bottom of one line of text to top of next. Can be either positive or negative. This vertical size of each line of text is modified by this attribute. On input, if this value is too small then no text may be displayed at all until a newline is added.
TypeFloat
Default Value2
leftMargin Optional left margin for the text, in pixels. Value can be positive or negative.
TypeFloat
Default Value0
rightMargin Optional right margin for the text, in pixels. Value can be positive or negative..
TypeFloat
Default Value0
indentation Optional indentation for first line of text. If this is negative then text is outdented to left of defined left margin.
TypeFloat
Default Value0
alignmentOptional alignment for text
Valuesleft
right
center
fill
Default Valueleft
charLimit Optional maximum number of characters allowed in field on input. If the initial text length is greater that that specified here then no input is allowed until the length of the string is reduced below the charLimit value. A charLimit value of 0 disables all restrictions on input length.
TypeInteger
Default Value0
color The color specified as an RGB/RGBA tuple, a hex string or a color name. The first number of the tuple represents the red intensity, the second green, and the third blue. A minimum value of 0 for each color results in black and a max value of 255 for each color results in white. For RGBA the first three attributes are the same as above and the fourth is the degree of opacity of the color with 0 being totally transparent and 255 totally opaque. Alternatively the color can be specified as in SVG either in hexadecimal with a '#' leading character or by name using the color names defined in the SVG specification. Since these do not specify opacity, an additional opacity attribute can be defined.
Value Template rgb(Color, Color, Color)
Value Template rgba(Color, Color, Color, Color)
From Value0
To Value255
Value Template#ColorColorColor
From Value00
To Valueff
Value Range Any SVG color name supported in the SVG1.1 specification.
opacity Optional attribute specifying the opacity of the color with 0 being totally transparent and 1.0 totally opaque. This will override any opacity channel value specified as part of the color attribute.
From Value0.0
To Value1.0
Default Value1.0
properties Additional set of properties governing the behavior of an EditField:
Value Template(Property,...)
Values
selectable
The text is selectable using the mouse.
editable
The EditField is selectable and accepts user input.
systemFont
Specifies that the font used for the EditField should be loaded from the System where possible and font glyphs do not need to be included as part of the movie. The Font symbol still needs to be defined within the document but does not need associated glyphs. This property can not be applied to EditField symbols that need to be rotated as they are rendered using the native platform renderer. In addition, all scaling transforms applied to systemFont symbols on a timeline are applied uniformly in both axes.
multiLine
On input a new display line is created on Enter or Carriage Return
html
Allows the initial text of the edit field to be specified as a HTML String. Permitted block attributes include font, color, alignment and size and can include bold and italic attributes. This is useful when using combination of plain, bold and italic fonts within a single field. Note: it may be necessary to force the inclusion of font glyphs in output using the forceOutput font flag if non-device fonts are used.
border
Places a black rectangular border around the text with a white background.
wordWrap
Will automatically split the text into multiple lines when the field border is reached. It will attempt to break on whitespace, if available.
password
The display and input text will be represented by asterisks. These asterisks inherit the styles specified for the Edit Field.
autosize
Only applicable for Versions 6 or higher. Setting this property will ignore the specified bounding rectangle and will ensure that all specified text is visible. This is particularly useful when the rendering font is unknown or for I18N purposes where text field sizes will vary with translation. For dynamic fields with borders, the border will grow with input. This will only autosize in the positive axis, however, so text with negative margins will be partially truncated.
fontRange Optionally specifies the characters in the specified font that should be included for this edit field. This is used to specific valid characters when an embedded Font has a 'Defined' font range and the EditField is dynamic. When specified, it will override the defined content in the field for display purposes e.g. if an EditField has the text "test" and the fontRange is "['A'-'Z']", then no characters will be displayed. The specified characters are still in the field however.
Values
All
Include all known font characters
Defined
Include only font characters used in defined symbols
User-defined range string.
A font range string consists of a comma separated set of ranges. Each range can be a single character constant enclosed in single quotes, an integer character code, a unicode character code, or a range of characters enclosed in square brackets with a '-' range character e.g. ['a'-'z'], '+', 34, \u0025
Default ValueDefined
antialias Flash 8 introduces a new antialias attribute that allows the use to specify the degree of antialiasing to be applied to a text element. Antialias values can be specified as 'reading', which is the default setting for maximum legibility, or as a pair of values indicating the thickness and sharpness of the antialiasing. When not specified, antialias behaviour defaults to that used in Flash player 7 and below. Thickness and sharpness, when specified should be in the following ranges:
Thickness: -200 -> +200
Sharpness: -400 -> + 400.
The default 'reading' setting is equivalent to setting both thickness and sharpness to 0.
Valuesreading
custom( thickness, sharpness)
Default ValueNot specified

Child Elements

Desc
Metadata
InitialText

Parent Elements

Definitions

Examples

EditField Examples
Elliptical Arcs Example
Font Manipulation Examples
HTML Support in EditFields
Button Example
Button DragTarget Example
CArcs Example
Circle Examples
Color Specification Example
EditField Transformations
Defines simple symbol for export
Importing symbols at runtime
ADPCM Sound Example
Simple MP3 Sound Example
ActionScriptSettings Example
Animate simple symbols on timeline
Quadratic Curve Example
SVG Arc Example in RVML
Raw MP3 Example
Font Range Examples
ActionScript on the Timeline
Color Gradient Examples
Import and Export a Symbol
MorphShape Example
Sound Envelope Example
Square to Circle Morph Example
Clipping and Text Clipping Example
Simple MP3 Sound From URL Example
User-Defined Font Example

Previous Element
Edges

Next Element
EmptyFrame