Digital Time
1.Create a Text Field and Create set them instance name = “time”.
2.Select the first Frame.
3. Press F9 and Copy Code Below and paste it.
Code:_root.onEnterFrame = function() { var time:Date = new Date(); hour = (time.getHours()<=12) ? time.getHours() : (time.getHours()-12); hour = (hour<10) ? ["0"+hour] : hour; second = time.getSeconds(); second = (second<10) ? ["0"+second] : second; Minutes = time.getMinutes(); Minutes = (Minutes<10) ? ["0"+Minutes] : Minutes; _root.time.text = [hour+"."+Minutes+"."+second]; };


LinkBack URL
About LinkBacks


Reply With Quote
