Callout

public class
feathers.controls.Callout

Description

A pop-up container that points at (or calls out) a specific region of the application (typically a specific control that triggered it).

In general, a Callout isn't instantiated directly. Instead, you will typically call the static function Callout.show(). This is not required, but it result in less code and no need to manually manage calls to the PopUpManager.

In the following example, a callout displaying a Label is shown when a Button is triggered:

button.addEventListener( Event.TRIGGERED, button_triggeredHandler );

function button_triggeredHandler( event:Event ):void {
    var label:Label = new Label();
    label.text = "Hello World!";
    var button:Button = Button( event.currentTarget );
    Callout.show( label, button );
}

See also:
http://wiki.starling-framework.org/feathers/callout

API overview

Constructor

Callout ()
Constructor.

Attributes

Public attributes

arrowOffset: Number

The offset, in pixels, of the arrow skin from the horizontal center or vertical middle of the background skin, depending on the position of the arrow (which side it is on)

arrowPosition: String

The position of the callout's arrow relative to the callout's background

backgroundSkin: DisplayObject

The primary background to display

bottomArrowGap: Number

The space, in pixels, between the bottom arrow skin and the background skin

bottomArrowSkin: DisplayObject

The arrow skin to display on the bottom edge of the callout

calloutFactory: Function static

Returns a new Callout instance when Callout.show() is called with isModal set to true

calloutOverlayFactory: Function static

Returns an overlay to display with a callout that is modal

closeOnKeys: Vector.<Number>

The callout will be closed if any of these keys are pressed

closeOnTouchBeganOutside: Boolean

Determines if the callout is automatically closed if a touch in the TouchPhase.BEGAN phase happens outside of the callout's bounds

closeOnTouchEndedOutside: Boolean

Determines if the callout is automatically closed if a touch in the TouchPhase.ENDED phase happens outside of the callout's bounds

content: DisplayObject

The display object that will be presented by the callout

disposeContent: Boolean

Determines if the callout's content will be disposed when the callout is disposed

disposeOnSelfClose: Boolean

Determines if the callout will be disposed when close() is called internally

leftArrowGap: Number

The space, in pixels, between the right arrow skin and the background skin

leftArrowSkin: DisplayObject

The arrow skin to display on the left edge of the callout

origin: DisplayObject

A callout may be positioned relative to another display object, known as the callout's origin

padding: Number

Quickly sets all padding properties to the same value

paddingBottom: Number

The minimum space, in pixels, between the callout's bottom edge and the callout's content

paddingLeft: Number

The minimum space, in pixels, between the callout's left edge and the callout's content

paddingRight: Number

The minimum space, in pixels, between the callout's right edge and the callout's content

paddingTop: Number

The minimum space, in pixels, between the callout's top edge and the callout's content

rightArrowGap: Number

The space, in pixels, between the right arrow skin and the background skin

rightArrowSkin: DisplayObject

The arrow skin to display on the right edge of the callout

stagePaddingBottom: Number static

The padding between a callout and the bottom edge of the stage when the callout is positioned automatically

stagePaddingLeft: Number static

The margin between a callout and the top edge of the stage when the callout is positioned automatically

stagePaddingRight: Number static

The padding between a callout and the right edge of the stage when the callout is positioned automatically

stagePaddingTop: Number static

The padding between a callout and the top edge of the stage when the callout is positioned automatically

supportedDirections: String

The directions that the callout may be positioned, relative to its origin

topArrowGap: Number

The space, in pixels, between the top arrow skin and the background skin

topArrowSkin: DisplayObject

The arrow skin to display on the top edge of the callout

Protected attributes

Constants

Constants

ARROW_POSITION_BOTTOM: String static

The arrow will appear on the bottom side of the callout

ARROW_POSITION_LEFT: String static

The arrow will appear on the left side of the callout

ARROW_POSITION_RIGHT: String static

The arrow will appear on the right side of the callout

ARROW_POSITION_TOP: String static

The arrow will appear on the top side of the callout

DIRECTION_ANY: String static

The callout may be positioned on any side of the origin region

DIRECTION_DOWN: String static

The callout must be positioned below the origin region

DIRECTION_HORIZONTAL: String static

The callout may be positioned on top or bottom of the origin region

DIRECTION_LEFT: String static

The callout must be positioned to the left side of the origin region

DIRECTION_RIGHT: String static

The callout must be positioned to the right side of the origin region

DIRECTION_UP: String static

The callout must be positioned above the origin region

DIRECTION_VERTICAL: String static

The callout may be positioned on top or bottom of the origin region

Functions

Public functions

close ( dispose: Boolean = false ): Void

Closes the callout

defaultCalloutFactory (): Callout static

The default factory that creates callouts when Callout.show() is called

