Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/03/2012, 17:45
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 10 meses
Puntos: 406
Respuesta: Contorlar audio en un fotograma especifico

Hola Juandavo:
En el frame 200 coloca los botones Play y Stop con los nombres de instancia: btn_play y btn_stop
Crea otra capa para las acciones y en su frame 200 coloca éste código:
Código actionscript:
Ver original
  1. stop();
  2. var pausePoint:Number=0.00;
  3. currently playing
  4. var isPlaying:Boolean;
  5. mp3 player
  6. var soundChannel:SoundChannel = new SoundChannel();
  7. var sound:Sound=new Sound(new URLRequest("pp_musicax.mp3"));
  8. btn_stop.addEventListener(MouseEvent.CLICK, sonStop);
  9. btn_play.addEventListener(MouseEvent.CLICK, sonPlay);
  10. soundChannel=sound.play();
  11. isPlaying=true;
  12. function sonPlay(evt:MouseEvent) {
  13.     if (isPlaying) {
  14.         pausePoint=soundChannel.position;
  15.         soundChannel.stop();
  16.         isPlaying=false;
  17.     } else {
  18.         soundChannel=sound.play(pausePoint);
  19.         isPlaying=true;
  20.     }
  21. }
  22. function sonStop(evt:MouseEvent) {
  23.     if (isPlaying) {
  24.         soundChannel.stop();
  25.         isPlaying=false;
  26.     }
  27.     pausePoint=0.00;
  28. }
Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/