Book Image

WordPress and Flash 10x Cookbook

Book Image

WordPress and Flash 10x Cookbook

Overview of this book

WordPress is much more than just a blogging platform now. This flexible CMS is the power behind millions of URLs, including blue-chip companies, small business, and personal websites. Flash is a world-famous multimedia platform. This book will show you the best of the proven and popular strategies and techniques to deliver rich multimedia content, which will let you sail through the world of Flashy Wordpress with ease.This book will take you through clear well-formed and comprehensive recipes, through the most essential and useful Flash multimedia tools for Wordpress available today including plugins for images, audio and video, as well as projects you can do yourself in Flash. It helps you to create a Wordpress website full of Flash content. We show the big picture by providing context, best practices and strategies. Detailed instructions are provided for each section. This book provides you with the shortlist of the most essential Flash tools for creating a dynamic and media-rich website or blog, and shows you how to implement these on your site. The sections on Flash are intended to give you the option to create custom .swf files, giving you an alternative to plugins that already exist. The book will show you how to configure Flash content in your WordPress site/blog for maximum SEO, introduce Flash content to your Wordpress with and without plugins, import image feeds, use lightbox effects, and much more.
Table of Contents (17 chapters)
Wordpress and Flash 10x Cookbook
Credits
About the Authors
About the Reviewers
Preface
WordPress Resources
Flash Resources

Embedding Flash .swf files in WordPress


The most basic and fundamental way of using WordPress and Flash together is to insert an animation. The steps are:

  1. 1. Create an animation in Flash.

  2. 2. Export the animation as a .swf.

  3. 3. Upload the .swf to your server.

  4. 4. Embed the .swf in your site.

WordPress makes it easy to embed a .swf—here, we provide an in-depth review of the Kimli Flash Embed Plugin, (version 2.0.2) based on Swfobject 2.x.

If you do not have an animation to begin with, this section uses a sample Flash animation, found in theChapter 1 folder.

Getting ready

WordPress displays Flash the same as any other web page—through Flash Detection. Flash developers use swfObject 2.x and JavaScript for Flash Detection. Otherwise, non-specialists can use one of a variety of plugins to embed Flash media (SWF or FLV). Kimli Flash Embed is among the best of such plugins.

The easiest way to embed Flash in WordPress is through the plugin "Kimili Flash Embed for Wordpress."

http://kimili.com/plug-ins/kml_flashembed/wp

"Built upon the SWFObject javascript code, it is standards compliant, search engine friendly, highly flexible and full featured, as well as easy to use." Quoted from http://kimili.com/plug-ins/kml_flashembed/#usage (2009).

How to do it...

Installing Kimili Flash Embed (KFE) on your WordPress site is simple.

  1. 1. In your dashboard sidebar, use the downward pointing arrow to expand Plugins and then click on Add New.

  2. 2. In the Search bar, type: flash, as seen in the following screenshot.

  1. 3. Browse down to Kimli Flash Embed, click Install, and then Activate.

  1. 4. Now that the plugin has been uploaded and activated, the final step is to insert a Flash file in the .swf format.

  2. 5. Click on Posts | Edit and then the relevant post title (we will be using the default Hello world! post).

  3. 6. Click on HTML to enter the HTML view.

Note

To add a Flash animation, use the following shortcode, replacing path, y and x parameters with the respective path, height, and width of your swf:

[kml_flashembed movie="/path/to/your/movie.swf" height="y" width="x" /]

  1. 7. The movie parameter is the only one required—height and width are optional. Though it is most efficient to size your .swf during export, the height and width parameters will resize a .swf file. If you do so, be sure to keep the numbers in scale proportion to avoid distortion For reference, look at the following screenshot.

  1. 8. If you're using the Visual Editor to write your posts, look for the red Flash button on the right. Click to launch the KFE Tag Generator, a wizard-like interface that will assist you in creating the necessary KFE tag. Again, the only necessary parameter is the URL to the .swf file you want to display.

That's it! You have now inserted your first Flash animation inside WordPress. It's easy to do through the shortcode or the KFE Tag Generator. Open another tab (PC: Ctrl + T /Mac: Cmd + T) to confirm:

How it works...

Three main sections comprise the KFE Tag Generator: SWFObject Configuration, SWF Definition, and Alternative Content.

Configuration options are covered in more detail in the following section, Adding Flash Detection with SWFObject 2.x. Please see the How to do it... section.