Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding a Movie 1

Status
Not open for further replies.

Supra

Programmer
Dec 6, 2000
422
US
Hi folks,

This question has been asked plenty of times, however I couldn't find the information I needed when I searched. Basically, I want a cross-browser embedded movie with support at least for IE and FireFox. The catch is, I'd like to have the movie paused at the first frame. So instead of seeing a black box, you see the first frame of the movie that's going to play. I've figured that bit out myself, however FireFox doesn't like my OBJECT tag and doesn't seem to like the EMBED tag within it. Any chance you folks could steer me in the right direction? Here's my code:
Code:
<OBJECT width="300" height="250" 
	classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
	type="application/x-oleobject">

	<PARAM name="URL" value="movie.wmv">
	<PARAM name="AutoStart" value="true">
	<PARAM name="currentPosition" value="36"
	<PARAM name="uiMode" value="mini">
	<PARAM name="AutoRewind" value="true"
	<PARAM name="PlayCount" value="1">

	<EMBED src="movie.wmv" showcontrols="true" autostart="true"></EMBED>
</OBJECT>

Thanks your your time!!
 
The still image is a screen capture of the first frame of the video in each example, replaced by the video when someone clicks on the graphic.

Lee
 
A star for the great idea trollacious! I don't know why I never thought of it, but I'm glad you did! I've taken a different route than you did on the linked page and it works great in IE, but I don't have FireFox installed to test it out. Can anyone verify whether or not this code behaves correctly in FireFox?
Code:
<script>
<!--
var movie = new Image(320,240);
movie.dynsrc = "insert-movie-here.wmv";

function loadMovie() {
    document.getElementById('Movie').dynsrc = movie.dynsrc;
}
//-->
</script>
</head>

<body>
<img name="Movie" src="insert-picture-here.jpg" dynsrc=""onClick="loadMovie();" width="320" height="240">
</body>

If not I will install FireFox when I get home from work tonight and see what happens ;)

Thanks again trollacious!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top