Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/05/2007, 11:24
Rizzo
 
Fecha de Ingreso: septiembre-2006
Mensajes: 1.193
Antigüedad: 17 años, 7 meses
Puntos: 30
Re: Fácil: Problema con botón

crea un mc y nombralo boton

y escribe esto:


Código:
var song_sound:Sound = new Sound();
song_sound.loadSound("musica.mp3");
boton._visible = false;
//
song_sound.onLoad = function() {
	//
	boton._visible = true;
};
var i:Number = 0;
//
boton.onRelease = function() {
	//
	i++;
	//
	var estado:Number = i%2;
	//
	if (estado != 0) {
		//
		song_sound.start();
		//
	} else {
		//
		song_sound.stop();
	}
};