Packagecom.pblabs.engine.resource
Classpublic class ResourceBundle
InheritanceResourceBundle Inheritance Object

The resource bundle handles automatic loading and registering of embedded resources. To use, create a descendant class and embed resources as public variables, then instantiate your class and pass it to PBE via PBE.addResources(new MyResourceBundleSubclass());. ResourceBundle will handle loading all of those resources into the ResourceManager.

See also

PBE.addResources


Public Properties
 PropertyDefined By
  ExtensionTypes : Object
[static] ExtensionTypes associates filename extensions with the resource type that they are to be loaded as.
ResourceBundle
Public Methods
 MethodDefined By
  
The constructor is where all of the magic happens.
ResourceBundle
Property Detail
ExtensionTypesproperty
public static var ExtensionTypes:Object

ExtensionTypes associates filename extensions with the resource type that they are to be loaded as. Each entry should be in the form of 'xml:"com.pblabs.engine.resource.XMLResource"' Where xml is the filename extension that should be associated with this type, and where "com.pblabs.engine.resource.XMLResource" is the fully qualified resource class name string, and png is the (lower-case) extension. This array can be extended at runtime, such as: ResourceBundle.ExtensionTypes.mycustomext = "com.mydomain.customresource"

Constructor Detail
ResourceBundle()Constructor
public function ResourceBundle()

The constructor is where all of the magic happens. This is where the ResourceBundle loops through all of its public properties and registers any embedded resources with the ResourceManager.