Packagecom.gaiaframework.events
Classpublic class AssetEvent
InheritanceAssetEvent Inheritance flash.events.Event

The AssetEvent is used by the IPreloader and is also used to listen for when on-demand assets are finished loading.

See also

AssetEvent Documentation


Public Properties
 PropertyDefined by
  asset : IAsset
This is a reference to the asset (pages are a type of asset) that is currently loading.
AssetEvent
  bytes : Boolean
If the total bytes of all files are set in the xml, this flag lets you know the loaded and total properties are bytes.
AssetEvent
  loaded : int
If bytes is true, this is the number of bytes loaded so far.
AssetEvent
  perc : Number
This is the overall percentage of the load for the entire branch, which is a floating point number from 0 to 1.
AssetEvent
  total : int
If bytes is true, this is the total number of bytes of all files loading.
AssetEvent
Public Constants
 ConstantDefined by
  ASSET_COMPLETE : String = "assetComplete"
[static] This event type is dispatched when loading on-demand assets and you need to know when they're finished loading.
AssetEvent
Property detail
assetproperty
public var asset:IAsset

This is a reference to the asset (pages are a type of asset) that is currently loading. In the default template, this information is used by the preloader to show the current asset being loaded and its individual progress.

bytesproperty 
public var bytes:Boolean

If the total bytes of all files are set in the xml, this flag lets you know the loaded and total properties are bytes.

loadedproperty 
public var loaded:int

If bytes is true, this is the number of bytes loaded so far. If not, this is the count of the current page or asset in the branch that is loading.

percproperty 
public var perc:Number

This is the overall percentage of the load for the entire branch, which is a floating point number from 0 to 1.

totalproperty 
public var total:int

If bytes is true, this is the total number of bytes of all files loading. Otherwise, this is the total number of pages and/or assets in the branch that are loading.

Constant detail
ASSET_COMPLETEconstant
public static const ASSET_COMPLETE:String = "assetComplete"

This event type is dispatched when loading on-demand assets and you need to know when they're finished loading.