Jump to Content
Kimili
  • Journal
  • Portfolio
  • Projects
  • About
  • Contact

Journal

I want to hear from you.

Kimili Flash Embed - WordPress Take 3

Update! 1.23.06
There’s a brand new version of KFE out which addresses many problems and has many new features. You can find it at the new permanant home of KFE.

Update! 9.22.05
In order to fix a problem some servers were having handling the parsing of the JavaScript, I made a small tweak to the plugin. If you’ve been having a problem, go ahead and download and plugin again.

Here we go again. Kimili Flash Embed for WordPress – version 0.3.1 – is now available!

This is just a bug-fix version, so if you’ve been having problems with this plugin on your WP installation, this new version should help. Version 0.3 updates include:

  • Fixed a bug that prevented the Flash movie from displaying properly on archive pages.
  • Updated Flash Object Javascript to include NS4 compatibility.

The updates from the previous version (v0.2) are still relevant here. Just to reiterate, they were:

  • Eliminated the need to install and link to a separate JavaScript file
  • Initialized some previously uninitialized variables, cleaning things up a bit (thanks to Kelvin Luck)
  • 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 (more about this here)
  • Successfully tested in WP 1.2.x and WP 1.5

So come and get it hot:

  • kml_flashembed_wp_03.zip (7.25KB).
    Get the latest version, always available at the KFE Home.

Usage

Please refer to the Kimili Flash Embed home for the specifics of installing and using this plugin. Any questions you may have regarding it are probably answered there.

Le Marquis says:
25 February 2005 ∞

I’m searching my ass of with this addon… (sorry for the bad language!)
Could you post snippets and replace-codes next time. I don’t have a text editor that shows lines like line 173 or 125. i had to count it manualy and gave up finaly…

For the rest it works now! But not XHTML VALID unfortunately.
You might wan’t to clear some thing out for those who don’t have the english language as their primary language.

Just a tip! Post a code where people can search for and show them what to replace it with…

Thanks,

Le Marquis

Michael Bester says:
26 February 2005 ∞

Le Marquis – If you want to search for the changes, you can look for the following:

In kml_flashembed.php, search for the following lines:

  • //$out[] = ’// <![CDATA[’;
  • //$out[] = ’// ]]>’;
and change them to this, respectively:

  • $out[] = ’// <![CDATA[’;
  • $out[] = ’// ]]>’;
Next, if you’re using WP 1.2.x, open up /wp-includes/template-functions-post.php and search for this:

  • $content = str_replace(']]>', ']]&gt;', $content);
You should find it three times. Replace all three with this:

  • // $content = str_replace(']]>', ']]&gt;', $content);
If you’re using WP 1.5 instead, open up both /wp-includes/template-functions-post.php and /wp-includes/feed-functions.php and search for this:

  • $output = str_replace(’]]>’, ’]]>’, $output);
You’ll find it once in each file. Change them both to this:

  • // $output = str_replace(']]>', ']]&gt;', $output);
That’s all you need to do.

Jeff Minard says:
26 February 2005 ∞

Hrm, that is kinda stupid. I would suggest you submit a bug report about that. The filter the ‘the_content” should come after that text is replaced.

Le Marquis says:
26 February 2005 ∞

I opened kml_flashembed.php (version 0.2), and tried to find:
the srting you gavethat needed to replaced, and:

It isn’t in there??

Also Opened, /wp-includes/template-functions-post.php and
/wp-includes/feed-functions.php, while using WP 1.5

Strings you gave up to replace with were not in there as well???

What the??? Do I have the right version? Or what!! If you want I could send you a sample of my WP! To check out…

Le Marquis

Michael Bester says:
27 February 2005 ∞

Le Marqius – The code is there! There are probably some spacing differences between what you are searching for and what is in the code itself. An extra tab or space will throw you off…

Try searching for just parts of the string within the files, like <![CDATA[ and ]]>. You’ll find it!

Le Marquis says:
27 February 2005 ∞

I added a ip here as a link to show you what I got…

Zip file containing two PHP files

Download and see that it isn’t in there. I used Dreamweaver for this to change… Although the kml_flashembed.php was already the given code you gave me to replace, that was your latest version…

If you could check it out and if you found the correct code would you be so kind to send it to my personal email seen below

Cao says:
8 March 2005 ∞

Does this code work with swish files? I’m trying to get swish to work…can’t figure it out.

Michael Bester says:
9 March 2005 ∞

Cao – I haven’t used Swish to create flash animations, so correct me if I’m wrong.

Swish should export standard .swf files, as flash does. If that’s the case, you would just refer to the swf file in the movie attribute of your kml_flashembed tag. I don’t think you’ll have any problems.

Bryan Rieger says:
11 March 2005 ∞

There’s a slight error in the tag provided in the plug-in desciption – it states ‘flashembed movie=”filename.swf”’... – it should be ‘kml_flashembed movie=”filename.swf”’.... (all within angle brackets – and matching end tag) for the filter to pick it up.

The tag is stated correctly in the Read Me file, but being the type of person who doesn’t read ‘Read Me’s’ I found out the hard way. Once that was fixed it worked perfectly. Thanks!

Michael Bester says:
12 March 2005 ∞

Thanks Bryan – Duly noted and corrected. The zip now contains the updated description.

jason Fields says:
17 March 2005 ∞

I have a pre-existing flash file that has some variables being passed in the movie parameter after the swf reference… like this..

movie=”gallery.swf?images=photos/oh_pic_000.jpg,photos/oh_pic_001.jpg&delay=2&”
its not working at all, is there something i need to be doing in order to have this pass the data/info properly?

thanks,
jason.

Michael Bester says:
18 March 2005 ∞

Jason – You have to split the variables out of the movie attribute and pass those to your .swf with the fvars attribute of the kml_flashembed tag. Make sure you seperate them with a semicolon. In your case, it would look something like:

movie="gallery.swf" fvars="images=photos/oh_pic_000.jpg,photos/oh_pic_001.jpg ; delay=2"

Make sure you also have height and width attributes defined in the tag, as they, along with the movie attribute are required.

sekhu says:
13 April 2005 ∞

Hi there,

This seems quite a promising plugin – I’m not sure if it’s possible or how dfficult it would be, but would there be a way to use this plugin integrated into WP to a point where a user can actuall insert an image and link it within a post via thumbnail generated by simple viewer?

Thanks

Andy Skogrand says:
15 May 2005 ∞

I may be too much a of a noob, but I have had no succes with this. I installed the plug-in, and I activated it. Afterwards, I created a post and typed in the following code:

<kml_flashembed movie=”filename.swf”                height=”150”                width=”300” ></kml_flashembed>
I replaced the filename.swf with the absolute path to a flash file on the server. As a result, all I eneded up with was,

height=”350”
width=”436”>

being displayed on my post. What am I missing. Something big I hope.

Michael Bester says:
16 May 2005 ∞

Andy – It looks like the plugin is active, but not parsing the tag correctly.

Try stripping the plugin tag down to its bare essentials. If I’m not mistaken, you’ve copied and pasted the sample tag from either above or the readme.txt file. For readability, I had put line breaks in the tag between attributes, but perhaps they’re introducing a problem.

The first thing I would do is remove any extra whitespace (liebreaks, tabs, etc) from between the tag attributes. Put only a single space between each attribute.

If you do this and it is still not working, prune it down to only the required attributes:

  • movie
  • width
  • height
If you take these precautions, it should work out for you.

Let me know how it goes…

Intoxo Pox says:
17 May 2005 ∞

It’s not working for me either. I’m running WP 1.5.1.

Here’s what I’m posting:

It does nothing.

Michael Bester says:
17 May 2005 ∞

I found an error in the plugin description that displays on the Wordpress Plugin Admin page. In it, the example tag was closed incorrectly.

I have corrected this and rezipped the package for download as Version 0.2.1. There is no functional change, but if anybody was copy/pasting that tag from the description, that would certianly be causing a problem.

Another thing to be mindful of is how this tag needs to be closed. Take this example:

<kml_flashembed … ></kml_flashembed>

That is the only way this tag can be closed and still work!

If you do any other variation to close the tag, it will not work. For example:

– xml style single-tag shorthand – doesn’t work

<kml_flashembed … />

– Put any whitespace between the opening and closing tags – the tag doesn’t work

<kml_flashembed … > </kml_flashembed>

I do hope that this will help some people in overcoming problems they may be having with this tag.

The current inflexibility of the tag is because I am not great at regex. For a future version, I could try to make that more robust, but I’ll need some help. Are there any regex gurus out there?

emeric says:
17 May 2005 ∞

hi :)

thx for your plug !! very usefull .. just having a little problem on the archive pages.. see : http://ghostprod.com/category/video/

using 1.5.1 any sugestion ?

emeric says:
17 May 2005 ∞

YES, just found out how to solve my problem. wasn’t your plugin witch is perfect.. it was only a wrong call in the php code :

Intoxo Pox says:
18 May 2005 ∞

Still not working. Here’s my code:

Intoxo Pox says:
18 May 2005 ∞

It won’t post my code. I’ll try again, but with a space after the open carrots.

Andy says:
20 May 2005 ∞

I went and deleted all the bad spaces, and lo and behold, it spat out this

