Options
Menu




AwayJS Scene

Build Status

Dependency for AwayJS applications requiring a heirarchical scenegraph: contains data structures for a collection of display object types, as well as geometric prefabs for simple 2D & 3D objects.

Documentation

Official AwayJS Documentation

AwayJS Dependencies

  • core
  • graphics

Internal Structure

  • adapters
    used for scripting

  • base
    Enums for various display object settings, root data classes for timeline and touch data

  • bounds
    (to be moved to view module)

  • controllers
    Custom interaction controls for display objects

  • display
    display objects that can be added to a scene heirarchy, including basic billboards, lines and text, as well as more configurable Sprite objects that expose the graphics API

  • errors
    Error types

  • events
    Event objects for scene classes

  • factories
    Interface for timelines

  • lightpickers
    Objects for selecting lightsources (to be moved to materials module)

  • managers
    manager classes for fonts and frame scripts

  • prefabs
    Generator clases for simple display objects such as Cube, Sphere, Torus etc

  • shadowmappers
    Helper classes for shadows (to be moved to materials module)

  • text
    Helper classes for text

  • tools
    Merge tool for combining display objects (or a heirarchy of display objects) into a single sprite

  • utils
    Cast tool for converting data types (deprecated)


version: @awayjs/scene@0.8.159

Index

Events

DisplayObject

DisplayObject:

The DisplayObject class is the base class for all objects that can be placed on the display list. The display list manages all objects displayed in flash. Use the DisplayObjectContainer class to arrange the display objects in the display list. DisplayObjectContainer objects can have child display objects, while other display objects, such as Shape and TextField objects, are "leaf" nodes that have only parents and siblings, no children.

The DisplayObject class supports basic functionality like the x and y position of an object, as well as more advanced properties of the object such as its transformation matrix.

DisplayObject is an abstract base class; therefore, you cannot call DisplayObject directly. Invoking new DisplayObject() throws an ArgumentError exception.

All display objects inherit from the DisplayObject class.

The DisplayObject class itself does not include any APIs for rendering content onscreen. For that reason, if you want create a custom subclass of the DisplayObject class, you will want to extend one of its subclasses that do have APIs for rendering content onscreen, such as the Shape, Sprite, Bitmap, SimpleButton, TextField, or MovieClip class.

The DisplayObject class contains several broadcast events. Normally, the target of any particular event is a specific DisplayObject instance. For example, the target of an added event is the specific DisplayObject instance that was added to the display list. Having a single target restricts the placement of event listeners to that target and in some cases the target's ancestors on the display list. With broadcast events, however, the target is not a specific DisplayObject instance, but rather all DisplayObject instances, including those that are not on the display list. This means that you can add a listener to any DisplayObject instance to listen for broadcast events. In addition to the broadcast events listed in the DisplayObject class's Events table, the DisplayObject class also inherits two broadcast events from the EventDispatcher class: activate and deactivate.

Some properties previously used in the ActionScript 1.0 and 2.0 MovieClip, TextField, and Button classes(such as _alpha, _height, _name, _width, _x, y, and others) have equivalents in the ActionScript 3.0 DisplayObject class that are renamed so that they no longer begin with the underscore() character.

For more information, see the "Display Programming" chapter of the ActionScript 3.0 Developer's Guide.

constructor

  • Creates a new DisplayObject instance.

    Returns DisplayObject

_adapter

_adapter: IAssetAdapter

_boundsType

_boundsType: string

Protected _boxBoundsInvalid

_boxBoundsInvalid: boolean

_concatenatedMatrix3D

_concatenatedMatrix3D: Matrix3D

_depth

_depth: number

_depthID

_depthID: number

_explicitMasks

_explicitMasks: Array<DisplayObject>

_height

_height: number

_hierarchicalPropsDirty

_hierarchicalPropsDirty: number

_iController

_iController: ControllerBase
internal

_iIsPartition

_iIsPartition: boolean

_iIsRoot

_iIsRoot: boolean

_iSourcePrefab

_iSourcePrefab: PrefabBase

_material

_material: IMaterial

_pBoxBounds

_pBoxBounds: Box

_pImplicitColorTransform

_pImplicitColorTransform: ColorTransform

_pImplicitMaskId

_pImplicitMaskId: number

_pImplicitMaskIds

_pImplicitMaskIds: Array<Array<number>>

_pImplicitMasks

_pImplicitMasks: Array<Array<IEntity>>

_pImplicitMouseEnabled

_pImplicitMouseEnabled: boolean

_pImplicitVisibility

_pImplicitVisibility: boolean

_pIsContainer

_pIsContainer: boolean

_pIsEntity

_pIsEntity: boolean

_pName

_pName: string

_pParent

_pPartition

_pPartition: DisplayObject

_pScene

_pScene: Scene

_pSphereBounds

_pSphereBounds: Sphere

_registrationMatrix3D

_registrationMatrix3D: Matrix3D

_sessionID

_sessionID: number

_style

_style: Style

Protected _tempPoint

_tempPoint: Point

_tempTransform

_tempTransform: Matrix3D

Protected _transform

_transform: Transform

_width

_width: number

adaptee

adaptee: AssetBase

adapter

adapter: IAssetAdapter

adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class

alignmentMode

alignmentMode: string

assetFullPath

assetFullPath: Array<string>

assetNamespace

assetNamespace: string

assetType

assetType: string

blendMode

blendMode: BlendMode

A value from the BlendMode class that specifies which blend mode to use. A bitmap can be drawn internally in two ways. If you have a blend mode enabled or an external clipping mask, the bitmap is drawn by adding a bitmap-filled square shape to the vector render. If you attempt to set this property to an invalid value, Flash runtimes set the value to BlendMode.NORMAL.

The blendMode property affects each pixel of the display object. Each pixel is composed of three constituent colors(red, green, and blue), and each constituent color has a value between 0x00 and 0xFF. Flash Player or Adobe AIR compares each constituent color of one pixel in the movie clip with the corresponding color of the pixel in the background. For example, if blendMode is set to BlendMode.LIGHTEN, Flash Player or Adobe AIR compares the red value of the display object with the red value of the background, and uses the lighter of the two as the value for the red component of the displayed color.

The following table describes the blendMode settings. The BlendMode class defines string values you can use. The illustrations in the table show blendMode values applied to a circular display object(2) superimposed on another display object(1).

cacheAsBitmap

cacheAsBitmap: boolean

If set to true, NME will use the software renderer to cache an internal bitmap representation of the display object. For native targets, this is often much slower than the default hardware renderer. When you are using the Flash target, this caching may increase performance for display objects that contain complex vector content.

All vector data for a display object that has a cached bitmap is drawn to the bitmap instead of the main display. If cacheAsBitmapMatrix is null or unsupported, the bitmap is then copied to the main display as unstretched, unrotated pixels snapped to the nearest pixel boundaries. Pixels are mapped 1 to 1 with the parent object. If the bounds of the bitmap change, the bitmap is recreated instead of being stretched.

If cacheAsBitmapMatrix is non-null and supported, the object is drawn to the off-screen bitmap using that matrix and the stretched and/or rotated results of that rendering are used to draw the object to the main display.

No internal bitmap is created unless the cacheAsBitmap property is set to true.

After you set the cacheAsBitmap property to true, the rendering does not change, however the display object performs pixel snapping automatically. The animation speed can be significantly faster depending on the complexity of the vector content.

The cacheAsBitmap property is automatically set to true whenever you apply a filter to a display object(when its filter array is not empty), and if a display object has a filter applied to it, cacheAsBitmap is reported as true for that display object, even if you set the property to false. If you clear all filters for a display object, the cacheAsBitmap setting changes to what it was last set to.

