Fork me on GitHub

API Documentation


Extends GLGE.Events.
Document preloader class
Defined in: glge_documentpreloader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
addImage(url)
Add an image, which should be loaded by the preloader.
 
changeState(newState)
Sets the state of the document preloader.
 
finish(event)
Called when the document preloader loaded all files.
 
Start loading all images in all xml files.
 
This function loads a XML-file.
 
Update preloader progress.
Methods borrowed from class GLGE.Events:
addEventListener, fireEvent, removeEventListener
Class Detail
GLGE.DocumentPreloader(doc, args)
Parameters:
doc
args
Method Detail
addImage(url)
Add an image, which should be loaded by the preloader.
Parameters:
{string} url
Url of the image.

changeState(newState)
Sets the state of the document preloader.
Parameters:
{number} newState
New state

finish(event)
Called when the document preloader loaded all files.
Parameters:
{object} event
Event parameter. Not used at all.

loadImages()
Start loading all images in all xml files. Assumes that XML-files have finished loading.

loadXMLFile(url)
This function loads a XML-file. Assumes that loading images hasn't yet begun.
Parameters:
{string} url
Url of the XML-file.

updateProgress(args)
Update preloader progress.
Parameters:
{object} args
Progress information.
args.stepBytes describes how many bytes have been loaded since the last update.

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 12 2012 14:20:23 GMT+0000 (GMT)