var flashObject = new FlashObject(”http://www.titanav.com/mini/nightin/slide.swf”, “fm_slide”, 436, 350, 6, “”);
flashObject.write();

rea says:
24 June 2005 ∞

sorry another noobie
did all the hacks still can’t get it to show looks like i got it right just won’t display the flash.
any suggestions?
here is the page

http://www.drchango.com/blog/?p=223#more-223

any help would be much appreciated

would have posted the code but wasn’t sure how to-

Michael Bester says:
24 June 2005 ∞

Make sure that the link to the javascript file that the plugin generates – flashobject.js – is correct. Look through the source code of your page, find the link to that file and copy and paste that address into a new browser. If you see the javascript, then you’re OK.

Since the link is built partially with the “Blog Address” setting you have in the General / Options tab, be aware that the link is only built correctly when you have the “Blog Address” pathed to point to the wordpress folder.

rea says:
24 June 2005 ∞

thanks your suggestion totally worked i was redirecting my page to the dir above my wordpress install becuase i had recently switched from blogger and didn’t want to throw people with the diff URI.
anyway thanks agin great plug, BTW

loptar says:
5 July 2005 ∞

thanx for the plugin! i will surely try it in my blog!

zachary forrest says:
16 July 2005 ∞

I can’t get it to work. I checked the source code and this is what’s pointing to the flash object file: http://zacharyforrest.com/zen/wp-content/plugins/kml_flashembed.php/flashobject.js

I’m trying to get a program called Slideshow Pro working which loads the images from an xml file. This is possible, isn’t it?

marion says:
22 July 2005 ∞

Thanks for your plugin, it works great for embedding flash movies on the frontpage of WP.

But I do have a problem with the archive pages, there instead of the movie I see a bit of code:

var flashObject = new FlashObject(”images/TonijnZalm.swf”, “fm_TonijnZalm”, “70%”, “20%”, 6, “”);
flashObject.write();

Also when we go to Categories and look at the blogs, no image but a bit of code.

Are we doing something wrong or is it a known bug?
Here is the url, still under construction ;-)
http://www.miekehollander.nl/kookschriftje/

Hope you can help, tia

bluecorn says:
23 July 2005 ∞

Hi, thanks for this work.

My “Blog Address” is pathed to point to a different folder from the wordpress-install folder, and this won’t be changeable.

Do I understand that I can’t use your plugin? Or can I dig into the template and change the path to flashobject.js

Michael Bester says:
24 July 2005 ∞

Bluecorn – By all means, you can open up the plugin PHP file and make the change to path if you are comfortable doing so. Just search for the following function towards the end of the file:

function add_flashobject_js

You’ll see the path to the “virtual” javascript file in there. Be aware that the path actually points to the plugin PHP file. Just change it to what your WP installation requires.

mike says:
29 July 2005 ∞

hi
I’m trying to get Imagvue gallery on my test site but not having any luck. I used the plugin but nothing happens. As a test I tried simpleviewer (free) gallery and at least it throws up the thing but it gets stuck on load. I tried the Wordpress forums but only found the same question and no one seems to have left an answer. Any help on this would be much appreciated. My test site is http://villian.pcmonkee.com

thanks!

mike says:
30 July 2005 ∞

never mind figured it out…

derek warner says:
7 August 2005 ∞

having issues… it works in my pages … but can’t get it to replace the top image… can ya help?

here’s the top image code
—#headerimg {
—height: 200px;—width: 100%;—background: url(“images/header.jpg”) no-repeat center;—margin: 20px auto 10px auto;—}

minus the—of course…

the background image is the top bar… how do i use this flash embedding to make the top bar a swf? i have the file header.swf taht i created in flash… but background: url(“images/header.swf”) doesn’t work… whats the syntax to make to work in this situation? Thanks for your help

Michael Bester says:
8 August 2005 ∞

Derek – Your issue is two-fold.

To address your first point, the plugin allows you to post flash movies in your articles, but not elsewhere on the page. This is due primarily to the archetecture of WordPress and how it handles plugins. As far as my understanding of WP goes, it doesn’t see custom tags (like <kml_flashembed>) in page templates, where your header would be, so consequently doesn’t process them there. If there is someone out there who can tell me otherwise, I’d be very interested in finding out how to do it…

Secondly, you cannot specicify a .swf file as a background image in CSS. No browser will recognize that syntax. If they did, there wouldn’t be much need for this sort of plugin, UFO, FlashObject, or Satay.

What I would suggest to get a .swf into the header is definitely a workaroud, but it should get the job done. Write a temporary article using the <kml_flashembed> tag, pointing it to the .swf you want to use in the header. Publish the artice and then view the source, looking for code like this:

<script type="text/javascript">
    var flashObject = new FlashObject("/path/to/movie.swf", "fm_movie", 600, 100, 6, "");
    flashObject.write();
</script>

Copy that bit of code and paste it into your page template where you want it to appear. Test it out, and if everything looks good, go ahead and delete that temporary article.

pascal says:
9 August 2005 ∞

Hi Michael. I’m having a bit of a difficulty getting the plugin to work.
I’ve got a test over at http://www.ghostrunnermusic.com/wordpress/?p=42
and I’m unable to have the plug-in load the right files (as you see.) I’ve read through the notes here and at http://wordpress.org/support/topic/32407. In accordance with that, I used this to call it up:
@kml_flashembed movie=”http://foo.com/galleries/test/viewer.swf” height=”100%” width=”100%” fvars=”xmlDataPath = http://foo.com/galleries/test/imageData.xml” >

