SwfObj WordPress Plugin

The SwfObj WordPress Plugin simplifies embedding Flash objects in WordPress posts and pages using SwfObject 2.2. For more information on SwfObject, visit the SwfObject wiki.

SwfObj enables you to embed Flash objects with a simple shortcode. While the shortcode can be as basic as [swfobj src="flashcontent.swf"], it also allows for more advanced settings. Here are some shortcode examples using attributes.

[swfobj src="flashcontent.swf" height="200" width="600"]
[swfobj src="flashcontent.swf" allowfullscreen="true"]

A list of current attributes is outlined below.


The following attributes are currently available for use in the shortcode. Default values, highlighted, are used if the attribute is not explicitly given. Attributes with no default are only included in the embedded object if a value is provided in the shortcode. You can modify the default values in the Admin section under Settings > SwfObj

  • src: REQUIRED ATTRIBUTE. The URL of the swf to be embedded. No content will be shown if this is not provided.
  • align: The alignment of the embedded object.
  • allowfullscreen: Whether fullscreen mode is enabled in the embedded object. false
  • alt: Alternative html content to be rendered if the Flash plugin is not installed in the viewer's browser. '<p>The Flash plugin is required to view this object.<p>'
  • class: Class name to apply to the object.
  • express_install_swf: This swf will be shown if the client does not have the minimum Flash player version to play the object. expressInstall.swf (included in the plugin)
  • flashvars: Set variables inside your Flash object through this attribute.
  • height: The height of the embedded object. 300
  • id: The id to give to the object. swfobj_XX Must be unique on the page.
  • name: Name to give the object.
  • required_player_version: The minimum Flash player version required to view this object. 8.0.0
  • width: The width of the embedded object. 400
  • wmode: Set the background of the object as transparent or opaque.


This plugin requires WordPress version 2.5 or higher as it is dependent on built in shortcode support.


Here are the features I am either currently implementing or hope to be implementing soon.

  • Dynamic Flash embedding available as well as static.
  • Support for all options in SwfObject: play, loop, menu, quality, scale, salign, wmode, bgcolor, base, swliveconnect, flashvars, devicefont, allowscriptaccess, seamlesstabbing, allownetworking
  • Allow the user to customize the options available in the Flash media insert popup.
  • Make it compatible with versions of WordPress prior to 2.5.
  • Internationalizing the text, with multi-lingual support.
  • Media button in the WordPress editor to allow direct Flash object upload and insertion into the post/page, similar to the current image uploading process.

Feel free download the plugin and give it a try. Any feedback is welcome. Thanks.