Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Kimili Flash Embed

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

I put a Flash Movie in my header. It works on the home page, but not on any other pages. Why?

When you embed a SWF on an HTML page, you have to make sure that you use an absolute path to reference your SWF, not a relative one. The reason for this is that the browser looks for the SWF relative to a page’s URL. Therefore, by using an absolute path, you’ll ensure that the browser always looks for the SWF in the same place, regardless of what the page’s URL may be. The difference looks like this:

Relative Path incorrect

[kml_flashembed movie="myMovie.swf" height="100" width="800" /]

Absolute Path correct

[kml_flashembed movie="/path/to/myMovie.swf" height="100" width="800" /]

As you can see, the main difference is that your path begin with a /, and then the path to your SWF. This tells the browser to start at the root of your site and find your SWF from there. Note that the absolute path need not include your site’s URL—it’s probably best if it doesn’t include it, as it’s more portable if your URL were to change.

I’m using SlideShowPro (or a similar slideshow tool). It works fine if I open the SWF directly in a browser, but on my site, it doesn’t display any content. What gives?

SlideShowPro reads an XML file which tells it where to find the images to display. If it doesn’t find that XML, it won’t display anything. Typically, the XML file is in the same directory as the slideshow SWF, and the slideshow SWF will look for that XML using a relative path. This is fine if you access the SWF directly in the browser, but as I explain in the previous question, once you embed that SWF in an HTML page, the SWF resolves paths relative to that HTML page, not relative to itself.

The way to override this is to use the base parameter. Since the slideshow SWF and its XML file are typically in the same directory, set the base value to the absolute path to that directory. It should look something like this:

[kml_flashembed movie="/path/to/my/slideshow.swf" base="/path/to/my/" /]

Of course, if your XML lives in a different directory, they you should change the value of the base parameter to match.

My Flash movie references external XML/image/audio/video/etc. files to populate its content and it’s not working. What’s going on?

If you’re using the fvars attribute to pass your Flash movie a path to an external file, make sure the path you’re feeding it is absolute, not relative. As in the first question above, when a SWF is embedded in an HTML page, the browser references other files that the SWF may ask for relative to the HTML page, not the SWF. Using absolute paths is the best way to make sure the browser always knows where to find those files.

In situations like the SlideShowPro question above, It may be the case that a relative path to an XML file is embedded in the SWF itself. If you can’t override the path in the SWF, you can use KFE’s base attribute to define a absolute base URL that the relative path will use as its point of reference to find those files.

I made sure to use an absolute path to reference my SWF (and it’s assets), but it’s still not working. Help!

In cases like this, the simplest answer is usually the best. Take that absolute URL, put it directly in a browser’s address bar and try to load the file in the browser. Do you see it? If not, make sure to correct the URL to point to the right place and then update your KFE tag with the correct URL. If you do see the file, but is still doesn’t work in your KFE tag, then feel free to contact me.

Can I use KFE on my WordPress.com blog?

Unfortunately, no. Because it’s a hosted service, wordpress.com doesn’t allow you the same freedom to install plugins and otherwise customize your site the way that you can with your own WordPress installation on your own server.

I see KFE tags instead of my Flash movies on my WordPress site. How can I fix this?

This is usually due to some missing function calls when using a non-default theme. If you’re experiencing this problem and have your site running with a custom theme, the best thing to do is to go into the theme editor and check the header and footer templates. They should have function calls as follows:

Header typically header.php

<?php wp_head() ?>

Footer typically footer.php

<?php wp_footer() ?>

If either the wp_head() or the wp_footer() php functions are missing, KFE will not work, so you’ll need to add them in. They should be placed, respectively, just before the </head> and </body> elements, as illustrated above.

I have HTML drop-down menus (or some other positioned HTML elements) which get hidden behind my Flash movie. How can I fix this?

Fortunately, there’s a very simple remedy for this. Just set the wmode attribute to transparent in your KFE tag and you should be good to go.

I set the play attribute to false in my KFE, but the video I’m embedding still plays. What gives?

