Jump to content

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?

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;

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...