Thursday, October 04, 2007

Fading News Scroller

My employers needed to display news on their homepage. To save us from the dreaded Marquee Of Death or the Flickering Ticker of Doom, I decided that a fading news display would be far more attractive.

I avoided Flash like the plague due to time constraints, so Javascript was the way to go.

After much searching for a piece of code on the Net, I eventually found one. But, after implementing it (and not particularly successfully), I realised that most of the code size and complexity was tied up in the fade-in fade-out functionality. "Wait a minute", I said to myself, "I'm already doing that, and using Prototype/Scriptaculous".

So, I searched in vain for something that would use those excellent libraries. Eventually, I succumbed to my least favourite thought: I'll have to bloody program it myself. In Javascript. Joy of all-consuming joys.

The fruits of my labour produced ColdFusion code.

So, here it is: in all of it's fading glory. Please remember to get Prototype and Scriptaculous (the Effects library) and include it in your HTML!

Download FadingNews.cfm

No comments: