How To Embed FLV Flash In WordPress or HTML
You could embed FLV flash video in HTML by referring to the template of code below.
For example, you only have to replace the red colour text with the URL of your own FLV video. The blue colour text refers to JW Media Player that “play” the FLV video file – replace it with the URL pointing to yours (if you’ve one), otherwise leave it as this.
The sample HTML code used to embed FLV video
How to embed FLV video in WordPress or New Blogger?
After replacing the text in red colour text and blue colour (optional) at the above, copy and paste it to the blog post editor while you compose an article with your own flash video!
If you copy the code directly to your post, you’ll see this video playing:-
Update:
1) Upload the mediaplayer.swf file to your blog directory, i.e. the directory where the wp-config.php is kept, if you don’t know what is this “blog directory” I am referring to. How to upload it? Well, how do you upload the WordPress core files (e.g. wp-config.php)?
2) Login to your blog and write/compose a new post. Suppose you’re going to show off a flash video in this “new post”, click the Add Media button to upload it. The Add Media button is one of the upload/insert buttons which you normally click Add An Image button to insert pictures into the blog post.
3) After upload completes, look for the Link URL text box. Below it, there is 3 buttons, click the File URL button to have WordPress fill up the Link URL text box. Copy whatever inside the Link URL text box to replace all the red-color text in the sample code above.
4) Optionally, upload a screenshot of the flash video and replace the yellow-color text with the Link URL of uploaded image. If you don’t want to use this feature, delete all the yellow-color text, please.
5) Lastly, replace the blue-color text in sample code with your blog domain.
Suppose you have done the steps correctly, your self-hosted flash video shows be showing off to the world now, as this one showing here that using the sample code above:
(This FLV video is copied from YouTube – refer to How to retrieve YouTube Video from the cache folder in IE and Firefox?)
More reference on this topic:
Embedding Flash Video into a Web Page
Macromedia Flash OBJECT and EMBED tag syntax
Flash Satay: Embedding Flash While Supporting Standards
Flash in HTML

The sample HTML code used to embed FLV video
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="480" height="360"><param name="flashvars" value="file=http://www.walkernews.net/wp-content/uploads/2008/01/LionLove.flv&image=http://www.walkernews.net/wp-content/uploads/2008/01/Lion-Hug-Rescuer.JPG" /><param name="movie" value="http://www.walkernews.net/mediaplayer.swf" /><embed src="http://www.walkernews.net/mediaplayer.swf" width="480" height="360" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://www.walkernews.net/wp-content/uploads/2008/01/LionLove.flv&image=http://www.walkernews.net/wp-content/uploads/2008/01/Lion-Hug-Rescuer.JPG" /></object>
How to embed FLV video in WordPress or New Blogger?
After replacing the text in red colour text and blue colour (optional) at the above, copy and paste it to the blog post editor while you compose an article with your own flash video!
If you copy the code directly to your post, you’ll see this video playing:-
Update:
1) Upload the mediaplayer.swf file to your blog directory, i.e. the directory where the wp-config.php is kept, if you don’t know what is this “blog directory” I am referring to. How to upload it? Well, how do you upload the WordPress core files (e.g. wp-config.php)?
2) Login to your blog and write/compose a new post. Suppose you’re going to show off a flash video in this “new post”, click the Add Media button to upload it. The Add Media button is one of the upload/insert buttons which you normally click Add An Image button to insert pictures into the blog post.
3) After upload completes, look for the Link URL text box. Below it, there is 3 buttons, click the File URL button to have WordPress fill up the Link URL text box. Copy whatever inside the Link URL text box to replace all the red-color text in the sample code above.
4) Optionally, upload a screenshot of the flash video and replace the yellow-color text with the Link URL of uploaded image. If you don’t want to use this feature, delete all the yellow-color text, please.
5) Lastly, replace the blue-color text in sample code with your blog domain.
Suppose you have done the steps correctly, your self-hosted flash video shows be showing off to the world now, as this one showing here that using the sample code above:
Do not copy the sample code and paste it directly to your post without replace the colourized-text. It won’t work in that way, because I disable the hotlinking to prevent you and most other people from using my hosting bandwidth :-)
(This FLV video is copied from YouTube – refer to How to retrieve YouTube Video from the cache folder in IE and Firefox?)
More reference on this topic:
Embedding Flash Video into a Web Page
Macromedia Flash OBJECT and EMBED tag syntax
Flash Satay: Embedding Flash While Supporting Standards
Flash in HTML
Custom Search








