|
|
#1 |
|
In Runtime
|
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:
Code:
<OBJECT
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
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'>
<EMBED
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>
</OBJECT>
James.
__________________
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 |
|
|
|
|
|
#2 |
|
Baseband Member
|
Put that Object in a DIV and ID it with something like:
Code:
<div id="vid1"> Code:
function changevid(){
foo = document.GetElementByID("vid1")
foo.innerHTML = new video code here
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? -Sam |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|