This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > April 2004 > Exect time





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Exect time
Pavelthesecond

2004-04-21, 3:14 pm

anybody know how to make a flash that would show exect time? like the one they have at http://www.ntv.ru/
adireddy

2004-04-21, 3:14 pm

You can use the Date object to display the date and time in flash. Note that
flash displays the time of the local system. You can also see the time
diaplayed in my website
[L=www.adiinteractive.com]http://www.adiinteractive.com[/L] using flash.

Pavelthesecond

2004-04-21, 3:14 pm

to what do i aplly the Date object code in order for it to display the current time?
can you give me exact code or a workable example that i can import into flash to see how it works.
thanks
adireddy

2004-04-21, 3:14 pm

The following is the code to display date similar to the one in my website
[L=www.adiinteractive.com]http://www.adiinteractive.com[/L]

Place the code in the timeline and create a dynamic text field with name
"date_txt"

var d = new Date();
days = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
months = new
Array("January","Febuary","March","April","May","June","July","August","Septembe
r","October","November","December");
hrs = d.getHours();
mins = d.getMinutes();
secs = d.getSeconds();
if(hrs < 10){ hrs = "0"+hrs; }
if(mins < 10){ mins = "0"+mins; }
if(secs < 10){ secs = "0"+secs; }
this.date_txt.text = months[d.getMonth()]+" "+d.getDate()+",
"+d.getFullYear()+ " "+hrs+":"+mins+":"+secs;

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews