Family Encyclopedia >> Electronics

How to Embed SWF Flash Files in WordPress Posts: Plugin and Manual Code Guide

As a seasoned WordPress developer with years of hands-on experience embedding multimedia, I know the challenges of adding Shockwave Flash (SWF) files to posts. WordPress.com blocks Flash for security, but on self-hosted sites, you have reliable options. Whether you're code-averse or prefer customization, here's how to embed SWF files using a plugin or HTML—no guesswork involved.

Using a Plugin (Easiest for Beginners)

Install the trusted Easy Flash Embed plugin—it's lightweight with zero admin settings. Simply add this shortcode in your post editor:

[swf src="https://www.example.com/my-flash-file.swf" width=300 height=100]

Update the src with your SWF URL, and adjust width and height as needed. Download the Easy Flash Embed plugin today for seamless results.

Manual HTML Method (For Full Control)

For developers wanting standards-compliant embedding across browsers (including legacy IE support), use the <object> element with an inner <embed>. This method works in posts, pages, or themes.

Here's the proven code:

<object width="300" height="120" data="https://www.example.com/my-flash-file.swf" type="application/x-shockwave-flash"
       >
<param name="movie" value="https://www.example.com/my-flash-file.swf" />
<param name="wmode" value="transparent" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="https://www.example.com/my-flash-file.swf"
       width="300" height="120"
       wmode="transparent"
       allowScriptAccess="sameDomain"
       type="application/x-shockwave-flash"
       alt="Your alt text here"
       />
</object>

Customize alt text, dimensions, or add params like wmode=transparent to avoid overlay issues (e.g., floating elements). Pro tip: Always use transparent wmode to prevent conflicts—see our guide on preventing YouTube oEmbed from overriding content.