Kimili Flash Embed

Provides a WordPress interface for SWFObject 2, the best way to embed Flash content on any site.

Author:Michael Bester (profile at wordpress.org)
WordPress version required:2.8
WordPress version tested:4.3.33
Plugin version:2.5.3
Added to WordPress repository:04-04-2008
Last updated:31-08-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:70
Rated by:16
Plugin URI:http://www.kimili.com/plugins/flash-embed
Total downloads:434 766
Active installs:4 000+
plugin download
Click to start download

Kimili Flash Embed is a plugin for WordPress that allows you to easily place Flash movies on your site. Built upon SWFObject javascript code, it is standards compliant, search engine friendly, highly flexible and full featured, as well as easy to use.

Kimili Flash Embed utilizes SWFObject 2.2, is fully compatible with WordPress 2.6 and later and plays well with most other plugins.

For non-english users, Kimili Flash Embed has been localized to the following languages:

  • Belorussian
  • Bulgarian
  • Dutch
  • German
  • Hindi
  • Irish Gaelic
  • Latvian
  • Romanian
  • Russian
  • Serbo-Croatian
  • Spanish
  • Ukranian

Basic Usage

Once the plugin is installed and activated, you can add Flash content to your pages using a tag like this in your articles:

[kml_flashembed movie="filename.swf" height="150" width="300" /]

When you use the Rich Text Editor in either Visual or HTML modes, you should see a button on the right end of the toolbar with a Flash player logo in the visual mode or a button that reads “Kimili Flash Embed” in HTML mode. Click it, and you will be presented with the Kimili Flash Embed Tag Generator which presents you with all possible embedding options. Set the options according to your needs and click the “Generate” button to drop a KFE tag in your editor.

The only required attributes in a KFE tag are movie, height, and width. See the the following sections all available attributes and advanced usage.

Available Attributes

All of the available attributes for the KFE tag should be lowercase and double quoted. They are:

There only one attribute required in a KFE tag: movie. All of the available attributes for the KFE tag should be lowercase and double quoted. They are:

MOVIE (required)
The path and file name of the Flash movie you want to display.

ALLOWFULLSCREEN
(true|false) Enables full-screen mode. The default value is false if this attribute is omitted. You must have version 9,0,28,0 or greater of Flash Player installed to use full-screen mode.

ALLOWFULLSCREENINTERACTIVE
(true|false) Enables full-screen interactive mode, in which content running in Flash Player can fill the entire screen and accept text input. The default value is false if this attribute is omitted. You must have version 11,3,0 or greater of Flash Player installed to use full-screen interactive mode. See Adobe’s developer guide for more info.

ALLOWNETWORKING
(all|internal|none) Controls a SWF file’s access to network functionality. The default value is ‘all’ if this attribute is omitted.

ALLOWSCRIPTACCESS
(always|never|sameDomain) Controls the ability to perform outbound scripting from within a Flash SWF. The default value is ‘always’ if this attribute is omitted.

ALTTEXT (very deprecated)
The text you want to display if the required Flash player is not found. I strongly recommend that you “nest alternative content in your KFE tags”:#altContent in favor of using this attribute.

BASE
( . or base directory or URL) – Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files.