The play parameter is misleading when it comes to embedding video. What it does is tell a simple flash movie with a timeline to play or stop, but that’s not the case with video. At its simplest, Flash video requires you have a player SWF – which has the playback controls and the stage for showing the video – and a video file – most likely an FLV – which gets loaded in the player SWF. The KFE play parameter has no control over the playback of video, but the player SWF does. Most video player SWFs have some way to play or stop the loaded video defined which is specific to that player. It could be a parameter that you pass to the video player when you load it. It could be a Javascript function that you call. It could be a combination of these things, too. You’d need to reference the documentation of the player that you’re using in order to find out what works for you in your specific situation.

How do I center or add some space around Flash movies on my page?

This is easy to do using a bit of CSS. By default, KFE renders Flash movies either within a <div> or an <object> element with has a class name of “flashmovie” (or whatever you set in your configuration options). Utilizing that, you can add a CSS definition like this:

div.flashmovie {
    margin: 1em auto;

That will add a 1 em margin on the top and bottom as well as center of all the Flash movies on your site that you’ve inserted using KFE. Also, remember that if you can apply a different class name to a certain Flash movies using the targetclass attribute. This is useful if you want to, for example, use a Flash movie in the header on your site and don’t want the default margins you’ve specified in your CSS to be applied to it.

How do I make my Flash movie clickable?

If you want somebody to be able to click on your Flash movie and have it work as a link, then you actually have to build that link, or clickable area into your SWF. KFE cannot “wrap” your SWF with a link.

How do I open a new window when someone clicks on my Flash movie?

First, re-read the previous question.

Now, if you still want to open a new window from your Flash movie, be aware that it’s a bad idea because it probably won’t work. You’d have to embed a window.open() javascript call in your movie, but the problem is that when you do that and someone clicks on it, any decent browser with a popup blocker (most, these days) will not allow it. Fact is, because the Flash player is a plugin, browsers don’t know whether a javascript call which originates from within a Flash movie was triggered by user interaction or programatically. Since the latter can easily be used with malicious intent (if you’ve ever see a Windows machine infected with spyware, you know what I’m talking about), browsers simply don’t allow it. Don’t do it.

Does this thing work with FLV files?

Sure it does, but you can’t just reference a FLV file directly with KFE. You have to insert a video player SWF onto your page and load an FLV into that. If you don’t have an video player SWF, there are a number available online such as the JW FLV Media Player.

The general approach you’d take with KFE is to embed your video player as the SWF and use the fvars attribute to specify either the url to the FLV file the URL to a playlist that references the FLV file(s). The specifics of how the fvars would be defined depends on the particular requirements of your FLV player.

I’d like to use KFE to put a Flash header in my WordPress site. How do I do it?

You can put a kml_flashembed tag anywhere on your site, but it requires some familiarity with editing PHP and HTML files. With the Tag Generator, the plugin is set up to insert tags in posts very easily, but you can manually insert a tag in any of your theme files as well. Simply navigate to Appearance → Editor, select one of your current Theme’s PHP files, and insert a KFE tag among the HTML and PHP where you want your SWF to appear.

Help! I installed KFE on my WordPress site and everything blew up! What do I do?

The first step is to check for incompatibilities with another plugin. Leaving KFE active, disable other plugins you have active one at a time, each time checking to see if your site is still blowing up. The moment you see that it doesn’t, the last plugin you disabled is the culprit – let me know about it.

Of course, this assumes that you are using a stock installation of WordPress, which is the only type of installation I’ve tested this plugin on. If you’re using a non-standard theme or you’ve modified or hacked the core PHP files in any way, I cannot guarantee any functionality, nor offer you support on how to fix things when they go awry. Sorry.

I’m still having trouble getting KFE to work in my WordPress site. Can you show me what to do?

Although it’s using an old version of the plugin, Brooks Andrus has put together a helpful screencast that walks through process of installing an using KFE.

Requires: 2.8 or higher
Compatible up to: 4.3.7
Last Updated: 1 year ago
Active Installs: 20,000+


3.3 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 71,7,5
100,1,1 100,2,2 58,12,7 0,1,0
100,2,2 100,6,6
100,1,1 100,2,2
67,3,2 100,2,2
50,2,1 100,1,1
0,1,0 100,2,2
33,3,1 100,1,1
0,13,0 100,1,1 100,1,1
0,3,0 100,1,1