|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I want visitors of my website to click on thumbnails to get a larger image in a new browser window plus to play music. I managed the first part (which is simple). How can I link the sound additionally and make it play in the new window, which just contains the image (meaning that the URL of this image page ends with "xyz.jpg")? Any help is appreciated! ~Gabi
|
|
#2
|
|||
|
|||
|
Er, why dont you make it go to an HTML page, and then just cram yer sound and JPG in there? Josh |
|
#3
|
|||
|
|||
|
That would be a solution, but makes things (and navigation) a little bit more complicated for me. I was just wondering if it can be done... What about an OnClick script?
Thanks anyways :-) Gabi |
|
#4
|
|||
|
|||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Gabi:
That would be a solution, but makes things (and navigation) a little bit more complicated for me. I was just wondering if it can be done... What about an OnClick script? Thanks anyways :-) Gabi[/quote] var muteFlag = 1; function soundPlayer(sound_to_play,mute){ if (muteFlag == 1){ if (sound_to_play == 0 && mute == 1){ document.plugins[0].play(); } if (sound_to_play == 1 && mute == 1){ document.plugins[1].play(); } if (sound_to_play == 2 && mute == 1){ document.plugins[2].play(); } if (sound_to_play == 3 && mute == 1){ document.plugins[3].play(); } if (sound_to_play == 4 && mute == 1){ document.plugins[4].play(); } if (sound_to_play == 5 && mute == 1){ document.plugins[5].play(); } if (sound_to_play == 6 && mute == 1){ document.plugins[6].play(); } } } //embed all this into your HTML. the first wav file gets called like this onClick="soundPlayer(0,1)" the second this onClick="soundPlayer(1,1)" and so on--> <embed src="your.wav" loop=no hidden=true autostart=false> <embed src="your.wav1" loop=no hidden=true autostart=false> <embed src="your.wav2" loop=no hidden=true autostart=false> <embed src="your.wav3" loop=no hidden=true autostart=false> <embed src="your.wav4" loop=no hidden=true autostart=false> <embed src="your5.wav" loop=no hidden=true autostart=false> <embed src="your6.wav" loop=no hidden=true autostart=false> Any Questions ?? |
|
#5
|
|||
|
|||
|
Thanks very much! I will give it a try. If I am having trouble, I will get back at you :-)
~Gabi |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Linking a thumbnail both to an image and sound |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|