Simple tutorial how to create flash digital clock, .fla is included.
First of all create 3 new layers, make everything how show below you ca change layer names but firs of all live tham.
Now select frame 1 of background layer and draw your clock design and go to frame 2 and click F5, Ok now go and select frame 1 of clock layer, select Text Tool and click on your work area wherever you want the digital clock to appear, name this text are as “clock” go to frame to and click F5.
Now select actions layer and go to frame 1, click F9 and copy code shown below
time=new Date(); var seconds = time.getSeconds() var minutes = time.getMinutes() var hours = time.getHours() if (hours<12) { ampm = "AM"; } else{ ampm = "PM"; } while(hours >12){ hours = hours - 12; } if(hours<10) { hours = "0" + hours; } if(minutes<10) { minutes = "0" + minutes; } if(seconds<10) { seconds = "0" + seconds; } clock.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;
and at last select frame 2 click F6 and than click F9 and copy this code
gotoAndPlay(1);






























Be The First To Comment
Related Post
Please Leave Your Comments Below