
Originally Posted by
kows
Another reason one might use this JavaScript function nowadays is for validation. The original way of embedding Flash files using the <embed> tag doesn't validate. This is because the <embed> tag was never a part of any HTML standard. To get the code to validate, however, only the following mark-up is required:
HTML Code:
<object type="application/x-shockwave-flash" data="path/to/file.swf" width="X" height="Y">
<param name="movie" value="path/to/file.swf" />
</object>
I managed to get the flash to show without needing to use annoying javascript using this code:
HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled-1</title>
</head>
<body bgcolor="#ffffff">
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="Untitled-1.swf" width="550" height="400">
<!--<![endif]-->
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</body>
</html>