Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/04/2007, 17:14
Rizzo
 
Fecha de Ingreso: septiembre-2006
Mensajes: 1.193
Antigüedad: 17 años, 5 meses
Puntos: 30
Re: Sonido a través de varias escenas

si, haz un mc que sea el "player" dentro de ese mc : colocas esto ahora:


Código:
var contador:Number = 0;
this.onRelease = function() {
	contador++;
	var resto:Number = contador%2;
	if (resto != 0) {
		tu_mc.gotoAndStop()
		this.my_sound.stop();
	} else {
		tu_mc.gotoAndPlay()
		this.my_sound.start();
	}
};
// create a new Sound object
var my_sound:Sound = new Sound();
// if the sound loads, play it; if not, trace failure loading
my_sound.onLoad = function(success:Boolean) {
	if (success) {
		this.my_sound.start();
	trace("Sound loaded");
	} else {
		trace("Sound failed");
	}
};
// load the sound
my_sound.loadSound("musica.mp3", true);