| Package | com.degrafa.utilities.external |
| Class | public class ExternalDataAsset |
| Inheritance | ExternalDataAsset DegrafaObject |
| Implements | IDegrafaObject |
| Subclasses | ExternalBitmapData |
| Property | Defined by | ||
|---|---|---|---|
| bytesLoaded : Number [read-only]
the current bytes loaded for this ExternalDataAsset
| ExternalDataAsset | ||
| bytesTotal : Number [read-only]
the bytesTotal for this ExternalDataAsset if known (i.e.
| ExternalDataAsset | ||
| content : Object [read-only]
The loaded content (a BitmapData instance) if it is available
or false (Boolean) if not available (triggers a loading request if not already requested).
| ExternalDataAsset | ||
![]() | document : Object
The MXML document that created this object.
| DegrafaObject | |
![]() | enableEvents : Boolean
Enable events for this object.
| DegrafaObject | |
![]() | hasEventManager : Boolean
Tests to see if a EventDispatcher instance has been created for this object.
| DegrafaObject | |
![]() | id : String
The identifier used by document to refer to this object.
| DegrafaObject | |
![]() | isInitialized : Boolean | DegrafaObject | |
| loadingLocation : LoadingLocation
ptional loadingLocation reference.
| ExternalDataAsset | ||
![]() | name : String
The name that refers to this object.
| DegrafaObject | |
![]() | objectBindings : Array | DegrafaObject | |
![]() | parent : IDegrafaObject
The current degrafa object parent.
| DegrafaObject | |
| requestBitmapDataAccess : LoaderContext [static]
| ExternalDataAsset | ||
![]() | suppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
| DegrafaObject | |
| url : String
the url of the external asset
assignable as either a string representing a url relative to an associated LoadingGroup basePath or as a regular url
For alternate domain loading or for redundancy support (multple locations) loading on error, use an associated LoadingGroup
assigned via the loadingGroup property and make this url relative to the basePath defined in the LoadingGroup
| ExternalDataAsset | ||
| Property | Defined by | ||
|---|---|---|---|
| _data : Object | ExternalDataAsset | ||
| dataType : Class | ExternalDataAsset | ||
![]() | eventDispatcher : EventDispatcher
EventDispatcher instance for this object.
| DegrafaObject | |
| _url : String | ExternalDataAsset | ||
| Method | Defined by | ||
|---|---|---|---|
|
ExternalDataAsset(url:String = null, totalBytes:Number, loader:Class = null)
Constructor
The ExternalDataAsset constructor has one optional argument for url(s) and a second optional argument to specifiy filesize for an external bitmap (useful when considered as part of a collection to preload if the data is available). | ExternalDataAsset | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
| DegrafaObject | |
![]() |
dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow.
| DegrafaObject | |
![]() |
dispatchPropertyChange(bubbles:Boolean = false, property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null):Boolean
Dispatches an property change event into the event flow.
| DegrafaObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| DegrafaObject | |
![]() |
initChange(property:String, oldValue:Object, newValue:Object, source:Object):void
Helper function for dispatching property changes
| DegrafaObject | |
![]() |
initialized(document:Object, id:String):void
Called after the implementing object has been created and all component properties specified on the MXML tag have been initialized.
| DegrafaObject | |
|
load():void
load this item, using LoadingGroup settings if this ExternalDataAsset is associated with a LoadingGroup instance
| ExternalDataAsset | ||
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| DegrafaObject | |
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| DegrafaObject | |
| Method | Defined by | ||
|---|---|---|---|
|
cleanUp():void
| ExternalDataAsset | ||
|
getUniqueInstance(url:String = null, loc:LoadingLocation = null, clazz:Class = null):ExternalDataAsset
[static]
static method to prevent multiple instances referring to the same external asset
this avoids creation of multiple instances of the same loaded data (multiple instances remain possible if required, by simply by using the constructor)
| ExternalDataAsset | ||
|
processLoad(_loader:Object):String
| ExternalDataAsset | ||
|
reset():Boolean
resets the status to waiting prior to load, stopping any current load in progress.
| ExternalDataAsset | ||
| Constant | Defined by | ||
|---|---|---|---|
| STATUS_DATA_ERROR : String = "itemDataError" [static]
| ExternalDataAsset | ||
| STATUS_IDENTIFIED : String = "itemIdentified" [static]
| ExternalDataAsset | ||
| STATUS_INITIALIZING : String = "itemInitializing" [static]
| ExternalDataAsset | ||
| STATUS_LOAD_ERROR : String = "itemLoadError" [static]
| ExternalDataAsset | ||
| STATUS_PROGRESS : String = "itemLoadProgress" [static]
| ExternalDataAsset | ||
| STATUS_READY : String = "itemReady" [static]
| ExternalDataAsset | ||
| STATUS_REQUESTED : String = "itemRequested" [static]
| ExternalDataAsset | ||
| STATUS_SECURITY_ERROR : String = "itemSecurityError" [static]
| ExternalDataAsset | ||
| STATUS_STARTED : String = "itemLoadStarted" [static]
| ExternalDataAsset | ||
| STATUS_WAITING : String = "itemWaiting" [static]
| ExternalDataAsset | ||
| TYPE_IMAGE_GIF : String = "image/gif" [static]
| ExternalDataAsset | ||
| TYPE_IMAGE_JPEG : String = "image/jpeg" [static]
| ExternalDataAsset | ||
| TYPE_IMAGE_PNG : String = "image/png" [static]
| ExternalDataAsset | ||
| TYPE_SWF : String = "application/x-shockwave-flash" [static]
| ExternalDataAsset | ||
| TYPE_UNKNOWN : String [static]
| ExternalDataAsset | ||
| bytesLoaded | property |
bytesLoaded:Number [read-only]the current bytes loaded for this ExternalDataAsset
Implementation public function get bytesLoaded():Number
| bytesTotal | property |
bytesTotal:Number [read-only]the bytesTotal for this ExternalDataAsset if known (i.e. verified during an actual load, or the value provided if pre-assigned through the constructor when instantiated) the value returned is NaN for unassigned, unverified (from actual file data) values
Implementation public function get bytesTotal():Number
| content | property |
content:Object [read-only]The loaded content (a BitmapData instance) if it is available or false (Boolean) if not available (triggers a loading request if not already requested).
Implementation public function get content():Object
| _data | property |
protected var _data:Object
| dataType | property |
protected var dataType:Class
| loadingLocation | property |
loadingLocation:LoadingLocation [read-write]ptional loadingLocation reference. Using a LoadingLocation simplifies management of groups of bitmap assets from other domains y permitting different locations (alternate domains used for loading) to be specified once in code f a loadingLocation is specified the url property in the ExternalDataAsset must be relative to the basepath specified in the LoadingLocation f an ExternalDataAsset's domain has a non-default policy file, a LoadingLocation must be used to specify the explicit location and ame of the cross-domain file that grants access. An ExternalDataAsset without a LoadingLocation will only check for permission n the default location and name (web document root, crossdomain.xml) for permission to access the remote file's BitmapData.
Implementation public function get loadingLocation():LoadingLocation
public function set loadingLocation(value:LoadingLocation):void
| requestBitmapDataAccess | property |
public static var requestBitmapDataAccess:LoaderContext
| _url | property |
protected var _url:String
| url | property |
url:String [read-write]the url of the external asset assignable as either a string representing a url relative to an associated LoadingGroup basePath or as a regular url For alternate domain loading or for redundancy support (multple locations) loading on error, use an associated LoadingGroup assigned via the loadingGroup property and make this url relative to the basePath defined in the LoadingGroup
Implementation public function get url():String
public function set url(value:String):void
| ExternalDataAsset | () | constructor |
public function ExternalDataAsset(url:String = null, totalBytes:Number, loader:Class = null)Constructor
The ExternalDataAsset constructor has one optional argument for url(s) and a second optional argument to specifiy filesize for an external bitmap (useful when considered as part of a collection to preload if the data is available). The url argument can be either a string for a single url or an array of url strings for backup.
Parametersurl:String (default = null) — a single url as a string. If a loadingGroup association is made in the loadingGroup property the url should be relative to the LoadingGroup basePath : use a LoadingGroup for fallback urls to provide redundancy under error conditions
|
|
totalBytes:Number — an [optional] specification for the total bytes to be loaded for this item, only available through the constructor (actionscript use)
|
|
loader:Class (default = null) |
| cleanUp | () | method |
protected function cleanUp():void
| getUniqueInstance | () | method |
protected static function getUniqueInstance(url:String = null, loc:LoadingLocation = null, clazz:Class = null):ExternalDataAssetstatic method to prevent multiple instances referring to the same external asset this avoids creation of multiple instances of the same loaded data (multiple instances remain possible if required, by simply by using the constructor)
Parametersurl:String (default = null) — the url to the external asset (must be relative if a LoadingLocation is used)
|
|
loc:LoadingLocation (default = null) — an optional LoadingLocation
|
|
clazz:Class (default = null) |
ExternalDataAsset |
| load | () | method |
public function load():voidload this item, using LoadingGroup settings if this ExternalDataAsset is associated with a LoadingGroup instance
| processLoad | () | method |
protected function processLoad(_loader:Object):StringParameters
_loader:Object |
String |
| reset | () | method |
protected function reset():Booleanresets the status to waiting prior to load, stopping any current load in progress.
ReturnsBoolean — Boolean value of true if status was anything other than waiting when called, otherwise false
|
| STATUS_DATA_ERROR | constant |
public static const STATUS_DATA_ERROR:String = "itemDataError"
| STATUS_IDENTIFIED | constant |
public static const STATUS_IDENTIFIED:String = "itemIdentified"
| STATUS_INITIALIZING | constant |
public static const STATUS_INITIALIZING:String = "itemInitializing"
| STATUS_LOAD_ERROR | constant |
public static const STATUS_LOAD_ERROR:String = "itemLoadError"
| STATUS_PROGRESS | constant |
public static const STATUS_PROGRESS:String = "itemLoadProgress"
| STATUS_READY | constant |
public static const STATUS_READY:String = "itemReady"
| STATUS_REQUESTED | constant |
public static const STATUS_REQUESTED:String = "itemRequested"
| STATUS_SECURITY_ERROR | constant |
public static const STATUS_SECURITY_ERROR:String = "itemSecurityError"
| STATUS_STARTED | constant |
public static const STATUS_STARTED:String = "itemLoadStarted"
| STATUS_WAITING | constant |
public static const STATUS_WAITING:String = "itemWaiting"
| TYPE_IMAGE_GIF | constant |
public static const TYPE_IMAGE_GIF:String = "image/gif"
| TYPE_IMAGE_JPEG | constant |
public static const TYPE_IMAGE_JPEG:String = "image/jpeg"
| TYPE_IMAGE_PNG | constant |
public static const TYPE_IMAGE_PNG:String = "image/png"
| TYPE_SWF | constant |
public static const TYPE_SWF:String = "application/x-shockwave-flash"
| TYPE_UNKNOWN | constant |
public static const TYPE_UNKNOWN:String