Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:06

Kevin's Hiding Flash Clip Function


Poster: tepidarium
Dated: Tuesday October 7 2003 - 18:53:34 BST

Hi,

I have searched the forum and found Kevin's hide flash script function. I have applied the function to a test page. I cannot seem to make it work in the appropriate affected browsers (Netscape 4.x, Opera 5.x)

http://www.citytech.cuny.edu/mm-flash.html

Also, for what it's worth - a separate but related issue:

I cannot seem to make the "hidediv" parameter work when surrounding the flash object with a div tag and appropriate id and name parameters.

Besides defining Hidediv in the menu properties in menu_data.js, is there anything else that needs to be done?

Thanks for your time.


Poster: Hergio
Dated: Tuesday October 7 2003 - 19:06:52 BST

Try this

http://www.milonic.com/forum/viewtopic.php?t=2193


Poster: tepidarium
Dated: Tuesday October 7 2003 - 19:28:00 BST

Hergio wrote:


Thanks for your reply. I neglected to mention that I had already tried the <param name="wmode" value="transparent">

It seems that this is not supported by netscape 4.x - the only browser (besides Opera) where this problem exists.

Has the hidediv function been depricated in Milonic Menu? Or, as is more likely the case, am I doing something wrong? :D

In the initial url I posted, I have only implemented kevin's fix, which (probably due to incorrect coding) does not work.

Re: Kevin's Hiding Flash Clip Function


Poster: kevin3442
Dated: Tuesday October 7 2003 - 20:03:42 BST

tepidarium wrote:
I have searched the forum and found Kevin's hide flash script function. I have applied the function to a test page. I cannot seem to make it work in the appropriate affected browsers


Hi,

I wrote that script about a year ago for version 3. The approach should still be valid, although the code might need a little tweaking to work with version 5. I'll have a look later today.

Kevin


Poster: kevin3442
Dated: Friday October 10 2003 - 7:12:00 BST

Hi Tep,

I did get a chance to have a look and made some necessary code adjustments. I have a feeling that, for some browsers at least, there might be some more tinkering to do... I just haven't had time to go through it as thoroughly as I'd like. I whipped up a couple of examples... flash, forms, java applet, and iframe; all embeded objects -- in some browsers -- that will layer over dhtml in various, mostly older, browsers. I just used the standard downloadable horizontal menu as a place to start (hope you don't mind Andy).

Normally, I'd add at least some basic documentation to it and test it better before uploading, but I haven't had as much time to do that the last couple of days. I'm leaving for vacation tomorrow (YAY! ... later today actually) and will be out of touch for a week and a half, so I thought I'd go ahead and upload this for you so you might at least try it out and see if the general approach will help. I'm sure I'll have time for improvements/fixes when I get back. In the meantime, feel free to give it a try. Download mm_hideDiv.zip, unzip it to a new folder, copy the latest menu scripte (milonic_src.js, mmenudom.js, mmenuns4.js) into the same folder, then open the index.htm file. The examples can be loaded from the "Hide Div Examples" menu.

As I said, there really isn't any documentation save for a few meager comments in mm_hideDiv.js. The approach is logically the same as the one I did for version 3:

(1) Wrap the offending embeded object (flash, form, java applet, iframe) in a <div> and give the div an ID.

(2) Use a menu item's onfunction property to call mm_hideDiv(divID, menuNames); it should be called from the menu item that opens a menu that will end up falling behind the offending embeded object (flash, form, whatever). The parameters you pass to the function are:

divID - a string containing the ID of the div you want to hide.

menuNames - a string containing a comma-separated list of the names of all menus that, when open, overlap the offending embeded object. The div should remain hidden as long as any one of those named menus is open, then reappear as soon as none of those named menus are open.

There are some user-adjustable parameters at the top of mm_hideDiv.js that may need to be tweaked, depending on individual implementations of the menu system. There's also a Browser Detection object called sniffBrowser() toward the top of mm_hideDiv.js that you can add more "bad" browsers to, as needs require, depending on your targeted platforms.

Open the included menu_data.js file and examone the Main Menu items to see how the mm_hideDiv() function is used in conjunction with each menu item's onfunction property. Note that this won't work with NS4 because, as far as I can tell, onfunction does not yet work with NS4. Maybe try in in IE4 or Opera6.

Sorry the instructions and examples aren't better; I'll hope to improve that upon my return. Hope you (and maybe a few others) find this useful.

Aloha!

Kevin


Poster: tepidarium
Dated: Friday October 10 2003 - 16:12:35 BST

Kevin - Thank you so much for taking the time to rework this. I am going to download it and try it out and will get back to you. I hope in the future Milonic might put back a general hidediv function for the menu.

Have agreat time on your vacation, and once again thanks for providing this code.
:D