Assets (HTML5): how to laod them manually avoiding preloading?

<assets path="assets/islandsbig" include="*" embed="false" />

When preload is set to false (or embed to false) the assets should be available for loading like so:

Assets.loadBitmapData("assets/islandsbig/"+id+".png").onComplete(
			function(bmd:BitmapData){
				
				var b = new Bitmap(bmd);
				b.smoothing = true;
				b.scaleX = 0.33;
				b.scaleY = 0.33;
				addChild(b);

			}
		);

Alternatively, I have used an asset manifest at runtime:

var manifest:AssetManifest = new AssetManifest(); 
manifest.addBitmapData("assets/products/" + product.id + ".png", product.id);

AssetLibrary.loadFromManifest(manifest).onComplete (function (library) {
			Assets.registerLibrary("mynewlibrary", library);
});
var bData = Assets.getBitmapData("mynewlibrary:"+ product.id);
3 Likes