This project is archived and is in readonly mode.

#119 ✓invalid

Asset.images -

Reported by xintron | September 13th, 2009 @ 11:06 PM

When loading images using Asset.images using:

var loader = new Asset.images(['', ''], {

    onComplete: function() {
            alert('Hey hey hey there');


It fails with the following error (firebug output): is not a function. It works if I remove from the image-function. Is this a bug or not?

image: function(source, properties){
        properties = $merge({
        onload: $empty,
        onabort: $empty,
        onerror: $empty
    }, properties);
    var image = new Image();
    var element = **** || new Element('img');
    ['load', 'abort', 'error'].each(function(name){
        var type = 'on' + name;
        var event = properties[type];
        delete properties[type];
        image[type] = function(){
            if (!image) return;
            if (!element.parentNode){
                element.width = image.width;
                element.height = image.height;
            image = image.onload = image.onabort = image.onerror = null;
            event.delay(1, element, element);
            element.fireEvent(name, element, 1);
    image.src = element.src = source;
    if (image && image.complete) image.onload.delay(1);
    return element.set(properties);

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket