[Flash 8] Zegar odliczajacy do danej daty
[Flash 8] Zegar odliczajacy do danej daty
Jak w temacie, jak sie do tego zabrac? Chodzi dokladnie o wyswietlanie Dni, Godzin, Minut i Sekund do podanej daty.
Re: [Flash 8] Zegar odliczajacy do danej daty
Dzieki
Nastepnym razem tam tez poszukam 
Z podanego przykładu zrobilem takie cos
Jak zrobic, aby to pole (z godzina) odczytywalo HTML ?
probowalem tak: ael to nic nie zmienia 
Z podanego przykładu zrobilem takie cos
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);
if (d == 1) {
dni = "dzien";
}
else {
dni = "dni";
}
if (h%24 == 1) {
godzina = "godzina";
}
else if (h%24 > 1 and h%24 < 5 or h%24 > 21 and h%24 < 25) {
godzina = "godziny";
}
else {
godzina = "godzin";
}
if (m%60 == 1) {
minuty = "minuta";
}
else if (m%60 > 1 and m%60 < 5 or m%60 > 21 and m%60 < 25 or m%60 > 31 and m%60 < 35 or m%60 > 41 and m%60 < 45 or m%60 > 51 and m%60 < 55 ) {
minuty = "minuty";
}
else {
minuty = "minut";
}
if (s%60 == 1) {
sekundy = "sekunda";
}
else if (s%60 > 1 and s%60 < 5 or s%60 > 21 and s%60 < 25 or s%60 > 31 and s%60 < 35 or s%60 > 41 and s%60 < 45 or s%60 > 51 and s%60 < 55 ) {
sekundy = "sekundy";
}
else {
sekundy = "sekund";
}
return "<font size=5>Do konca roku szkolnego pozostało: "+d+" "+dni+", "+( h%24 )+" "+godzina+", "+(m%60 )+" "+minuty+" i "+(s%60 )+" "+sekundy+"</font>";
}
this.createTextField( "w",1,0,0,500,50 );
this.onEnterFrame = function(){
var d = new Date( 2006,5,23, 24, 00);
w.text=( d.countDown() );
}
probowalem tak:
Kod: Zaznacz cały
this.onEnterFrame = function(){
var d = new Date( 2006,5,23, 24, 00);
w.text=( d.countDown() );
w.html = true;
}odliczanie
http://forum.webinside.pl/viewtopic.php ... ght=#39987
