# Want display time in my font of choice

**URL:** <https://forum.kirupa.com/t/want-display-time-in-my-font-of-choice/29903>\
**Category:** Uncategorized\
**Created:** [September 1, 2003, 8:47pm UTC](https://forum.kirupa.com/t/want-display-time-in-my-font-of-choice/29903 "2003-09-01T20:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonafide](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bonafide](https://forum.kirupa.com/u/bonafide)\
**Post date:** [September 1, 2003, 8:47pm UTC](https://forum.kirupa.com/t/want-display-time-in-my-font-of-choice/29903/1 "2003-09-01T20:47:56Z")

</div>

Question, I was following the tutorial @ [http://www.flashkit.com/tutorials/Actionscripting/How\_to\_m-Ogier\_Sc-892/index.php](http://www.flashkit.com/tutorials/Actionscripting/How_to_m-Ogier_Sc-892/index.php) and would like the display to be in my font of choice. Is this possible? …and if it is, how do I accomplish this?

Thanks in advance.  
Bonafide

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2003, 10:34pm UTC](https://forum.kirupa.com/t/want-display-time-in-my-font-of-choice/29903/2 "2003-09-01T22:34:43Z")

</div>

I’ve made all kinds of clocks (like on my site in the top right corner). I always just use dynamic text boxes with the font of my choosing and do something like this: -I’ll comment it; I didn’t realize it was so long!

```auto

onClipEvent (load) {
//this sets up the arrays of the months and days
	months = ["January", "Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
	days = ["SUN", "MON", "TUE", "WED", "THR", "FRI", "SAT"];
	pm=0;
}
onClipEvent (enterFrame) {
//get's system date and time every frame
//and gets various parts of time
	now = new Date();
	h = now.getHours();
	m = now.getMinutes();
	s = now.getSeconds();
//convert from military time
	if (h>12) {
		h -= 12;
		pm = 1;
	}
	if (h == 0) {
		h = 12;
	}
//changes like 9 minutes to 09 minutes
	if (m<10) {
		m = "0"+m;
	}
//do the same with seconds
	if (s<10) {
		s = "0"+s;
	}
//set up time for text box called 'time'
	_root.time = h+":"+m+":"+s;
//For spacing, I put in an extra text box called 'thing' to display
//either AM or PM. The variable is set later (ap)
	_root.thing = ap;
//gets date information
	month = months[now.getMonth()];
//this pulls the name out of the array 'months'
	year = now.getFullYear();
	day = days[now.getDay()];
//this pulls the name out of the array 'days'
	dnum = now.getDate();
//this gets the numerical day's date
	st = "th";
//defaults 'st' to 'th' for like 14th or 17th
//then the next stuff is changing the defalt for 'st',
//'nd' and 'rd'
	if (dnum == "1" or dnum == "21" or dnum == "31") {
		st = "st";
	}
	if (dnum == "2" or dnum == "22") {
		st = "nd";
	}
	if (dnum == "3" or dnum == "23") {
		st = "rd";
	}
	_root.date = month+" "+dnum+st;
//sends formatted date to a text box called 'date'
	_root.dyear = year;
//sends year to a text box called 'year'
	_root.dday = day;
//sends formatted day (word) to a text box called 'dday'
//this last bit tacks on either 'am' or 'pm' to the time
	if (pm == 1) {
		ap = "PM";
	} else {
		ap = "AM";
	}
}

```

Hope that helps - I thought it would be a shorter answer - sorry…
