function onTest() { var factory = shell.factory; var thumb = (factory) ? factory.createBitmap("myBmp", "../content/img1.png", scene) : null; if (thumb) { shell.print("width = " + thumb.width); } }