Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 06-22-2007, 08:23 AM   #1
In Runtime
j.venning's Avatar
Join Date: Mar 2006
Posts: 220
Send a message via ICQ to j.venning Send a message via MSN to j.venning
Question Change embeded video with link?

Hi everyone, I have my desktop set to a HTML webpage as my background. When I log on, a music video plays in an embeded media player. Is there any way I can change the video by clicking a link beside it or something, i.e. by JavaScript or something? Here is the code for my player:

codebase='http://activex.microsoft.com/activex/controls/ mplayer/en/nsmp2inf.cab#Version=5,1,52,701' type='application/x-oleobject' width="480" height="320"
standby='Loading Microsoft Windows Media Player components...' id='mediaPlayer'>
      <param name='fileName' value="D:\WINDOWS\Cascada.avi">
      <param name='animationatStart' value='1'>
      <param name='transparentatStart' value='1'>
      <param name='autoStart' value='1'>
      <param name='ShowControls' value='0'>
      <param name='ShowDisplay' value='0'>
      <param name='ShowStatusBar' value='0'>
      <param name='loop' value='0'>
src="D:\WINDOWS\Cascada.avi" width="480" height="320" autostart='1' loop='0' type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/ en/download/'
id='mediaPlayer' displaysize='4' autosize='0' 
bgcolor='darkblue' showcontrols='0' showtracker='1' 
showdisplay='0' showstatusbar='0' videoborder3d='0' designtimesp='5311'>      </EMBED>

Brand new setup!

Intel Core 2 Quad Extreme Edition QX6800 (2.93GHz)
Intel Extreme D975XBX2KR Motherboard
BFG GeForce 8800 GTX 768MB GDDR3
Corsair 2GB DDR2 XMS2 Dominator RAM
Thermaltake VE2000SWA Armour LCS Super Tower
Western Digital Raptor X 150GB X2
j.venning is offline   Reply With Quote
Old 06-25-2007, 04:37 AM   #2
Baseband Member
Join Date: May 2007
Posts: 42
Send a message via AIM to yohed55
Default Re: Change embeded video with link?

Put that Object in a DIV and ID it with something like:

<div id="vid1">
Then set up a JS function like

function changevid(){
foo = document.GetElementByID("vid1")
foo.innerHTML = new video code here
Then link to that JS function

I haven't worked with DHTML for a while, so don't expect this to be bullet proof. Go ahead and google "getelementbyid" I'm pretty sure w3schools has a pretty nice tutorial on it.

If you're already familiar with Javascript, this should be plenty to get you going. If not, it never hurts to learn eh?

yohed55 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 10:40 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0