Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/07/2010, 16:40
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Respuesta: Repetir un sonido indefinidamente

Hola icuevas:
Bienvenido al Foro.
Tu código escríbelo así:
Código actionscript:
Ver original
  1. var pausa:Number = 0;
  2. var estado:Number = 0;
  3. Sonido.stop();
  4. _root.onLoad = function() {
  5.     misonido = new Sound();
  6.     misonido.attachSound("musica");
  7.     misonido.onSoundComplete = function() {
  8.         misonido.start();
  9.     };
  10. };
  11. Sonido.onPress = function() {
  12.     if (estado == 0) {
  13.         misonido.start(pausa/1000);
  14.         estado = 1;
  15.         Sonido.gotoAndStop("pause");
  16.     } else {
  17.         pausa = misonido.position;
  18.         misonido.stop();
  19.         estado = 0;
  20.         Sonido.gotoAndStop("play");
  21.     }
  22. };
Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/