show ( content: DisplayObject , origin: DisplayObject , supportedDirections: String = , isModal: Boolean = true , customCalloutFactory: Function = null ): Callout static

Creates a callout, and then positions and sizes it automatically based on an origin rectangle and the specified direction relative to the original

Protected functions

Constructor

Callout ()

Constructor.

Attributes

alpha: Number
Inherited from DisplayObject

The opacity of the object, 0 = transparent, 1 = opaque.

arrowOffset: Number

The offset, in pixels, of the arrow skin from the horizontal center or vertical middle of the background skin, depending on the position of the arrow (which side it is on). This value is used to point at the callout's origin when the callout is not perfectly centered relative to the origin.

On the top and bottom edges, the arrow will move left for negative values of arrowOffset and right for positive values. On the left and right edges, the arrow will move up for negative values and down for positive values.

If you use Callout.show() or set the origin property manually, you should avoid manually modifying the arrowPosition and arrowOffset properties.

In the following example, the arrow offset is set to 20 pixels:

callout.arrowOffset = 20;

See also:
#arrowPosition
#origin

arrowPosition: String

The position of the callout's arrow relative to the callout's background. If the callout's origin is set, this value will be managed by the callout and may change automatically if the origin moves to a new position or if the stage resizes.

The supportedDirections property is related to this one, but they have different meanings and are usually opposites. For example, a callout on the right side of its origin will generally display its left arrow.

If you use Callout.show() or set the origin property manually, you should avoid manually modifying the arrowPosition and arrowOffset properties.

In the following example, the callout's arrow is positioned on the left side:

callout.arrowPosition = Callout.ARROW_POSITION_LEFT;

See also:
#origin
#supportedDirections
#arrowOffset

backgroundSkin: DisplayObject

The primary background to display.

In the following example, the callout's background is set to an image:

callout.backgroundSkin = new Image( texture );

base: DisplayObject
Inherited from DisplayObject

read-only

The topmost object in the display tree the object is part of.

blendEnabled: Boolean
Inherited from DisplayObject

Enables or disables blending. If set to false, there will be no blending and there may be performance gains.

blendMode: BlendMode
Inherited from DisplayObject
The default value is BlendMode.AUTO

The blend mode determines how the object is blended with the objects underneath.

See also:
loom2d.display.BlendMode

bottomArrowGap: Number

The space, in pixels, between the bottom arrow skin and the background skin. To have the arrow overlap the background, you may use a negative gap value.

In the following example, the gap between the callout and its bottom arrow is set to -4 pixels (perhaps to hide a border on the callout's background):

callout.bottomArrowGap = -4;

bottomArrowSkin: DisplayObject

The arrow skin to display on the bottom edge of the callout. This arrow is displayed when the callout is displayed above the region it points at.

In the following example, the callout's bottom arrow skin is set to an image:

callout.bottomArrowSkin = new Image( texture );

bounds: Rectangle
Inherited from DisplayObject

read-only

The bounds of the object relative to the local coordinates of the parent.

cacheAsBitmap: Boolean
Inherited from DisplayObject

If true, the untransformed contents get cached into a texture at render time. The contents remain static until you turn off caching or use invalidateBitmapCache to update the cache manually.

calloutFactory: Function

static

Returns a new Callout instance when Callout.show() is called with isModal set to true. If one wishes to skin the callout manually, a custom factory may be provided.

This function is expected to have the following signature:

function():Callout

The following example shows how to create a custom callout factory:

Callout.calloutFactory = function():Callout {
    var callout:Callout = new Callout();
    //set properties here!
    return callout;
};

See also:
#show()

calloutOverlayFactory: Function

static

Returns an overlay to display with a callout that is modal. Uses the standard overlayFactory of the PopUpManager by default, but you can use this property to provide your own custom overlay, if you prefer.

This function is expected to have the following signature:

function():DisplayObject

The following example uses a semi-transparent Quad as a custom overlay:

Callout.calloutOverlayFactory = function():Quad {
    var quad:Quad = new Quad(10, 10, 0x000000);
    quad.alpha = 0.75;
    return quad;
};

See also:
feathers.core.PopUpManager#overlayFactory

#show()

clipRect: Rectangle
Inherited from Sprite

closeOnKeys: Vector.<Number>

The callout will be closed if any of these keys are pressed.

In the following example, the callout close when the Escape key is pressed:

callout.closeOnKeys = new &lt;uint&gt;[Keyboard.ESCAPE];

See also:
#closeOnTouchBeganOutside
#closeOnTouchEndedOutside

closeOnTouchBeganOutside: Boolean

Determines if the callout is automatically closed if a touch in the TouchPhase.BEGAN phase happens outside of the callout's bounds.

In the following example, the callout will not close when a touch event with TouchPhase.BEGAN is detected outside the callout's (or its origin's) bounds:

