onaluf / gameQuery

a javascript game engine with jQuery
http://gamequeryjs.com
633 stars 161 forks source link

fadeTo not work ? #16

Closed wanderBee closed 9 years ago

wanderBee commented 12 years ago

From the tutorial.js

// this try to respawn the ship after a death and return true if the game is over this.respawn = function(){ this.replay--; if(this.replay==0){ return true; }

    this.grace  = true;
    this.shield = 3;

    this.respawnTime = (new Date()).getTime();
    $(this.node).fadeTo(0, 0.2);    // fadeTo does not work ?
    return false;
};

this.node is supposed to be $("#player") in this situation; why actually the func fadeTo seems not to work well here?

onaluf commented 12 years ago

What exactly is your problem there ? On the browser I tested it on it seams to work: once the spaceship reappears after being shut down it is transparent for a small amount of time ? On what browser do you experiment this issue ?

bugnano commented 12 years ago

fadeTo does not work for sprite groups in IE 8 and below because the opacity implementation in those browsers does not propagate for the children background images. A possible workaround may be:

$(this.node).children().fadeTo(...)

but I have not tested it.

Il 07/09/2012 23:19, Selim Arsever ha scritto:

What exactly is your problem there ? On the browser I tested it on it seams to work: once the spaceship reappears after being shut down it is transparent for a small amount of time ? On what browser do you experiment this issue ?

— Reply to this email directly or view it on GitHub https://github.com/onaluf/gameQuery/issues/16#issuecomment-8379299.

ayuhamaro commented 11 years ago

$(this.node).children().fadeTo(...) is work!!

thank you