craftyjs.github.com

Crafty.image_whitelist

A list of file extensions that can be loaded as images by Crafty.load

Example

Crafty.image_whitelist.push("tif")
Crafty.load(["images/sprite.tif", "sounds/jump.mp3"],
    function() {
        //when loaded
        Crafty.scene("main"); //go to main scene
        Crafty.audio.play("jump.mp3"); //Play the audio file
    },

    function(e) {
      //progress
    },

    function(e) {
      //uh oh, error loading
    }
);

See Also

See Also