When I first created this this little experiment a few months ago I wanted to replicate the neat window effects that the OS X gui can do. Obviously that would have been impractical for a full-blown windowing system, but for tooltips it could have easily worked. Unfortunately my Flash animation skills are lacking; however, I make up for this with Actionscript.
Is this necessary? Are poppuping up Flash versions of normally dhtml tooltips useful? In terms of practicality, no. Sometimes the tooltips themselves take a while to load up and finally display. Otherwise, with flash we can accomplish some cool things such as rounded corners, drop shadows, transparency, and neat shapes all without having to mangle with the DOM or with CSS.
And so we come to the question: but why? Simply put, it was a fun experiment. I wanted to see if I could do a better job than last time and I succeeded.
Approach and Limitations
Normal tooltips come up when you have a "title" or "alt" (or both, as is the case when pairing the <a> and <img> tags) attributes set on elements. These generally work well, but for large amounts of text get ugly. Also, HTML cannot be injected into these attribute and be expected to degrade gracefully as well.
This is where definition lists come in. As the name implies, these lists allow you to specify a string and also specify definitions for it. I chose these for two reasons. First, I could easily contain the entire tooltip within the text within a simple list. Second, the definition list lends itself well to the concept of tootlips because the definition is implicitly highly relevant to what's being defined--at least that's how I rationalized it in terms of a search engine spider parsing the HTML.
An inherent limitation with definition lists is that they are block-level elements. As such, they cannot be placed within HTML paragraphs (<p>) and similar tags. If this idea was to be actually pursued, then they should be made to simply replace normal tootlips offered by the title and alt tag attributes. In retrospect, making my life easier by doing this would have been a good idea, but oh well. I wanted to get HTML into them!
Helpful 3rd Party Code
Putting it Together
This was a fun diversion and experiment. I think last time I was overcomplicating--even though the result was rather simple. This time around I've made a rather simple script that can be seamlessly integrated into any website (although I don't suggest it).