[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Embed Flash .flv file into html.

Posted on 2009-04-27
9
Medium Priority
?
2,643 Views
Last Modified: 2012-05-06
I've got an .flv video file named DD_master_v4_042409.flv

I can't seem to find an understandable example online of how I would embed this into an HTML page using an object tag.
0
Comment
Question by:josephdaviskcrm
  • 5
  • 3
9 Comments
 
LVL 10

Expert Comment

by:KenAdney
ID: 24244068
0
 

Author Comment

by:josephdaviskcrm
ID: 24244122
So I'm trying to make this as basic as possible.  I have built the html below, but it is not working.  Can you tell me what I'm missing.  That url that you provided isn't very clear to me.
<html>
  <head>
  </head>
  <body>
    <object data="DD_master_v4_042409.flv">
    </object>
  </body>
</hmtl>

Open in new window

0
 
LVL 5

Expert Comment

by:blacksix
ID: 24244319
Here is a simple example:
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">
</embed>
</object>

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:josephdaviskcrm
ID: 24244379
Per your example I made the following.  It still doesn't seem to work.  All I'm getting is a box on the page that looks like it is supposed to hold an image, but the image never loads.  Is it ok that I'm using an .flv file instead of a .swf file?

Also, the .flv file is a 40mb file.  will that have any impact on how it is loading?  I'm running this html page that I'm working on from my local machine.  There shouldn't be a download time issue.
<object width="550" height="400">
  <param name="movie" value="DD_master_v4_042409.flv">
  <embed src="DD_master_v4_042409.flv" width="550" height="400"></embed>
</object>

Open in new window

0
 
LVL 5

Accepted Solution

by:
blacksix earned 2000 total points
ID: 24244515
Sorry, didn't have an flv handy to test with and wanted to keep the code very simple, but I was way off base.

Here's the solution,

Download a free flv player
http://www.longtailvideo.com/players/jw-flv-player/

extract the contents to the same directory as your html file

then just paste the code from below and change the part of the code below that says
<param name="flashvars" value="file=video.flv&image=preview.jpg" />

you can even save a jpg file as the preview image that you want to show up before they press play.
	<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->
 
	<script type="text/javascript" src="swfobject.js"></script>
	<script type="text/javascript">
		swfobject.registerObject("player","9.0.98","expressInstall.swf");
	</script>
 
	<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">
		<param name="movie" value="player.swf" />
		<param name="allowfullscreen" value="true" />
		<param name="allowscriptaccess" value="always" />
		<param name="flashvars" value="file=video.flv&image=preview.jpg" />
		<object type="application/x-shockwave-flash" data="player.swf" width="328" height="200">
			<param name="movie" value="player.swf" />
			<param name="allowfullscreen" value="true" />
			<param name="allowscriptaccess" value="always" />
			<param name="flashvars" value="file=video.flv&image=preview.jpg" />
			<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>
		</object>
	</object>
 
	<!-- END OF THE PLAYER EMBEDDING -->

Open in new window

0
 

Author Comment

by:josephdaviskcrm
ID: 24244770
This thing is producing a javascript error on the page.  It says 'swfobject is undefined'  Do you know how I can get rid of that?  It is even occuring on their readme.html page.  I don't want to release a page with a javascript error to our clients.
0
 

Author Comment

by:josephdaviskcrm
ID: 24244847
Ok... I got it figured out.  I just moved the script tags into the head of the document.  It works fine now.  Thanks.
0
 
LVL 5

Expert Comment

by:blacksix
ID: 24244937
good, glad it is working out. =)
0
 

Author Closing Comment

by:josephdaviskcrm
ID: 31575076
Sorry... I thought I had closed this the other day when I solved the issue.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question