Michael Bester says:
9 August 2005 ∞

Pascal – Looking at the source code of your test page, I see that the xml variable is not being included. I tried duplicating your error but cannot do so. Can you copy your kml_flashembed tag exactly as it appears in your article?

Pascal says:
9 August 2005 ∞

Absolutely. Well, mostly, ‘cause of the HTML stripper in here, so remove the space after the first ’

Got it a little further along, but it still won’t load images. Thanks for your help, Michael.

Page under discussion is:
http://www.ghostrunnermusic.com/wordpress/?p=42

Pascal says:
9 August 2005 ∞

Ugh. Sorry.

’

without the single quotes.

Brian says:
14 August 2005 ∞

Hello. I am using WP 1.5.3 and cannot get the plugin to work. I installed kml_flashembed.php in the wp-content/plugings folder, activated the plugin, copy and pasted the insert movie syntax from the README document and replaced the filename with an absolute URL to my Flash movie. Nothing appears. Viewing the HTML source code, similar to Zachary, I see within the head of the page a Javascript reference to:

http://domain.com/wp/wp-content/plugins/kml_flashembed.php/flashobject.js

This does not seem like a relevant path and perhaps is the problem. Any suggestions? Thanks!

JJ Redwolf says:
15 August 2005 ∞

I’m trying to embed the resulting SWF from SlideShowPro into a “page”, but all I get is what looks like the outline of it…any suggestions? My pathing is correct (http://www….) and I have double and triple checked my syntax (). I really need this to work!

Michael Bester says:
25 August 2005 ∞

Brian – That path to the javascript file is correct. The javascript code itself is embedded in the plugin php file, and by accessing that URL, it should grab just the javascript.

That said, there have been some people with issues accessing the JS using this method. Try putting the URL into a browser. If you get the Javascript file, then your problem is elsewhere. If you don’t get the Javascript file, then it has to do with the settings on the server. In this case, you can try changing the permissions of the plugin PHP file to 777 and it should work.

Redwolf – Your issue likely has more to do with how you’re setting up Slideshow Pro rather than with this plugin. I am guessing that Flash is being fussy with the pathing to images in Slideshow Pro. Try making the paths in that file absolute rather than relative to be sure that Flash will find everything all right. You can take a look here for more information.

Brian says:
25 August 2005 ∞

Hi Michael – Thank you for your reply. As you suggest, I cannot view the JS URL in the browser so I changed permissions on kml_flashembed.php to 777 but still no go. Perhaps you can see what I am doing wrong? You can view a sample at: http://brianmcnitt.com/wp/?p=6. (BTW, sorry if I sound frustrated in my blog; it was a tough day. (; ) Anyhow, there should be two “green heads” on the page, one below the other. The first is inserted using Flashifier (a lesser embed solution), the second using KML. Hopefully it’s something simple I am missing. Thanks for your help. – Brian

rowby says:
25 August 2005 ∞

I am having trouble getting the align to work. Is the following example correct:

I tried l and r and it doesn’t seem to have an effect. Am I doing it correctly. This is for embedding in a post.

Thanks!

Ryan says:
31 August 2005 ∞

Michael-Thanks for writing this plugin. Question-does it play .flv files as well? Because I can’t get it to, and I’m not sure if this is due to my ineptitude, or due to the fact that the plugin only plays .swv files. Thanks!

Alexey says:
6 September 2005 ∞

Hi Michael!
I am having trouble to insert flash into post. I am install script as in instructions above, checked twice tags, paths, permissions and get error then page loading: FlashObject is undefined.

My WordPress is 1.5.2 version. Problem is here: http://www.toptendaily.com/nanaca-crash/1

Thanks in advance!

Brian says:
11 September 2005 ∞

I have the same issue.

Michael Bester says:
12 September 2005 ∞

Alexy & Brian – The error you are getting is because the Javascript is not loading properly. When you have the plugin active, view the source of, say, the front page of your site, and look for a line of code like this in the head:

<script type="text/javascript" src="http://www.yourdomain.com/wp/wp-content/plugins/kml_flashembed.php/flashobject.js"></script>

If you have it, copy the address in the tag and try loading it in the browser. You should get a Javascript file. If you don’t, it is likely a setting on your server that is preventing the file from being rendered properly.

If you don’t have the tag, then the problem is elsewhere.

Andy Skogrand says:
17 September 2005 ∞

It seems to be a javascript issue. At my site, you can access the javascript file here

http://paellafactory.com/blog/wp-content/plugins/kml_flashembed.php/flashobject.js

but it will read “No input file specified.” I set the permissions to 777, and it still doesn’t fly. However, if I go into my Options, General tab and set my Wordpress address to someone’s blog who is running your script correctly, the son of a gun picks up with no problem. Evidently, the javascript file isn’t flying. Any ideas beyond changing the permissions to make this sucker fly. I know I am close, I can feel it.

Site in question http://paellafactory.com/blog/?page_id=7

Michael Bester says:
18 September 2005 ∞

Andy – It isn’t really a javascript problem. This stems from the way some servers are configured to handle PHP. Although I can’t say with certianty exactly what causes this issue in every case, you may want to check if PHP is running on your server as CGI or as an Apache Module.

If it is running as CGI and you have the option to change it to Apache, try doing that. It may work out for you.

Wolf says:
21 September 2005 ∞

I ran into the same problem running wordpress in a cgi environment; changing the line in add_flashobject_js to

kml_flashembed.php?flashobject.js

instead of

kml_flashembed.php/flashobject.js

fixed it for me.

Michael Bester says:
22 September 2005 ∞

Wolf – Great suggestion! After testing your approach out, I made the change to the plugin file and have updated the download package so everybody who is having this problem can benefit.

Thanks!

Wolf says:
22 September 2005 ∞

Cool. Fast turnaround! I had to make one other tweak. When other filters were added in “the_content” chain they were losing text if this filter ran first and the content didn’t contain an embedded flash tag. I added the following to kml_flashembed immediately after:

$tags= preg_split($tag_regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE);

so it would play well with others :-)

