Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/05/2008, 09:35
akira the one
 
Fecha de Ingreso: marzo-2006
Mensajes: 134
Antigüedad: 18 años, 1 mes
Puntos: 0
Exclamación Un Solo Boton Para On/off El Sonido

hola a todos tengo una pregunta para el sonido...
tengo un solo boton que me detiene y activa el sonido (asi es el dieño) y funciona pero el detalle esta que detiene TODOS los otros sonidos como de los botones....

como puedo evitar esto aki tengo el action script que utilice:

es un boton que esta dentro de un movie clip y es el movie clip quien lleva el action scritp...

onClipEvent (load)
{
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame)
{
if (_root.soundstatus == "on")
{
step = 5;
} // end if
if (_root.soundstatus == "off")
{
step = -5;
} // end if
maxvolume = maxvolume + step;
if (maxvolume > 100)
{
maxvolume = 100;
} // end if
if (maxvolume < 0)
{
maxvolume = 0;
} // end if
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}

gracias espero me puedan ayudar...