Digital Clock

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”);
}