From all the people on this site i am probably the least qualified to answer your question, but after messing around for a couple of minutes i'd at least like to offer you something to pass time until one of the more skilled fellows comes along and makes everything right again. :)
Well, first off, i opened your example, however i found that it ran too badly (my laptop doesn't support webgl), so i made my own one - a bit simplified, yet seems to work decently.
Now, it is made on r142, so there might be bugs in later versions, but i at least tried. The example itself should be simple enough and i put in a comment or two there too (<30 events).