diff --git a/src/preloadjs/LoadQueue.js b/src/preloadjs/LoadQueue.js
index adf41be..2a5260c 100644
--- a/src/preloadjs/LoadQueue.js
+++ b/src/preloadjs/LoadQueue.js
@@ -1083,6 +1083,7 @@ this.createjs = this.createjs || {};
* its files will NOT use the basePath parameter. The basePath parameter is deprecated.
* This parameter will be removed in a future version. Please either use the `basePath` parameter in the LoadQueue
* constructor, or a `path` property in a manifest definition.
+ * @return {AbstractLoader} The loader for the file
*/
p.loadFile = function (file, loadNow, basePath) {
if (file == null) {
@@ -1090,13 +1091,15 @@ this.createjs = this.createjs || {};
this._sendError(event);
return;
}
- this._addItem(file, null, basePath);
+ var loader = this._addItem(file, null, basePath);
if (loadNow !== false) {
this.setPaused(false);
} else {
this.setPaused(true);
}
+
+ return loader;
};
/**
@@ -1187,8 +1190,9 @@ this.createjs = this.createjs || {};
return;
}
+ var items = [];
for (var i = 0, l = fileList.length; i < l; i++) {
- this._addItem(fileList[i], path, basePath);
+ items.push(this._addItem(fileList[i], path, basePath));
}
if (loadNow !== false) {
@@ -1197,6 +1201,7 @@ this.createjs = this.createjs || {};
this.setPaused(true);
}
+ return items;
};
/**
@@ -1334,6 +1339,7 @@ this.createjs = this.createjs || {};
* @param {String} [basePath] DeprecatedAn optional basePath passed into a {{#crossLink "LoadQueue/loadManifest"}}{{/crossLink}}
* or {{#crossLink "LoadQueue/loadFile"}}{{/crossLink}} call. This parameter will be removed in a future tagged
* version.
+ * @return {AbstractLoader} The loader for the file
* @private
*/
p._addItem = function (value, path, basePath) {
@@ -1363,6 +1369,7 @@ this.createjs = this.createjs || {};
this._loadedScripts.push(null);
}
}
+ return loader;
};
/**