How to add Flash content within a webpage in HTML?
Flash is a vector animation software that was created with the intention of creating animations for web pages. Because vector graphics are so light, they are perfect for the web. There are different ways to insert a Flash file in HTML.
Method-1: Using object and embed tag: The web standard for embedding content on a web page is the <object> tag, but the <embed> tag is a holdover from the days of the Netscape browser and is not a legitimate tag in web standards. Due to its great compatibility with many browsers, it is still widely used to embed Flash content today. Many major websites, such as YouTube, still provide embed codes in the above format.
<object width="500" height="400"> // You should replace somefilename with // your own filepath or URL of your file <param name="movie" value="somefilename.swf"> <embed src="somefilename.swf" width="500" height="400"> </embed> </object>
Nowadays Flash becomes outdated and is not supported by any browser. That’s why you see the output like this –
Method-2: Using Comment tags: Far better, the standards-compliant solution is to include the comment tags that Internet Explorer browsers utilize. This approach is a hack, yet it adheres to the W3 standard and contributes to web standardization.
<![if !IE]> // You should replace somefilename with your // own filepath or URL of your file <object type="application/x-shockwave-flash" data="somefilename.swf" width="300" height="200"> </object> <![endif]> <!--[if IE]> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab #version=6,0,0,0" width="300" height="200"> <param name="movie" value="somefilename.swf" /> <![endif]-->