method getResourceById

resource getResourceById(string resourceID);

Argumente

Zurückgegebener Wert

This method attempts to locate a resource with the given ID within this library and return it back. This method returns null if resource id is not found.
var lib = scene.importLibrary("box://app/theme/goldTheme.box");
if (lib)
{
    var bmp = lib.getResourceById("testPng");
    if (bmp)
    {
        lib.removeResource(bmp);
    }
}