callout.closeOnTouchBeganOutside = false;

See also:
#closeOnTouchEndedOutside
#closeOnKeys

closeOnTouchEndedOutside: Boolean

Determines if the callout is automatically closed if a touch in the TouchPhase.ENDED phase happens outside of the callout's bounds.

In the following example, the callout will not close when a touch event with TouchPhase.ENDED is detected outside the callout's (or its origin's) bounds:

callout.closeOnTouchEndedOutside = false;

See also:
#closeOnTouchBeganOutside
#closeOnKeys

content: DisplayObject

The display object that will be presented by the callout. This object may be resized to fit the callout's bounds. If the content needs to be scrolled if placed into a smaller region than its ideal size, it must provide its own scrolling capabilities because the callout does not offer scrolling.

In the following example, the callout's content is an image:

callout.content = new Image( texture );

defaultTextEditorFactory: Function
Inherited from FeathersControl

static

A function used by all UI controls that support text editor to create an ITextEditor instance. You may replace the default function with your own, if you prefer not to use the StageTextTextEditor.

The function is expected to have the following signature: function():ITextEditor

See also:
http://wiki.starling-framework.org/feathers/text-editors
feathers.core.ITextEditor

defaultTextRendererFactory: Function
Inherited from FeathersControl

static

A function used by all UI controls that support text renderers to create an ITextRenderer instance. You may replace the default function with your own, if you prefer not to use the BitmapFontTextRenderer.

The function is expected to have the following signature: function():ITextRenderer

See also:
http://wiki.starling-framework.org/feathers/text-renderers
feathers.core.ITextRenderer

depth: Number
Inherited from DisplayObject

If depthSort is enabled on parent, this will be used to establish draw order. Higher values are drawn closer. Matching values have undefined order.

depthSort: Boolean
Inherited from DisplayObjectContainer

If depth sorting enabled, direct children will use their depth property to establish draw order.

disposeContent: Boolean

Determines if the callout's content will be disposed when the callout is disposed. If set to false, the callout's content may be added to the display list again later.

In the following example, the callout's content will not be disposed when the callout is disposed:

callout.disposeContent = false;

disposeOnSelfClose: Boolean

Determines if the callout will be disposed when close() is called internally. Close may be called internally in a variety of cases, depending on values such as closeOnTouchBeganOutside, closeOnTouchEndedOutside, and closeOnKeys. If set to false, you may reuse the callout later by giving it a new origin and adding it to the PopUpManager again.

In the following example, the callout will not be disposed when it closes itself:

callout.disposeOnSelfClose = false;

See also:
#closeOnTouchBeganOutside
#closeOnTouchEndedOutside
#closeOnKeys
#close()

focusIndicatorSkin: DisplayObject
Inherited from FeathersControl

If this component supports focus, this optional skin will be displayed above the component when showFocus() is called. The focus indicator skin is not always displayed when the component has focus. Typically, if the component receives focus from a touch, the focus indicator is not displayed.

The touchable of this skin will always be set to false so that it does not "steal" touches from the component or its sub-components. This skin will not affect the dimensions of the component or its hit area. It is simply a visual indicator of focus.

focusManager: IFocusManager
Inherited from FeathersControl

The current focus manager for this component.

focusPadding: Number
Inherited from FeathersControl

Quickly sets all focus padding properties to the same value. The focusPadding getter always returns the value of focusPaddingTop, but the other focus padding values may be different.

The following example gives the button 2 pixels of focus padding on all sides:

object.padding = 2;

focusPaddingBottom: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's bottom edge and the bottom edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the bottom edge only:

button.focusPaddingBottom = -2;

focusPaddingLeft: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's left edge and the left edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the right edge only:

button.focusPaddingLeft = -2;

focusPaddingRight: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's right edge and the right edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the right edge only:

button.focusPaddingRight = -2;

focusPaddingTop: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's top edge and the top edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the top edge only:

button.focusPaddingTop = -2;

hasVisibleArea: Boolean
Inherited from DisplayObject

read-only

Indicates if an object occupies any visible area. (Which is the case when its 'alpha', 'scaleX' and 'scaleY' values are not zero, and its 'visible' property is enabled.)

height: Number
Inherited from DisplayObject

The height of the object in pixels.

ignoreHitTestAlpha: Boolean
Inherited from DisplayObject

This can be used if you wish to have a DisplayObject with zero alpha still respond to hit tests

includeInLayout: Boolean
Inherited from FeathersControl

Determines if the ILayout should use this object or ignore it.

isEnabled: Boolean
Inherited from FeathersControl

