Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
TextFieldAsset

Package | mx.core
Class | public class TextFieldAsset
Inheritance | TextFieldAsset FlexTextField flash.text.TextField
Implements | IFlexAsset, IFlexDisplayObject

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

TextFieldAsset is a subclass of the flash.text.TextField class which represents TextField symbols that you embed in a Flex application from a SWF file produced by Flash. It implements the IFlexDisplayObject interface, which makes it possible for a TextFieldAsset to be displayed in an Image control, or to be used as a container background or a component skin.

This class is included in Flex for completeness, so that any kind of symbol in a SWF file produced by Flash can be embedded in a Flex application. However, Flex applications do not typically use embedded TextFields. Refer to more commonly-used asset classes such as BitmapAsset for more information about how embedded assets work in Flex.

Public Properties

| Property | Defined By
--- | --- | ---
|  | measuredHeight : Number [read-only] The measured height of this object. | TextFieldAsset
|  | measuredWidth : Number [read-only] The measured width of this object. | TextFieldAsset

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TextFieldAsset() Constructor. | TextFieldAsset
|  | move(x:Number, y:Number):void Moves this object to the specified x and y coordinates. | TextFieldAsset
|  | setActualSize(newWidth:Number, newHeight:Number):void Sets the actual size of this object. | TextFieldAsset
|  | toString():String [override] Returns a string indicating the location of this object within the hierarchy of DisplayObjects in the Application. | FlexTextField

Property Detail

measuredHeight | property

`measuredHeight:Number` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The measured height of this object.

This is typically hard-coded for graphical skins because this number is simply the number of pixels in the graphic. For code skins, it can also be hard-coded if you expect to be drawn at a certain size. If your size can change based on properties, you may want to also be an ILayoutManagerClient so a `measure()` method will be called at an appropriate time, giving you an opportunity to compute a `measuredHeight`.

Implementation
`public function get measuredHeight():Number`

measuredWidth | property |

`measuredWidth:Number` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The measured width of this object.

This is typically hard-coded for graphical skins because this number is simply the number of pixels in the graphic. For code skins, it can also be hard-coded if you expect to be drawn at a certain size. If your size can change based on properties, you may want to also be an ILayoutManagerClient so a `measure()` method will be called at an appropriate time, giving you an opportunity to compute a `measuredHeight`.

Implementation
`public function get measuredWidth():Number`
Constructor Detail

TextFieldAsset | () | Constructor

`public function TextFieldAsset()`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Constructor.

Method Detail

move | () | method

`public function move(x:Number, y:Number):void`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Moves this object to the specified x and y coordinates.

Parameters

| `x:Number` — The new x-position for this object.
| `y:Number` — The new y-position for this object.

setActualSize | () | method |

`public function setActualSize(newWidth:Number, newHeight:Number):void`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Sets the actual size of this object.

This method is mainly for use in implementing the `updateDisplayList()` method, which is where you compute this object's actual size based on its explicit size, parent-relative (percent) size, and measured size. You then apply this actual size to the object by calling `setActualSize()`.

In other situations, you should be setting properties such as `width`, `height`, `percentWidth`, or `percentHeight` rather than calling this method.

Parameters

| `newWidth:Number` — The new width for this object.
| `newHeight:Number` — The new height for this object.

Sun Mar 5 2017, 03:42 PM +11:00