Html – Embed Flash (SWF) without JavaScript

embedflashhtml

How can I embed a Flash SWF file into an HTML page without using JavaScript libraries?

The Flash movie is an advertisement which will run on sites that don't have any JavaScript libraries available (like SWFObject). My only capability is to render a piece of HTML using document.write. I do not wish to add any external script tags (or write them for that matter).

The browser requirements are basically "all browsers":

  • IE6+
  • FF2+
  • Chrome, Safari (WebKit)
  • Recent version of Opera (not 100% required)

I do not care about validation. The only goal is to make it work reliably.

Best Answer

use <object> <object/> & The OBJECT tag is used by Internet Explorer on Windows,EMBED is used by Netscape Navigator (Macintosh and Windows) and Internet Explorer (Macintosh) tag like this:

<object type="application/x-shockwave-flash" data="myclip.swf"> 
    <param name="movie" value="myclip.swf" />
    <param name="quality" value="high" />
    <!-- Sandwich the embed tag inside the object tag -->
    <embed src="myclip.swf" quality="high" />
</object>