Comunidad de diseño web y desarrollo en internet online

Problema con Sonido

Citar            
MensajeEscrito el 07 Feb 2008 07:45 pm
S.O.S !!!!! tengo un loop de sonido en la pelicula general que lo llamo con:
if (noRepeat == undefined) {
var noRepeat:Number;
noRepeat = 1;
var s_ambiente:Sound = new Sound();
s_ambiente.attachSound("ambiente");

s_ambiente.onSoundComplete = function() {
//Vuelva a arrancarlo
this.start();
};
//Iniciamos el sonido
s_ambiente.start();
s_ambiente.setVolume(15);
}

y varios clips de sonido que funciona cada uno con su boton que tiene el còdigo

on (release) {
stopAllSounds();
}
on (release) {
play();
s = new sound();
s.attachSound("day flu");
s.start();
}
on (release) {
stop();
}

¿COMO HAGO PARA?
que si pasa a otra sección (donde no estàn los sonidos) vuelva a sonar el "ambiente"
como loop nuevamente¿?

estoy revarado agradezco HELP

Por lombana

5 de clabLevel



 

bogotà

firefox
Citar            
MensajeEscrito el 08 Feb 2008 04:54 am
ya intentaste metiendo todo dentro de una función? algo así:

Código :

function iniciar_sound() {
   if (noRepeat == undefined) {
      var noRepeat:Number;
      noRepeat = 1;
      var s_ambiente:Sound = new Sound();
      s_ambiente.attachSound("ambiente");

      s_ambiente.onSoundComplete = function() {
         //Vuelva a arrancarlo
         this.start();
      };
      //Iniciamos el sonido
      s_ambiente.start();
      s_ambiente.setVolume(15);
   }
}
iniciar_sound();

con esto la puedes iniciar cada que necesites.
Saludos!!!

Por vcomics

217 de clabLevel



 

Medellin - Colombia

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.