26.5.04
flash sleep prototype 
Un prototype que afegeix el metode sleep a les movies de flash:


MovieClip.prototype.sleep = function(milli, what) {
this.stop()
this.sl_what = what
this.sl_inter = setInterval(this, "plaia", milli)
}

MovieClip.prototype.plaia = function() {
trace('play el plaia')
clearInterval(this.sl_inter)
this.sl_what()
}


per fer-lo servir:


this.sleep(millisegonds, punterExecució)
this.sleep(3000, this.play)



Google
titulares publicidad
links interesantes
archivos