Plugin: Easy Flash Embed

Embed Flash easily and standard compliant with SWFObject using only a [swf] shortcode!

In the text editor simply write something like:

[swf src=”http://www.example.com/my-flash-file.swf” width=300 height=100]

The attributes src, width and height are required

Additional attributes includes:

  • params
  • flashvars

The attributes params, and flashvars should be written like “flashvar1=value&flashvar2=value” to function properly

To provide alternative content for people without Flash, simply put some text between the [swf] brackets, e.g.

[swf src=”http://www.example.com/my-flash-file.swf” width=300 height=100]You must have Flash to view this file[/swf]

Installation

  1. Upload /easy-flash-embed/ to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Use the [swf] shortcode in the text editor as described in the description

Download

Download here

58 comments on “Plugin: Easy Flash Embed
  1. Awesome plug-in. Super easy to use. One thing I noticed is that if you have multiple params the SWFObject embed codes includes the html char code for “&” in the param name.

    Example:

    [swf src=”http://mysite.com/some.swf” width=530 height=410 params=”wmode=transparent&quality=high&bgcolor=#F5F5F5″]

    I get this output :

    {“wmode”:”transparent”,”#038;quality”:”high”,”#038;bgcolor”:”#F5F5F5″}

    Thanks again for an great WP plugin.

  2. John says:

    Hi Vincent

    I’m trying to show a camtasia5-produced .swf video (I also have the .html & _controller.swf files, etc).

    I’ve installed your plugin but don’t see a control button for inserting a video. So I’ve just inserted this code:
    [swf src=”http://www.myfile.swf” width=480 height=378]

    I’ve also tried this with the _controller.swf file.

    However, I can’t get a player controller skin around my .swf video – it presents just the same as before I used your plugin, without a controller , and just plays automatically.

    Please could you clarify:
    * how do I use the plugin for the above?
    * how I can get the video to show with a controller skin?

    Please forgive me if I’m missing a trick here!

    Many Thanks

    • Vincent says:

      Make sure you know which .swf file to embed. I don’t know the specifics on embedding a Camtasia video, but if you have older embed-HTML look at the code for reference. Perhaps you’re missing some flashvars or params!

  3. aparent says:

    Hey there, trying to get your plugin to work. I have a swf hosted that is larger than I’d like, and the width/height params seem to crop not scale. How can I tell it to scale proportionally?

    It also doesn’t appear to play the video, although the first frame/buttons appear onscreen.

  4. Amanda says:

    I am having an issue embedding a flash slideshow with your plugin. I keep getting this error:

    “Sorry, xml file not loaded”

    Any suggestions? Is there a specific location I should place the xml file?

  5. Pamela Alford says:

    Would it be possible for you to post the proper way to include a flashvar for swf file to read an xml file?

    • Vincent says:

      Again, that’s hard for me to do without knowing the specifics. But, if the variable name is “xmlFile” and the path to your XML-file is “/xmls/myfile.xml” you would include it like this:

      [swf src=”http://www.example.com/my-flash-file.swf” width=300 height=100 flashvars=”xmlFile=/xmls/myfile.xml”]You must have Flash to view this file[/swf]

      Again, this is not a working example since I don’t know the details of your flash file. I hope it helps!

  6. Pamela Alford says:

    Excellent! That is all I needed, thanks!

  7. frank says:

    What’s the proper way to code the swf to not autoplay?

  8. Mansur says:

    how to make a button to play a flash after you turn off a false

  9. Karen Salter says:

    Hi, I’m trying to embed a video in the header.php file. The video won’t show – just the text of the code. Am I missing something? Code I’m using is:

    [swf src=”http://www.eynp.com/spirtualawakening/images/BirdFlying3e.swf” width=300 height=100]You must have Flash to view this file[/swf]

    Thanks, Karen

    • Vincent says:

      The plugin is supposed to be used within the content area.

      Perhaps you could write
      echo apply_filters( 'the_content', '[swf src="http://www.eynp.com/spirtualawakening/images/BirdFlying3e.swf" width=300 height=100]You must have Flash to view this file[/swf]' );

  10. Chris says:

    I seem to have the same problem as many above. The video just automatically plays when the post is loaded and there is no way to have the control bar on the bottom of the video.

    I want the reader to have to click play to start the video. How can this be done?

  11. John Frenaye says:

    I am not very experienced in flash and hopefully you can answer this question.

    I have WP3.1 and am using your plugin. I have an advertiser that supplied me wiht a SWF file and I have uploadaed it to my media library.

    I have installed that location into your short code whihc is in a widget in the side bar. It displays properly

    The question I have is that it says “click here for tickets” and I need to get the image “clickable”

    How do I do that?

  12. Joel Glastetter says:

    Hi,
    I’m trying to place my flash file on a wordpress page and align it to the right hand side and let my body copy flow around it. Can you please help me with the shortcode to do this? I’ve tried a bunch of stuff and searched like crazy to try to find it, with no luck. Any help you can give would be appreciated.
    Thanks!

  13. Charl says:

    Hi there,

    Thanks for creating this great plugin. Its very useful. I do have 1 little problem though, I am embedding a swf in my wordpress page, this swf calls other swf’s loaded into a target. When using this plugin the files aren’t loaded into the target when I click a button.( I know this because it works with an iframe). The way I understand it is that the plugin is stopping the embedded swf from loading external swf’s. The main swf is in the same folder as the swf being called. I have tried using an absolute and a relative path in the swf , both don’t work.

    Any ideas ?
    I hope to hear from you.

    • Vincent says:

      Hi Charl,

      What the plugin actually does is to convert your [swf]-shortcode to the swfobject scripts needed to embed a Flash file. So if you see any Flash file at all, the plugin is working. Please refer to swfobject documentation to see if any help can be found there. I know cross-domain calls can be a hassle, so a good idea would be to check if that could be the cause of the problem as well.

      I do not think the plugin is the cause of your problems, but if it turns out to be, please let me know what caused it!

  14. JT says:

    Hello, I have installed the plug-in and embedded a basic swf that only contains animation. All of my browsers have the latest flash plugin installed but when I view the source of the rendered page I only get this on three different browsers…

    You must have Flash to view this file

    The shortcodes seem to match what you have on this site…
    [swf src=”/assets/InstallVideo2.swf” width=566 height=395]You must have Flash to view this file[/swf]

    Any ideas?

    • JT says:

      My code example was modified by WP. When I view the source of the rendered page I only get this on three different browsers…

      div id=”efe-swf-1″ class=”efe-flash” — You must have Flash to view this file — div

      • Vincent says:

        Are you using a custom theme? If so, are you including the wp_head and wp_footer functions in your header and footer? They’re used to include the scripts.

  15. thanks for this useful plugin.. but how can i allow swf to works with fullscreen button? i tried [swf src=”http://www.blablabla.com/files/video/video_player.swf” allowfullscreen=true width=600 height=400 ]You must have Flash to view this file[/swf]

    but it didn’t work …

  16. omg.. sorry for the unuseful post.. i found my mistake .. this is the right one which works… [swf src=”http://www.blablabla.com/files/video/video_player.swf” params=”allowfullscreen=true” width=600 height=400 ]You must have Flash to view this file[/swf]

  17. […] SWF embeds we are using swf object and a WordPress plugin called Easy Flash Embed SWF files have to be hosted on a server and posted by using the following code: <div […]

  18. Is there a way to use this plugin with a script instead? I mean, not with WordPress but on another site or blog. I wish SWFObject was this easy…

  19. carsten says:

    Hi Vincent,

    it´s possible to make a link in the shortcode inside ?

  20. Geoffrey Inman says:

    Im trying to embed in wordpress a game that uses an .xml file for a config i tried this:
    [swf src=/acroblast_flash/acroblast.swf” width=750 height=810 params=”wmode=transparent” FlashVars=”xmlFile=/acroblast_flash/sfs-config.xml][/swf]

    But it does not work is this wrong? I can embedd the flash in an HTML file just fine and it works fine…….. Thanks!

    • Vincent says:

      You seem to be missing some quotes. The first one in the src-argument, and the last one in the flashvar-argument. Also, try to see if typing flashvars in all lower case might help.
      [swf src=”/acroblast_flash/acroblast.swf” width=750 height=810 params=”wmode=transparent” flashvars=”xmlFile=/acroblast_flash/sfs-config.xml”][/swf]

  21. Patrick Dickey says:

    Will this work with flv files? I have one that I tried to upload using this plugin, and although I do have the Flash window (when I right click), it says “Movie Not Loaded” (again, when I right click).

    Here’s what I put for the shortcode

    [swf src=”http://files.ubuntu-manual.org/videos/ump-team_640x360.flv” width=640 height=379 params=”allowfullscreen=true”]

    Thanks for any help. And have a great day:)
    Patrick.

    P.S. the page is located (temporarily) at http://wptest.ubuntu-manual.org/contributors

    • Vincent says:

      I guess you need a .swf-file in which a player loads the .flv.

      • I do have a file called OSPlayer.swf, so would the correct code be
        [swf src=/wp-content/ubuntu-assets/OSPlayer.swf?movie=http://files.ubuntu-manual.org/videos/ump-team_640x360.flv” width=640 height=379 params=”allowfullscreen=true”]?

        Thanks for the quick reply, and have a great day:)
        Patrick.

  22. Chris Quinn says:

    my flash file is not coming up in firefox. fine in safari and chrome. can you help?

  23. Chris Quinn says:

    Awesome plugin. Have tried several others. All have problems but yours. Am having issue with submenu coming up behind flash file. submenu is set to relative, z index 99, but still won’t come forward. Can you help, please? HAVE to get this fixed!

  24. Markus says:

    Nice plugin. It is really easy to use. However, i can’t get my parameters work but the first one, like this:

    [swf src=”../audio/dewplayer-vol.swf?mp3=../audio/squeeze-page.mp3&autostart=1&showtime=1″ width=240 height=20]

    all the rest starting by ‘&’ isn’t working. How do i get the flashvars right? Thanks in advance

  25. luca fruzza says:

    HI, I’m using Easy Flash Embed to load and show swf files created using “SlideShowPro Player ” Flash component with Flash CS5.
    It allows to set a full screen option, but when I load the files on my site pages the full screen button does’nt work…
    On their support page they suggest (but only with older flòash versions it seems…) this:

    Next, add allowFullScreen=”true” as a new attribute anywhere inside the embed element, like so:
    1.

    http://wiki.slideshowpro.net/SSPfl/C-EnableFullScreenMode

    As I use the shortcode to place the files in the pages where do I have to paste the above code?

    Do I need to do that?

    Any other way to show full screen swf?

    Thank you very much…
    Hoping you can help…
    it’s very important to have the full screen option working on our site

  26. luca fruzza says:

    Thank you… now it works!
    Only one thing: when I esc the fullscreen mode the swf ino centered in the page as before entering fullscrees but it moves to the left…

    maybe due to an html error?

    any suggestion?

  27. rmxculture says:

    hi all… I’ve embedded my swf objects in the website pages…

    http://guidoclerici.it

    it works with all browsers except explorer…

    the drop-down menu is hidden by the swf

    I tried editing css, using z-index and position parameters but i’m not sure i placed the code in the right place…

    can anybody help?

    thank you very much

  28. rmxculture says:

    GREAT! it works perfectly… thak you again…

  29. Thk for your totorial, we won causion giv me help for 2 embedid swf to wordpress

  30. Zak says:

    [swf src=”http://hostname/wp-content/uploads/2013/12/logo1.swf” width=135px height=115px params=”wmode=transparent”]

    logo is working, but its not transparent :(.. please help

  31. Dhruv says:

    Hi Vincent

    I am liking your plugin. It has solved many problems. However, there is one issue that I would be happy for if you would guide me on how to do it.

    I want your help on this link: http://touritvirtually.com/test_link/

    Here, I have used your short code to place this virtual reality swf tour. However, the full screen option visible on the tour is not functioning, making the tour be restricted to the dimensions standard to the theme.

    Is there a solution to make the full screen option work? Or is there any plugin to make the screen size of the body bigger, irrespective of the standard template sizes.

    Thank you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

About

WordPress Quick Tips is a blog supplying great tips about WordPress.

We hope to create a great knowledge resource for WordPress developers as well as serving a reminder for all the forgetful ones.

The blog is created and run by Vincent of Oakwood Creative

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 120 other followers

Follow

Get every new post delivered to your Inbox.

Join 120 other followers

%d bloggers like this: