Monday, September 24, 2007

How to add SWF files to blog posts?

Adding images and videos to blogs is as easy as pie. HTML already supports images through the IMG tag and videos can be inserted through the "Add Video" options in blogger. Even if your blogging platform doesn't give you an easy way to add videos you can do so by uploading the videos to video sharing sites like YouTube. YouTube will generate a link to the video which you can use to embed that video in your blog. But adding SWF files  isn't such straightforward. For this you have to add a small code to your blog. It's very easy. Just upload the SWF files to ImageShack or any other image sharing site. Now add the following code wherever you want the flash file to appear in your blog  post and then replace  file_url with the actual link to the flash file.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" /,0,29,0" width="405" height="400">
<param name="movie" value="file_url">
<param name="quality" value="high">
<embed src="file_url" quality="high" pluginspage="" type="application/x-shockwave-flash" width="405" height="400"></embed></object>

Note, that the "width" and "height" values in the above code needs to be changed too according to the size of the flash file. See this example of how I added SWF files in my blog.


  1. Hello Kaushik.

    I just want to know why some IE browsers can't see those animations?

    They installed the flash player without success.

    Thanks for any help

    BTW, very nice blog you have!. Congrats.


  2. Some IE browsers are having trouble viewing the animation? But it is working at my end.

    Use IE7.

  3. Hey, thanks for the code...I didn't realize I couldn't just upload and post .swf files until 5 minutes ago when I tried to for the first time...hehehe.

    Thanks again,

  4. i followed everything, but i get a 'movie not loaded'

  5. If you get movie not loaded, either you have flash disabled on your browser or the swf file doesn't exist.

  6. movie not loaded - and flash is not disabled on my browser , swf was created 5 seconds ago for testing. but nothing

  7. hi,

    do you know how to embed a swf file containing flv video in it?

  8. If it's a video, upload it to Youtube or any other video sharing site and use the embed code to post it in your website.

  9. didnt seem to work for me either im using and the imageshack website said some error when i tried to look at my swf

  10. ok i seemed to fix the problem using a swf file hosting website will fix your problem
    and this is the swf hosting site

  11. I tried other examples on other sites however your code worked the best. I added my flash banner to our Ning Social network home page and blogsite.


  12. Works, but..

    Mine is a banner.. whats the code for linking it to external site?

  13. Thankyou bro....

  14. @blukazs: The link must lead directly to the SWF file, like

  15. do you know a site where i can upload flash files? imageshack doesnt work for me.

  16. the megaswf site it the best I've come up with. On that you have to pay to embed your swf, so it only works as a link to their own site, with your uploaded material. better than nothing.

  17. here is flash&snow effects please check it

  18. Hi,
    Can u pls tell me in detail how to upload a swf file to web or a blog.

  19. If any one know how to upload a swf in to a blog or a web,please revert back.

  20. @karthikreddy, you can't upload SWF files to blogger. You must upload to file serving service like Dropbox or image sharing service that supports SWF, then use the embedding code.

  21. I'm been looking for this for my blog. I'll give this a try. Thanks.

  22. step1:upload your swf files in google doc or similer sites
    step2:go to your blogger dashboard and add the wedget as embaded and put your swf file link



Contact Form


Email *

Message *

Popular Posts