Packagecom.greensock.loading.data.core
Classpublic dynamic class LoaderItemVars
InheritanceLoaderItemVars Inheritance LoaderCoreVars
SubclassesCSSLoaderVars, DataLoaderVars, DisplayObjectLoaderVars, MP3LoaderVars, XMLLoaderVars

Facilitates code hinting and data type enforcement for the 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.

Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.



Public Properties
 PropertyDefined 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
 InheritedautoDispose : 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
 Inheritedname : 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
 InheritedonCancel : 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
 InheritedonComplete : Function
A handler function for LoaderEvent.COMPLETE events which are dispatched when the loader has finished loading successfully.
LoaderCoreVars
 InheritedonError : 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
 InheritedonFail : Function
A handler function for LoaderEvent.FAIL events which are dispatched whenever the loader fails and its status changes to LoaderStatus.FAILED.
LoaderCoreVars
 InheritedonHTTPStatus : Function
A handler function for LoaderEvent.HTTP_STATUS events.
LoaderCoreVars
 InheritedonIOError : 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
 InheritedonOpen : Function
A handler function for LoaderEvent.OPEN events which are dispatched when the loader begins loading.
LoaderCoreVars
 InheritedonProgress : Function
A handler function for LoaderEvent.PROGRESS events which are dispatched whenever the bytesLoaded changes.
LoaderCoreVars
 InheritedrequireWithRoot : DisplayObject
LoaderMax supports subloading, where an object can be factored into a parent's loading progress.
LoaderCoreVars
Property detail
alternateURLproperty
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).

estimatedBytesproperty 
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).

noCacheproperty 
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).