The Color Clock: Done!
I've created a brand new version of the clock I posted about earlier. First the clock, then the talking!
Then came Annoying Old Guy who got completely sucked into the problem of getting a better code algorithm for the operation of the clock. He posted several versions and an elaborate explanation. Very nice indeed! However, it needed to be actionscript. While I understood the code that Annoying Old Guy posted, I couldn't quite get it converted to ActionScript. Then came Roy, a.k.a. weefselkweekje who sent me a lean and mean piece of actionscript to get it done right. Here's the code he sent me:
setTime = function( hours, minutes ){
var mcs = new Array( top, right, bottom, left );
var a = hours % 4;
for( var i=0; i<mcs.length; i++ ){
mcs[i]._rotation = 0;
if ( i == a ){
mcs[i]._rotation += minutes;
}
}
for( var i=0; i<hours; i++ ){
mcs[i%4]._rotation += 60;
}
}
setTime(hours, minutes);
Beautiful, elegant and... working!
As a last step I needed to get the clock to look better than it did in it's original rough version. Also, because the very slow movement of this clock I wanted it to be a bit more dynamic. Therefore I decided to add an indicator for the current hour that's passing as well as the seconds. Erwin Kho, a former collegue gave me some Illustrator tips on MSN in order for me to get the elements of the clock drawn right.
These efforts combined resulted in the working Flash clock you see now. If you like it, feel free to SWF file and place it on your own site. If you do, a little link to my site would be nice.
I'd like to thank Annoying Old Guy, Roy Tanck and Erwin Kho for their assistance. This combined effort resulted into something extremely nice!!!
Filed under: design, web development
Number of comments:
Number of trackbacks:
Tagged with: 







At 14 April '05 - 23:55 Ronald wrote:
At 15 April '05 - 06:50 weefselkweekje wrote:
At 15 April '05 - 09:53 Ronald wrote:
At 15 April '05 - 10:03 Marco wrote:
At 15 April '05 - 10:59 Hans wrote:
Which source code do i need to add the clock to my posting ?
At 15 April '05 - 11:12 Marco wrote:
The swf is here
At 15 April '05 - 12:57 Henri wrote:
At 15 April '05 - 13:30 Marco wrote:
At 16 April '05 - 11:10 Bakkel wrote:
At 06 August '05 - 00:11 Tratamiento de agua wrote: