Events Package
From Gaia Framework Wiki
Contents |
Overview
com.gaiaframework.events
The events package in Gaia contains 5 events, two are internal and the other three you might need to receive.
AssetEvent
AssetEvent is the event that is used to track an asset's loading and complete process.
Additionally, it has two types, only one of which you need to listen for when an on-demand asset is finished loading, AssetEvent.ASSET_COMPLETE.
perc
perc:Number
This is the overall percentage of the load for the entire branch, which is a floating point number from 0 to 1.
asset
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.
bytes
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.
loaded
loaded:Number
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.
total
total:Number
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.
GaiaEvent
When a goto occurs, GaiaEvent is passed to any Gaia event listener or hijacker. It has five properties and more information about these can be found in the Events and Hijacking documentation.
validBranch
validBranch:String
The valid branch of the goto - a vaild branch is a branch that exists in the site.xml
fullBranch
fullBranch:String
The full branch is a valid branch plus any deep link outside the scope of the valid branch
external
external:Boolean
If the page is external, this will be true. Only beforeGoto would ever have this as true.
src
src:String
The src of the page that is loading, external or internal
flow
flow:String
If there is a flow override on the goto event, it is passed here
PageEvent
When a transition in or transition out occurs on a page, these events will fire. There are no properties, but there are two types that you may use, both of which are dispatched in the AbstractPage. More information can be found in the Pages and Templates Package documentation.
TRANSITION_OUT
PageEvent.TRANSITION_OUT
TRANSITION_IN
PageEvent.TRANSITION_IN
GaiaSWFAddressEvent
When a deeplink event occurs, Pages receive this in their onDeeplink event listener automatically, or you can receive this via a custom deeplink listener. It has two properties you can use. More information about this can be found in the Pages documentation.
deeplink
deeplink:String
branch
branch:String

