Because there are AssetLibrary, Loader3d, AssetsLoader,
I checked comments in these .as files, it looks like we should use AssetLibrary.
question 1:
But how to use AssetLibrary to load a list?
or only can load model one bye one?
question 2:
how to set model(asset)‘s id?
When we need get a asset from AssetLibrary, AssetLibrary.getAssets();
Where to set it?
the code snippet is very stranger: comment said param id, but where is this param?
/**
* Retrieves an unloaded resource parsed from the given data.
* @param data The data to be parsed.
* @param id The id that will be assigned to the resource. This can later also be used by the getResource method.
* @param ignoreDependencies Indicates whether or not dependencies should be ignored or loaded.
* @param parser An optional parser object that will translate the data into a usable resource.
* @return A handle to the retrieved resource.
*/
private function parseResource(data : *, parser : ParserBase = null, context : AssetLoaderContext = null, ns : String = null) : AssetLoaderToken
{
var loader : AssetLoader = new AssetLoader();
_loadingSessions.push(loader);
loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceRetrieved);
loader.addEventListener(LoaderEvent.DEPENDENCY_COMPLETE, onDependencyRetrieved);
loader.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.ANIMATION_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.ANIMATOR_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.BITMAP_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.CONTAINER_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.GEOMETRY_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.MATERIAL_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.MESH_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.SKELETON_COMPLETE, onAssetComplete);
loader.addEventListener(AssetEvent.SKELETON_POSE_COMPLETE, onAssetComplete);
return loader.parseData(data, '', parser, context, ns);
}