swfObject Reloaded

Allows easy embedding (shortcode inserted via Add Media button while posting) and better management of swf files.


Contributors: CodeAndReload
Donate link: http://www.codeandreload.com/wp-plugins/swfobjectreloaded#donate
Tags: media, swf, animation, flash, flex, javascript, embed, insert, media-button, shortcode, upload
Requires at least: 2.9
Tested up to: 3.0.1
Stable tag: 1.0


Description

This plugin allows easy embedding of swf files and better media management for swf files, allowing swf files to have a height, width, and their own minimum flash version. This plugin adds a swfobject shortcode that can be inserted via the "Add media" button while editing a post. SWF files are now also automatically embedded on their respective attachment pages.


Installation

Installation is simple and straight-forward:

  1. Upload swfobject_reloaded.zip to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Configure the plugin options under the 'Settings->Media' menu in WordPress. Don't forget to Save Changes!

Frequently Asked Questions

How do I embed a swf in a post (or on a page)?

To embed a swf in a post (or page), do the following:

  1. Upload the swf, either directly into the Media Library or when creating or editing the post (or page).
  2. Enter the width and height of the swf. If the swf requires a different version of Flash than you have configured in the 'Settings->Media' menu in WordPress, enter that version number also.
  3. Click 'Insert into Post' to embed the swf. This will add the swfobject shortcode to the post (or page).
  4. At this point, you can edit the shortcode to provide other parameters for the swf, if desired.

What are the other parameters available for use with the swfobject shortcode?

At a minimum, the swf media file must be specified, either as the media ID number (entered automatically by swfObject Reloaded when the swf is inserted into the post or page), or as a URL.

Here are all the parameters that can be specified:

  1. media ID or URL (required)
  2. width
  3. height
  4. flashvars
  5. base

Parameters must be entered in the order shown. To skip a parameter, just leave it completely blank (i.e., don't type anything) followed by the comma to separate it from the next parameter.

See Flash OBJECT and EMBED tag attributes for more information on using the flashvar and base parameters.

Examples:

[swfobject]573[/swfobject]

This is the simplest usage, specifying only the media ID of the swf.

[swfobject]http://www.example.com/test.swf,300,200[/swfobject]

Another simple example using an external URL. Note that the width and height parameters should be specified.

[swfobject]http://www.example.com/test2.swf,250,120,foo:"bar",http://www.example.com/[/swfobject]

This example uses an external URL, and includes the width, height, flashvar (foo:"bar") and base (http://www.example.com/) parameters.

What size will the swf file be when displayed?

The screen size of the swf file is determined by checking for the following, in this order:

  1. dimensions specified in the shortcode
  2. dimensions assigned to the media in the Media Libary
  3. dimensions configured as the "Maximum Embed Size" on the Settings->Media menu
  4. dimensions configured as the "Image Sizes->Medium Size" on the Settings->Media menu

If none of those are found, an error message will be displayed instead of the swf.

What is the maximum size to which the swf will will be scaled?

If Scale Flash Content is checked, the screen size of the swf file will be scaled (preserving its aspect ratio) to:

  1. dimensions configured as the "Maximum Embed Size" on the Settings->Media menu
  2. dimensions configured as the "Image Sizes->Medium Size" on the Settings->Media menu

What are the various swfobject settings on the Media menu?

The settings define how Flash content will be embedded with the shortcode, as follows:


Screenshots

  1. This is the media upload screen showing the new fields added by swfObject Reloaded for Width, Height and SWF Version.
  2. This is the swfobjects settings added to the Settings->Media menu.

Changelog

1.0


Upgrade Notice

1.0
Initial public release.

Support

Technical support for this plugin will be provided via the WordPress plugin forum. Additional support may be available at plugin's homepage.