How To Embed SWF In HTML Code Or WordPress Post?

For those who would like to show or add a Shockwave Flash game in the HTML page or blog post, here is a template of code for reference.

Unlike embedding Flash Video file (FLV) in HTML code, the template code used to embed SWF file is relatively “easier” and “simpler”.

Although, it’s still a “satay” of OBJECT tag and EMBED tag, in order to satisfy Microsoft and non-Microsoft web browsers, especially those older versions.

According to Adobe Technote, OBJECT tag is favoured by Internet Explorer 3.0 or later or any web browser that supports Flash ActiveX control, while the EMBED tag is used by Netscape Navigator 2.0 or later or web browsers that use Netscape-compatible plugin version of Flash Player.

Template code for embedding SWF file in HTML code or blog post

1) Upload the SWF file (Shockwave Flash) to web directory. Using WordPress blog as example, this is as simple as uploading an image file in post editor mode.

2) Copy the web path of the uploaded SWF file.

3) Copy and paste the following code into HTML code or blog post editor, update the red-colour text with the web path of uploaded SWF file.

The blue-colour text is optional for change. While the width and height are self-explainable, the id is “nick-name” of the SWF file and it should be unique among embedded SWF files within the single web page. kij Milos Lazarevic vrsta_amebe

Note: Don’t simply copy and paste this template code without updating the SWF’s web path, as the hotlinking prevention will stop it from working on your sites.

 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="498" height="380" id="test1">
<param name="movie" value="" /><embed src="" width="498" height="380" name="test1" type="application/x-shockwave-flash" 
pluginspage="" /></object>
mihajlo.marjanovic.txt · Last modified: 2012/02/24 00:28 by mihajlo.marjanovic
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki