Jul20
Category:General News

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!

2 Responses to “Dissappearing DIV”

  • Derek
    August 5th, 2006
    1:20 am

    An interesting idea. Doesn’t seem to do what it’s supposed to do in Safari though. Inspirational nonetheless.


  • Zach
    August 5th, 2006
    3:24 pm

    Weird, I had thought I tested it in Safari. I must have been using Firefox at the time.

    hhmmm…I’ll have to look into this. I bet I have to add some kind of handling for Safari.


  • Leave a Reply