KIMILI FLASH EMBED Wordpress Plugin Version - 1.1 Date - 4/3/2006 Author - Kimili | Michael Bester http://www.kimili.com/plugins/kml_flashembed DESCRIPTION Provides a WordPress friendly interface for Geoff Stearns' excellent standards compliant Flash detection and embedding JavaScript. Geoff's script is available at: http://blog.deconcept.com/flashobject/ ===================================================================================================== RELEASE NOTES ============= Version 1.1 * Much improved compatibility with other WordPress plugins and themes. (yay!) * Simplified embedding multiple instances of the same SWF. * Removed FlashObject code from RSS feeds, allowing for feed validation. * Added BASE attribute. * Updated JS to latest codebase. (FlashObject 1.3d) Version 1.0 * Updated JS to latest codebase. (FlashObject 1.3, released 1/17/06) * Modified JS to support old browsers. * Added ability to pass arbitrary Javascript and PHP values to SWF. * Includes Express Install functionality. Version 0.3.1 * Fixed a bug that prevented the Javascript from displaying properly on some servers Version 0.3 * Fixed a bug that prevented the Flash movie from displaying properly on archive pages. * Updated Flash Object Javascript to include NS4 compatibility. Version 0.2 * Eliminated the need to install and link to a separate JavaScript file * Initialized some previously uninitialized variables, cleaning things up a bit * Fixed a bug that prevented fvars from being passed to the flash * Dealt with a strange WP behaivior that was keeping the code from validating (See URL above for more info) USAGE ===== Installing the plugin is as easy as dropping the kml_flashembed.php file into your wp-content/plugins directory and activating the plugin. Now 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" /] AVAILABLE ATTRIBUTES ==================== 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. HEIGHT (required) The height of the flash movie. You can specify in pixels using just a number or percentage. WIDTH (required) The widthof the flash movie. You can specify in pixels using just a number or percentage. ALLOWSCRIPTACCESS (always|never) Controls the ability to perform outbound scripting through use of FSCommand actions or getURL actions from within your SWF. If unspecified, the Flash Player defaults to "always". ALTTEXT (deprecated) The text or html you want to display if the required flash player is not found. This attribute is ignored if target is used. 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. DETECTKEY This is the url variable name the script will look for when bypassing the detection. Defaults to Ôdetectflash'. For example: To bypass the Flash detection and simply write the Flash movie to the page, you could add ?detectflash=false to the url of the document containing the Flash movie. FID Use this attribute to give your movie a unique id on the page for scripting purposes. 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: Javascript Ð href = ${document.location.href;} PHP Ð date = ?{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. Defaults to 6. 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. NOSCRIPT Text or html content you would like to display to users browsing on a non-javascript browser or with javascript disabled. PLAY (true, false) Ð Specifies whether the movie begins playing immediately on loading in the browser. The default is true. QUALITY (low, high, autolow, autohigh, best ) Ð Specifies the playback quality of the Flash movie. REDIRECTURL If you wish to redirect users who don't have the correct Flash Player version, use this parameter and they will be redirected. Ignored if using useexpressinstall. SCALE (showall, noborder, exactfit) Ð Dictates how the movie fills in the specified target area. TARGET This is the ID of an element on your page that you want your flash movie to display within. USEEXPRESSINSTALL (true) Use this if you want to invoke the Flash Player Express Install functionality. This gives users the option to easily update their Flash Player if it doesn't meet the required version without leaving your site. Also see XIREDIRECTURL Note Ð In order to use this functionality, you have to include the bundled expressinstall.as actionscript file in the first frame of your SWF. See below for more information. WMODE (window, opaque, transparent) Ð Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. XIREDIRECTURL When using the useexpressinstall functionality, use this attribute to specify an alternate URL to redirect users who complete the ExpressInstall upgrade. You can find out more about Flash player attributes at http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_12701 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 now use the Flash Player's Express Install functionality. It takes a few extra steps to use it, but it is worth the effort. They are: Include and invoke the Express Install actionscript in your Flash movie. 1. Add Express Install support to each of the SWF files that may require an upgrade. These files need to be at least 215px x 138px in size, so the entire upgrade dialog can be seen by the user if the Express Install is triggered. 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. 2. Copy the bundled expressinstall.as to the same directory as the .FLA file you want to use the Express Install option with. 3. Call the Express Install script on the first frame of your movie with the following code: #include "expressinstall.as" // initialize the ExpressInstall object var ExpressInstall = new ExpressInstall(); if (ExpressInstall.needsUpdate) { ExpressInstall.init(); stop(); } All other functionality of your movie should be moved to frame 2 to ensure compatibility back to Flash Player version 6.0.65. 4. Add the useexpressinstall attribute to your [kml_flashembed /] tag. The only thing left to do is to add the following attribute to the KFE tag: useexpressinstall="true" You can also add the xiredirecturl attribute to redirect users who successfully upgrade their flash player: xiredirecturl="http://www.yoursite.com/bleeding/edge/flash/"