Timer problem
: czw sty 17, 2008 7:46 pm
Zrobilem Timer, jednak mam jeden problem, chce zeby zamiast "2 sekund" pokazywal "02 sekund".
Oto kod.
Oto kod.
Kod: Zaznacz cały
Date.prototype.countDown = function( ){
var d = this - new Date();
var s = Math.floor(d/1000);
var m = Math.floor(s/60);
var h = Math.floor(m/60);
var d = Math.floor(h/24);
return d+" "+( h%24 )+" "+(m%60 )+" "+(s%60 )+" ";
}
this.createTextField( "w",1,0,0,500,38 );
this.onEnterFrame = function(){
var d = new Date( 2009,3, 19, 12, 0 );
czas.text= d.countDown() ;;
}
stop();