1. Home
  2. Computing & Technology
  3. Animation

Flash Digital Clock

By , About.com Guide

8 of 10

Now we just need to tell Flash that the text displayed in Dynamic Text box timeclock on the root level should be the concatenated string clocktime:

onClipEvent (enterFrame) {
myclock=new Date() ;
clocktime = ((myclock.getHours())+ ":" + (myclock.getMinutes()) + ":" + (myclock.getSeconds())) ;
_root.timeclock.text=clocktime;
}
Right now, we have a working twenty-four-hour clock. If you’re unsure of how that works, try taking a look at this lesson. If you’re clear, move on to the last step.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Digital Clock

©2009 About.com, a part of The New York Times Company.

All rights reserved.