if (count($tags)

Wolf says:
22 September 2005 ∞

hmmm, the last line was cut off, should be two lines:

if (count($tags)

Wolf says:
22 September 2005 ∞

dang. Textile… last line is a “return $text;” ... sorry for the trail of posts…

Wolf says:
22 September 2005 ∞

and conditional should be “if (count($tags)

Ryan says:
27 September 2005 ∞

Does Kmili play .flv files or not?!?

Michael Bester says:
27 September 2005 ∞

Have you tried it, Ryan?

Ryan says:
28 September 2005 ∞

Yes, I’ve tried it and I couldn’t get it to work—so meanwhile I’m trying to figure out if it’s something I’m doing wrong, and I’d feel stupid if Kmili just didn’t play .flv files.

From your response I’m guessing that it does…

Michael Bester says:
28 September 2005 ∞

The Kimili Flash Embed isn’t a flash player, it just generates the accessable code necessary to access the Flash Player Plugin on a user’s machine and play a movie.

Now the Flash Player doesn’t play .FLV files by themselves. Although I haven’t done much work with .FLVs, the way I understand it, you need a .SWF that loads the .FLV in order to play it.

You’re not doing anything wrong with the plugin. You just need to create a player as a .SWF that will pull in the .FLVs that you want to show. I would create a generic one that you can pass the urls of .FLVs you want to show. Then you would use the Kimili Flash Embed to reference the .SWF, adding the path to the .FLV in the fvar attribute.

Björn says:
23 October 2005 ∞

Hi, just wanted to say that your plugin works like a gem. thanks!

one thing though: it seems to crash the markdown filter, or at least markdown when run through the text-control plugin

The solution for me was to lower the filter priority on flashembed:
add_filter('the_content', 'kml_flashembed',100);, where “100” is the priority (10 is default, and 1 is the highest.) Hmm…. Come to think about it, I guess I could have just raised the priority for text-control instead. Might do that actually…

Jay says:
30 October 2005 ∞

Just fyi. Your script uses a reference to $_SERVER[‘REQUEST_URI’], which for whatever reason returns nothing on my Windows server. I didn’t want to go mess with the php.ini file to make this work, so I just changed a few things around. Instead of calling kml_flashembed.php?flashobject.js, I did something like this: kml_flashembed.php?jsCall=true and just checked for that variable in the conditional statement. Works great now, but I did pull my hair out for while before I figured out what wasn’t working.

Great script overall. Thanks.

Michael Bester says:
31 October 2005 ∞

Jay – Thanks for sharing your experience. As I don’t have access to an IIS server for testing, your findings should prove very helpful to anybody out there who is running into the same sort of problems with it.

John Skidgel says:
2 November 2005 ∞

Hi,
Love the plug-in. Having a small problem with it. I’m using Flash Pro 8 and the new FLVComponents. I’ve installed the plug-in and when I reference a swf, it doesn’t show the transport controls that are in the component swf.

Here’s what I put in my post:
@@

Here’s the page:
http://www.skidgel.com/blog/?p=28

The transport controls don’t show. Here’s a page where I’m referencing the same swf and the controls do appear:
http://www.skidgel.com/blog/wp-content/video/walking_flvplyr.html
click and hover over the swf to have the controls appear.
If you look at the source for the web page above, there isn’t anything I’m not putting in the kml tag afaik.

Any ideas?

Thanks again for the plug-in!

John

Jefte says:
10 November 2005 ∞

Thanks for the plugin, it rocks!

A warning to anyone using the Post-Teaser plugin. Activating this plugin will make Post-Teaser not work. Updating to the latest version of both Post-Teaser & KML still does not fix the situation.

What a shame, its a great plugin otherwise!
I’ll have to embed my flash manually until I find some sort of resolution. :(

The Fraze says:
30 November 2005 ∞

This looks like a great plugin to use alongside my textile formatting but i’m having a few errors. First of I’m running WP 2.0RC-1 so please let me know right off the top if that might be the problem.

Here is my code

  

and I’m getting the following error

Warning: join(): Bad arguments. in /home/badwea76/public_html/thefraze/wp-content/plugins/kml_flashembed.php on line 299

http://thefraze.badweather.net/index.php/mp3-test_70/

Michael Bester says:
1 December 2005 ∞

Fraze – Your code didn’t come through.

I haven’t tried it at all with WP2.0, and yours is the first report I’ve seen about an incompatibility. I have been working on an update to the plugin which I expect to publish within the next few weeks, and this is definitely another thing to get right before its release. Thanks!

Greg says:
5 December 2005 ∞

Hi, I’m using WordPress 1.5.2 and trying to get the plugin tag to work inside of a “page” in WP. Here’s my exact line:

I don’t get any errors, but my Flash doesn’t show on the page. When I view the page source I see:

var flashObject = new FlashObject(“http://family.greddin.com/slideshow.swf”, “slideshow”, 399, 501, 6, “”);
flashObject.write();

I have the flashobject.js file in my root and the plugins directory too. Where does it need to be?

Can you point me in the right direction?

Thanks,
-Greg R

Michael Bester says:
6 December 2005 ∞

Greg – What you found in the page source is correct. I think your problem stems from the fact that your pages are calling 2 different versions of the Flash Object JS file. There is an older version that is distributed in the kml_flashembed plugin and the most recent version that you have put into the root level.

There are going to be conflicts between the two versions and the plugin code, so for simplicity’s sake, remove any reference to the newer version of the JS that you have in the root.

As I’ve mentioned in previous comments, I am working on an update to the plugin which will package the lastest version of the flashobject.js code.

Greg says:
6 December 2005 ∞

Is there supposed to be a flashobject.js file included with the kml_flashembed.php file that I downloaded? I didn’t see one in the zip file.

Greg says:
6 December 2005 ∞

Just a followup. Note that since I didn’t see a flashobject.js file in the download package, I manually copied the one I had from my root into the plugins folder. Do you know where I can get the older version which works better with kml_flashembed?

Greg says:
6 December 2005 ∞

Ok, I’m getting somewhere now. But not quite there. I essentially had two flashobject.js files just in different locations. I took the reference to the root one out and now it’s working.

Lastly, I’m adding an fvar like this:
fvar=”initialUrl=escape(document.location)”

When it gets rendered to the page it looks like this: (notice the quotes around the escape(document.location). I think this is the problem.

var flashObject = new FlashObject(“http://family.greddin.com/slideshow.swf”, “slideshow”, 399, 501, 6, “”);
flashObject.addVariable(“initialUrl”, “escape(document.location)”);
flashObject.write();

I’m trying to setup permalinks with SlideShowPro. Do you know a way I can not get the quotes to appear around this? Or perhaps another way to accomplish the same thing?

Thanks a lot.

Michael Bester says:
6 December 2005 ∞

You’re right. The quotes around the escape(document.location) are not letting it be parsed as a Javascript object.

Unfortunately, the current version of the plugin doesn’t support passing Javascript or dynamic values into the fvars attribute. This is another feature that I will add to the new version of the plugin.

Alex Kessaris says:
6 December 2005 ∞

Yes!!! this is the best plugin! Amazing.. check out my embedded flash résumé on www.artsy.ca. thank you kimili!

ohk says:
11 December 2005 ∞

Hi there,
I am using camtasia and wordpress. I have managed to make your plug in work in a wordpress post. This is great! I am curious though cause I am not getting any controls (I just use the .swf file not all 4 files that camtasia produces). Is there something in the plugin that would provide controls? Or is there other software out there that would include controls. Not sure if any of this makes sense but I would appreciate your consideration.

ohk says:
11 December 2005 ∞

Hi there, I’ve figured out that Camtasia does not produce build in controls. I have been trying BB Flashback recorder. I produce a good quality swf files but it looks terrible on the wordpress blog. Any suggestions?

LOP says:
11 December 2005 ∞

Can anyone tell me what program was used to make this flash file. The reason I am asking is 1. I like the controls and 2. I like how their is no blank screen when the flash file ends.

http://www.drchango.com/blog/?p=223#more-223
(there is no contact info on the site)

Right now I am using MAcromedia Captivate and after the flashfile ends it leaves the space blank and also I don’t like the controls (in order for it to restart you have to click rewind, rather than play.)

If anyone can tell me what programme can be useful for the above requirements please let me know.

Michael Bester says:
13 December 2005 ∞

ohk – I’m not sure what Camtasia is – can you expand on that?

LOP – It looks to me like Flash was used to make that. The controls are the stock Flash media player controls which have been modified.

Brooks says:
14 December 2005 ∞

Just wanted to confirm, that Flash 8 media component controls do not show up when used in conjunction with kimili—the flv plays back just fine, but without controls ( the controls show up properly when not used in conjunction with kimil ).

FYI – Camtasia is a screencasting product which allows you to perform screen captures and then outputs to a variety of file formats including flash. Camtasia allows you to produce a swf file and a “swf playback” application which will load that file and provides vcr style ciontrols, time display, etc.

I too can confirm that when using the Camtasia playback application kimili does not work properly. The Camtasia playback application requires an xm file to be loaded up which provides configuration details, etc. It appears as though the relative paths to the xml and swf files it needs are not being interpreted correctly.

Does anyone have any thoughts about potential workarounds for either of these problems?

Michael Bester says:
14 December 2005 ∞

I’ve now gotten multiple reports of problems using FLV components in conjunction with KML. This is something that I am definitely aiming to resolve with the next release of this plugin.

Although I haven’t used Camtasia, if the SWFs that it generates require pointing to an XML config file, it is best to make the path to that file absolute. This is true of any Flash movie that you pass URLs into for it to reference another file.

Flash is fussy with how it handles URLs. If I’m not mistaken, when you give it a relative URL for it to use as a reference to another file amd the flash movie is embedded into an HTML page, it will look for that file relative to the page that the flash movie is on rather than relative to the flash file itself.

I hope this helps clear up some recurrent issues people are having.

Yoram says:
21 December 2005 ∞

there is a incompatibility with another plug-in: Link Page v1.0 won’t work if you have Kimili Flash Embed (v0.3) installed/activated. maybe there will be a fix sometime?

Brooks says:
25 December 2005 ∞

Hadn’t ever realized it, but the Flash 8 flv components output a swf file which which is used for the playback controls. It appears the reason the flv components are not visible is because of the same relative file path issues described above.

Micheael’s response concerning absolute paths vs relative paths for loading xml and external swf’s will indeed remedy the situation. It seems an awkward work around, as relative pathing will be assumed by tools and developers, but it works nonetheless.

thomas says:
26 December 2005 ∞

ola, i’m sorry about my english.
i love your plugin, but i have a problem: i’ve got a .swf file who is reading “loadVariables” from a .txt file, but with wordpress and your plugin it doesn’t wok. at a normal html site the .swf works….

Michael Bester says:
26 December 2005 ∞

Thomas – Do you have an example of the plugin code that you’re using or a test page we can see it at? I’m thinking that you need to give the .swf an absolute path to your .txt file, as I outlined in my comment above – (#79).

thomas says:
26 December 2005 ∞

wow, that’s a service!
the plugin i’m using is Version: 0.3.1.
the testpage is http://www.blog.zwischenzeit.ch, the .swf should be above, at “test”.
i tried it with an absolute path, it doesnt worked.
as: _root.loadVariables(“http://www.blog.zwischenzeit.ch/public_html/blog/downloads/text.txt”, “”)
thnx

Michael Bester says:
26 December 2005 ∞

Thomas – The URL to the textfile you put in the previous comment doesn’t work. There is a 404 error, and that’s why it doesn’t work. What I think it should be is:

http://www.blog.zwischenzeit.ch/downloads/text.txt

Also, although you can code the URLs directly into the .swf, that’s not what I would do. I would:

  1. Set up a variable in the root of your movie that will get the URL to your textfile.
  2. Pass that variable to the loadVariables method, like: _root.loadVariables(varname)
  3. Using kml_flashembed’s fvars attribute, pass the URL of the textfile into the movie: fvars=”varname=/path/to/file.txt”
Doing this will allow you to change the URL to your textfile or point to different ones without you having to update the SWF.

thomas says:
26 December 2005 ∞

thnx!!! just great service, hehe.

Peter says:
27 December 2005 ∞

Plugin works with 2.0, but it doesn’t display anything in the post editor when trying to edit the post (not even if you press the HTML button).

Peter says:
27 December 2005 ∞

I use the plugin with the Scripturizer Remix:

http://laurenceo.com/2005/10/08/scripturizer-remix/

Activating your plugin causes scripturizer to cease to function without any error messages.

I tried the solution mentioned above of lowering the filter priority and it worked. A long term solution without editing the plugin would be nice. Whether its the wordpress devs, you, or the other plugin authors fault… I don’t know.

MilleSabords says:
27 December 2005 ∞

Plugin don’t work with WP 2.0,
After an upgrade 1.52 to 2.0, post are OK, but each time you want to edit a post with WP 2.0, when you click on save the post, the post is save then after the text of the post is cleaned and the
is deleted. So when you save it again, the flash section is lost.

Scott Benedict says:
1 January 2006 ∞

I’m having problems getting simpleviewer to work. I’ve read all the posts and I’ve found similiar problems with this program and it seems to stem from the imageData.xml file. Anyone fixed this yet? Pascal was working on it and then he dropped off.

Thanks!

Scott

lastboyscout says:
2 January 2006 ∞

hmmm
great concept BUT i am trying to embed a swf in my header. i ativated the plugin, and placed the code in the header, but nothing. Now is realise i have no js code? can anyone expalin why the js code is noewhere to be found, even though the plugin is activated? (or am i just being dumb????) happy new year to all ans sundry.

lastboyscout says:
3 January 2006 ∞

sorry for all those spelling mistakes. my plugin does not generate a .js file. shouldn’t it do so?

Michael Bester says:
3 January 2006 ∞

Unfortunately, the way Wordpress handles and applies the plugin only allows it to be processed in a post. This means that you can’t put the plugin code into a page template and expect it to work properly. Maybe things have changed with WP 2.0, though. I have to look into that.

As far as the JS goes, it’s in there. At the end of the head section of your html, you’ll see a script tag with a link to kml_flashembed.php?flashobject.js. That is the flashobject JS.

louisamaus says:
13 January 2006 ∞

Hi, i got an error

Warning: join(): Bad arguments. in /usr/export/www/vhosts/funnetwork/hosting/louisamaus/wordpress/wp-content/plugins/kml_flashembed.php on line 299

Everyone solve this problem ?

peppe says:
14 January 2006 ∞

Activating your plugin causes, in search results and archives, display the_content+the_excerpt instead the_excerpt!
Look: http://www.4mj.it/index.php?s=google

KK says:
15 January 2006 ∞

Hi sorry if my questions sound stupid, I’m just a newbie, I wanted to add flash movies into my post and I tried the plugin version 0.3.1 . I found out that there are no play/control buttons for visitors to click on? Is there anyway that I can add them?

I would also like to add a border around my flash, how do i do that?

Maybe you all can view my site here and give me some comments.

I don’t quite understand about the flashobject.js thingy. What’s the file for? I didn’t upload the file but I can still view the flash with no problem. How come?

Hope you guys can answer my questions. Thanks!

KK

KK says:
15 January 2006 ∞

Oops, here’s my site again – http://zelda-fans.com/blog/

Aaron says:
16 January 2006 ∞

With WP 2.0 the plugin doesn’t work. Kimili flash plugin results in losing the flash tags when editing a post. This is an issues of the rich editor.

Users of the plugin can deactivate the rich editor in your user settings but that sucks. The WYSWIG editor is on by default anyway…

Maybe you can try adding an alternative syntax like the exec-php plugin author did with his plugin.

He changed to use brackets [] instead of the like so:

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

Whether this would work for the flash plugin or not, I have no clue. I’m not good at PHP or Wordpress development. Regardless this would be an ugly work around, but something is better than nothing.

MW says:
20 January 2006 ∞

No idea what this does. Is there a demo anywhere to take a look? I’ve just surfed in here in error. Interested to learn though.

David says:
20 January 2006 ∞

Is this plugin going to be developed for Wordpress 2.0?

Michael Bester says:
20 January 2006 ∞

MW – Simply put, it is a plugin for both Wordpress and Textpattern that allows you to easily include flash movies in your posts.

David – Yes. I have it 99% ready to go and am aiming to release it this weekend.

angus says:
21 January 2006 ∞

great!! if u need any beta testers let me know… im in desperate need of such a tool! cheers, a.

David says:
21 January 2006 ∞

Cool.

Looking forward to it!

Thanks :)

MW says:
22 January 2006 ∞

Bring it on!! I’m running WP2 so would like to use the new plugin

Philip Olsson says:
23 January 2006 ∞

I’m using this plugin with “Ozh Click Counter” and everytime i activate this plugin, the click counter stops to work. Anybody have any solution? will the new version sovle that or something?

danielgc says:
23 January 2006 ∞

Yup, plz bring it on for wp2

Michael Bester says:
23 January 2006 ∞

Head on over to the new permanant home of KFE and have at it!


Flickr

  • No Entry.
  • Summer Sunday Fun
  • Grassy
  • All curled up
  • Graffiti is a crime.
  • Texaco
  • Beacon

See more at Flickr

Recent Listening

  1. Cujo - Adventures in Foam
  2. Frank Morgan - Frank Morgan
  3. Quadro Nuevo - Mocca Flor
  4. Sweetback
  5. The Budos Band
  6. Adele - 21
  7. The Budos Band - III
  8. Amon Tobin - Chaos Theory
  9. Sonny Rollins - Saxophone Colossus

See more at Last.fm

Tweet, Tweet

  • Dec 31st, 1969

See more at Twitter

©MMII—MMXIII Michael Bester