Packagefeathers.themes
Interfacepublic interface IAsyncTheme extends IFeathersEventDispatcher
Implementors MetalWorksDesktopThemeWithAssetManager, MetalWorksMobileThemeWithAssetManager

Product Version : Feathers 2.3.0

A theme that uses an asynchronous loading mechanism (such as the Starling AssetManager), during initialization to load textures and other assets. This type of theme may not be ready to style components immediately, and it will dispatch Event.COMPLETE once the it has fully initialized. Attempting to create Feathers components before the theme has dispatched Event.COMPLETE may result in no skins or even runtime errors.



Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function):void
Adds a listener for an event type.
IFeathersEventDispatcher
 Inherited
dispatchEvent(event:Event):void
Dispatches an event to all listeners added for the specified event type.
IFeathersEventDispatcher
 Inherited
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event from the pool with the specified to all listeners for the specified event type.
IFeathersEventDispatcher
 Inherited
hasEventListener(type:String, listener:Function = null):Boolean
Checks if a listener has been added for the specified event type.
IFeathersEventDispatcher
  
Indicates if the assets have been loaded and the theme has been initialized for a specific Starling instance.
IAsyncTheme
 Inherited
removeEventListener(type:String, listener:Function):void
Removes a listener for an event type.
IFeathersEventDispatcher
 Inherited
removeEventListeners(type:String = null):void
Removes all listeners for an event type.
IFeathersEventDispatcher
Events
 Event Summary Defined By
  Dispatched when the theme's assets are loaded, and the theme has initialized.IAsyncTheme
Method Detail
isCompleteForStarling()method
public function isCompleteForStarling(starling:Starling):Boolean

Indicates if the assets have been loaded and the theme has been initialized for a specific Starling instance.

Parameters

starling:Starling

Returns
Boolean

See also

Event Detail
complete Event
Event Object Type: starling.events.Event
Event.type property = starling.events.Event.COMPLETE

Dispatched when the theme's assets are loaded, and the theme has initialized. Feathers component cannot be skinned automatically by the theme until this event is dispatched.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
dataThe Starling instance that is associated with the assets that have finished loading.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

Event type that may be used whenever something finishes.

See also