All loaders accept an item containing the properties defined in this class. If a raw object is passed instead, it will not be affected, but it must contain at least a Src:property property. A string path or HTML tag is also acceptable, but it will be automatically converted to a LoadItem using the Create method by AbstractLoader
createvalue
Defined in
create:181
Create a LoadItem.
setprops
Defined in
set:210
Provides a chainable shortcut method for setting a number of properties on the instance.
var loadItem = new createjs.LoadItem().set({src:"image.png", maintainOrder:true});
props
Object
A generic object containing properties to copy to the LoadItem instance.
Returns the instance the method is called on (useful for chaining calls.)
callback
Defined in
callback:90
A callback used by JSONP requests that defines what global method to call when the JSONP content is loaded.
Default: null
crossOrigin
Defined in
crossOrigin:151
Sets the crossOrigin attribute for CORS-enabled images loading cross-domain.
Default: Anonymous
data
Defined in
data:98
An arbitrary data object, which is included with the loaded object.
Default: null
headers
Defined in
headers:124
An object hash of headers to attach to an XHR request. PreloadJS will automatically attach some default headers when required, including "Origin", "Content-Type", and "X-Requested-With". You may override the default headers by including them in your headers object.
Default: null
id
Defined in
id:69
A string identifier which can be used to reference the loaded object. If none is provided, this will be automatically set to the Src:property.
Default: null
LOAD_TIMEOUT_DEFAULT
Defined in
LOAD_TIMEOUT_DEFAULT:172
Default duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR (level one) loading, as XHR (level 2) provides its own timeout event.
loadTimeout
Defined in
loadTimeout:159
The duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR (level one) loading, as XHR (level 2) provides its own timeout event.
Default: 8000 (8 seconds)
maintainOrder
Defined in
maintainOrder:78
Determines if a manifest will maintain the order of this item, in relation to other items in the manifest
that have also set the maintainOrder property to true. This only applies when the max connections has
been set above 1 (using setMaxConnections). Everything with this
property set to false will finish as it is loaded. Ordered items are combined with script tags loading in
order when maintainScriptOrder is set to true.
Default: false
method
Defined in
method:106
The request method used for HTTP calls. Both GET or POST request types are supported, and are defined as constants on AbstractLoader.
Default: GET
mimeType
Defined in
mimeType:142
Set the mime type of XHR-based requests. This is automatically set to "text/plain; charset=utf-8" for text based files (json, xml, text, css, js).
Default: null
src
Defined in
src:50
The source of the file that is being loaded. This property is required. The source can either be a string (recommended), or an HTML tag. This can also be an object, but in that case it has to include a type and be handled by a plugin.
Default: null
type
Defined in
type:60
The type file that is being loaded. The type of the file is usually inferred by the extension, but can also be set manually. This is helpful in cases where a file does not have an extension.
Default: null
values
Defined in
values:116
An object hash of name/value pairs to send to the server.
Default: null
withCredentials
Defined in
withCredentials:134
Enable credentials for XHR requests.
Default: false