Previous Element | Next Element |
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. | |
Type | String | |
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) | |
Type | Float | |
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. | |
Type | String | |
fontID | The name of the Font symbol or FontDefinition symbol used to render the text. | |
Type | String | |
fontSize | The size of the font used to render the text. | |
Type | Float | |
Default Value | 8 | |
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. | |
Type | Float | |
Default Value | 2 | |
leftMargin | Optional left margin for the text, in pixels. Value can be positive or negative. | |
Type | Float | |
Default Value | 0 | |
rightMargin | Optional right margin for the text, in pixels. Value can be positive or negative.. | |
Type | Float | |
Default Value | 0 | |
indentation | Optional indentation for first line of text. If this is negative then text is outdented to left of defined left margin. | |
Type | Float | |
Default Value | 0 | |
alignment | Optional alignment for text | |
Values | left right center fill | |
Default Value | left | |
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. | |
Type | Integer | |
Default Value | 0 | |
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 Value | 0 | |
To Value | 255 | |
Value Template | #ColorColorColor | |
From Value | 00 | |
To Value | ff | |
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 Value | 0.0 | |
To Value | 1.0 | |
Default Value | 1.0 | |
properties | Additional set of properties governing the behavior of an EditField: | |
Value Template | (Property,...) | |
Values |
| |
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 |
| |
Default Value | Defined | |
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. | |
Values | reading custom( thickness, sharpness) | |
Default Value | Not specified |
Child Elements
DescMetadata
InitialText
Parent Elements
DefinitionsExamples
EditField ExamplesElliptical 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 | Next Element |