PDA

View Full Version : Javacsript Menu displays flash



funksoul
06-04-2007, 03:28 PM
1) Script Title: AnyLink Vertical Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.htm

3) Describe problem: Menu displays under flash

Dear all,

I use PHP script to utilize this js from DD which is working fine. I made a flash and tried put that on the web page. However, the js menus are under flash and I'd rather put the js menu on top of the flash. Help is appreciated. Thank you.

jscheuer1
06-04-2007, 03:32 PM
Follow the detailed information at:

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14201

Or, if this short version (good in most cases) fixes it, so much the better! Add in this language to your object/embed tag:

Add the following parameter to the OBJECT tag:

<param name="wmode" value="transparent">

Add the following attribute to the EMBED tag:

wmode="transparent"

If you are using script to generate the tags (as is frequently done to avoid the 'click to activate' feature in some browsers), the wmode transparent must be passed to the script. This is easily accomplished but, varies depending upon the sort of script one uses. Some scripts do it automatically.

funksoul
06-04-2007, 03:49 PM
wow, John. You are fast!!

Thank you very much as your suggestion works perfectly.

funksoul
06-04-2007, 04:11 PM
Just one more thing, for IE7, viewers have to click the flash for the first time to activate the interaction from flash. How can I pass the "wmode" setting to the flash or is there anything I should do? thx!

jscheuer1
06-04-2007, 04:23 PM
If the code for the flash is written to page using javascript from an external script, this will overcome 'click to activate' in IE and Opera. If you need help doing that, try my wizard:

http://home.comcast.net/~jscheuer1/side/click_to_activate_w.htm

Just follow the instructions.

funksoul
06-04-2007, 04:40 PM
oh man, this is so nice. The wizard is just darn cool.

TheCrazyLexx
08-05-2007, 09:26 PM
I'm also having the same problem of a dropdown menu hiding behind a flash applet. Here's what I've done so far:



<noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="200">
<param name="wmode" value="transparent">
<param name="movie" value="/templates/{$theme}/slidebar/slidebar.swf?fs_path=/templates/{$theme}/slidebar" />
<param name="quality" value="high" />
<embed src="/templates/{$theme}/slidebar/slidebar.swf?fs_path=/templates/{$theme}/slidebar" width="500" height="200" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object></noscript>
<script type="text/javascript" src="/templates/{$theme}/js/activate.js">
/* Generated by: Click to Activate Override Wizard
* John Davenport Scheuer email:jscheuer1REMOVETHISTOMAIL@comcast.net
* This credit must remain for legal use. */
</script>




document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="200">\n\
<param name="movie" value="/templates/gamepals07/slidebar/slidebar.swf?fs_path=/templates/gamepals07/slidebar" />\n\
<param name="quality" value="high" />\n\
<embed src="/templates/gamepals07/slidebar/slidebar.swf?fs_path=/templates/gamepals07/slidebar" width="500" height="200" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>\n\
</object>');


The menu still gets covered up by the flash applet. Any ideas where I've made a mistake in my code?

Thanks,
TOM

thetestingsite
08-05-2007, 09:30 PM
The only thing that I can see is in the second code snippet you failed to put the wmode param in the object tag like so:



document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="200">\n\
<param name="wmode" value="transparent">\n\
<param name="movie" value="/templates/gamepals07/slidebar/slidebar.swf?fs_path=/templates/gamepals07/slidebar" />\n\
<param name="quality" value="high" />\n\
<embed src="/templates/gamepals07/slidebar/slidebar.swf?fs_path=/templates/gamepals07/slidebar" width="500" height="200" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>\n\
</object>');


Hope this helps.

TheCrazyLexx
08-05-2007, 09:44 PM
The only thing that I can see is in the second code snippet you failed to put the wmode param in the object tag like so:



document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="200">\n\
<param name="wmode" value="transparent">
<param name="movie" value="/templates/gamepals07/slidebar/slidebar.swf?fs_path=/templates/gamepals07/slidebar" />\n\
<param name="quality" value="high" />\n\
<embed src="/templates/gamepals07/slidebar/slidebar.swf?fs_path=/templates/gamepals07/slidebar" width="500" height="200" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>\n\
</object>');


Hope this helps.

Nope, that doesn't work. If I insered the "<param name="wmode" value="transparent"> code into the JavaScript, the flash applet isn't displayed any longer

thetestingsite
08-05-2007, 09:47 PM
Sorry, forgot about the \n\ at the end of it. I editted my post above to correct this.

TheCrazyLexx
08-05-2007, 09:53 PM
Great, that did the trick! Appreciate your help :)

joshfraz
08-13-2009, 10:49 AM
For anyone looking for a programmatic way to fix this issue using javascript, you may be interested in this blog post which explains how to do it:

http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/