A display object does not use a bitmap even if the cacheAsBitmap property is set to true and instead renders from vector data in the following cases:

  • The bitmap is too large. In AIR 1.5 and Flash Player 10, the maximum size for a bitmap image is 8,191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels.(So, if a bitmap image is 8,191 pixels wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier, the limitation is is 2880 pixels in height and 2,880 pixels in width.
  • The bitmap fails to allocate(out of memory error).

The cacheAsBitmap property is best used with movie clips that have mostly static content and that do not scale and rotate frequently. With such movie clips, cacheAsBitmap can lead to performance increases when the movie clip is translated(when its x and y position is changed).

castsShadows

castsShadows: boolean

extra

extra: Object

An object that can contain any extra data.

id

id: number

A unique id for the asset, used to identify assets in an associative array

isSlice9ScaledMC

isSlice9ScaledMC: boolean

isSlice9ScaledSprite

isSlice9ScaledSprite: boolean

mask

The calling display object is masked by the specified mask object. To ensure that masking works when the Stage is scaled, the mask display object must be in an active part of the display list. The mask object itself is not drawn. Set mask to null to remove the mask.

To be able to scale a mask object, it must be on the display list. To be able to drag a mask Sprite object(by calling its startDrag() method), it must be on the display list. To call the startDrag() method for a mask sprite based on a mouseDown event being dispatched by the sprite, set the sprite's buttonMode property to true.

When display objects are cached by setting the cacheAsBitmap property to true an the cacheAsBitmapMatrix property to a Matrix object, both the mask and the display object being masked must be part of the same cached bitmap. Thus, if the display object is cached, then the mask must be a child of the display object. If an ancestor of the display object on the display list is cached, then the mask must be a child of that ancestor or one of its descendents. If more than one ancestor of the masked object is cached, then the mask must be a descendent of the cached container closest to the masked object in the display list.

Note: A single mask object cannot be used to mask more than one calling display object. When the mask is assigned to a second display object, it is removed as the mask of the first object, and that object's mask property becomes null.

orientationMode

orientationMode: string

originalName

originalName: string

The original name used for this asset in the resource (e.g. file) in which it was found. This may not be the same as name, which may have changed due to of a name conflict.

rotation

rotation: number

Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement my_video.rotation = 450 is the same as my_video.rotation = 90.

scale9Grid

scale9Grid: Rectangle

The current scaling grid that is in effect. If set to null, the entire display object is scaled normally when any scale transformation is applied.

When you define the scale9Grid property, the display object is divided into a grid with nine regions based on the scale9Grid rectangle, which defines the center region of the grid. The eight other regions of the grid are the following areas:

  • The upper-left corner outside of the rectangle
  • The area above the rectangle
  • The upper-right corner outside of the rectangle
  • The area to the left of the rectangle
  • The area to the right of the rectangle
  • The lower-left corner outside of the rectangle
  • The area below the rectangle
  • The lower-right corner outside of the rectangle

You can think of the eight regions outside of the center(defined by the rectangle) as being like a picture frame that has special rules applied to it when scaled.

When the scale9Grid property is set and a display object is scaled, all text and gradients are scaled normally; however, for other types of objects the following rules apply:

  • Content in the center region is scaled normally.
  • Content in the corners is not scaled.
  • Content in the top and bottom regions is scaled horizontally only. Content in the left and right regions is scaled vertically only.
  • All fills(including bitmaps, video, and gradients) are stretched to fit their shapes.

If a display object is rotated, all subsequent scaling is normal(and the scale9Grid property is ignored).

For example, consider the following display object and a rectangle that is applied as the display object's scale9Grid:

A common use for setting scale9Grid is to set up a display object to be used as a component, in which edge regions retain the same width when the component is scaled.

throws

ArgumentError If you pass an invalid argument to the method.

scrollRect

scrollRect: Rectangle

The scroll rectangle bounds of the display object. The display object is cropped to the size defined by the rectangle, and it scrolls within the rectangle when you change the x and y properties of the scrollRect object.

The properties of the scrollRect Rectangle object use the display object's coordinate space and are scaled just like the overall display object. The corner bounds of the cropped window on the scrolling display object are the origin of the display object(0,0) and the point defined by the width and height of the rectangle. They are not centered around the origin, but use the origin to define the upper-left corner of the area. A scrolled display object always scrolls in whole pixel increments.

You can scroll an object left and right by setting the x property of the scrollRect Rectangle object. You can scroll an object up and down by setting the y property of the scrollRect Rectangle object. If the display object is rotated 90° and you scroll it left and right, the display object actually scrolls up and down.

zOffset

zOffset: number

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static traverseName

traverseName: string

_acceptTraverser

  • _acceptTraverser(traverser: TraverserBase): void
  • Parameters

    • traverser: TraverserBase

    Returns void

_hitTestPointInternal

  • _hitTestPointInternal(x: number, y: number, shapeFlag: boolean, masksFlag: boolean): boolean
  • Parameters

    • x: number
    • y: number
    • shapeFlag: boolean
    • masksFlag: boolean

    Returns boolean

_iAssignedColorTransform

  • _iAssignedColorTransform(): ColorTransform
  • Returns ColorTransform

_iAssignedMaskId

  • _iAssignedMaskId(): number
  • internal

    Returns number

_iAssignedMasks

  • _iAssignedMasks(): Array<Array<IEntity>>
  • internal

    Returns Array<Array<IEntity>>

_iInternalUpdate

  • _iInternalUpdate(): void
  • Returns void

_iIsMouseEnabled

  • _iIsMouseEnabled(): boolean
  • internal

    Returns boolean

_iIsVisible

  • _iIsVisible(): boolean
  • internal

    Returns boolean

_iMasksConfig

  • _iMasksConfig(): Array<Array<number>>
  • Returns Array<Array<number>>

Protected _iSetScene

  • Parameters

    Returns void

_onInvalidateProperties

  • _onInvalidateProperties(event?: StyleEvent): void
  • Parameters

    • Default value event: StyleEvent = null

    Returns void

Protected _onUpdateConcatenatedMatrix3D

  • _onUpdateConcatenatedMatrix3D(event: TransformEvent): void
  • Parameters

    • event: TransformEvent

    Returns void

_pInvalidateBounds

  • _pInvalidateBounds(): void
  • Returns void

_pUpdateBoxBounds

  • _pUpdateBoxBounds(): void
  • Returns void

_pUpdateSphereBounds

  • _pUpdateSphereBounds(): void
  • Returns void

Protected _setScaleX

  • _setScaleX(val: number): void
  • Parameters

    • val: number

    Returns void

Protected _setScaleY

  • _setScaleY(val: number): void
  • Parameters

    • val: number

    Returns void

Protected _setScaleZ

  • _setScaleZ(val: number): void
  • Parameters

    • val: number

    Returns void

_updateMaskMode

  • _updateMaskMode(): void
  • Returns void

_updateMouseEnabled

  • _updateMouseEnabled(): void
  • Returns void

addEventListener

  • addEventListener(type: string, listener: function): void
  • Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

assetPathEquals

  • assetPathEquals(name: string, ns: string): boolean
  • Parameters

    • name: string
    • ns: string

    Returns boolean

clear

  • clear(): void
  • Returns void

clone

copyTo

  • Parameters

    Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void
  • Returns void

disposeValues

  • disposeValues(): void
  • Returns void

getBounds

  • Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. Consider the following code, which shows how the rectangle returned can vary depending on the targetCoordinateSpace parameter that you pass to the method:

    Note: Use the localToGlobal() and globalToLocal() methods to convert the display object's local coordinates to display coordinates, or display coordinates to local coordinates, respectively.

    The getBounds() method is similar to the getRect() method; however, the Rectangle returned by the getBounds() method includes any strokes on shapes, whereas the Rectangle returned by the getRect() method does not. For an example, see the description of the getRect() method.

    Parameters

    • targetCoordinateSpace: DisplayObject

      The display object that defines the coordinate system to use.

    Returns Rectangle

    The rectangle that defines the area of the display object relative to the targetCoordinateSpace object's coordinate system.

getBox

  • Parameters

    Returns Box

getRect

  • Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes. The values that the getRect() method returns are the same or smaller than those returned by the getBounds() method.

    Note: Use localToGlobal() and globalToLocal() methods to convert the display object's local coordinates to Scene coordinates, or Scene coordinates to local coordinates, respectively.

    Parameters

    • Default value targetCoordinateSpace: DisplayObject = null

      The display object that defines the coordinate system to use.

    Returns Rectangle

    The rectangle that defines the area of the display object relative to the targetCoordinateSpace object's coordinate system.

getRenderSceneTransform

  • getRenderSceneTransform(cameraTransform: Matrix3D): Matrix3D
  • Parameters

    • cameraTransform: Matrix3D

    Returns Matrix3D

getSphere

  • Parameters

    Returns Sphere

globalToLocal

  • globalToLocal(point: Point, target?: Point): Point
  • Converts the point object from the Scene(global) coordinates to the display object's(local) coordinates.

    To use this method, first create an instance of the Point class. The x and y values that you assign represent global coordinates because they relate to the origin(0,0) of the main display area. Then pass the Point instance as the parameter to the globalToLocal() method. The method returns a new Point object with x and y values that relate to the origin of the display object instead of the origin of the Scene.

    Parameters

    • point: Point

      An object created with the Point class. The Point object specifies the x and y coordinates as properties.

    • Default value target: Point = null

    Returns Point

    A Point object with coordinates relative to the display object.

globalToLocal3D

  • globalToLocal3D(position: Vector3D): Vector3D
  • Converts a two-dimensional point from the Scene(global) coordinates to a three-dimensional display object's(local) coordinates.

    To use this method, first create an instance of the Vector3D class. The x, y and z values that you assign to the Vector3D object represent global coordinates because they are relative to the origin(0,0,0) of the scene. Then pass the Vector3D object to the globalToLocal3D() method as the position parameter. The method returns three-dimensional coordinates as a Vector3D object containing x, y, and z values that are relative to the origin of the three-dimensional display object.

    Parameters

    • position: Vector3D

    Returns Vector3D

    A Vector3D object with coordinates relative to the three-dimensional display object.

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

hitTestObject

  • Evaluates the bounding box of the display object to see if it overlaps or intersects with the bounding box of the obj display object.

    Parameters

    Returns boolean

    true if the bounding boxes of the display objects intersect; false if not.

hitTestPoint

  • hitTestPoint(x: number, y: number, shapeFlag?: boolean, masksFlag?: boolean): boolean
  • Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters. The x and y parameters specify a point in the coordinate space of the Scene, not the display object container that contains the display object(unless that display object container is the Scene).

    Parameters

    • x: number

      The x coordinate to test against this object.

    • y: number

      The y coordinate to test against this object.

    • Default value shapeFlag: boolean = false

      Whether to check against the actual pixels of the object (true) or the bounding box (false).

    • Default value masksFlag: boolean = false

    Returns boolean

    true if the display object overlaps or intersects with the specified point; false otherwise.

iSetParent

invalidate

  • invalidate(): void
  • Returns void

invalidateElements

  • invalidateElements(): void
  • Returns void

invalidateMaterial

  • invalidateMaterial(): void
  • Returns void

invalidatePartitionBounds

  • invalidatePartitionBounds(): void
  • Returns void

isAsset

  • isAsset(assetClass: IAssetClass): boolean
  • Parameters

    • assetClass: IAssetClass

    Returns boolean

localToGlobal

  • localToGlobal(point: Point, target?: Point): Point
  • Converts the point object from the display object's(local) coordinates to the Scene(global) coordinates.

    This method allows you to convert any given x and y coordinates from values that are relative to the origin(0,0) of a specific display object(local coordinates) to values that are relative to the origin of the Scene(global coordinates).

    To use this method, first create an instance of the Point class. The x and y values that you assign represent local coordinates because they relate to the origin of the display object.

    You then pass the Point instance that you created as the parameter to the localToGlobal() method. The method returns a new Point object with x and y values that relate to the origin of the Scene instead of the origin of the display object.

    Parameters

    • point: Point

      The name or identifier of a point created with the Point class, specifying the x and y coordinates as properties.

    • Default value target: Point = null

    Returns Point

    A Point object with coordinates relative to the Scene.

localToGlobal3D

  • localToGlobal3D(position: Vector3D): Vector3D
  • Converts a three-dimensional point of the three-dimensional display object's(local) coordinates to a three-dimensional point in the Scene (global) coordinates.

    This method allows you to convert any given x, y and z coordinates from values that are relative to the origin(0,0,0) of a specific display object(local coordinates) to values that are relative to the origin of the Scene(global coordinates).

    To use this method, first create an instance of the Point class. The x and y values that you assign represent local coordinates because they relate to the origin of the display object.

    You then pass the Vector3D instance that you created as the parameter to the localToGlobal3D() method. The method returns a new Vector3D object with x, y and z values that relate to the origin of the Scene instead of the origin of the display object.

    Parameters

    • position: Vector3D

      A Vector3D object containing either a three-dimensional position or the coordinates of the three-dimensional display object.

    Returns Vector3D

    A Vector3D object representing a three-dimensional position in the Scene.

lookAt

  • lookAt(scenePosition: Vector3D, upAxis?: Vector3D): void
  • Rotates the 3d object around to face a point defined relative to the local coordinates of the parent ObjectContainer3D.

    Parameters

    • scenePosition: Vector3D
    • Default value upAxis: Vector3D = null

      An optional vector used to define the desired up orientation of the 3d object after rotation has occurred

    Returns void

movePivot

  • movePivot(dx: number, dy: number, dz: number): void
  • Moves the local point around which the object rotates.

    Parameters

    • dx: number

      The amount of movement along the local x axis.

    • dy: number

      The amount of movement along the local y axis.

    • dz: number

      The amount of movement along the local z axis.

    Returns void

pInvalidateHierarchicalProperties

  • pInvalidateHierarchicalProperties(propDirty: number): boolean
  • Parameters

    • propDirty: number

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

reset

  • reset(): void
  • Returns void

resetAssetPath

  • resetAssetPath(name: string, ns?: string, overrideOriginal?: boolean): void
  • Parameters

    • name: string
    • Optional ns: string
    • Optional overrideOriginal: boolean

    Returns void

updateFullPath

  • updateFullPath(): void
  • Returns void

_iPickingCollision

  • get (): PickingCollision
  • internal

    Returns PickingCollision

alpha

  • get (): number
  • set (value: number): void
  • Indicates the alpha transparency value of the object specified. Valid values are 0(fully transparent) to 1(fully opaque). The default value is

    1. Display objects with alpha set to 0 are active, even though they are invisible.

    Returns number

  • Indicates the alpha transparency value of the object specified. Valid values are 0(fully transparent) to 1(fully opaque). The default value is

    1. Display objects with alpha set to 0 are active, even though they are invisible.

    Parameters

    • value: number

    Returns void

animator

  • get (): IAnimator
  • set (value: IAnimator): void
  • Defines the animator of the display object. Default value is null.

    Returns IAnimator

  • Defines the animator of the display object. Default value is null.

    Parameters

    • value: IAnimator

    Returns void

boundsType

  • get (): string
  • set (value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

debugVisible

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

depth

  • get (): number
  • set (val: number): void
  • Indicates the depth of the display object, in pixels. The depth is calculated based on the bounds of the content of the display object. When you set the depth property, the scaleZ property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a depth of 0, even if you try to set depth to a different value.

    Returns number

  • Indicates the depth of the display object, in pixels. The depth is calculated based on the bounds of the content of the display object. When you set the depth property, the scaleZ property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a depth of 0, even if you try to set depth to a different value.

    Parameters

    • val: number

    Returns void

eulers

  • get (): Vector3D
  • set (value: Vector3D): void
  • Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.

    Returns Vector3D

  • Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.

    Parameters

    • value: Vector3D

    Returns void

height

  • get (): number
  • set (val: number): void
  • Indicates the height of the display object, in pixels. The height is calculated based on the bounds of the content of the display object. When you set the height property, the scaleY property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a height of 0, even if you try to set height to a different value.

    Returns number

  • Indicates the height of the display object, in pixels. The height is calculated based on the bounds of the content of the display object. When you set the height property, the scaleY property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a height of 0, even if you try to set height to a different value.

    Parameters

    • val: number

    Returns void

index

  • get (): number
  • Indicates the instance container index of the DisplayObject. The object can be identified in the child list of its parent display object container by calling the getChildByIndex() method of the display object container.

    If the DisplayObject has no parent container, index defaults to 0.

    Returns number

inheritColorTransform

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

isContainer

  • get (): boolean
  • Returns boolean

isEntity

  • get (): boolean
  • Returns boolean

isPartition

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

loaderInfo

  • get (): LoaderInfo
  • Returns a LoaderInfo object containing information about loading the file to which this display object belongs. The loaderInfo property is defined only for the root display object of a SWF file or for a loaded Bitmap(not for a Bitmap that is drawn with ActionScript). To find the loaderInfo object associated with the SWF file that contains a display object named myDisplayObject, use myDisplayObject.root.loaderInfo.

    A large SWF file can monitor its download by calling this.root.loaderInfo.addEventListener(Event.COMPLETE, func).

    Returns LoaderInfo

maskMode

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

masks

  • Returns Array<DisplayObject>

  • Parameters

    Returns void

material

  • get (): IMaterial
  • set (value: IMaterial): void
  • Returns IMaterial

  • Parameters

    • value: IMaterial

    Returns void

mouseEnabled

  • get (): boolean
  • set (value: boolean): void
  • Specifies whether this object receives mouse, or other user input, messages. The default value is true, which means that by default any InteractiveObject instance that is on the display list receives mouse events or other user input events. If mouseEnabled is set to false, the instance does not receive any mouse events(or other user input events like keyboard events). Any children of this instance on the display list are not affected. To change the mouseEnabled behavior for all children of an object on the display list, use flash.display.DisplayObjectContainer.mouseChildren.

    No event is dispatched by setting this property. You must use the addEventListener() method to create interactive functionality.

    Returns boolean

  • Specifies whether this object receives mouse, or other user input, messages. The default value is true, which means that by default any InteractiveObject instance that is on the display list receives mouse events or other user input events. If mouseEnabled is set to false, the instance does not receive any mouse events(or other user input events like keyboard events). Any children of this instance on the display list are not affected. To change the mouseEnabled behavior for all children of an object on the display list, use flash.display.DisplayObjectContainer.mouseChildren.

    No event is dispatched by setting this property. You must use the addEventListener() method to create interactive functionality.

    Parameters

    • value: boolean

    Returns void

mouseX

  • get (): number
  • Indicates the x coordinate of the mouse or user input device position, in pixels.

    Note: For a DisplayObject that has been rotated, the returned x coordinate will reflect the non-rotated object.

    Returns number

mouseY

  • get (): number
  • Indicates the y coordinate of the mouse or user input device position, in pixels.

    Note: For a DisplayObject that has been rotated, the returned y coordinate will reflect the non-rotated object.

    Returns number

name

  • get (): string
  • set (value: string): void
  • Indicates the instance name of the DisplayObject. The object can be identified in the child list of its parent display object container by calling the getChildByName() method of the display object container.

    throws

    IllegalOperationError If you are attempting to set this property on an object that was placed on the timeline in the Flash authoring tool.

    Returns string

  • Indicates the instance name of the DisplayObject. The object can be identified in the child list of its parent display object container by calling the getChildByName() method of the display object container.

    Parameters

    • value: string

    Returns void

parent

  • Indicates the DisplayObjectContainer object that contains this display object. Use the parent property to specify a relative path to display objects that are above the current display object in the display list hierarchy.

    You can use parent to move up multiple levels in the display list as in the following:

    throws

    SecurityError The parent display object belongs to a security sandbox to which you do not have access. You can avoid this situation by having the parent movie call the Security.allowDomain() method.

    Returns DisplayObjectContainer

partition

  • get (): IEntity
  • Returns IEntity

registrationPoint

  • get (): Vector3D
  • set (value: Vector3D): void
  • Defines the local point around which the object rotates.

    Returns Vector3D

  • Defines the local point around which the object rotates.

    Parameters

    • value: Vector3D

    Returns void

registrationScale

  • get (): Vector3D
  • set (value: Vector3D): void
  • Defines the local scale.

    Returns Vector3D

  • Defines the local scale.

    Parameters

    • value: Vector3D

    Returns void

root

  • For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file. For a Bitmap object representing a loaded image file, the root property is the Bitmap object itself. For the instance of the main class of the first SWF file loaded, the root property is the display object itself. The root property of the Scene object is the Scene object itself. The root property is set to null for any display object that has not been added to the display list, unless it has been added to a display object container that is off the display list but that is a child of the top-most display object in a loaded SWF file.

    For example, if you create a new Sprite object by calling the Sprite() constructor method, its root property is null until you add it to the display list(or to a display object container that is off the display list but that is a child of the top-most display object in a SWF file).

    For a loaded SWF file, even though the Loader object used to load the file may not be on the display list, the top-most display object in the SWF file has its root property set to itself. The Loader object does not have its root property set until it is added as a child of a display object for which the root property is set.

    Returns DisplayObjectContainer

rotationX

  • get (): number
  • set (val: number): void
  • Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Returns number

  • Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Parameters

    • val: number

    Returns void

rotationY

  • get (): number
  • set (val: number): void
  • Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Returns number

  • Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Parameters

    • val: number

    Returns void

rotationZ

  • get (): number
  • set (val: number): void
  • Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Returns number

  • Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Parameters

    • val: number

    Returns void

scaleX

  • get (): number
  • set (val: number): void
  • Indicates the horizontal scale(percentage) of the object as applied from the registration point. The default registration point is(0,0). 1.0 equals 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Returns number

  • Indicates the horizontal scale(percentage) of the object as applied from the registration point. The default registration point is(0,0). 1.0 equals 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Parameters

    • val: number

    Returns void

scaleY

  • get (): number
  • set (val: number): void
  • Indicates the vertical scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Returns number

  • Indicates the vertical scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Parameters

    • val: number

    Returns void

scaleZ

  • get (): number
  • set (val: number): void
  • Indicates the depth scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x, y and z property values, which are defined in whole pixels.

    Returns number

  • Indicates the depth scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x, y and z property values, which are defined in whole pixels.

    Parameters

    • val: number

    Returns void

scene

  • Returns Scene

scenePosition

  • get (): Vector3D
  • Returns Vector3D

shaderPickingDetails

  • get (): boolean
  • Returns boolean

skewX

  • get (): number
  • set (val: number): void
  • Indicates the horizontal skew(angle) of the object as applied from the registration point. The default registration point is(0,0).

    Returns number

  • Indicates the horizontal skew(angle) of the object as applied from the registration point. The default registration point is(0,0).

    Parameters

    • val: number

    Returns void

skewY

  • get (): number
  • set (val: number): void
  • Indicates the vertical skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Returns number

  • Indicates the vertical skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Parameters

    • val: number

    Returns void

skewZ

  • get (): number
  • set (val: number): void
  • Indicates the depth skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Returns number

  • Indicates the depth skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Parameters

    • val: number

    Returns void

style

  • get (): Style
  • set (value: Style): void
  • Returns Style

  • Parameters

    • value: Style

    Returns void

transform

  • get (): Transform
  • An object with properties pertaining to a display object's matrix, color transform, and pixel bounds. The specific properties - matrix, colorTransform, and three read-only properties (concatenatedMatrix, concatenatedColorTransform, and pixelBounds) - are described in the entry for the Transform class.

    Each of the transform object's properties is itself an object. This concept is important because the only way to set new values for the matrix or colorTransform objects is to create a new object and copy that object into the transform.matrix or transform.colorTransform property.

    For example, to increase the tx value of a display object's matrix, you must make a copy of the entire matrix object, then copy the new object into the matrix property of the transform object:

     public myMatrix:Matrix =
    myDisplayObject.transform.matrix; myMatrix.tx += 10;
    myDisplayObject.transform.matrix = myMatrix; 

    You cannot directly set the tx property. The following code has no effect on myDisplayObject:

     myDisplayObject.transform.matrix.tx +=
    10; 

    You can also copy an entire transform object and assign it to another display object's transform property. For example, the following code copies the entire transform object from myOldDisplayObj to myNewDisplayObj:

    myNewDisplayObj.transform = myOldDisplayObj.transform;

    The resulting display object, myNewDisplayObj, now has the same values for its matrix, color transform, and pixel bounds as the old display object, myOldDisplayObj.

    Note that AIR for TV devices use hardware acceleration, if it is available, for color transforms.

    Returns Transform

traverseName

  • get (): string
  • Returns string

visible

  • get (): boolean
  • set (value: boolean): void
  • Whether or not the display object is visible. Display objects that are not visible are disabled. For example, if visible=false for an InteractiveObject instance, it cannot be clicked.

    Returns boolean

  • Whether or not the display object is visible. Display objects that are not visible are disabled. For example, if visible=false for an InteractiveObject instance, it cannot be clicked.

    Parameters

    • value: boolean

    Returns void

width

  • get (): number
  • set (val: number): void
  • Indicates the width of the display object, in pixels. The width is calculated based on the bounds of the content of the display object. When you set the width property, the scaleX property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content(such as an empty sprite) has a width of 0, even if you try to set width to a different value.

    Returns number

  • Indicates the width of the display object, in pixels. The width is calculated based on the bounds of the content of the display object. When you set the width property, the scaleX property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content(such as an empty sprite) has a width of 0, even if you try to set width to a different value.

    Parameters

    • val: number

    Returns void

x

  • get (): number
  • set (val: number): void
  • Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's children inherit a coordinate system that is rotated 90° counterclockwise. The object's coordinates refer to the registration point position.

    Returns number

  • Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's children inherit a coordinate system that is rotated 90° counterclockwise. The object's coordinates refer to the registration point position.

    Parameters

    • val: number

    Returns void

y

  • get (): number
  • set (val: number): void
  • Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's children inherit a coordinate system that is rotated 90° counterclockwise. The object's coordinates refer to the registration point position.

    Returns number

  • Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's children inherit a coordinate system that is rotated 90° counterclockwise. The object's coordinates refer to the registration point position.

    Parameters

    • val: number

    Returns void

z

  • get (): number
  • set (val: number): void
  • Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container. The z property is used for 3D coordinates, not screen or pixel coordinates.

    When you set a z property for a display object to something other than the default value of 0, a corresponding Matrix3D object is automatically created. for adjusting a display object's position and orientation in three dimensions. When working with the z-axis, the existing behavior of x and y properties changes from screen or pixel coordinates to positions relative to the 3D parent container.

    For example, a child of the _root at position x = 100, y = 100, z = 200 is not drawn at pixel location(100,100). The child is drawn wherever the 3D projection calculation puts it. The calculation is:

    (xcameraFocalLength/cameraRelativeZPosition, ycameraFocalLength/cameraRelativeZPosition)

    Returns number

  • Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container. The z property is used for 3D coordinates, not screen or pixel coordinates.

    When you set a z property for a display object to something other than the default value of 0, a corresponding Matrix3D object is automatically created. for adjusting a display object's position and orientation in three dimensions. When working with the z-axis, the existing behavior of x and y properties changes from screen or pixel coordinates to positions relative to the 3D parent container.

    For example, a child of the _root at position x = 100, y = 100, z = 200 is not drawn at pixel location(100,100). The child is drawn wherever the 3D projection calculation puts it. The calculation is:

    (xcameraFocalLength/cameraRelativeZPosition, ycameraFocalLength/cameraRelativeZPosition)

    Parameters

    • val: number

    Returns void

TextField

TextField:

The TextField class is used to create display objects for text display and input. You can use the TextField class to perform low-level text rendering. However, in Flex, you typically use the Label, Text, TextArea, and TextInput controls to process text. You can give a text field an instance name in the Property inspector and use the methods and properties of the TextField class to manipulate it with ActionScript. TextField instance names are displayed in the Movie Explorer and in the Insert Target Path dialog box in the Actions panel.

To create a text field dynamically, use the TextField() constructor.

The methods of the TextField class let you set, select, and manipulate text in a dynamic or input text field that you create during authoring or at runtime.

ActionScript provides several ways to format your text at runtime. The TextFormat class lets you set character and paragraph formatting for TextField objects. You can apply Cascading Style Sheets(CSS) styles to text fields by using the TextField.styleSheet property and the StyleSheet class. You can use CSS to style built-in HTML tags, define new formatting tags, or apply styles. You can assign HTML formatted text, which optionally uses CSS styles, directly to a text field. HTML text that you assign to a text field can contain embedded media(movie clips, SWF files, GIF files, PNG files, and JPEG files). The text wraps around the embedded media in the same way that a web browser wraps text around media embedded in an HTML document.

Flash Player supports a subset of HTML tags that you can use to format text. See the list of supported HTML tags in the description of the htmlText property.

constructor

  • Creates a new TextField instance. After you create the TextField instance, call the addChild() or addChildAt() method of the parent DisplayObjectContainer object to add the TextField instance to the display list.

    The default size for a text field is 100 x 100 pixels.

    Returns TextField

_adapter

_adapter: IAssetAdapter

_boundsType

_boundsType: string

Protected _boxBoundsInvalid

_boxBoundsInvalid: boolean

_concatenatedMatrix3D

_concatenatedMatrix3D: Matrix3D

_defaultTextFormat

_defaultTextFormat: TextFormat

Specifies the format applied to newly inserted text, such as text entered by a user or text inserted with the replaceSelectedText() method.

Note: When selecting characters to be replaced with setSelection() and replaceSelectedText(), the defaultTextFormat will be applied only if the text has been selected up to and including the last character. Here is an example:

 public my_txt:TextField new TextField();
my_txt.text = "Flash Macintosh version"; public my_fmt:TextFormat = new
TextFormat(); my_fmt.color = 0xFF0000; my_txt.defaultTextFormat = my_fmt;
my_txt.setSelection(6,15); // partial text selected - defaultTextFormat
not applied my_txt.setSelection(6,23); // text selected to end -
defaultTextFormat applied my_txt.replaceSelectedText("Windows version");

When you access the defaultTextFormat property, the returned TextFormat object has all of its properties defined. No property is null.

Note: You can't set this property if a style sheet is applied to the text field.

throws

Error This method cannot be used on a text field with a style sheet.

_depth

_depth: number

_depthID

_depthID: number

_explicitMasks

_explicitMasks: Array<DisplayObject>

_glyphsDirty

_glyphsDirty: Boolean

_height

_height: number

_hierarchicalPropsDirty

_hierarchicalPropsDirty: number

_iController

_iController: ControllerBase
internal

_iIsPartition

_iIsPartition: boolean

_iIsRoot

_iIsRoot: boolean

_iSourcePrefab

_iSourcePrefab: PrefabBase

_material

_material: IMaterial

_pBoxBounds

_pBoxBounds: Box

_pImplicitColorTransform

_pImplicitColorTransform: ColorTransform

_pImplicitMaskId

_pImplicitMaskId: number

_pImplicitMaskIds

_pImplicitMaskIds: Array<Array<number>>

_pImplicitMasks

_pImplicitMasks: Array<Array<IEntity>>

_pImplicitMouseEnabled

_pImplicitMouseEnabled: boolean

_pImplicitVisibility

_pImplicitVisibility: boolean

_pIsContainer

_pIsContainer: boolean

_pIsEntity

_pIsEntity: boolean

_pName

_pName: string

_pParent

_pPartition

_pPartition: DisplayObject

_pScene

_pScene: Scene

_pSphereBounds

_pSphereBounds: Sphere

_positionsDirty

_positionsDirty: Boolean

_registrationMatrix3D

_registrationMatrix3D: Matrix3D

_sessionID

_sessionID: number

_style

_style: Style

Protected _tempPoint

_tempPoint: Point

_tempTransform

_tempTransform: Matrix3D

_textColor

_textColor: number

The color of the text in a text field, in hexadecimal format. The hexadecimal color system uses six digits to represent color values. Each digit has 16 possible values or characters. The characters range from 0-9 and then A-F. For example, black is 0x000000; white is 0xFFFFFF.

default

0(0x000000)

_textDirty

_textDirty: Boolean

Protected _transform

_transform: Transform

_width

_width: number

_wordWrap

_wordWrap: boolean

A Boolean value that indicates whether the text field has word wrap. If the value of wordWrap is true, the text field has word wrap; if the value is false, the text field does not have word wrap. The default value is false.

adaptee

adaptee: AssetBase

adapter

adapter: IAssetAdapter

adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class

alignmentMode

alignmentMode: string

alwaysShowSelection

alwaysShowSelection: boolean

When set to true and the text field is not in focus, Flash Player highlights the selection in the text field in gray. When set to false and the text field is not in focus, Flash Player does not highlight the selection in the text field.

default

false

antiAliasType

antiAliasType: AntiAliasType

The type of anti-aliasing used for this text field. Use flash.text.AntiAliasType constants for this property. You can control this setting only if the font is embedded(with the embedFonts property set to true). The default setting is flash.text.AntiAliasType.NORMAL.

To set values for this property, use the following string values:

assetFullPath

assetFullPath: Array<string>

assetNamespace

assetNamespace: string

blendMode

blendMode: BlendMode

A value from the BlendMode class that specifies which blend mode to use. A bitmap can be drawn internally in two ways. If you have a blend mode enabled or an external clipping mask, the bitmap is drawn by adding a bitmap-filled square shape to the vector render. If you attempt to set this property to an invalid value, Flash runtimes set the value to BlendMode.NORMAL.

The blendMode property affects each pixel of the display object. Each pixel is composed of three constituent colors(red, green, and blue), and each constituent color has a value between 0x00 and 0xFF. Flash Player or Adobe AIR compares each constituent color of one pixel in the movie clip with the corresponding color of the pixel in the background. For example, if blendMode is set to BlendMode.LIGHTEN, Flash Player or Adobe AIR compares the red value of the display object with the red value of the background, and uses the lighter of the two as the value for the red component of the displayed color.

The following table describes the blendMode settings. The BlendMode class defines string values you can use. The illustrations in the table show blendMode values applied to a circular display object(2) superimposed on another display object(1).

cacheAsBitmap

cacheAsBitmap: boolean

If set to true, NME will use the software renderer to cache an internal bitmap representation of the display object. For native targets, this is often much slower than the default hardware renderer. When you are using the Flash target, this caching may increase performance for display objects that contain complex vector content.

All vector data for a display object that has a cached bitmap is drawn to the bitmap instead of the main display. If cacheAsBitmapMatrix is null or unsupported, the bitmap is then copied to the main display as unstretched, unrotated pixels snapped to the nearest pixel boundaries. Pixels are mapped 1 to 1 with the parent object. If the bounds of the bitmap change, the bitmap is recreated instead of being stretched.

If cacheAsBitmapMatrix is non-null and supported, the object is drawn to the off-screen bitmap using that matrix and the stretched and/or rotated results of that rendering are used to draw the object to the main display.

No internal bitmap is created unless the cacheAsBitmap property is set to true.

After you set the cacheAsBitmap property to true, the rendering does not change, however the display object performs pixel snapping automatically. The animation speed can be significantly faster depending on the complexity of the vector content.

The cacheAsBitmap property is automatically set to true whenever you apply a filter to a display object(when its filter array is not empty), and if a display object has a filter applied to it, cacheAsBitmap is reported as true for that display object, even if you set the property to false. If you clear all filters for a display object, the cacheAsBitmap setting changes to what it was last set to.

A display object does not use a bitmap even if the cacheAsBitmap property is set to true and instead renders from vector data in the following cases:

  • The bitmap is too large. In AIR 1.5 and Flash Player 10, the maximum size for a bitmap image is 8,191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels.(So, if a bitmap image is 8,191 pixels wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier, the limitation is is 2880 pixels in height and 2,880 pixels in width.
  • The bitmap fails to allocate(out of memory error).

The cacheAsBitmap property is best used with movie clips that have mostly static content and that do not scale and rotate frequently. With such movie clips, cacheAsBitmap can lead to performance increases when the movie clip is translated(when its x and y position is changed).

castsShadows

castsShadows: boolean

chars_codes

chars_codes: number[]

chars_width

chars_width: number[]

condenseWhite

condenseWhite: boolean

A Boolean value that specifies whether extra white space(spaces, line breaks, and so on) in a text field with HTML text is removed. The default value is false. The condenseWhite property only affects text set with the htmlText property, not the text property. If you set text with the text property, condenseWhite is ignored.

If condenseWhite is set to true, use standard HTML commands such as
and

to place line breaks in the text field.

Set the condenseWhite property before setting the htmlText property.

displayAsPassword

displayAsPassword: boolean

Specifies whether the text field is a password text field. If the value of this property is true, the text field is treated as a password text field and hides the input characters using asterisks instead of the actual characters. If false, the text field is not treated as a password text field. When password mode is enabled, the Cut and Copy commands and their corresponding keyboard shortcuts will not function. This security mechanism prevents an unscrupulous user from using the shortcuts to discover a password on an unattended computer.

default

false

embedFonts

embedFonts: boolean

Specifies whether to render by using embedded font outlines. If false, Flash Player renders the text field by using device fonts.

If you set the embedFonts property to true for a text field, you must specify a font for that text by using the font property of a TextFormat object applied to the text field. If the specified font is not embedded in the SWF file, the text is not displayed.

default

false

extra

extra: Object

An object that can contain any extra data.

gridFitType

gridFitType: GridFitType

The type of grid fitting used for this text field. This property applies only if the flash.text.AntiAliasType property of the text field is set to flash.text.AntiAliasType.ADVANCED.

The type of grid fitting used determines whether Flash Player forces strong horizontal and vertical lines to fit to a pixel or subpixel grid, or not at all.

For the flash.text.GridFitType property, you can use the following string values:

default

pixel

htmlText

htmlText: string

Contains the HTML representation of the text field contents.

Flash Player supports the following HTML tags:

Flash Player and AIR also support explicit character codes, such as &(ASCII ampersand) and €(Unicode € symbol).

id

id: number

A unique id for the asset, used to identify assets in an associative array

isSlice9ScaledMC

isSlice9ScaledMC: boolean

isSlice9ScaledSprite

isSlice9ScaledSprite: boolean

mask

The calling display object is masked by the specified mask object. To ensure that masking works when the Stage is scaled, the mask display object must be in an active part of the display list. The mask object itself is not drawn. Set mask to null to remove the mask.

To be able to scale a mask object, it must be on the display list. To be able to drag a mask Sprite object(by calling its startDrag() method), it must be on the display list. To call the startDrag() method for a mask sprite based on a mouseDown event being dispatched by the sprite, set the sprite's buttonMode property to true.

When display objects are cached by setting the cacheAsBitmap property to true an the cacheAsBitmapMatrix property to a Matrix object, both the mask and the display object being masked must be part of the same cached bitmap. Thus, if the display object is cached, then the mask must be a child of the display object. If an ancestor of the display object on the display list is cached, then the mask must be a child of that ancestor or one of its descendents. If more than one ancestor of the masked object is cached, then the mask must be a descendent of the cached container closest to the masked object in the display list.

Note: A single mask object cannot be used to mask more than one calling display object. When the mask is assigned to a second display object, it is removed as the mask of the first object, and that object's mask property becomes null.

maxChars

maxChars: number

The maximum number of characters that the text field can contain, as entered by a user. A script can insert more text than maxChars allows; the maxChars property indicates only how much text a user can enter. If the value of this property is 0, a user can enter an unlimited amount of text.

default

0

mouseWheelEnabled

mouseWheelEnabled: boolean

A Boolean value that indicates whether Flash Player automatically scrolls multiline text fields when the user clicks a text field and rolls the mouse wheel. By default, this value is true. This property is useful if you want to prevent mouse wheel scrolling of text fields, or implement your own text field scrolling.

multiline

multiline: boolean

Indicates whether field is a multiline text field. If the value is true, the text field is multiline; if the value is false, the text field is a single-line text field. In a field of type TextFieldType.INPUT, the multiline value determines whether the Enter key creates a new line(a value of false, and the Enter key is ignored). If you paste text into a TextField with a multiline value of false, newlines are stripped out of the text.

default

false

orientationMode

orientationMode: string

originalName

originalName: string

The original name used for this asset in the resource (e.g. file) in which it was found. This may not be the same as name, which may have changed due to of a name conflict.

restrict

restrict: string

Indicates the set of characters that a user can enter into the text field. If the value of the restrict property is null, you can enter any character. If the value of the restrict property is an empty string, you cannot enter any character. If the value of the restrict property is a string of characters, you can enter only characters in the string into the text field. The string is scanned from left to right. You can specify a range by using the hyphen (-) character. Only user interaction is restricted; a script can put any text into the text field. This property does not synchronize with the Embed font options in the Property inspector.

If the string begins with a caret(^) character, all characters are initially accepted and succeeding characters in the string are excluded from the set of accepted characters. If the string does not begin with a caret(^) character, no characters are initially accepted and succeeding characters in the string are included in the set of accepted characters.

The following example allows only uppercase characters, spaces, and numbers to be entered into a text field:

 my_txt.restrict = "A-Z 0-9"; 

The following example includes all characters, but excludes lowercase letters:

 my_txt.restrict = "^a-z"; 

You can use a backslash to enter a ^ or - verbatim. The accepted backslash sequences are -, \^ or \. The backslash must be an actual character in the string, so when specified in ActionScript, a double backslash must be used. For example, the following code includes only the dash(-) and caret(^):

 my_txt.restrict = "\\-\\^"; 

The ^ can be used anywhere in the string to toggle between including characters and excluding characters. The following code includes only uppercase letters, but excludes the uppercase letter Q:

 my_txt.restrict = "A-Z^Q"; 

You can use the \u escape sequence to construct restrict strings. The following code includes only the characters from ASCII 32(space) to ASCII 126(tilde).

 my_txt.restrict = "\u0020-\u007E"; 
default

null

rotation

rotation: number

Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement my_video.rotation = 450 is the same as my_video.rotation = 90.

scale9Grid

scale9Grid: Rectangle

The current scaling grid that is in effect. If set to null, the entire display object is scaled normally when any scale transformation is applied.

When you define the scale9Grid property, the display object is divided into a grid with nine regions based on the scale9Grid rectangle, which defines the center region of the grid. The eight other regions of the grid are the following areas:

  • The upper-left corner outside of the rectangle
  • The area above the rectangle
  • The upper-right corner outside of the rectangle
  • The area to the left of the rectangle
  • The area to the right of the rectangle
  • The lower-left corner outside of the rectangle
  • The area below the rectangle
  • The lower-right corner outside of the rectangle

You can think of the eight regions outside of the center(defined by the rectangle) as being like a picture frame that has special rules applied to it when scaled.

When the scale9Grid property is set and a display object is scaled, all text and gradients are scaled normally; however, for other types of objects the following rules apply:

  • Content in the center region is scaled normally.
  • Content in the corners is not scaled.
  • Content in the top and bottom regions is scaled horizontally only. Content in the left and right regions is scaled vertically only.
  • All fills(including bitmaps, video, and gradients) are stretched to fit their shapes.

If a display object is rotated, all subsequent scaling is normal(and the scale9Grid property is ignored).

For example, consider the following display object and a rectangle that is applied as the display object's scale9Grid:

A common use for setting scale9Grid is to set up a display object to be used as a component, in which edge regions retain the same width when the component is scaled.

throws

ArgumentError If you pass an invalid argument to the method.

scrollH

scrollH: number

The current horizontal scrolling position. If the scrollH property is 0, the text is not horizontally scrolled. This property value is an integer that represents the horizontal position in pixels.

The units of horizontal scrolling are pixels, whereas the units of vertical scrolling are lines. Horizontal scrolling is measured in pixels because most fonts you typically use are proportionally spaced; that is, the characters can have different widths. Flash Player performs vertical scrolling by line because users usually want to see a complete line of text rather than a partial line. Even if a line uses multiple fonts, the height of the line adjusts to fit the largest font in use.

Note: The scrollH property is zero-based, not 1-based like the scrollV vertical scrolling property.

scrollRect

scrollRect: Rectangle

The scroll rectangle bounds of the display object. The display object is cropped to the size defined by the rectangle, and it scrolls within the rectangle when you change the x and y properties of the scrollRect object.

The properties of the scrollRect Rectangle object use the display object's coordinate space and are scaled just like the overall display object. The corner bounds of the cropped window on the scrolling display object are the origin of the display object(0,0) and the point defined by the width and height of the rectangle. They are not centered around the origin, but use the origin to define the upper-left corner of the area. A scrolled display object always scrolls in whole pixel increments.

You can scroll an object left and right by setting the x property of the scrollRect Rectangle object. You can scroll an object up and down by setting the y property of the scrollRect Rectangle object. If the display object is rotated 90° and you scroll it left and right, the display object actually scrolls up and down.

scrollV

scrollV: number

The vertical position of text in a text field. The scrollV property is useful for directing users to a specific paragraph in a long passage, or creating scrolling text fields.

The units of vertical scrolling are lines, whereas the units of horizontal scrolling are pixels. If the first line displayed is the first line in the text field, scrollV is set to 1(not 0). Horizontal scrolling is measured in pixels because most fonts are proportionally spaced; that is, the characters can have different widths. Flash performs vertical scrolling by line because users usually want to see a complete line of text rather than a partial line. Even if there are multiple fonts on a line, the height of the line adjusts to fit the largest font in use.

selectable

selectable: boolean

A Boolean value that indicates whether the text field is selectable. The value true indicates that the text is selectable. The selectable property controls whether a text field is selectable, not whether a text field is editable. A dynamic text field can be selectable even if it is not editable. If a dynamic text field is not selectable, the user cannot select its text.

If selectable is set to false, the text in the text field does not respond to selection commands from the mouse or keyboard, and the text cannot be copied with the Copy command. If selectable is set to true, the text in the text field can be selected with the mouse or keyboard, and the text can be copied with the Copy command. You can select text this way even if the text field is a dynamic text field instead of an input text field.

default

true

sharpness

sharpness: number

The sharpness of the glyph edges in this text field. This property applies only if the flash.text.AntiAliasType property of the text field is set to flash.text.AntiAliasType.ADVANCED. The range for sharpness is a number from -400 to 400. If you attempt to set sharpness to a value outside that range, Flash sets the property to the nearest value in the range(either -400 or 400).

default

0

styleSheet

styleSheet: StyleSheet

Attaches a style sheet to the text field. For information on creating style sheets, see the StyleSheet class and the ActionScript 3.0 Developer's Guide.

You can change the style sheet associated with a text field at any time. If you change the style sheet in use, the text field is redrawn with the new style sheet. You can set the style sheet to null or undefined to remove the style sheet. If the style sheet in use is removed, the text field is redrawn without a style sheet.

Note: If the style sheet is removed, the contents of both TextField.text and TextField.htmlText change to incorporate the formatting previously applied by the style sheet. To preserve the original TextField.htmlText contents without the formatting, save the value in a variable before removing the style sheet.

textShapes

textShapes: any

thickness

thickness: number

The thickness of the glyph edges in this text field. This property applies only when AntiAliasType is set to AntiAliasType.ADVANCED.

The range for thickness is a number from -200 to 200. If you attempt to set thickness to a value outside that range, the property is set to the nearest value in the range(either -200 or 200).

default

0

type

The type of the text field. Either one of the following TextFieldType constants: TextFieldType.DYNAMIC, which specifies a dynamic text field, which a user cannot edit, or TextFieldType.INPUT, which specifies an input text field, which a user can edit.

default

dynamic

throws

ArgumentError The type specified is not a member of flash.text.TextFieldType.

useRichTextClipboard

useRichTextClipboard: boolean

Specifies whether to copy and paste the text formatting along with the text. When set to true, Flash Player copies and pastes formatting(such as alignment, bold, and italics) when you copy and paste between text fields. Both the origin and destination text fields for the copy and paste procedure must have useRichTextClipboard set to true. The default value is false.

words

words: number[]

zOffset

zOffset: number

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static assetType

assetType: string

Static traverseName

traverseName: string

_acceptTraverser

  • _acceptTraverser(traverser: TraverserBase): void

_hitTestPointInternal

  • _hitTestPointInternal(x: number, y: number, shapeFlag: boolean, masksFlag: boolean): boolean

_iAssignedColorTransform

  • _iAssignedColorTransform(): ColorTransform

_iAssignedMaskId

  • _iAssignedMaskId(): number

_iAssignedMasks

  • _iAssignedMasks(): Array<Array<IEntity>>

_iInternalUpdate

  • _iInternalUpdate(): void

_iIsMouseEnabled

  • _iIsMouseEnabled(): boolean

_iIsVisible

  • _iIsVisible(): boolean

_iMasksConfig

  • _iMasksConfig(): Array<Array<number>>

Protected _iSetScene

_onInvalidateProperties

  • _onInvalidateProperties(event?: StyleEvent): void

Protected _onUpdateConcatenatedMatrix3D

  • _onUpdateConcatenatedMatrix3D(event: TransformEvent): void

_pInvalidateBounds

  • _pInvalidateBounds(): void

_pUpdateBoxBounds

  • _pUpdateBoxBounds(): void

_pUpdateSphereBounds

  • _pUpdateSphereBounds(): void

Protected _setScaleX

  • _setScaleX(val: number): void
  • Parameters

    • val: number

    Returns void

Protected _setScaleY

  • _setScaleY(val: number): void
  • Parameters

    • val: number

    Returns void

Protected _setScaleZ

  • _setScaleZ(val: number): void
  • Parameters

    • val: number

    Returns void

_updateMaskMode

  • _updateMaskMode(): void

_updateMouseEnabled

  • _updateMouseEnabled(): void

addEventListener

  • addEventListener(type: string, listener: function): void
  • Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

appendText

  • appendText(newText: string): void
  • Appends the string specified by the newText parameter to the end of the text of the text field. This method is more efficient than an addition assignment(+=) on a text property (such as someTextField.text += moreText), particularly for a text field that contains a significant amount of content.

    Parameters

    • newText: string

      The string to append to the existing text.

    Returns void

assetPathEquals

  • assetPathEquals(name: string, ns: string): boolean
  • Parameters

    • name: string
    • ns: string

    Returns boolean

clear

  • clear(): void

clone

closeParagraph

  • closeParagraph(): void
  • *tells the Textfield that a paragraph is defined completly. e.g. the textfield will start a new line for future added text.

    Returns void

copyTo

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void

disposeValues

  • disposeValues(): void

getBounds

  • Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. Consider the following code, which shows how the rectangle returned can vary depending on the targetCoordinateSpace parameter that you pass to the method:

    Note: Use the localToGlobal() and globalToLocal() methods to convert the display object's local coordinates to display coordinates, or display coordinates to local coordinates, respectively.

    The getBounds() method is similar to the getRect() method; however, the Rectangle returned by the getBounds() method includes any strokes on shapes, whereas the Rectangle returned by the getRect() method does not. For an example, see the description of the getRect() method.

    Parameters

    • targetCoordinateSpace: DisplayObject

      The display object that defines the coordinate system to use.

    Returns Rectangle

    The rectangle that defines the area of the display object relative to the targetCoordinateSpace object's coordinate system.

getBox

getCharBoundaries

  • getCharBoundaries(charIndex: number): Rectangle
  • Returns a rectangle that is the bounding box of the character.

    Parameters

    • charIndex: number

      The zero-based index value for the character(for example, the first position is 0, the second position is 1, and so on).

    Returns Rectangle

    A rectangle with x and y minimum and maximum values defining the bounding box of the character.

getCharIndexAtPoint

  • getCharIndexAtPoint(x: number, y: number): number
  • Returns the zero-based index value of the character at the point specified by the x and y parameters.

    Parameters

    • x: number

      The x coordinate of the character.

    • y: number

      The y coordinate of the character.

    Returns number

    The zero-based index value of the character(for example, the first position is 0, the second position is 1, and so on). Returns -1 if the point is not over any character.

getFirstCharInParagraph

  • getFirstCharInParagraph(charIndex: number): number
  • Given a character index, returns the index of the first character in the same paragraph.

    throws

    RangeError The character index specified is out of range.

    Parameters

    • charIndex: number

      The zero-based index value of the character(for example, the first character is 0, the second character is 1, and so on).

    Returns number

    The zero-based index value of the first character in the same paragraph.

getImageReference

  • Returns a DisplayObject reference for the given id, for an image or SWF file that has been added to an HTML-formatted text field by using an tag. The tag is in the following format:

     

    Parameters

    • id: string

      The id to match(in the id attribute of the tag).

    Returns DisplayObject

    The display object corresponding to the image or SWF file with the matching id attribute in the tag of the text field. For media loaded from an external source, this object is a Loader object, and, once loaded, the media object is a child of that Loader object. For media embedded in the SWF file, it is the loaded object. If no tag with the matching id exists, the method returns null.

getLineIndexAtPoint

  • getLineIndexAtPoint(x: number, y: number): number
  • Returns the zero-based index value of the line at the point specified by the x and y parameters.

    Parameters

    • x: number

      The x coordinate of the line.

    • y: number

      The y coordinate of the line.

    Returns number

    The zero-based index value of the line(for example, the first line is 0, the second line is 1, and so on). Returns -1 if the point is not over any line.

getLineIndexOfChar

  • getLineIndexOfChar(charIndex: number): number
  • Returns the zero-based index value of the line containing the character specified by the charIndex parameter.

    throws

    RangeError The character index specified is out of range.

    Parameters

    • charIndex: number

      The zero-based index value of the character(for example, the first character is 0, the second character is 1, and so on).

    Returns number

    The zero-based index value of the line.

getLineLength

  • getLineLength(lineIndex: number): number
  • Returns the number of characters in a specific text line.

    throws

    RangeError The line number specified is out of range.

    Parameters

    • lineIndex: number

      The line number for which you want the length.

    Returns number

    The number of characters in the line.

getLineMetrics

  • Returns metrics information about a given text line.

    throws

    RangeError The line number specified is out of range.

    Parameters

    • lineIndex: number

      The line number for which you want metrics information.

    Returns TextLineMetrics

    A TextLineMetrics object.

getLineOffset

  • getLineOffset(lineIndex: number): number
  • Returns the character index of the first character in the line that the lineIndex parameter specifies.

    throws

    RangeError The line number specified is out of range.

    Parameters

    • lineIndex: number

      The zero-based index value of the line(for example, the first line is 0, the second line is 1, and so on).

    Returns number

    The zero-based index value of the first character in the line.

getLineText

  • getLineText(lineIndex: number): string
  • Returns the text of the line specified by the lineIndex parameter.

    throws

    RangeError The line number specified is out of range.

    Parameters

    • lineIndex: number

      The zero-based index value of the line(for example, the first line is 0, the second line is 1, and so on).

    Returns string

    The text string contained in the specified line.

getParagraphLength

  • getParagraphLength(charIndex: number): number
  • Given a character index, returns the length of the paragraph containing the given character. The length is relative to the first character in the paragraph(as returned by getFirstCharInParagraph()), not to the character index passed in.

    throws

    RangeError The character index specified is out of range.

    Parameters

    • charIndex: number

      The zero-based index value of the character(for example, the first character is 0, the second character is 1, and so on).

    Returns number

    Returns the number of characters in the paragraph.

getRect

  • Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes. The values that the getRect() method returns are the same or smaller than those returned by the getBounds() method.

    Note: Use localToGlobal() and globalToLocal() methods to convert the display object's local coordinates to Scene coordinates, or Scene coordinates to local coordinates, respectively.

    Parameters

    • Default value targetCoordinateSpace: DisplayObject = null

      The display object that defines the coordinate system to use.

    Returns Rectangle

    The rectangle that defines the area of the display object relative to the targetCoordinateSpace object's coordinate system.

getRenderSceneTransform

  • getRenderSceneTransform(cameraTransform: Matrix3D): Matrix3D

getSphere

getTextFormat

  • getTextFormat(beginIndex?: number, endIndex?: number): TextFormat
  • Returns a TextFormat object that contains formatting information for the range of text that the beginIndex and endIndex parameters specify. Only properties that are common to the entire text specified are set in the resulting TextFormat object. Any property that is mixed, meaning that it has different values at different points in the text, has a value of null.

    If you do not specify values for these parameters, this method is applied to all the text in the text field.

    The following table describes three possible usages:

    throws

    RangeError The beginIndex or endIndex specified is out of range.

    Parameters

    • Default value beginIndex: number = -1
    • Default value endIndex: number = -1

    Returns TextFormat

    The TextFormat object that represents the formatting properties for the specified text.

getTextShapeForIdentifierAndFormat

  • getTextShapeForIdentifierAndFormat(id: string, format: TextFormat): any
  • Parameters

    Returns any

globalToLocal

  • globalToLocal(point: Point, target?: Point): Point
  • Converts the point object from the Scene(global) coordinates to the display object's(local) coordinates.

    To use this method, first create an instance of the Point class. The x and y values that you assign represent global coordinates because they relate to the origin(0,0) of the main display area. Then pass the Point instance as the parameter to the globalToLocal() method. The method returns a new Point object with x and y values that relate to the origin of the display object instead of the origin of the Scene.

    Parameters

    • point: Point

      An object created with the Point class. The Point object specifies the x and y coordinates as properties.

    • Default value target: Point = null

    Returns Point

    A Point object with coordinates relative to the display object.

globalToLocal3D

  • globalToLocal3D(position: Vector3D): Vector3D
  • Converts a two-dimensional point from the Scene(global) coordinates to a three-dimensional display object's(local) coordinates.

    To use this method, first create an instance of the Vector3D class. The x, y and z values that you assign to the Vector3D object represent global coordinates because they are relative to the origin(0,0,0) of the scene. Then pass the Vector3D object to the globalToLocal3D() method as the position parameter. The method returns three-dimensional coordinates as a Vector3D object containing x, y, and z values that are relative to the origin of the three-dimensional display object.

    Parameters

    • position: Vector3D

    Returns Vector3D

    A Vector3D object with coordinates relative to the three-dimensional display object.

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

hitTestObject

  • Evaluates the bounding box of the display object to see if it overlaps or intersects with the bounding box of the obj display object.

    Parameters

    Returns boolean

    true if the bounding boxes of the display objects intersect; false if not.

hitTestPoint

  • hitTestPoint(x: number, y: number, shapeFlag?: boolean, masksFlag?: boolean): boolean
  • Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters. The x and y parameters specify a point in the coordinate space of the Scene, not the display object container that contains the display object(unless that display object container is the Scene).

    Parameters

    • x: number

      The x coordinate to test against this object.

    • y: number

      The y coordinate to test against this object.

    • Default value shapeFlag: boolean = false

      Whether to check against the actual pixels of the object (true) or the bounding box (false).

    • Default value masksFlag: boolean = false

    Returns boolean

    true if the display object overlaps or intersects with the specified point; false otherwise.

iSetParent

invalidate

  • invalidate(): void
  • Returns void

invalidateElements

  • invalidateElements(): void

invalidateMaterial

  • invalidateMaterial(): void

invalidatePartitionBounds

  • invalidatePartitionBounds(): void

isAsset

  • isAsset(assetClass: IAssetClass): boolean
  • Parameters

    • assetClass: IAssetClass

    Returns boolean

localToGlobal

  • localToGlobal(point: Point, target?: Point): Point
  • Converts the point object from the display object's(local) coordinates to the Scene(global) coordinates.

    This method allows you to convert any given x and y coordinates from values that are relative to the origin(0,0) of a specific display object(local coordinates) to values that are relative to the origin of the Scene(global coordinates).

    To use this method, first create an instance of the Point class. The x and y values that you assign represent local coordinates because they relate to the origin of the display object.

    You then pass the Point instance that you created as the parameter to the localToGlobal() method. The method returns a new Point object with x and y values that relate to the origin of the Scene instead of the origin of the display object.

    Parameters

    • point: Point

      The name or identifier of a point created with the Point class, specifying the x and y coordinates as properties.

    • Default value target: Point = null

    Returns Point

    A Point object with coordinates relative to the Scene.

localToGlobal3D

  • localToGlobal3D(position: Vector3D): Vector3D
  • Converts a three-dimensional point of the three-dimensional display object's(local) coordinates to a three-dimensional point in the Scene (global) coordinates.

    This method allows you to convert any given x, y and z coordinates from values that are relative to the origin(0,0,0) of a specific display object(local coordinates) to values that are relative to the origin of the Scene(global coordinates).

    To use this method, first create an instance of the Point class. The x and y values that you assign represent local coordinates because they relate to the origin of the display object.

    You then pass the Vector3D instance that you created as the parameter to the localToGlobal3D() method. The method returns a new Vector3D object with x, y and z values that relate to the origin of the Scene instead of the origin of the display object.

    Parameters

    • position: Vector3D

      A Vector3D object containing either a three-dimensional position or the coordinates of the three-dimensional display object.

    Returns Vector3D

    A Vector3D object representing a three-dimensional position in the Scene.

lookAt

  • lookAt(scenePosition: Vector3D, upAxis?: Vector3D): void
  • Rotates the 3d object around to face a point defined relative to the local coordinates of the parent ObjectContainer3D.

    Parameters

    • scenePosition: Vector3D
    • Default value upAxis: Vector3D = null

      An optional vector used to define the desired up orientation of the 3d object after rotation has occurred

    Returns void

maxScrollH

  • maxScrollH(): number
  • The maximum value of scrollH.

    Returns number

maxScrollV

  • maxScrollV(): number
  • The maximum value of scrollV.

    Returns number

movePivot

  • movePivot(dx: number, dy: number, dz: number): void
  • Moves the local point around which the object rotates.

    Parameters

    • dx: number

      The amount of movement along the local x axis.

    • dy: number

      The amount of movement along the local y axis.

    • dz: number

      The amount of movement along the local z axis.

    Returns void

pInvalidateHierarchicalProperties

  • pInvalidateHierarchicalProperties(propDirty: number): boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

replaceSelectedText

  • replaceSelectedText(value: string): void
  • Replaces the current selection with the contents of the value parameter. The text is inserted at the position of the current selection, using the current default character format and default paragraph format. The text is not treated as HTML.

    You can use the replaceSelectedText() method to insert and delete text without disrupting the character and paragraph formatting of the rest of the text.

    Note: This method does not work if a style sheet is applied to the text field.

    throws

    Error This method cannot be used on a text field with a style sheet.

    Parameters

    • value: string

      The string to replace the currently selected text.

    Returns void

replaceText

  • replaceText(beginIndex: number, endIndex: number, newText: string): void
  • Replaces the range of characters that the beginIndex and endIndex parameters specify with the contents of the newText parameter. As designed, the text from beginIndex to endIndex-1 is replaced.

    Note: This method does not work if a style sheet is applied to the text field.

    throws

    Error This method cannot be used on a text field with a style sheet.

    Parameters

    • beginIndex: number

      The zero-based index value for the start position of the replacement range.

    • endIndex: number

      The zero-based index position of the first character after the desired text span.

    • newText: string

      The text to use to replace the specified range of characters.

    Returns void

reset

  • reset(): void
  • Returns void

resetAssetPath

  • resetAssetPath(name: string, ns?: string, overrideOriginal?: boolean): void
  • Parameters

    • name: string
    • Optional ns: string
    • Optional overrideOriginal: boolean

    Returns void

setSelection

  • setSelection(beginIndex: number, endIndex: number): void
  • Sets as selected the text designated by the index values of the first and last characters, which are specified with the beginIndex and endIndex parameters. If the two parameter values are the same, this method sets the insertion point, as if you set the caretIndex property.

    Parameters

    • beginIndex: number

      The zero-based index value of the first character in the selection(for example, the first character is 0, the second character is 1, and so on).

    • endIndex: number

      The zero-based index value of the last character in the selection.

    Returns void

setTextFormat

  • setTextFormat(format: TextFormat, beginIndex?: number, endIndex?: number): void
  • Applies the text formatting that the format parameter specifies to the specified text in a text field. The value of format must be a TextFormat object that specifies the desired text formatting changes. Only the non-null properties of format are applied to the text field. Any property of format that is set to null is not applied. By default, all of the properties of a newly created TextFormat object are set to null.

    Note: This method does not work if a style sheet is applied to the text field.

    The setTextFormat() method changes the text formatting applied to a range of characters or to the entire body of text in a text field. To apply the properties of format to all text in the text field, do not specify values for beginIndex and endIndex. To apply the properties of the format to a range of text, specify values for the beginIndex and the endIndex parameters. You can use the length property to determine the index values.

    The two types of formatting information in a TextFormat object are character level formatting and paragraph level formatting. Each character in a text field can have its own character formatting settings, such as font name, font size, bold, and italic.

    For paragraphs, the first character of the paragraph is examined for the paragraph formatting settings for the entire paragraph. Examples of paragraph formatting settings are left margin, right margin, and indentation.

    Any text inserted manually by the user, or replaced by the replaceSelectedText() method, receives the default text field formatting for new text, and not the formatting specified for the text insertion point. To set the default formatting for new text, use defaultTextFormat.

    throws

    Error This method cannot be used on a text field with a style sheet.

    throws

    RangeError The beginIndex or endIndex specified is out of range.

    Parameters

    • format: TextFormat

      A TextFormat object that contains character and paragraph formatting information.

    • Default value beginIndex: number = -1
    • Default value endIndex: number = -1

    Returns void

updateFullPath

  • updateFullPath(): void
  • Returns void

Static getNewTextField

  • Returns TextField

Static isFontCompatible

  • isFontCompatible(fontName: string, fontStyle: string): boolean
  • Returns true if an embedded font is available with the specified fontName and fontStyle where Font.fontType is flash.text.FontType.EMBEDDED. Starting with Flash Player 10, two kinds of embedded fonts can appear in a SWF file. Normal embedded fonts are only used with TextField objects. CFF embedded fonts are only used with the flash.text.engine classes. The two types are distinguished by the fontType property of the Font class, as returned by the enumerateFonts() function.

    TextField cannot use a font of type EMBEDDED_CFF. If embedFonts is set to true and the only font available at run time with the specified name and style is of type EMBEDDED_CFF, Flash Player fails to render the text, as if no embedded font were available with the specified name and style.

    If both EMBEDDED and EMBEDDED_CFF fonts are available with the same name and style, the EMBEDDED font is selected and text renders with the EMBEDDED font.

    throws

    ArgumentError The fontStyle specified is not a member of flash.text.FontStyle.

    Parameters

    • fontName: string

      The name of the embedded font to check.

    • fontStyle: string

      Specifies the font style to check. Use flash.text.FontStyle

    Returns boolean

    true if a compatible embedded font is available, otherwise false.

_iPickingCollision

  • get (): PickingCollision

alpha

  • get (): number
  • set (value: number): void
  • Indicates the alpha transparency value of the object specified. Valid values are 0(fully transparent) to 1(fully opaque). The default value is

    1. Display objects with alpha set to 0 are active, even though they are invisible.

    Returns number

  • Indicates the alpha transparency value of the object specified. Valid values are 0(fully transparent) to 1(fully opaque). The default value is

    1. Display objects with alpha set to 0 are active, even though they are invisible.

    Parameters

    • value: number

    Returns void

animator

  • get (): IAnimator
  • set (value: IAnimator): void
  • Defines the animator of the display object. Default value is null.

    Returns IAnimator

  • Defines the animator of the display object. Default value is null.

    Parameters

    • value: IAnimator

    Returns void

assetType

  • get (): string
  • Returns string

autoSize

  • get (): string
  • set (value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

background

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

backgroundColor

  • get (): number
  • set (value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

border

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

borderColor

  • get (): number
  • set (value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

bottomScrollV

  • get (): number
  • An integer(1-based index) that indicates the bottommost line that is currently visible in the specified text field. Think of the text field as a window onto a block of text. The scrollV property is the 1-based index of the topmost visible line in the window.

    All the text between the lines indicated by scrollV and bottomScrollV is currently visible in the text field.

    Returns number

boundsType

  • get (): string
  • set (value: string): void

caretIndex

  • get (): number
  • The index of the insertion point(caret) position. If no insertion point is displayed, the value is the position the insertion point would be if you restored focus to the field(typically where the insertion point last was, or 0 if the field has not had focus).

    Selection span indexes are zero-based(for example, the first position is 0, the second position is 1, and so on).

    Returns number

debugVisible

  • get (): boolean
  • set (value: boolean): void

defaultTextFormat

  • Returns TextFormat

  • Parameters

    Returns void

depth

  • get (): number
  • set (val: number): void
  • Indicates the depth of the display object, in pixels. The depth is calculated based on the bounds of the content of the display object. When you set the depth property, the scaleZ property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a depth of 0, even if you try to set depth to a different value.

    Returns number

  • Indicates the depth of the display object, in pixels. The depth is calculated based on the bounds of the content of the display object. When you set the depth property, the scaleZ property is adjusted accordingly, as shown in the following code:

    Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a depth of 0, even if you try to set depth to a different value.

    Parameters

    • val: number

    Returns void

eulers

  • get (): Vector3D
  • set (value: Vector3D): void
  • Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.

    Returns Vector3D

  • Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.

    Parameters

    • value: Vector3D

    Returns void

height

  • get (): number
  • set (val: number): void

index

  • get (): number
  • Indicates the instance container index of the DisplayObject. The object can be identified in the child list of its parent display object container by calling the getChildByIndex() method of the display object container.

    If the DisplayObject has no parent container, index defaults to 0.

    Returns number

inheritColorTransform

  • get (): boolean
  • set (value: boolean): void

isContainer

  • get (): boolean

isEntity

  • get (): boolean

isPartition

  • get (): boolean
  • set (value: boolean): void

length

  • get (): number
  • The number of characters in a text field. A character such as tab (\t) counts as one character.

    Returns number

loaderInfo

  • get (): LoaderInfo
  • Returns a LoaderInfo object containing information about loading the file to which this display object belongs. The loaderInfo property is defined only for the root display object of a SWF file or for a loaded Bitmap(not for a Bitmap that is drawn with ActionScript). To find the loaderInfo object associated with the SWF file that contains a display object named myDisplayObject, use myDisplayObject.root.loaderInfo.

    A large SWF file can monitor its download by calling this.root.loaderInfo.addEventListener(Event.COMPLETE, func).

    Returns LoaderInfo

maskMode

  • get (): boolean
  • set (value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

masks

material

  • get (): IMaterial
  • set (value: IMaterial): void
  • Returns IMaterial

  • Parameters

    • value: IMaterial

    Returns void

mouseEnabled

  • get (): boolean
  • set (value: boolean): void
  • Specifies whether this object receives mouse, or other user input, messages. The default value is true, which means that by default any InteractiveObject instance that is on the display list receives mouse events or other user input events. If mouseEnabled is set to false, the instance does not receive any mouse events(or other user input events like keyboard events). Any children of this instance on the display list are not affected. To change the mouseEnabled behavior for all children of an object on the display list, use flash.display.DisplayObjectContainer.mouseChildren.

    No event is dispatched by setting this property. You must use the addEventListener() method to create interactive functionality.

    Returns boolean

  • Specifies whether this object receives mouse, or other user input, messages. The default value is true, which means that by default any InteractiveObject instance that is on the display list receives mouse events or other user input events. If mouseEnabled is set to false, the instance does not receive any mouse events(or other user input events like keyboard events). Any children of this instance on the display list are not affected. To change the mouseEnabled behavior for all children of an object on the display list, use flash.display.DisplayObjectContainer.mouseChildren.

    No event is dispatched by setting this property. You must use the addEventListener() method to create interactive functionality.

    Parameters

    • value: boolean

    Returns void

mouseX

  • get (): number
  • Indicates the x coordinate of the mouse or user input device position, in pixels.

    Note: For a DisplayObject that has been rotated, the returned x coordinate will reflect the non-rotated object.

    Returns number

mouseY

  • get (): number
  • Indicates the y coordinate of the mouse or user input device position, in pixels.

    Note: For a DisplayObject that has been rotated, the returned y coordinate will reflect the non-rotated object.

    Returns number

name

  • get (): string
  • set (value: string): void
  • Indicates the instance name of the DisplayObject. The object can be identified in the child list of its parent display object container by calling the getChildByName() method of the display object container.

    throws

    IllegalOperationError If you are attempting to set this property on an object that was placed on the timeline in the Flash authoring tool.

    Returns string

  • Indicates the instance name of the DisplayObject. The object can be identified in the child list of its parent display object container by calling the getChildByName() method of the display object container.

    Parameters

    • value: string

    Returns void

numLines

  • get (): number
  • Defines the number of text lines in a multiline text field. If wordWrap property is set to true, the number of lines increases when text wraps.

    Returns number

parent

  • Indicates the DisplayObjectContainer object that contains this display object. Use the parent property to specify a relative path to display objects that are above the current display object in the display list hierarchy.

    You can use parent to move up multiple levels in the display list as in the following:

    throws

    SecurityError The parent display object belongs to a security sandbox to which you do not have access. You can avoid this situation by having the parent movie call the Security.allowDomain() method.

    Returns DisplayObjectContainer

partition

  • get (): IEntity

registrationPoint

  • get (): Vector3D
  • set (value: Vector3D): void
  • Defines the local point around which the object rotates.

    Returns Vector3D

  • Defines the local point around which the object rotates.

    Parameters

    • value: Vector3D

    Returns void

registrationScale

  • get (): Vector3D
  • set (value: Vector3D): void

root

  • For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file. For a Bitmap object representing a loaded image file, the root property is the Bitmap object itself. For the instance of the main class of the first SWF file loaded, the root property is the display object itself. The root property of the Scene object is the Scene object itself. The root property is set to null for any display object that has not been added to the display list, unless it has been added to a display object container that is off the display list but that is a child of the top-most display object in a loaded SWF file.

    For example, if you create a new Sprite object by calling the Sprite() constructor method, its root property is null until you add it to the display list(or to a display object container that is off the display list but that is a child of the top-most display object in a SWF file).

    For a loaded SWF file, even though the Loader object used to load the file may not be on the display list, the top-most display object in the SWF file has its root property set to itself. The Loader object does not have its root property set until it is added as a child of a display object for which the root property is set.

    Returns DisplayObjectContainer

rotationX

  • get (): number
  • set (val: number): void
  • Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Returns number

  • Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Parameters

    • val: number

    Returns void

rotationY

  • get (): number
  • set (val: number): void
  • Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Returns number

  • Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Parameters

    • val: number

    Returns void

rotationZ

  • get (): number
  • set (val: number): void
  • Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Returns number

  • Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range.

    Parameters

    • val: number

    Returns void

scaleX

  • get (): number
  • set (val: number): void
  • Indicates the horizontal scale(percentage) of the object as applied from the registration point. The default registration point is(0,0). 1.0 equals 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Returns number

  • Indicates the horizontal scale(percentage) of the object as applied from the registration point. The default registration point is(0,0). 1.0 equals 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Parameters

    • val: number

    Returns void

scaleY

  • get (): number
  • set (val: number): void
  • Indicates the vertical scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Returns number

  • Indicates the vertical scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x and y property values, which are defined in whole pixels.

    Parameters

    • val: number

    Returns void

scaleZ

  • get (): number
  • set (val: number): void
  • Indicates the depth scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x, y and z property values, which are defined in whole pixels.

    Returns number

  • Indicates the depth scale(percentage) of an object as applied from the registration point of the object. The default registration point is(0,0). 1.0 is 100% scale.

    Scaling the local coordinate system changes the x, y and z property values, which are defined in whole pixels.

    Parameters

    • val: number

    Returns void

scene

scenePosition

  • get (): Vector3D

selectionBeginIndex

  • get (): number
  • The zero-based character index value of the first character in the current selection. For example, the first character is 0, the second character is 1, and so on. If no text is selected, this property is the value of caretIndex.

    Returns number

selectionEndIndex

  • get (): number
  • The zero-based character index value of the last character in the current selection. For example, the first character is 0, the second character is 1, and so on. If no text is selected, this property is the value of caretIndex.

    Returns number

shaderPickingDetails

  • get (): boolean

skewX

  • get (): number
  • set (val: number): void
  • Indicates the horizontal skew(angle) of the object as applied from the registration point. The default registration point is(0,0).

    Returns number

  • Indicates the horizontal skew(angle) of the object as applied from the registration point. The default registration point is(0,0).

    Parameters

    • val: number

    Returns void

skewY

  • get (): number
  • set (val: number): void
  • Indicates the vertical skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Returns number

  • Indicates the vertical skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Parameters

    • val: number

    Returns void

skewZ

  • get (): number
  • set (val: number): void
  • Indicates the depth skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Returns number

  • Indicates the depth skew(angle) of an object as applied from the registration point of the object. The default registration point is(0,0).

    Parameters

    • val: number

    Returns void

style

  • get (): Style
  • set (value: Style): void
  • Returns Style

  • Parameters

    • value: Style

    Returns void

text

  • get (): string
  • set (value: string): void
  • A string that is the current text in the text field. Lines are separated by the carriage return character('\r', ASCII 13). This property contains unformatted text in the text field, without HTML tags.

    To get the text in HTML form, use the htmlText property.

    Returns string

  • A string that is the current text in the text field. Lines are separated by the carriage return character('\r', ASCII 13). This property contains unformatted text in the text field, without HTML tags.

    To get the text in HTML form, use the htmlText property.

    Parameters

    • value: string

    Returns void

textColor

  • get (): number
  • set (value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

textFormat

  • Returns TextFormat

  • Parameters

    Returns void

textHeight

  • get (): number
  • The width of the text in pixels.

    Returns number

textInteractionMode

  • The interaction mode property, Default value is TextInteractionMode.NORMAL. On mobile platforms, the normal mode implies that the text can be scrolled but not selected. One can switch to the selectable mode through the in-built context menu on the text field. On Desktop, the normal mode implies that the text is in scrollable as well as selection mode.

    Returns TextInteractionMode

textWidth

  • get (): number
  • The width of the text in pixels.

    Returns number

transform

  • get (): Transform
  • An object with properties pertaining to a display object's matrix, color transform, and pixel bounds. The specific properties - matrix, colorTransform, and three read-only properties (concatenatedMatrix, concatenatedColorTransform, and pixelBounds) - are described in the entry for the Transform class.

    Each of the transform object's properties is itself an object. This concept is important because the only way to set new values for the matrix or colorTransform objects is to create a new object and copy that object into the transform.matrix or transform.colorTransform property.

    For example, to increase the tx value of a display object's matrix, you must make a copy of the entire matrix object, then copy the new object into the matrix property of the transform object:

     public myMatrix:Matrix =
    myDisplayObject.transform.matrix; myMatrix.tx += 10;
    myDisplayObject.transform.matrix = myMatrix; 

    You cannot directly set the tx property. The following code has no effect on myDisplayObject:

     myDisplayObject.transform.matrix.tx +=
    10; 

    You can also copy an entire transform object and assign it to another display object's transform property. For example, the following code copies the entire transform object from myOldDisplayObj to myNewDisplayObj:

    myNewDisplayObj.transform = myOldDisplayObj.transform;

    The resulting display object, myNewDisplayObj, now has the same values for its matrix, color transform, and pixel bounds as the old display object, myOldDisplayObj.

    Note that AIR for TV devices use hardware acceleration, if it is available, for color transforms.

    Returns Transform

traverseName

  • get (): string

visible

  • get (): boolean
  • set (value: boolean): void
  • Whether or not the display object is visible. Display objects that are not visible are disabled. For example, if visible=false for an InteractiveObject instance, it cannot be clicked.

    Returns boolean

  • Whether or not the display object is visible. Display objects that are not visible are disabled. For example, if visible=false for an InteractiveObject instance, it cannot be clicked.

    Parameters

    • value: boolean

    Returns void

width

  • get (): number
  • set (val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

wordWrap

  • get (): boolean
  • set (val: boolean): void
  • The width of the text in pixels.

    Returns boolean

  • The width of the text in pixels.

    Parameters

    • val: boolean

    Returns void

x

  • get (): number
  • set (val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

y

  • get (): number
  • set (val: number): void
  • Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's children inherit a coordinate system that is rotated 90° counterclockwise. The object's coordinates refer to the registration point position.

    Returns number

  • Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's children inherit a coordinate system that is rotated 90° counterclockwise. The object's coordinates refer to the registration point position.

    Parameters

    • val: number

    Returns void

z

  • get (): number
  • set (val: number): void
  • Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container. The z property is used for 3D coordinates, not screen or pixel coordinates.

    When you set a z property for a display object to something other than the default value of 0, a corresponding Matrix3D object is automatically created. for adjusting a display object's position and orientation in three dimensions. When working with the z-axis, the existing behavior of x and y properties changes from screen or pixel coordinates to positions relative to the 3D parent container.

    For example, a child of the _root at position x = 100, y = 100, z = 200 is not drawn at pixel location(100,100). The child is drawn wherever the 3D projection calculation puts it. The calculation is:

    (xcameraFocalLength/cameraRelativeZPosition, ycameraFocalLength/cameraRelativeZPosition)

    Returns number

  • Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container. The z property is used for 3D coordinates, not screen or pixel coordinates.

    When you set a z property for a display object to something other than the default value of 0, a corresponding Matrix3D object is automatically created. for adjusting a display object's position and orientation in three dimensions. When working with the z-axis, the existing behavior of x and y properties changes from screen or pixel coordinates to positions relative to the 3D parent container.

    For example, a child of the _root at position x = 100, y = 100, z = 200 is not drawn at pixel location(100,100). The child is drawn wherever the 3D projection calculation puts it. The calculation is:

    (xcameraFocalLength/cameraRelativeZPosition, ycameraFocalLength/cameraRelativeZPosition)

    Parameters

    • val: number

    Returns void

Generated using TypeDoc