This method creates a Bitmap resource for the given image file (aURL). The Bitmap
resource is assigned the given id. For more information please
see
bitmap class.
function onSample()
{
var factory = shell.factory;
var thumb = (factory) ? factory.createBitmap("myBmp", "../content/img1.png", scene) : null;
if (thumb)
{
// set the bitmap's max size and add the new bitmap resource into our scene's library
thumb.setThumbSize(100, 100);
var lib = scene.library;
if (lib)
{
// add it to the library
lib.addResource(thumb);
}
}
}