Monthly Archives: April, 2009
MooTools 1.2.2 is here and it’s very cool
What a great surprise it’s been to see the major updates in Mootools Core are around the Class object. Object Oriented javascript is the future and MooTools is the freeway to get there. Now, better than ever. MooTools 1.2.2 is a mainly a bug fix release but it also includes an almost entirely new Class.js. [...]
Synchronizing sounds (or trying to…)
The purpose of this demo is to test and see how possible is to synchronize sounds with DOM effects while being played in different threads or timers. It looks like, while synchronizing sounds with DOM effects is quite simple and works fine, sounds played by different threads or timers get out of sync after a [...]
Setting up timers and intervals inside JS objects
It may seem trivial but it has its tricky point. Usually, in procedural Javascript (this is, non object oriented programming), timers are set up passing the callback function on a string: function hello() { alert("hello"); } // Will execute hello() after 10 seconds setTimeout('hello()', 10000); For this code to work, hello() has to be [...]
Regular expressions in Freemarker
At work we have our custom CMS (SWITCH) which uses Freemarker to create template-based pages. So far I had never needed this, but today I had to figure out how to strip all html tags from a text block. Well, nothing like a good RegEx for that :) Trimming an HTML block to 100 characters [...]