Indicates whether the control is interactive or not.

isFocusEnabled: Boolean
Inherited from FeathersControl

Determines if this component can receive focus.

isInitialized: Boolean
Inherited from FeathersControl

read-only

Determines if the component has been initialized yet. The initialize() function is called one time only, when the Feathers UI control is added to the display list for the first time.

isQuickHitAreaEnabled: Boolean
Inherited from FeathersControl

Similar to mouseChildren on the classic display list. If true, children cannot dispatch touch events, but hit tests will be much faster.

layoutData: ILayoutData
Inherited from FeathersControl

Extra parameters associated with this display object that will be used by the layout algorithm.

leftArrowGap: Number

The space, in pixels, between the right arrow skin and the background skin. To have the arrow overlap the background, you may use a negative gap value.

In the following example, the gap between the callout and its left arrow is set to -4 pixels (perhaps to hide a border on the callout's background):

callout.leftArrowGap = -4;

leftArrowSkin: DisplayObject

The arrow skin to display on the left edge of the callout. This arrow is displayed when the callout is displayed to the right of the region it points at.

In the following example, the callout's left arrow skin is set to an image:

callout.leftArrowSkin = new Image( texture );

maxHeight: Number
Inherited from FeathersControl

The maximum recommended height to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit height value that is larger than maxHeight may be set and will not be affected by the maximum.

maxWidth: Number
Inherited from FeathersControl

The maximum recommended width to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit width value that is larger than maxWidth may be set and will not be affected by the maximum.

minHeight: Number
Inherited from FeathersControl

The minimum recommended height to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit height value that is smaller than minHeight may be set and will not be affected by the minimum.

minTouchHeight: Number
Inherited from FeathersControl

If using isQuickHitAreaEnabled, and the hit area's height is smaller than this value, it will be expanded.

minTouchWidth: Number
Inherited from FeathersControl

If using isQuickHitAreaEnabled, and the hit area's width is smaller than this value, it will be expanded.

minWidth: Number
Inherited from FeathersControl

The minimum recommended width to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit width value that is smaller than minWidth may be set and will not be affected by the minimum.

name: String
Inherited from DisplayObject

The name of the display object (default: null). Used by 'getChildByName()' of display object containers.

nameList: TokenList
Inherited from FeathersControl

read-only

Contains a list of all "names" assigned to this control. Names are like classes in CSS selectors. They are a non-unique identifier that can differentiate multiple styles of the same type of UI control. A single control may have many names, and many controls can share a single name. Names may be added, removed, or toggled on the nameList.

See also:
#name

nextTabFocus: IFocusDisplayObject
Inherited from FeathersControl

The next object that will receive focus when the tab key is pressed. If null, defaults to the next child on the display list.

numChildren: Number
Inherited from DisplayObjectContainer

read-only

The number of children of this container.

origin: DisplayObject

A callout may be positioned relative to another display object, known as the callout's origin. Even if the position of the origin changes, the callout will reposition itself to always point at the origin.

When an origin is set, the arrowPosition and arrowOffset properties will be managed automatically by the callout. Setting either of these values manually with either have no effect or unexpected behavior, so it is recommended that you avoid modifying those properties.

In general, if you use Callout.show(), you will rarely need to manually manage the origin.

In the following example, the callout's origin is set to a button:

callout.origin = button;

See also:
#supportedDirections
#arrowPosition
#arrowOffset

padding: Number

Quickly sets all padding properties to the same value. The padding getter always returns the value of paddingTop, but the other padding values may be different.

In the following example, the padding of all sides of the callout is set to 20 pixels:

callout.padding = 20;

paddingBottom: Number

The minimum space, in pixels, between the callout's bottom edge and the callout's content.

In the following example, the padding on the bottom edge of the callout is set to 20 pixels:

callout.paddingBottom = 20;

paddingLeft: Number

The minimum space, in pixels, between the callout's left edge and the callout's content.

In the following example, the padding on the left edge of the callout is set to 20 pixels:

callout.paddingLeft = 20;

paddingRight: Number

The minimum space, in pixels, between the callout's right edge and the callout's content.

In the following example, the padding on the right edge of the callout is set to 20 pixels:

callout.paddingRight = 20;

paddingTop: Number

The minimum space, in pixels, between the callout's top edge and the callout's content.

In the following example, the padding on the top edge of the callout is set to 20 pixels:

callout.paddingTop = 20;

parent: DisplayObjectContainer
Inherited from DisplayObject

pivotX: Number
Inherited from DisplayObject

The x coordinate of the object's origin in its own coordinate space (default: 0).

pivotY: Number
Inherited from DisplayObject

The y coordinate of the object's origin in its own coordinate space (default: 0).

previousTabFocus: IFocusDisplayObject
Inherited from FeathersControl

The previous object that will receive focus when the tab key is pressed while holding shift. If null, defaults to the previous child on the display list.

rightArrowGap: Number

The space, in pixels, between the right arrow skin and the background skin. To have the arrow overlap the background, you may use a negative gap value.

In the following example, the gap between the callout and its right arrow is set to -4 pixels (perhaps to hide a border on the callout's background):

callout.rightArrowGap = -4;

rightArrowSkin: DisplayObject

The arrow skin to display on the right edge of the callout. This arrow is displayed when the callout is displayed to the left of the region it points at.

In the following example, the callout's right arrow skin is set to an image:

callout.rightArrowSkin = new Image( texture );

root: DisplayObject
Inherited from DisplayObject

read-only

The root object the display object is connected to (ie: an instance of the class that was passed to the Starling constructor), or null if the object is not connected to the stage.

rotation: Number
Inherited from DisplayObject

The rotation of the object in radians, (In Loom2D, all angles are measured in radians.)

scale: Number
Inherited from DisplayObject

General scale factor. '1' means no scale, negative values flip the object. Use this when setting scaleX/scaleY explicitly is too verbose.

scaleX: Number
Inherited from DisplayObject

The horizontal scale factor. '1' means no scale, negative values flip the object.

scaleY: Number
Inherited from DisplayObject

The vertical scale factor. '1' means no scale, negative values flip the object.

skewX: Number
Inherited from DisplayObject

The horizontal skew angle in radians.

skewY: Number
Inherited from DisplayObject

The vertical skew angle in radians.

stage: Stage
Inherited from DisplayObject

read-only

The stage the display object is connected to, or null if it is not connected to the stage.

stagePaddingBottom: Number

static

The padding between a callout and the bottom edge of the stage when the callout is positioned automatically. May be ignored if the callout is too big for the stage.

In the following example, the bottom stage padding will be set to 20 pixels:

Callout.stagePaddingBottom = 20;

stagePaddingLeft: Number

static

The margin between a callout and the top edge of the stage when the callout is positioned automatically. May be ignored if the callout is too big for the stage.

In the following example, the left stage padding will be set to 20 pixels:

Callout.stagePaddingLeft = 20;

stagePaddingRight: Number

static

The padding between a callout and the right edge of the stage when the callout is positioned automatically. May be ignored if the callout is too big for the stage.

In the following example, the right stage padding will be set to 20 pixels:

Callout.stagePaddingRight = 20;

stagePaddingTop: Number

static

The padding between a callout and the top edge of the stage when the callout is positioned automatically. May be ignored if the callout is too big for the stage.

In the following example, the top stage padding will be set to 20 pixels:

Callout.stagePaddingTop = 20;

styleName: String
Inherited from DisplayObject

The style name used by the CSS system.

supportedDirections: String

The directions that the callout may be positioned, relative to its origin. If the callout's origin is not set, this value will be ignored.

The arrowPosition property is related to this one, but they have different meanings and are usually opposites. For example, a callout on the right side of its origin will generally display its left arrow.

In the following example, the callout's supported directions are restricted to up and down:

callout.supportedDirections = Callout.DIRECTION_VERTICAL;

See also:
#origin
#DIRECTION_ANY
#DIRECTION_VERTICAL
#DIRECTION_HORIZONTAL
#DIRECTION_UP
#DIRECTION_DOWN
#DIRECTION_LEFT
#DIRECTION_RIGHT
#arrowPosition

topArrowGap: Number

The space, in pixels, between the top arrow skin and the background skin. To have the arrow overlap the background, you may use a negative gap value.

In the following example, the gap between the callout and its top arrow is set to -4 pixels (perhaps to hide a border on the callout's background):

callout.topArrowGap = -4;

topArrowSkin: DisplayObject

The arrow skin to display on the top edge of the callout. This arrow is displayed when the callout is displayed below the region it points at.

In the following example, the callout's top arrow skin is set to an image:

callout.topArrowSkin = new Image( texture );

touchable: Boolean
Inherited from DisplayObject

Indicates if this object (and its children) will receive touch events.

transformationMatrix: Matrix
Inherited from DisplayObject

The transformation matrix of the object relative to its parent.

If you assign a custom transformation matrix, Starling will try to figure out suitable values for x, y, scaleX, scaleY, and rotation. However, if the matrix was created in a different way, this might not be possible. In that case, Starling will apply the matrix, but not update the corresponding properties.

visible: Boolean
Inherited from DisplayObject

The visibility of the object, An invisible object will be untouchable.

width: Number
Inherited from DisplayObject

The width of the object in pixels.

x: Number
Inherited from DisplayObject

The x coordinate of the object relative to the local coordinates of the parent.

y: Number
Inherited from DisplayObject

The y coordinate of the object relative to the local coordinates of the parent.

Protected attributes

Constants

ARROW_POSITION_BOTTOM: String

static

The arrow will appear on the bottom side of the callout.

See also:
#arrowPosition

ARROW_POSITION_LEFT: String

static

The arrow will appear on the left side of the callout.

See also:
#arrowPosition

ARROW_POSITION_RIGHT: String

static

The arrow will appear on the right side of the callout.

See also:
#arrowPosition

ARROW_POSITION_TOP: String

static

The arrow will appear on the top side of the callout.

See also:
#arrowPosition

DIRECTION_ANY: String

static

The callout may be positioned on any side of the origin region.

See also:
#supportedDirections

DIRECTION_DOWN: String

static

The callout must be positioned below the origin region.

See also:
#supportedDirections

DIRECTION_HORIZONTAL: String

static

The callout may be positioned on top or bottom of the origin region.

See also:
#supportedDirections

DIRECTION_LEFT: String

static

The callout must be positioned to the left side of the origin region.

See also:
#supportedDirections

DIRECTION_RIGHT: String

static

The callout must be positioned to the right side of the origin region.

See also:
#supportedDirections

DIRECTION_UP: String

static

The callout must be positioned above the origin region.

See also:
#supportedDirections

DIRECTION_VERTICAL: String

static

The callout may be positioned on top or bottom of the origin region.

See also:
#supportedDirections

INVALIDATION_FLAG_ALL: String

static

Flag to indicate that everything is invalid and should be redrawn.

INVALIDATION_FLAG_DATA: String

static

Invalidation flag to indicate that the primary data displayed by the UI control has changed.

INVALIDATION_FLAG_FOCUS: String

static

Invalidation flag to indicate that the focus of the UI control has changed.

INVALIDATION_FLAG_LAYOUT: String

static

Invalidation flag to indicate that the layout of the UI control has changed.

INVALIDATION_FLAG_SCROLL: String

static

Invalidation flag to indicate that the scroll position of the UI control has changed.

INVALIDATION_FLAG_SELECTED: String

static

Invalidation flag to indicate that the selection of the UI control has changed.

INVALIDATION_FLAG_SIZE: String

static

Invalidation flag to indicate that the dimensions of the UI control have changed.

INVALIDATION_FLAG_SKIN: String

static

Invalidation flag to indicate that the skin of the UI control has changed.

INVALIDATION_FLAG_STATE: String

static

Invalidation flag to indicate that the state has changed. Used by isEnabled, but may be used for other control states too.

See also:
#isEnabled

INVALIDATION_FLAG_STYLES: String

static

Invalidation flag to indicate that the styles or visual appearance of the UI control has changed.

Functions

FeathersControl__ls_staticconstructor (): Void
Inherited from FeathersControl

static

Static constructor.



addChild ( child: DisplayObject , fireEvents: Boolean = true ): DisplayObject
Inherited from DisplayObjectContainer

Adds a child to the container. It will be at the frontmost position.

Parameters

child: DisplayObject
fireEvents: Boolean = true


addChildAt ( child: DisplayObject , index: Number , fireEvents: Boolean = true ): DisplayObject
Inherited from DisplayObjectContainer

Adds a child to the container at a certain index.

Parameters

child: DisplayObject
index: Number
fireEvents: Boolean = true


addEventListener ( type: String , listener: Function ): Void
Inherited from EventDispatcher

Registers an event listener at a certain object.

Parameters

type: String
listener: Function


addLMLChild ( id: String , child: Object ): Void
Inherited from DisplayObjectContainer

Add a child to this LML node, identifying it by id.

Parameters

id: String
child: Object


broadcastEvent ( event: Event ): Void
Inherited from DisplayObjectContainer

Dispatches an event on all children (recursively). The event must not bubble.

Parameters

event: Event


broadcastEventWith ( type: String , data: Object = null ): Void
Inherited from DisplayObjectContainer

Dispatches an event with the given parameters on all children (recursively). The method uses an internal pool of event objects to avoid allocations.

Parameters

type: String
data: Object = null


center (): Void
Inherited from DisplayObject

Center the DisplayObject's pivot point using the width and height. This centers this object about its own origin based on its width and height.



close ( dispose: Boolean = false ): Void

Closes the callout.

Parameters

dispose: Boolean = false


contains ( child: DisplayObject ): Boolean
Inherited from DisplayObjectContainer

Determines if a certain object is a child of the container (recursively).

Parameters

child: DisplayObject


defaultCalloutFactory (): Callout

static

The default factory that creates callouts when Callout.show() is called. To use a different factory, you need to set Callout.calloutFactory to a Function instance.



dispatchEvent ( event: Event ): Void
Inherited from EventDispatcher

Dispatches an event to all objects that have registered listeners for its type. If an event with enabled 'bubble' property is dispatched to a display object, it will travel up along the line of parents, until it either hits the root object or someone stops its propagation manually.

Parameters

event: Event


dispatchEventWith ( type: String , bubbles: Boolean = false , data: Object = null ): Void
Inherited from EventDispatcher

Dispatches an event with the given parameters to all objects that have registered listeners for the given type. The method uses an internal pool of event objects to avoid allocations.

Parameters

type: String
bubbles: Boolean = false
data: Object = null


dispose (): Void
Inherited from DisplayObject

Disposes all resources of the display object. GPU buffers are released, event listeners are removed, filters are disposed.



flatten (): Void
Inherited from Sprite



getBounds ( targetSpace: DisplayObject , resultRect: Rectangle = null ): Rectangle
Inherited from DisplayObject

Returns a rectangle that completely encloses the object as it appears in another coordinate system. If you pass a 'resultRectangle', the result will be stored in this rectangle instead of creating a new object.

Parameters

targetSpace: DisplayObject
resultRect: Rectangle = null


getChildAt ( index: Number ): DisplayObject
Inherited from DisplayObjectContainer

Returns a child object at a certain index.

Parameters

index: Number


getChildAtUnsafe ( index: Number ): DisplayObject
Inherited from DisplayObjectContainer

Returns a child object at a certain index without doing bounds checks. For optimized use in cases where you are 100% about the index validity.

Parameters

index: Number


getChildByName ( name: String ): DisplayObject
Inherited from DisplayObjectContainer

Returns a child object with a certain name (non-recursively).

Parameters

name: String


getChildIndex ( child: DisplayObject ): Number
Inherited from DisplayObjectContainer

Returns the index of a child within the container, or "-1" if it is not found.

Parameters

child: DisplayObject


getFullTypeName (): String
Inherited from Object

native

Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.


Returns

String fully qualified type name of the Object.

getTargetTransformationMatrix ( targetSpace: DisplayObject , resultMatrix: Matrix ): Void
Inherited from DisplayObject

native

Parameters

targetSpace: DisplayObject
resultMatrix: Matrix


getType (): Type
Inherited from Object

native

Gets the Type that describes the Object.


Returns

Type The Type that describes the object.

getTypeName (): String
Inherited from Object

native

Gets the type name of the Object.


Returns

String type name of the Object.

globalToLocal ( globalPoint: Point ): Point
Inherited from DisplayObject

Transforms a point from global (stage) coordinates to the local coordinate system.

Parameters

globalPoint: Point


hasEventListener ( type: String ): Boolean
Inherited from EventDispatcher

Returns if there are listeners registered for a certain event type.

Parameters

type: String


hideFocus (): Void
Inherited from FeathersControl

If the visual indicator of focus has been displayed by showFocus(), call this function to hide it.

Important: This function will not clear focus from the display object if it has focus. To clear focus from the display object, you should set the focus property on the focus manager to null or another display object.

See also:
#showFocus()
feathers.core.IFocusManager#focus



hitTest ( localPoint: Point , forTouch: Boolean = false ): DisplayObject
Inherited from DisplayObject

Returns the object that is found topmost beneath a point in local coordinates, or nil if the test fails. If "forTouch" is true, untouchable and invisible objects will cause the test to fail.

Parameters

localPoint: Point
forTouch: Boolean = false


initializeLMLNode ( id: String ): Void
Inherited from DisplayObject

Handle LML node initialization.

Parameters

id: String


invalidate ( flag: String = ): Void
Inherited from FeathersControl

Call this function to tell the UI control that a redraw is pending. The redraw will happen immediately before Starling renders the UI control to the screen. The validation system exists to ensure that multiple properties can be set together without redrawing multiple times in between each property change.

If you cannot wait until later for the validation to happen, you can call validate() to redraw immediately. As an example, you might want to validate immediately if you need to access the correct width or height values of the UI control, since these values are calculated during validation.

See also:
feathers.core.FeathersControl#validate()

Parameters

flag: String =


invalidateBitmapCache (): Void
Inherited from DisplayObject

native

Update the cached texture before the next render. This function has no effect if cacheAsBitmap is turned off.



isInvalid ( flag: String = null ): Boolean
Inherited from FeathersControl

Indicates whether the control is pending validation or not. By default, returns true if any invalidation flag has been set. If you pass in a specific flag, returns true only if that flag has been set (others may be set too, but it checks the specific flag only. If all flags have been marked as invalid, always returns true.

Parameters

flag: String = null


localToGlobal ( localPoint: Point ): Point
Inherited from DisplayObject

Transforms a point from the local coordinate system to global (stage) coordinates.

Parameters

localPoint: Point


moveChildLast ( child: DisplayObject ): Void
Inherited from DisplayObjectContainer

Moves a child to be the last object in the container.

Parameters

child: DisplayObject


preinitializeLMLNode ( id: String ): Void
Inherited from DisplayObject

Pre-initialize the LML node.

Parameters

id: String


removeChild ( child: DisplayObject , dispose: Boolean = false , fireEvents: Boolean = true ): DisplayObject
Inherited from DisplayObjectContainer

Removes a child from the container. If the object is not a child, nothing happens. If requested, the child will be disposed right away.

Parameters

child: DisplayObject
dispose: Boolean = false
fireEvents: Boolean = true


removeChildAt ( index: Number , dispose: Boolean = false , fireEvents: Boolean = true ): DisplayObject
Inherited from DisplayObjectContainer

Removes a child at a certain index. Children above the child will move down. If requested, the child will be disposed right away.

Parameters

index: Number
dispose: Boolean = false
fireEvents: Boolean = true


removeChildren ( beginIndex: Number = 0 , endIndex: Number = , dispose: Boolean = false ): Void
Inherited from DisplayObjectContainer

Removes a range of children from the container (endIndex included). If no arguments are given, all children will be removed.

Parameters

beginIndex: Number = 0
endIndex: Number =
dispose: Boolean = false


removeEventListener ( type: String , listener: Function ): Void
Inherited from EventDispatcher

Removes an event listener from the object.

Parameters

type: String
listener: Function


removeEventListeners ( type: String = null ): Void
Inherited from EventDispatcher

Removes all event listeners with a certain type, or all of them if type is null. Be careful when removing all event listeners: you never know who else was listening.

Parameters

type: String = null


removeFromParent ( dispose: Boolean = false ): Void
Inherited from DisplayObject

Removes the object from its parent, if it has one.

Parameters

dispose: Boolean = false


removeLMLChildren (): Void
Inherited from DisplayObjectContainer

Remove (and destroy) all LML children from this node.



setChildIndex ( child: DisplayObject , index: Number ): Void
Inherited from DisplayObjectContainer

Moves a child to a certain index. Children at and after the replaced position move up.

Parameters

child: DisplayObject
index: Number


setChildrenUnsafe ( ordered: Vector.<DisplayObject> ): Void
Inherited from DisplayObjectContainer

Parameters

ordered: Vector.<DisplayObject>


setSize ( width: Number , height: Number ): Void
Inherited from FeathersControl

Sets both the width and the height of the control.

Parameters

width: Number
height: Number


show ( content: DisplayObject , origin: DisplayObject , supportedDirections: String = , isModal: Boolean = true , customCalloutFactory: Function = null ): Callout

static

Creates a callout, and then positions and sizes it automatically based on an origin rectangle and the specified direction relative to the original. The provided width and height values are optional, and these values may be ignored if the callout cannot be drawn at the specified dimensions.

In the following example, a callout displaying a Label is shown when a Button is triggered:

button.addEventListener( Event.TRIGGERED, button_triggeredHandler );

function button_triggeredHandler( event:Event ):void {
    var label:Label = new Label();
    label.text = "Hello World!";
    var button:Button = Button( event.currentTarget );
    Callout.show( label, button );
}

Parameters

content: DisplayObject
origin: DisplayObject
supportedDirections: String =
isModal: Boolean = true
customCalloutFactory: Function = null


showFocus (): Void
Inherited from FeathersControl

If the object has focus, an additional visual indicator may optionally be displayed to highlight the object. Calling this function may have no effect. It's merely a suggestion to the object.

Important: This function will not give focus to the display object if it doesn't have focus. To give focus to the display object, you should set the focus property on the focus manager.

object.focusManager.focus = object;

See also:
#hideFocus()
feathers.core.IFocusManager#focus



sortChildren ( compareFunction: Function ): Void
Inherited from DisplayObjectContainer

Sorts the children according to a given function (that works just like the sort function of the Vector class).

Parameters

compareFunction: Function


swapChildren ( child1: DisplayObject , child2: DisplayObject ): Void
Inherited from DisplayObjectContainer

Swaps the indexes of two children.

Parameters

child1: DisplayObject
child2: DisplayObject


swapChildrenAt ( index1: Number , index2: Number ): Void
Inherited from DisplayObjectContainer

Swaps the indexes of two children.

Parameters

index1: Number
index2: Number


toString (): String
Inherited from Object

native

Returns a String that describes the Object. This can be overriden to provide extra details when printing objects using trace().


Returns

String String that described the Object.

unflatten (): Void
Inherited from Sprite



Protected functions

: