Neler yeni

Yeni mesajlar Yeni konular En çok mesaj En çok tepki En çok görüntülenen

bilgisayar saatine göre saat yapma

trvendetta

🏅Acemi Tasarımcı🏅
Katılım
21 Ara 2009
Mesajlar
60
Tepkime puanı
0
resimleri uplaod etmek filan uzun sürdügünden resimsiz detaylı yaptım kolay bişe yapamayan olursa resimlide yaparım
yeni sayfa açıyoruz
ekrana text tool ile properties penceresinden dynamic text seçip açıyoruz

tıklayıp ismini the24Time yazıyoruz properties bölümünden

1 frameye sağ tıklayıp bu kodu yazıyoruz

//Add an event listener to the dynamic text field.
the24Time.addEventListener(Event.ENTER_FRAME,show24Time);

function show24Time(event:Event):void {
//Creates a new instances of the date class
var myTime:Date = new Date();
//This returns the hour, minutes, and seconds.
var theSeconds=myTime.getSeconds();
var theMinutes=myTime.getMinutes();
var theHours=myTime.getHours();

//This adds '0' to the hours if there is only one digit.
if (String(theHours).length == 1) {
theHours="0"+theHours;
}
//This adds '0' to the minutes if there is only one digit.
if (String(theMinutes).length == 1) {
theMinutes="0"+theMinutes;
}
//This adds '0' to the seconds if there is only one digit.
if (String(theSeconds).length == 1) {
theSeconds="0"+theSeconds;
}
//Display the 24 time in the dynamic text field.
the24Time.text =theHours+":"+theMinutes+":"+theSeconds;
}


kaynak dosya
saat.fla ... at uploaded.to - Free File Hosting, Free Image Hosting, Free Music Hosting, Free Video Hosting, ...
önizleme
SwfCabin - Free Swf Upload & Swf Hosting - Viewing: vendetta
 

Benzer konular

Üst