Strona 1 z 1

Flash a zegarek

: śr lut 22, 2006 11:43 am
autor: czelek
Witam :) jak zrobic we flashu zegarek ? chodzi mi o zegarek w danej animacji...

Zegarek

: śr lut 22, 2006 6:02 pm
autor: Marek_bf

Re: Flash a zegarek

: śr lut 22, 2006 7:27 pm
autor: czelek
no no no.. nice ;) ale potrzebny mi jest do strony o tematyce edukacyjnej... wolalbym cyfrowy a nie analogowy do tego data przydała by sie.
tak mniej wiecej:

11:50
22.02.2006

z gory dzieki

zegar zegarek cyfrowy

: śr lut 22, 2006 11:17 pm
autor: Marek_bf

Kod: Zaznacz cały

this.createTextField("my_txt", 0, 10, 10, 200, 20);
//
function clock() {
	var myDate = new Date();
	var years = myDate.getFullYear();
	var month = myDate.getMonth() + 1;
	var day = myDate.getDate();
	var hours = myDate.getHours();
	var minutes = myDate.getMinutes();
	var seconds = myDate.getSeconds();
	month = month < 9 ? "0" + month : month;
	day = day < 9 ? "0" + day : day;
	hours = hours < 9 ? "0" + hours : hours;
	minutes = minutes < 9 ? "0" + minutes : minutes;
	seconds = seconds < 9 ? "0" + seconds : seconds;
	return hours + ":" + minutes + ":" + seconds + " - " + day + "." + month + "." + years;
}
var IntervalID = setInterval(function () {
	my_txt.text = clock();
}, 500);

Re: Flash a zegarek

: czw lut 23, 2006 10:46 am
autor: czelek
a jak zmienic w tym czcionke? face, color, size? i jak przenisc to do nastepnej lini? podejrzewam ze w

return hours + ":" + minutes + ":" + seconds + " - " + day + "." + month + "." + years;

chodzi mi zeby zegar byl: tahoma, size 5, #666666
a pod nim data to samo tylko size 3

dzieki z gory

Re: Flash a zegarek

: czw lut 23, 2006 3:26 pm
autor: Marek_bf

Kod: Zaznacz cały

this.createTextField("my_txt", 0, 10, 10, 200, 100);
with (my_txt) {
	html = true;
	multiline = true;
	wordWrap = true;
	selectable = false;
}
// 
function clock() {
	var myDate = new Date();
	var years = myDate.getFullYear();
	var month = myDate.getMonth() + 1;
	var day = myDate.getDate();
	var hours = myDate.getHours();
	var minutes = myDate.getMinutes();
	var seconds = myDate.getSeconds();
	month = month < 9 ? "0" + month : month;
	day = day < 9 ? "0" + day : day;
	hours = hours < 9 ? "0" + hours : hours;
	minutes = minutes < 9 ? "0" + minutes : minutes;
	seconds = seconds < 9 ? "0" + seconds : seconds;
	czas = "<p><font face='tahoma' size='14' color='#666666'><br>" + hours + ":" + minutes + ":" + seconds + "</font></p>";
	czas += "<p><font face='tahoma' size='11' color='#666666'>" + day + "." + month + "." + years + "</font></p>";
	return czas;
}
var IntervalID = setInterval(function () {
	my_txt.htmlText = clock();
}, 500);

Re: Flash a zegarek

: pt lut 24, 2006 10:28 am
autor: czelek
ok dzieki bardzo ;) moc forum jest wielka :D