Anybody interested in neat javascript/actionscript tricks should check this out. It’s a new website I’m creating for an organization called Dynamic Essentials. The neat part of it is the self-hiding flash movie. Once it’s through playing, actionscript is used to call “javascript:hideMovie();” (via the getURL function), which in turn slowly reduces the size of the DIV containing the flash as well as the flash object itself. (For the impatient, there’s a “Hide Movie” link in the upper right hand corner)
Note: If your DIV doesn’t contain a flash object, you could probably get by with just resizing the DIV. However, a trait of flash is that when it’s embedded on a webpage, it’s always rendered on the top most layer. It doesn’t matter if it’s container gets smaller, the flash object will not.
In debugging this, I found out that Internet Explorer uses the <OBJECT> tag for embedding flash, while Firefox uses the <EMBED> tag found within the <OBJECT> tag. So….long story short, to avoid throwing errors, the javascript had to detect which browser was being used and then determine which element needed to be resized.
Fun Stuff!



