Clock

Hi me again! I’m trying to do the digital clock using the tutorial on the site, but without the day and time but I can’t seem to make it work, this is the script i’m using

onClipEvent (enterFrame) {
myTime = new Date();
nMinutes = myTime.getMinutes();
nHours = nTime.getHours();
if (nHours>=12) {
ampm = “pm”;
}else{
ampm = “am”
}
if (nHours>=13){
nHours = nHours-12
}
if (length(nMinutes)==1){
nMinutes = “0”+nMinutes;
}
nTime = nHours+":"+nMinutes+""+ampm;
}

any clues as to what i’m doing wrong? Thanks in advance!