Jump to content
Sign in to follow this  
Vzero

changing embed video how

Recommended Posts

Hey using embed script, how would you change a video in it. Like I mean one video to another. I tryed using a javascript Id code://in javascriptdocument.getElementById('media').src="video.wmv"//in the embed code<embed src="othervideo.wmv" id="media">but the Id code didn't work, it only worked with images, but I want the fulmedia cotrol from quicktimes/windows media player. Is there another way, or am I doing something wrounge?

Share this post


Link to post
Share on other sites

I once was asked to build a control that would load a random flash movie from a list of about 6 movies whenever someone visited a certain page. Not knowing anything about shockwave or flash, I went the javascript route.What I discovered is that I had to wrap the movie in a div with an id and then use the innerHTML property to write out all the <object><param /><param /><embed></embed></object> markup with javascript.Something along these lines:

var div = document.getElementById("MovieDiv");var content = "<embed src=\"othervideo.wmv\" id=\"media\">";div.innerHTML = content;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×