Forum Moderators: open
[java.sun.com...]
I had to modify a couple of things to make it validate (see the \) in the
object p and embed close tags.. also, the author didnt close the embed tag in the article (see the url) so I closed it in mine.
This validates, and the flash appears in both netscape and ie.
(this is not a fix limited to flash only, other mime types and active x
clsid's can be used)
You can check the page I did this on, as proof (there are links to the wc3 validator on the page) and the code is exactly the same as what I used on the site, minus the real file name.
<script language="Javascript" type="text/javascript">
var _app = navigator.appName;
if (_app == 'Netscape') {
document.write('<embed src="flash.swf"',
'width="436"',
'height="60"',
'type="application/x-shockwave-flash">',
'<\/noembed>');
}
else if (_app == 'Microsoft Internet Explorer') {
document.write('<object ',
'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"',
'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"',
'type="application/x-shockwave-flash"',
'width="436"',
'height="60">',
'<param name="movie" value="flash.swf">',
'<\/object>');
}
else {
document.write('<p>Sorry, unsupported browser.<\/p>');
}
</script>
[edited by: BlobFisk at 10:30 am (utc) on May 6, 2005]
[edit reason] No URLs please! See TOS [webmasterworld.com] [/edit]
[macromedia.com...]