This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > September 2004 > starting/stopping an embedded .mp3





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author starting/stopping an embedded .mp3
Hapless Intern

2004-09-29, 7:15 pm

Right now, I have an embedded .mp3 that loops once it's loaded, and an on/off
button that changes images, but doesn't control the sound. Are there special
functions for this? Here's the code, if it helps:

//in the head/javascript section

var soundON = true;
function toggleSound() {
if(soundON) {
MM_swapImage('sound','','images_Nav/soundOff.jpg',1);
soundON = false;
} else {
MM_swapImage('sound','','images_Nav/soundON.jpg',1);
soundON = true;
}
}


// in the body

<embed src="files/mySound.mp3" name="mySound" mastersound autostart="true"
loop="true" hidden="true"></embed>
<map name="soundMap2">
<area shape="rect" coords="7,15,43,49" href="#"
onclick="javascript:toggleSound();">
</map>TextText

I appreciate the help,
Paul

darrel

2004-09-29, 7:15 pm

> Right now, I have an embedded .mp3 that loops once it's loaded, and an
on/off
> button that changes images, but doesn't control the sound. Are there

special
> functions for this?


Use flash.

-Darrel


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews