WHAT IS THIS?

A JavaScript Preloader for HTML5 Apps

PxLoader is a Javascript library that helps you download images, sound files or anything else you need before you take a specific action on your site (like showing a user interface or starting a game). You can use it to create a preloader for HTML5 games and websites.

It let's you monitor download status by providing progress and completed events and it lets you prioritize the order in which items are downloaded. You can even tag groups of files and then prioritize downloads or register for events by tag.

It let's you monitor download status by providing progress and completed events and it lets you prioritize the order in which items are downloaded. You can even tag groups of files and then prioritize downloads or register for events by tag.

We created PxLoader for the HTML5 version of Cut the Rope and out of the box works great with images and sound files (the types of resources we needed for the game), but it's designed to be extensible and work with any file type or other network action.

GET STARTED

Step by Step Instructions

1. Download the script and place the files in the JavaScript directory of your site. The files you need are:

  • PxLoader.js (the main library file)
  • PxLoaderImage.js (the image file downloader if you want to download images)
  • PxLoaderSound.js (the sound file downloader if you want to download sounds)*
  • PxLoaderVideo.js (the video file downloader if you want to download videos)
  • Any other downloaders that you write or get in the plugins section of this page

*The sound file downloader works with SoundManager 2 and allows it do the heavy lifting of the actual download. In fact, PxLoader always defers downloads to the downloader objects. That gives a complex sound library like SoundManager 2 the ability to choose how to download the file based on whether it's using Flash or HTML5 for the audio.

2. Add the core JavasScript file.

2. Add the core JavasScript file.