Package | com.greensock.loading.data.core |
Class | public dynamic class LoaderItemVars |
Inheritance | LoaderItemVars LoaderCoreVars |
Subclasses | CSSLoaderVars, DataLoaderVars, DisplayObjectLoaderVars, MP3LoaderVars, XMLLoaderVars |
vars
object that's passed into the
constructor of various LoaderItems in the LoaderMax system. There is no reason to use this class directly - see
docs for the vars classes that extend LoaderItemVars like XMLLoaderVars, SWFLoaderVars, etc.Property | Defined by | ||
---|---|---|---|
alternateURL : String If you define an
alternateURL , the loader will initially try to load from its original url and if it fails, it will automatically (and permanently) change the loader's url to the alternateURL and try again. | LoaderItemVars | ||
autoDispose : Boolean When
autoDispose is true , the loader will be disposed immediately after it completes (it calls the dispose() method internally after dispatching its COMPLETE event). | LoaderCoreVars | ||
estimatedBytes : uint Initially, the loader's
bytesTotal is set to the estimatedBytes value (or LoaderMax.defaultEstimatedBytes if one isn't defined). | LoaderItemVars | ||
name : String A name that is used to identify the loader instance.
| LoaderCoreVars | ||
noCache : Boolean If
true , a "cacheBusterID" parameter will be appended to the url with a random set of numbers to prevent caching (don't worry, this info is ignored when you LoaderMax.getLoader() or LoaderMax.getContent() by url or when you're running locally). | LoaderItemVars | ||
onCancel : Function A handler function for
LoaderEvent.CANCEL events which are dispatched when loading is aborted due to either a failure or because another loader was prioritized or cancel() was manually called. | LoaderCoreVars | ||
onComplete : Function A handler function for
LoaderEvent.COMPLETE events which are dispatched when the loader has finished loading successfully. | LoaderCoreVars | ||
onError : Function A handler function for
LoaderEvent.ERROR events which are dispatched whenever the loader experiences an error (typically an IO_ERROR or SECURITY_ERROR). | LoaderCoreVars | ||
onFail : Function A handler function for
LoaderEvent.FAIL events which are dispatched whenever the loader fails and its status changes to LoaderStatus.FAILED . | LoaderCoreVars | ||
onHTTPStatus : Function A handler function for
LoaderEvent.HTTP_STATUS events. | LoaderCoreVars | ||
onIOError : Function A handler function for
LoaderEvent.IO_ERROR events which will also call the onError handler, so you can use that as more of a catch-all whereas onIOError is specifically for LoaderEvent.IO_ERROR events. | LoaderCoreVars | ||
onOpen : Function A handler function for
LoaderEvent.OPEN events which are dispatched when the loader begins loading. | LoaderCoreVars | ||
onProgress : Function A handler function for
LoaderEvent.PROGRESS events which are dispatched whenever the bytesLoaded changes. | LoaderCoreVars | ||
requireWithRoot : DisplayObject LoaderMax supports subloading, where an object can be factored into a parent's loading progress.
| LoaderCoreVars |
alternateURL | property |
public var alternateURL:String
If you define an alternateURL
, the loader will initially try to load from its original url
and if it fails, it will automatically (and permanently) change the loader's url
to the alternateURL
and try again. Think of it as a fallback or backup url
. It is perfectly acceptable to use the same alternateURL
for multiple loaders (maybe a default image for various ImageLoaders for example).
estimatedBytes | property |
public var estimatedBytes:uint
Initially, the loader's bytesTotal
is set to the estimatedBytes
value (or LoaderMax.defaultEstimatedBytes
if one isn't defined). Then, when the loader begins loading and it can accurately determine the bytesTotal, it will do so. Setting estimatedBytes
is optional, but the more accurate the value, the more accurate your loaders' overall progress will be initially. If the loader is inserted into a LoaderMax instance (for queue management), its auditSize
feature can attempt to automatically determine the bytesTotal
at runtime (there is a slight performance penalty for this, however - see LoaderMax's documentation for details).
noCache | property |
public var noCache:Boolean
If true
, a "cacheBusterID" parameter will be appended to the url with a random set of numbers to prevent caching (don't worry, this info is ignored when you LoaderMax.getLoader()
or LoaderMax.getContent()
by url
or when you're running locally).