Insert div over flash in IE

后端 未结 6 1076
暗喜
暗喜 2021-01-11 11:44

I have a menu bar which has several submenu items. The homepage contains a flash animation which is located under the menu bar. When the submenu items are over the flash fi

6条回答
  •  走了就别回头了
    2021-01-11 12:22

    There is a better solution to this as adding that parameter does not always work especially if using flash object within a div.

    At the end of the page register the flash object like so:

    
    

    Then call a javascript function like so:

    
    

    This function does the following:

    
    

    And this works on all browsers 100%


    You can also use:

    document.getElementById('FlashIdName').style.visibility = 'hidden';
    

    Now if you are calling actions on the div tag like for example:

    document.getElementById('MyDiv').style.visibility = 'block';
    

    or document.getElementById('MyDiv').style.visibility = 'none';

    What you need to do is first do the div action then call the flash visibilty in that order:

    document.getElementById('MyDiv').style.display = 'block';
    document.getElementById('FlashIdName').style.visibility = 'visible';
    

    Enjoy !

提交回复
热议问题