Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/04/2012, 12:33
ginoarias
 
Fecha de Ingreso: abril-2012
Mensajes: 1
Antigüedad: 12 años, 1 mes
Puntos: 0
Respuesta: Contorlar audio en un fotograma especifico

hola tengo un problema con mi audio no quiero que se inicie al principio si no cuando le hago click en el boton de play y no se donde poner un stop o algo aqui dejo el codigo porfavor ayuda!!


var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var req:URLRequest = new URLRequest("Bruderschaft-Forever.mp3");

mySound.load(req);
myChannel = mySound.play();


var posicion:Number = 0;
function pausar(e:MouseEvent):void{
posicion = myChannel.position;
myChannel.stop();

}
parar_btn.addEventListener(MouseEvent.CLICK, pausar );


function reproducir(e:MouseEvent):void{
myChannel = mySound.play(posicion);
}
reproducir_btn.addEventListener(MouseEvent.CLICK, reproducir );