Package | feathers.themes |
Class | public class MetalWorksDesktopThemeWithAssetManager |
Inheritance | MetalWorksDesktopThemeWithAssetManager ![]() ![]() ![]() ![]() |
Implements | IAsyncTheme |
This version of the theme requires loading assets at runtime. To use
embedded assets, see MetalWorksDesktopTheme
instead.
To use this theme, the following files must be included when packaging your app:
See also
Method | Defined By | ||
---|---|---|---|
MetalWorksDesktopThemeWithAssetManager(assetsBasePath:String = ./, assetManager:AssetManager = null)
Constructor. | MetalWorksDesktopThemeWithAssetManager | ||
![]() | addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | |
![]() | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | |
![]() | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | |
![]() | dispose():void [override]
Disposes the texture atlas before calling super.dispose()
| BaseMetalWorksDesktopTheme | |
![]() |
Returns a StyleNameFunctionStyleProvider to be passed to
the specified class. | StyleNameFunctionTheme | |
![]() | hasEventListener(type:String, listener:Function = null):Boolean If called with one argument, figures out if there are any listeners registered for
the given event type. | EventDispatcher | |
isCompleteForStarling(starling:Starling):Boolean
Indicates if the assets have been loaded and the theme has been
initialized for a specific Starling instance. | MetalWorksDesktopThemeWithAssetManager | ||
![]() | removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | |
![]() | removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
Event type that may be used whenever something finishes. | MetalWorksDesktopThemeWithAssetManager | |||
Dispatched when the theme's assets fail to load due to an IO error. | MetalWorksDesktopThemeWithAssetManager | |||
Dispatched when the theme's assets fail to load due to a parsing error. | MetalWorksDesktopThemeWithAssetManager | |||
Dispatched when the theme's assets fail to load due to a security error. | MetalWorksDesktopThemeWithAssetManager |
MetalWorksDesktopThemeWithAssetManager | () | Constructor |
public function MetalWorksDesktopThemeWithAssetManager(assetsBasePath:String = ./, assetManager:AssetManager = null)
Constructor.
ParametersassetsBasePath:String (default = ./ ) — The root folder of the assets.
| |
assetManager:AssetManager (default = null ) — An optional pre-created AssetManager. The scaleFactor property must be equal to Starling.contentScaleFactor. To load assets with a different scale factor, use multiple AssetManager instances.
|
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 |
Boolean |
complete | Event |
starling.events.Event
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:
Property | Value |
---|---|
bubbles | false |
currentTarget | The 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 . |
data | The Starling instance that
is associated with the assets that have finished loading. |
target | The 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.
ioError | Event |
starling.events.Event
starling.events.Event.IO_ERROR
Dispatched when the theme's assets fail to load due to an IO error.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The 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 . |
data | The URL that could not be loaded. |
target | The 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. |
parseError | Event |
starling.events.Event
starling.events.Event.PARSE_ERROR
Dispatched when the theme's assets fail to load due to a parsing error.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The 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 . |
data | The name of the asset that could not be parsed. |
target | The 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. |
securityError | Event |
starling.events.Event
starling.events.Event.SECURITY_ERROR
Dispatched when the theme's assets fail to load due to a security error.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
currentTarget | The 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 . |
data | The URL that could not be loaded. |
target | The 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. |