2010 •
Could you please specify how to add an image to this embedded player (snapshot for video).
In a similar script it was done with the line
s1.addVariable(“image”,”FILELOCATION.jpg”);
how would that be in this case?
Thanks!
Hi Nik, you may use JW Media Player (refer to the post) where the Javascript will able to do that for your case.
(The code template that I’ve outlined is HTML style and thus less features).
Please refer to my correction on the next comment.
Hi Nik, sorry for misleading info, I might be too tired :-(
By using JW Media Player, you could also include the snapshot / preview image of the FLV video clip by simply including the ‘image’ flashvar to that HTML-style of code (i.e. without having to use a Javascript), i.e.
......param name="flashvars" value="file=http://walkernewsdownload.googlepages.com/Lion-hug-Rescuer.flv&image=http://walkernewsdownload.googlepages.com/WalkerNews-Feed.jpg"......Hi Nik, it run. But…how i can make it to show a playlist of these file I’ve linked
How could I get this to autoplay?
Walker:
Very helpful thread. Now that I can access the FLVs via HTTP and the Object embed, how can I create a “wrapper” SWF player in which to play the files? I want to create a “branded” player. (Obviously, I don’t know much about Flash).
Thanks – John
Hi John, do you mean to create flash player of yourself?
To be frank, I know only little about creating flash movie. So, I can’t help you on this.
I want to generalize the code as much as possible which I can probably do by creating a .js file of the enbed object code and pass the name of the target FLV file in as a parameter. I want to use a single code base to access a library of FLV files. The “player” (the single_video_player.swf) file is what I was really referring to. I want to create a new one with some additional controls and branding. Since I’m not a Flash expert by any means, I wondered if you had advice on creating the SWF player.
Thanks – John
[...] short flash video showing a simple trick on how to do [...]
[...] just upgraded or is running WordPress powered blog for the first time, do you know that WordPress allows author to edit or rewrite the post slug to a search engine friendly [...]
[...] too hard for you to visualize the world clock on the world map, you may refer to this simple Shockwave Flash gadget provided by [...]
hi walker
How can i change the skin , i want to add a different skin that has more buttons is there a way to do it
Thanks
[...] those who are using WordPress powered weblog, do you click the commenter IP address each time before approving it? If you never [...]
hi there, i have 1 problem in the code at the top, when i copy and paste the code, the video didn’t play..i already change the URL of the video, but nothings happen.. this is my example “URL:http://localhost/request/DK.flv” please someone here to help me, this is for my thesis..
Hi Paul,
do you have a copy of JW Media Player (i.e. the mediaplayer.swf) in your local web server?
If you do, you should also replace the URL of mediaplayer.swf (written in light-blue text) to test all in local web server.
If you doubt the local web server working, just place the the URL you’re using in web browser Address bar (I think the working web server will prompt you to download).
Is there any way to get the player to autoplay?
[...] / truncation logic). If you have a reason to change the default “Pretty Permalink”, WordPress allows you to edit or change the permalink, just as you [...]
Thanx for the code. I saw this code a while back but I never needed it until today. I’m starting a new site and the wordpress theme I am using only excepts this one without showing code on home page. All I need to do now is figure out how to get the full screen access turned on. Thanx again.
Copied and pasted the code and it worked fine except that it doesn’t allow full screen. How do I enable full screen viewing?
Try set the
allowfullscreento true (my sample code above doesn’t include this), e.g.I’m trying to add a flash player to my site. I’m self-taught, so i tend to intermingle different types of code. i’ve tried a few different versions of code for players, yours included, and I have the same problem every time, – I can’t hear any audio. Is there a common mistake I’m making that you can think of?
HI Tracy, have you tried to browse the page embedded with flash on different PC or different browser?
yes, I’m on a Mac, so initially I thought that was the problem, and had my friends go to the link too. No audio in any browser…
Hi ,
I am trying to add this code in php file and I am not able to
Can anyone help me out with it
Hello,
i’ve been racking my brain over embedding my own videos with my own flash player. my question is how do i make a video URL such as youtube, and how can i make a video id such as youtube?
can anyone help? I appreciate it.
thanks man …helped alot…got it working…replaced the player on my server….all is well…much respect!!
Thanks JW Media Player!
[...] 01:29 How do you open SWF file or Shockwave Flash game? Well, if you able to watch YouTube or any flash video embedded on a web page, most likely you could open the SWF file with that web browser. But, people seldom receive SWF [...]
Thanks to your guidelines I have included a “flv’ video file to the site – after much heartache I will admit – the main problems encountered on the way was getting a suitable swf file. It works fine in safari and firefox on mac osx and ie but firefox on windows has a problem ??? I am still looking at this (the site is under development obviously if you look).
What I really want to know is the params or flashvars to turn off the controller – I have tried “name = controller value=false” but it does not seem to have any affect. If you have a list of params that apply to your swf it would be appreciated.
All in all it is great and simple – thanks again.
Paul
Thanks man.
Thanks for the straight-cut solution. :)
Hey thanks much for the tutorial. I’m having troubles though and want to know if you can help me out. What if I want to host the video in the same directory as my blog but then embed it on the blog itself? I’ve tried using your code and it just shows the code in the preview….no video. So let me see if I can make what I’m trying to do a bit more clear. I’ve uploaded the video to the same public_html directory and just want to post it live on my blog. What would be the correct way to go about doing this? Thanks in advance.
Please take note that the block of code in the post is referring to files hosted at Google Pages, which imposes quota of bandwidth per month. I.e. it won’t work if the bandwidth limit is hit.
For your case, you should host the mediaplayer.swf file too instead of using mine copy at Google Pages. Note, you need to update the path to video and mediaplayer.swf accordingly.
Hi ,
I am using above code to dynamically add flash to my page by appending object tag to div.But I need to save this into database.While iam using div.innerhtml iam not getting
flash vars value.I am getting like this
“”
How can i get this value.Any help appreiciated?
Helppp!
I created a banner in Flash and saved it as a swf. How can I upload it ( the new banner) into wordpress to replace the old one?
Thanks
I have just updated this post today:
1) The block of code is now using my own hosting server instead of Google Pages.
2) The revised steps.
[...] Flash game in the HTML page or blog post, here is a template of code for reference. Unlike embedding Flash Video file (FLV) in HTML code, the template code used to embed SWF file is relatively “easier” and [...]
I’m going crazy here.. I put a FLV in a SWF and made a Mojave External style for it or whatever, then i went under publish and published the swf and the html and everything, and uploaded the entire folder to my website and nothing is showing up..
What am I doing wrong, here?
Hi..thanks for this article..i’ve been trying so many times and it cannot work..
but becoz of your article, now it works…
<3 gbu
Hello,
Can i change play button? if, its possible so please let me know how to chagne it.
Thanks,
Nilesh
THANK YOU THANK YOU THANK YOU…
I am new to blogging, etc, and have been pulling my hair out trying to figure out how to make FLV play on my wordpress blog. Your post was the first thing I found that walked me through step by step – I especially appreciate you telling me in what folder to upload the player.sfw, which was my biggest source of frustration.
Many Blessing!!
Hi there,
This was just what I was looking for. Thanks for sharing.
Is it possible to download and install a free mediaplayer.swf to my server? Where do I find one?
Thank you.
You could download a copy of mediaplayer.swf from Jeroenwijering website.
Another simple way to add flash content to wordpress pages and posts is to embed it into a HTML page and then recall it with an iframe. The iframe src code can be easily added as HTML into the wordpress text editor and it can be customized with all kind of formats …..size, borders, transparency.
By following your nice tutorial I added the video.swf to my project. It is working on local I mean in Frontpage. But after uploading to my website there is nothing appearing.
Another question : Is mediaplayer.swf is free to use for comm. and pers. website.
thanks a lot for make this nice tutorial;
Please refer to JW Media Player developer regarding the license issue.
Hi there,
I am still having trouble trying to put a WMV file on my webpage and have it play on the site. I’ve tried some of your codes, but for some reason are having difficulty.
Please help!
Katie
Thanks, this is exactly what I needed. The quick setup wizard they provide was not working correctly for me. Copying and pasting your code worked perfectly.
Thanks,
Matt