Creating a 12 hour digital clock in Animate CC in HTML5 Canvas
hello, i have as3 code working 12 hour clock using dynamic text field , looking translate html5. i've found several examples of clock code in javascript, cannot seem translate working clock in animate cc. can me translate as3 code working javascript/html5 animate cc? //adds enter frame event dynamic text field. thetime.addeventlistener(event.enter_frame,showtime); function showtime(event:event):void { //create new instance of date class. var mytime:date = new date(); //this returns seconds, minutes , hour. var theseconds=mytime.getseconds(); var theminutes=mytime.getminutes(); var thehours=mytime.gethours(); var ampm:string; //displays am/pm depending on current hour. if (thehours>=12) { ampm="pm"; } else { ampm="am"; } //this subtracts 12 hour when greater 13. if (thehours>=13) { thehours=thehours-12; } if (thehours==0) { thehours=thehours+12; } //adds '0' if...