The Color Clock: Done!

Thursday Apr 14 2005

I've created a brand new version of the I posted about earlier. First the clock, then the talking!

Dark Matter Pro: a premium photoblog template.

Affiliate program available

As I described in the original posting, I designed a clock back in the early nineties. After the posting something started tickling inside me. I had to make a working version of it. I succeeded and rough version was born. However it wasn't quite what I wanted it to be yet.

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 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 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!!!
bookmarking

Commentary

Join the discussion! Leave a comment through the comment form below!

Got something to add to this?

Feel free to leave a comment on this site. You can use Textile and Emoticons. Your email address is only used to show a gravatar. Please stay on-topic and use common decency. Spammers will be shot in front of a live studio audience.

If you plan on posting code, use pastebin please and post a URL to the code. The comment processing doesn't deal very well with code. Sorry for the inconvenience.

Human comment spammers: don't bother posting your crap here. Comments are moderated and I won't let any of your shit through.

Remember personal info?
Yes
No

Trackbacks

If you have an interesting related post on your own site you can leave a trackback. As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once.

Evolution of a time piece
i-marco posted an entry on his weblog about a very original clock he worked out in flash. It needs some getting used to [reading his article might help] but when you do find out, you’ll notice it’s quite ingenious. Nice one!

Check out i-marco’s clockSent on 15 April '05 - 09:18 , via Curieus | Style
Flash klok
Marco heeft een flash klok gemaakt die absoluut weer het bekijken waard is. Ik ga hem hier niet installeren aangezien er voor mijn lay-out te veel kleur in zit, maar opnieuw is ‘onze’ Marco weer lekker bezig.Sent on 16 April '05 - 11:28 , via Bakkel's weblog
 

  • Featured Links
RockySomewhere near the Orion NebulaBookalicio.usGolden Gate BridgeThames River BankJackie and mePimpin' it