BGCOLOR
(#RRGGBB, hexadecimal RGB value) – Specifies the background color of the Flash movie.

DEVICEFONT
Specifies whether static text objects that the Device Font option has not been selected for will be drawn using device fonts anyway, if the necessary fonts are available from the operating system.

FID
Use this attribute to give your movie a unique id on the page for scripting purposes. If omitted, a random ID is assigned to your movie.

FVARS
Pass variables (name/value pairs) into your movie with this attribute. You can pass in as few or as many variables as you want, separating name/value pairs with a semicolon. Syntax is as follows:

  • fvars=" name = value ; name = value "

In addition to hard coded values, you can also pass in arbitrary Javascript or PHP code, like such:

  • Javascripthref = ${document.location.href;}
  • PHPdate = ?{date('F j, Y');}

These can be strung together in any order inside the fvars attribute:

  • fvars=" href = ${document.location.href;} ; date = ?{date('F j, Y');} ; name = Johnny Bravo "

FVERSION
You can specify what version of the Flash player is required to play your movie. If you omit this attribute, the value set in the plugin options will be used.

HEIGHT
The height of the Flash movie. You can specify in pixels using just a number or percentage. If you omit this attribute, the value set in the plugin options will be used.

LOOP
(true|false) – Specifies whether the movie repeats indefinitely or stops when it reaches the last frame. The default value is true if this attribute is omitted.

MENU
(true) displays the full menu, allowing the user a variety of options to enhance or control playback.
(false) displays a menu that contains only the Settings option and the About Flash option.

PLAY
(true|false) – Specifies whether the movie begins playing immediately on loading in the browser. The default is true.

PUBLISHMETHOD
(static) – Embed Flash content and alternative content using standards compliant markup and use unobtrusive JavaScript to resolve the issues that markup alone cannot solve.
(dynamic) – Create alternative content using standards compliant markup and embed Flash content with unobtrusive JavaScript.

If you omit this attribute, the value set in the plugin options will be used.

QUALITY
(low|high|autolow|autohigh|best) – Specifies the playback quality of the Flash movie.

SCALE
(showall|noborder|exactfit) – Dictates how the movie fills in the specified target area.

SEAMLESSTABBING
(true|false) Specifies whether users are allowed to use the Tab key to move keyboard focus out of a Flash movie and into the surrounding HTML (or the browser, if there is nothing focusable in the HTML following the Flash movie). The default value is true if this attribute is omitted.

SWLIVECONNECT
(true|false) Specifies whether the browser should start Java when loading the Flash Player for the first time. The default value is false if this attribute is omitted. If you use JavaScript and Flash on the same page, Java must be running for the FSCommand to work.

TARGET
When setting publishmethod to dynamic, this is the ID of an element on your page that you want your Flash movie to display within. If you don’t set this attribute, a random target ID will be generated. Will be ignored if publishmethod is static.

TARGETCLASS
This is the class name of the element on your page that you want your Flash movie to display within – helpful for CSS Styling. If you omit this attribute, the value set in the plugin options will be used.

USEEXPRESSINSTALL
(true|false) Use this if you want to invoke the Flash Player “Express Install”:#expressinstall functionality. This gives users the option to easily update their Flash Player if it doesn’t meet the required version without leaving your site.

WIDTH
The width of the Flash movie. You can specify in pixels using just a number or percentage. If you omit this attribute, the value set in the plugin options will be used.

WMODE
(window, opaque, transparent) – Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.

You can find out more about Flash player attributes at Adobe’s Knowledge Base

Using Flash Player Express Install

If you want to give visitors to your site the option to upgrade their Flash Player to the latest version as quickly and seamlessly as possible, you can use the Flash Player’s Express Install functionality.

General Notes

Your SWF files need to be a minimum of 214px wide by 137px high so the entire upgrade dialog can be seen by the user if the Express Install is triggered. Furthermore, if your Express-Install-enabled SWF is not at least that size, the Express Install function will automatically fail.

It may also be a good idea to only place one SWF with Express Install functionality on each page. This way users won’t be greeted with multiple upgrade dialog boxes and be forced to choose one. Onto the specifics:

Specifics

Define the minimum flash player version required by your .SWF using the fversion attribute:

fversion="9.0.115"

Add the useexpressinstall attribute to your [kml_flashembed /] tag, like this:

useexpressinstall="true"

In the end, your KFE tag should look something like this:

[kml_flashembed movie="filename.swf" height="300" width="300" fversion="9" useexpressinstall="true" /]

That is all you need in order to invoke the Express Install functionality. In the case of the above KFE tag, if a user arrives at your site with either a Flash Player 6, 7, or 8 installed, they will be alerted that they need a more recent version of the Flash Player and be given the option to upgrade it without leaving your site.

Defining Alternate Content for a Flash Movie

As of KFE 2.0, it is now much easier to specify alternative content which gets displayed when your Flash doesn’t get rendered. This could happen if a user doesn’t have a recent enough Flash player installed or lacks the Flash player altogether, such as on an iPhone. Another reason to specify alternative content is for search engine optimization, or SEO. Most search engines aren’t very good at indexing content in Flash movies, if they can do it at all (Google can, but only with content that has been hard coded into a SWF–dynamic content in a SWF doesn’t get indexed). In these cases it’s best to specify some alternative content for your SWF.

To define alternative content for a SWF, you can now nest arbitrary HTML inside a KFE tag and it will be treated as alternate content for that SWF. The Tag Generator does this for you automatically. Properly nested alternative content looks like this:

[kml_flashembed movie="/my/great/movie.swf" width="400" height="300"]

    <!-- Begin Alternate Content -->

    <p>
        <a href="http://adobe.com/go/getflashplayer">
            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
        </a>
    </p>

    <!-- End Alternate Content -->

[/kml_flashembed]<h3>Configuration Options</h3>

KFE 2.1 features configuration options which allow you to customize how the plugin behaves as well as set all defaults for the Tag Generator and KFE tags that omit some parameters. In WordPress, you can find the options by navigating to Settings → Kimili Flash Embed. Unless otherwise noted, the default tag generator values will be blank or unselected. You’ll find the following options available to you:

SWFObject Configuration Defaults

Publish Method
Specifies the default publishing method for your SWF. If you omit this attribute from a KFE tag, whatever value you have set here will be applied to the tag. Default is static

Flash Version
Specifies the default Flash player version (Major.Minor.Release format) required to display your SWFs. If you omit this attribute from a KFE tag, whatever value you have set here will be applied to the tag. Default is 8.0.0

Adobe Express Install
Specifies whether or not you want to use Express Install functionality in your SWFs for users who don’t have the minimum version of the Flash Player you’ve defined installed. Default is yes.

SWF Definition Defaults

SWF Filename
This is the default SWF filename which is populated in the Flash (.swf) field in the Tag Generator. This is especially useful if you use a common player to play FLVs, for instance. You can specify a URL with an absolute file path (i.e. @/flies/flash/player.swf@). Default is untitled.swf.

Dimensions (width×height)
Specifies the default width and height for your SWFs. If you omit either of these attributes from a KFE tag, whatever value you have set here will be applied to the tag. Default is 400×300

Attributes

Flash Content ID
This is the CSS class name applied to your rendered Flash movies. This uniquely identifies the Flash movie so that it can be referenced using a scripting language or by CSS.

class
This is the CSS class name applied to your rendered Flash movies. If you omit this attribute from a KFE tag, whatever value you have set here will be applied to the tag. Default is flashmovie.

align
HTML alignment of the object element. If this attribute is omitted, it by default centers the movie and crops edges if the browser window is smaller than the movie. NOTE: Using this attribute is not valid in XHTML 1.0 Strict.

Parameters

play
Specifies whether the movie begins playing immediately on loading in the browser. The default value is true if this attribute is omitted.

loop
Specifies whether the movie repeats indefinitely or stops when it reaches the last frame. The default value is true if this attribute is omitted.

menu
Shows a shortcut menu when users right-click (Windows) or control-click (Macintosh) the SWF file. To show only About Flash in the shortcut menu, deselect this option. By default, this option is set to true.

quality
Specifies the trade-off between processing time and appearance. The default value is ‘high’ if this attribute is omitted.

scale
Specifies scaling, aspect ratio, borders, distortion and cropping for if you have changed the document’s original width and height.

salign
Specifies where the content is placed within the application window and how it is cropped.

wmode
Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. The default value is ‘window’ if this attribute is omitted.

bgcolor
Hexadecimal RGB value in the format #RRGGBB, which specifies the background color of the movie, which will override the background color setting specified in the Flash file.

devicefont
Specifies whether static text objects that the Device Font option has not been selected for will be drawn using device fonts anyway, if the necessary fonts are available from the operating system.

seamlesstabbing
Specifies whether users are allowed to use the Tab key to move keyboard focus out of a Flash movie and into the surrounding HTML (or the browser, if there is nothing focusable in the HTML following the Flash movie). The default value is true if this attribute is omitted.

allowfullscreen
Enables full-screen mode. The default value is false if this attribute is omitted. You must have version 9.0.28.0 or greater of Flash Player installed to use full-screen mode.

allowfullscreeninteractive
Enables full-screen interactive mode, in which content running in Flash Player can fill the entire screen and accept text input. The default value is false if this attribute is omitted. You must have version 11.3.0 or greater of Flash Player installed to use full-screen interactive mode. See Adobe’s developer guide for more info.

allowscriptaccess
Controls the ability to perform outbound scripting from within a Flash SWF. If omitted, the default value is “sameDomain” in most situations, except if the user’s Flash Player version is lower than 9.0.115.0 and the Flash movie is published for FP7 or earlier. In that case, the default will be “always”.

allownetworking
Controls a SWF file’s access to network functionality. The default value is ‘all’ if this attribute is omitted.

base
Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files.

fvars
Allows you to pass variables to a Flash movie. You need to separate individual name/variable pairs with a semicolon (i.e. name=John Doe ; count=3).

Alternative Content Default

Alternate Content
Specifies the default “alternative content”:#altContent to display when your SWF isn’t rendered. Default is a “Get Flash Player” badge linked to Adobe’s Flash Player download page, rendered as follows:

<p>
    <a href="http://adobe.com/go/getflashplayer">
        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
</p>

Javascript Options

Create a reference to SWFObject.js?
Decide whether or not you want to create a reference to SWFObject 2.1 in the HTML of your page templates. It is useful to turn this off if you already have SWFObject being referenced elsewhere in your code. Note that SWFObject 2.x is NOT compatible with SWFObject 1.x! KFE 2 requires SWFObject 2.x. Default is true

Where do you want to reference SWFObject.js from?
If you choose to create a reference to SWFObject 2.1, you have 2 options in terms of where you reference it from. Internal creates a link to the copy of SWFObject bundled with the plugin. Google Ajax Library creates a link to the copy of SWFObject hosted in the Google’s Hosted Ajax Library. The advantage of this is that the Javascript gets served with correct cache headers and it saves you a bit of bandwidth on your server. Default is Google Ajax Library

Do you want to use SWFObject’s autohide functionality?
By default, SWFObject temporarily hides your SWF or alternative content until the library has decided which content to display. This option allows you to disable that behavior.

Backwards Compatibility Gotchas

KFE 2.0 is mostly backwards compatible with KFE 1.x, so if you’ve been using the 1.x version and just creating basic KFE tags, you should be able to upgrade with no issues whatsoever. There are, however, some attributes which were available in 1.x which are no longer available in 2.0. This is due primarily to changes in SWFObject itself when it went to 2.0, unless otherwise noted. The 1.x attributes which are no longer supported are:

  • detectkey
  • noscript – This is now handled by defining alternate content properly.
  • redirecturl
  • xiredirecturl

One other minor backwards compatibility issue for you has to do with the format of KFE tags. In very early versions of this plugin, you defined KFE tags using angle brackets – <kml_flashembed ... />. When problems arose with using angle bracket tags in WordPress’ Rich Text Editor, I introduced the familiar square bracket variety – [kml_flashembed ... /]. Up to and including KFE 1.4.3, both versions of the tag formatting were supported. However, in order to simplify things in the KFE 2.0 code, the old angle bracket tags are no longer supported. If you have any posts which use the old formatting, you’ll have to go back and update them to square brackets in order to continue rendering those Flash movies correctly.