# Digital Clock

**URL:** <https://forum.kirupa.com/t/digital-clock/205424>\
**Category:** Uncategorized\
**Created:** [October 29, 2006, 2:23pm UTC](https://forum.kirupa.com/t/digital-clock/205424 "2006-10-29T14:23:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anita1511](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Anita1511](https://forum.kirupa.com/u/Anita1511)\
**Post date:** [October 29, 2006, 2:23pm UTC](https://forum.kirupa.com/t/digital-clock/205424/1 "2006-10-29T14:23:22Z")

</div>

Hi Guys;

I’m Anita and just a bubbie according to Flash but everybody has to start somewhere. I made the digital clock with help of the video of Kirupa and it works PERFECTLY. Now I insert it inside my website and the only thing what is coming up is “::PM”. What did I done wrong? I put all the actions on 1 layer?!

\_root.onEnterFrame = function() {  
var myDate:Date = new Date();  
var myHours = myDate.getHours();  
var myMinutes = myDate.getMinutes();  
var mySeconds = myDate.getSeconds();  
var AmPm;  
if (myHours \< 12) {  
AmPm = “AM”;  
}  
else  
{  
AmPm = “PM”;  
}  
if (myHours == 0){  
myHours = 12;  
}  
if (myHours \>12){  
myHours = myHours - 12;  
}  
if (myHours \<10) {  
myHours = “0” + myHours;  
}  
if (myMinutes \<10) {  
myMinutes = “0” + myMinutes;  
}  
if (mySeconds \<10) {  
mySeconds = “0” + mySeconds;  
}  
time\_txt.text = myHours + “:” + myMinutes + “:” + mySeconds + " " + AmPm;  
}  
this.Coffee\_btn.onRelease=function(){  
getUrl(“coffee.html”);  
}  
this.Food\_btn.onRelease=function(){  
getUrl(“food products.html”);  
}  
this.Cosmetics\_btn.onRelease=function(){  
getUrl(“PC.html”);  
}  
this.Earth\_btn.onRelease=function(){  
getUrl(“PE.html”);  
}  
this.Eximport\_btn.onRelease=function(){  
getUrl(“exportimport.html”);  
}
