BitmapFontLoader Class
The xml loader is used to load in XML bitmap font data ('xml' or 'fnt') To generate the data you can use http://www.angelcode.com/products/bmfont/ This loader will also load the image file as the data. When loaded this class will dispatch a 'loaded' event
Constructor
BitmapFontLoader
-
url -
crossorigin
Parameters:
-
urlStringThe url of the sprite sheet JSON file
-
crossoriginBooleanWhether requests should be treated as crossorigin
Item Index
Methods
Properties
Methods
addEventListener
-
type -
listener
Adds a listener for a specific event
Parameters:
-
typeStringA string representing the event type to listen for.
-
listenerFunctionThe callback function that will be fired when the event occurs
dispatchEvent
-
event
Fires the event, ie pretends that the event has happened
Parameters:
-
eventEventthe event object
load
()
Loads the XML font data
onLoaded
()
private
Invoked when all files are loaded (xml/fnt and texture)
onXMLLoaded
()
private
Invoked when the XML file is loaded, parses the data
removeAllEventListeners
-
type
Removes all the listeners that were active for the specified event type
Parameters:
-
typeStringA string representing the event type which will have all its listeners removed
removeEventListener
-
type -
listener
Removes the specified listener that was assigned to the specified event type
Parameters:
-
typeStringA string representing the event type which will have its listener removed
-
listenerFunctionThe callback function that was be fired when the event occured
Properties
baseUrl
String
[read-only] The base url of the bitmap font data
baseUrl
String
[read-only] The texture of the bitmap font
crossorigin
Boolean
Whether the requests should be treated as cross origin
listeners
Object
Holds all the listeners
url
String
The url of the bitmap font data
