Packagepotomac.bundle
Classpublic class BundleEvent
InheritanceBundleEvent Inheritance flash.events.Event

BundleEvent represents events in response to bundle activities on the BundleService.



Public Properties
 PropertyDefined By
  bundleID : String
[read-only] The bundle ID relevant to the event.
BundleEvent
  bytesLoaded : uint
[read-only] The number of bytes currently loaded during a progress event.
BundleEvent
  bytesTotal : uint
[read-only] The total bytes in the downloading file during a progress event.
BundleEvent
  isRepeat : Boolean
[read-only] True if this event is a repeat event.
BundleEvent
  message : String
[read-only] The message associated with an error event or null.
BundleEvent
  url : String
[read-only] The URL being downloaded during a progress event.
BundleEvent
Public Methods
 MethodDefined By
  
BundleEvent(type:String, bundleID:String = null, repeat:Boolean = false, url:String = null, bytesLoaded:uint = 0, bytesTotal:uint = 0, message:String = null)
Callers should not construct instances of BundleEvent.
BundleEvent
  
clone():Event
[override]
BundleEvent
Public Constants
 ConstantDefined By
  BUNDLE_ERROR : String = bundleError
[static] The BundleEvent.BUNDLE_ERROR constant defines the value of the type property of the event object for a bundleError event.
BundleEvent
  BUNDLE_LOADING : String = bundleLoading
[static] The BundleEvent.BUNDLE_LOADING constant defines the value of the type property of the event object for a bundleLoading event.
BundleEvent
  BUNDLE_PROGRESS : String = bundleProgress
[static] The BundleEvent.BUNDLE_PROGRESS constant defines the value of the type property of the event object for a bundleProgress event.
BundleEvent
  BUNDLE_READY : String = bundleReady
[static] The BundleEvent.BUNDLE_READY constant defines the value of the type property of the event object for a bundleReady event.
BundleEvent
  BUNDLES_INSTALLED : String = bundlesInstalled
[static] The BundleEvent.BUNDLES_INSTALLED constant defines the value of the type property of the event object for a bundlesInstalled event.
BundleEvent
  BUNDLES_INSTALLING : String = bundlesInstalling
[static] The BundleEvent.BUNDLES_INSTALLING constant defines the value of the type property of the event object for a bundlesInstalling event.
BundleEvent
  BUNDLES_PRELOADING : String = bundlesPreloading
[static] The BundleEvent.BUNDLES_PRELOADING constant defines the value of the type property of the event object for a bundlesPreloading event.
BundleEvent
Property Detail
bundleIDproperty
bundleID:String  [read-only]

The bundle ID relevant to the event.


Implementation
    public function get bundleID():String
bytesLoadedproperty 
bytesLoaded:uint  [read-only]

The number of bytes currently loaded during a progress event.


Implementation
    public function get bytesLoaded():uint
bytesTotalproperty 
bytesTotal:uint  [read-only]

The total bytes in the downloading file during a progress event.


Implementation
    public function get bytesTotal():uint
isRepeatproperty 
isRepeat:Boolean  [read-only]

True if this event is a repeat event. The BundleService dispatches a bundleReady whenever a bundle load is requested, even when the bundle is already loaded. This allows callers to code one logic path in both cases where the bundle is loaded or not. This property will be set to true if the bundle has already been loaded.


Implementation
    public function get isRepeat():Boolean
messageproperty 
message:String  [read-only]

The message associated with an error event or null.


Implementation
    public function get message():String
urlproperty 
url:String  [read-only]

The URL being downloaded during a progress event.


Implementation
    public function get url():String
Constructor Detail
BundleEvent()Constructor
public function BundleEvent(type:String, bundleID:String = null, repeat:Boolean = false, url:String = null, bytesLoaded:uint = 0, bytesTotal:uint = 0, message:String = null)

Callers should not construct instances of BundleEvent.

Parameters
type:String
 
bundleID:String (default = null)
 
repeat:Boolean (default = false)
 
url:String (default = null)
 
bytesLoaded:uint (default = 0)
 
bytesTotal:uint (default = 0)
 
message:String (default = null)
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
BUNDLE_ERRORConstant
public static const BUNDLE_ERROR:String = bundleError

The BundleEvent.BUNDLE_ERROR constant defines the value of the type property of the event object for a bundleError event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDThe id of the bundle this error event is associated with.
isRepeatfalse
urlnull
bytesLoaded0
bytesTotal0
messageThe error message.

BUNDLE_LOADINGConstant 
public static const BUNDLE_LOADING:String = bundleLoading

The BundleEvent.BUNDLE_LOADING constant defines the value of the type property of the event object for a bundleLoading event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDThe id of the bundle that is now loading.
isRepeatfalse
urlURL of the bundle SWF.
bytesLoaded0
bytesTotal0
messagenull

BUNDLE_PROGRESSConstant 
public static const BUNDLE_PROGRESS:String = bundleProgress

The BundleEvent.BUNDLE_PROGRESS constant defines the value of the type property of the event object for a bundleProgress event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDThe id of the bundle this progress event is associated with.
isRepeatfalse
urlURL of the asset or SWF being downloaded.
bytesLoadedThe current bytes loaded.
bytesTotalTotal bytes of downloading asset or SWF.
messagenull

BUNDLE_READYConstant 
public static const BUNDLE_READY:String = bundleReady

The BundleEvent.BUNDLE_READY constant defines the value of the type property of the event object for a bundleReady event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDThe id of the loaded bundle.
isRepeatTrue if this is a repeated ready event.
urlnull
bytesLoaded0
bytesTotal0
messagenull

BUNDLES_INSTALLEDConstant 
public static const BUNDLES_INSTALLED:String = bundlesInstalled

The BundleEvent.BUNDLES_INSTALLED constant defines the value of the type property of the event object for a bundlesInstalled event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDnull
isRepeatfalse
urlnull
bytesLoaded0
bytesTotal0
messagenull

BUNDLES_INSTALLINGConstant 
public static const BUNDLES_INSTALLING:String = bundlesInstalling

The BundleEvent.BUNDLES_INSTALLING constant defines the value of the type property of the event object for a bundlesInstalling event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDnull
isRepeatfalse
urlnull
bytesLoaded0
bytesTotal0
messagenull

BUNDLES_PRELOADINGConstant 
public static const BUNDLES_PRELOADING:String = bundlesPreloading

The BundleEvent.BUNDLES_PRELOADING constant defines the value of the type property of the event object for a bundlesPreloading event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
bundleIDnull
isRepeatfalse
urlnull
bytesLoaded0
bytesTotal0
messagenull