1. Home
  2. Computing & Technology
  3. Animation

Flash Digital Clock

By Adrien-Luc Sanders, About.com

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

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

Easy ways to connect two computers for networking purposes. 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.