Joe Berkovitz has written a sample application called ReviewTube which "Allows users to create time-based subtitles for any YouTube video, a la closed captioning. These captions become publicly accessible, and visitors to the site can browse the set of videos with captions. Think of it as a “subtitle graffiti wall” for YouTube!"
The app is the example used to demonstrate the MVCS framework/approach for building Flex applications.
http://www.joeberkovitz.com/blog/reviewtube/
Not sure if this will help with the colored rectangles and whatnot, but it's a decent place to start.