Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activating flash on mouse rollover

Status
Not open for further replies.

noyes99

Programmer
Jun 25, 2002
38
IN
Hi,

I need a bit of a help. I am trying to display a flash file ( or a gif if no flash ) and it seems to be working fine on IE6. yet it doesn't work on netscape6. Could any one help me out and point out what is wrong with my code?

Thanks a lot, much appreciated.

Code
----------------------------------------------------------
<table><tr><td>
<DIV id=&quot;bgimage&quot; style=&quot;position:absolute; visibility: hidden; left:150; top:260; z-index:1;&quot;>
<script language=&quot;javascript&quot;>
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes\[&quot;application/x-shockwave-flash&quot;\] ) {
// Check for Flash version 5 or greater in Netscape
var plugin = navigator.mimeTypes\[&quot;application/x-shockwave-flash&quot;\].enabledPlugin;
if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(&quot;.&quot;)-1))>=5)
UseFlash = 1;
} else if (navigator.appName && navigator.appName.indexOf(&quot;Microsoft&quot;) != -1 &&
navigator.userAgent.indexOf(&quot;Windows&quot;) != -1 && navigator.userAgent.indexOf(&quot;Windows 3.1&quot;) == -1) {
// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
UseFlash = 1;
}

// Allow the cookie to override
if (document.cookie && (document.cookie.indexOf(&quot;FlashRenderOption=P&quot;) >= 0)) {
UseFlash = 1;
} else if (document.cookie && (document.cookie.indexOf(&quot;FlashRenderOption=I&quot;) >= 0)) {
UseFlash = 0;
}


if ( UseFlash ) {
document.write('<OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;');
document.write(' codebase=&quot; document.write(' ID=VTS701_flash_336x280 WIDTH=336 HEIGHT=280>');
document.write('<PARAM NAME=movie VALUE=&quot;/flash_files/VTS701_flash_336x280.swf&quot;> <PARAM NAME=loop VALUE=false> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#FFFFCC> ');
document.write('<EMBED src=&quot;/flash_files/VTS701_flash_336x280.swf&quot; loop=false quality=best bgcolor=#FFFFCC ');
document.write(' swLiveConnect=FALSE WIDTH=336 HEIGHT=280');
document.write(' TYPE=&quot;application/x-shockwave-flash&quot; PLUGINSPAGE=&quot; document.write('</EMBED>');
document.write('</OBJECT>');
} else if (!(navigator.appName && navigator.appName.indexOf(&quot;Netscape&quot;)>=0 && navigator.appVersion.indexOf(&quot;2.&quot;)>=0)) {
document.write('<IMG SRC=&quot;/images/VTS-701_prevent_336x280.gif&quot; WIDTH=336 HEIGHT=280 usemap=&quot;#cfo030802&quot; BORDER=0>');
}
</script>
<NOSCRIPT><IMG SRC=&quot;/images/VTS-701_prevent_336x280.gif&quot; WIDTH=336 HEIGHT=280 usemap=&quot;#cfo030802&quot; BORDER=0></NOSCRIPT>
</DIV>
</td></tr></table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top