| Package | com.gaiaframework.api |
| Interface | public interface IAsset extends flash.events.IEventDispatcher |
| Subinterfaces | IByteArray, IDisplayObject, IJson, INetStream, ISound, IStyleSheet, IText, IXml |
See also
| Property | Defined by | ||
|---|---|---|---|
| bytes : int [read-only]
Returns the bytes attribute value set in the
site.xml for byte-accurate preloading. | IAsset | ||
| id : String [read-only]
Returns the ID as set in
site.xml. | IAsset | ||
| node : XML [read-only]
Returns the raw XML node of the asset
| IAsset | ||
| order : int [read-only]
Returns the load order and position of the asset relative to other assets of the page.
| IAsset | ||
| percentLoaded : Number [read-only]
Returns the bytesLoaded / bytesTotal.
| IAsset | ||
| preloadAsset : Boolean
Specifies a value of
true if the asset is set to preload, or false if it is on-demand. | IAsset | ||
| showProgress : Boolean
Specifies whether the asset will cause the asset preloader to appear when loaded on-demand.
| IAsset | ||
| src : String
Returns the source path of the asset.
| IAsset | ||
| title : String
Specifies the title of the asset.
| IAsset | ||
| Method | Defined by | ||
|---|---|---|---|
|
abort():void
Used to manually abort an on-demand asset load.
| IAsset | ||
|
getBytesLoaded():int
Returns the loaded bytes of the file.
| IAsset | ||
|
getBytesTotal():int
Returns the total bytes of the file.
| IAsset | ||
|
load(... args):void
Used to load assets on-demand.
| IAsset | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the asset is finished loading. | IAsset | |||
| bytes | property |
bytes:int [read-only]
Returns the bytes attribute value set in the site.xml for byte-accurate preloading.
public function get bytes():int
| id | property |
id:String [read-only]
Returns the ID as set in site.xml. Assets need unique IDs per page and the IDs cannot be a reserved property or function name of MovieClip objects. The ID must be alphanumeric (no hyphens or underscores), and must start with a letter, not a number.
public function get id():String
| node | property |
node:XML [read-only]Returns the raw XML node of the asset
Implementation public function get node():XML
| order | property |
order:int [read-only]Returns the load order and position of the asset relative to other assets of the page. SEOAssets are always 0.
Implementation public function get order():int
| percentLoaded | property |
percentLoaded:Number [read-only]Returns the bytesLoaded / bytesTotal.
Implementation public function get percentLoaded():Number
| preloadAsset | property |
preloadAsset:Boolean [read-write]
Specifies a value of true if the asset is set to preload, or false if it is on-demand.
public function get preloadAsset():Boolean
public function set preloadAsset(value:Boolean):void
| showProgress | property |
showProgress:Boolean [read-write]
Specifies whether the asset will cause the asset preloader to appear when loaded on-demand. true if the asset will show the asset preloader (default), false if not. In the site.xml, this property is represented with the progress attribute.
public function get showProgress():Boolean
public function set showProgress(value:Boolean):void
| src | property |
src:String [read-write]Returns the source path of the asset.
Implementation public function get src():String
public function set src(value:String):void
| title | property |
title:String [read-write]Specifies the title of the asset.
Implementation public function get title():String
public function set title(value:String):void
| abort | () | method |
public function abort():voidUsed to manually abort an on-demand asset load.
| getBytesLoaded | () | method |
public function getBytesLoaded():intReturns the loaded bytes of the file.
Returnsint |
| getBytesTotal | () | method |
public function getBytesTotal():intReturns the total bytes of the file.
Returnsint |
| load | () | method |
public function load(... args):voidUsed to load assets on-demand. Sound and NetStream assets will start playing immediately. The args are for internal Gaia use only.
Parameters... args |
| assetComplete | event |
com.gaiaframework.events.AssetEvent
Dispatched when the asset is finished loading. Used with on-demand assets.
The target or asset property