Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/08/2011, 12:47
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: Activar sonido con Rollover¿?

Hola Nniko():
Aquí tienes un ejemplo de como hacerlo.
En la Biblioteca al conido ponle como nombre: Sonido1 y lo vinculas con el mismo nombre.
En el frame escribe éste código:
Código actionscript:
Ver original
  1. thisSound = new Sound();
  2. Sound1 = new Sound();
  3. Sound1.attachSound("Sound1");
  4. var Sound1added:Boolean = false;
  5. if (Sound1added == false) {
  6.     thisSound.attachSound("Sound1");
  7.     Sound1added = false;
  8. }
  9. thisSound.stop();
  10. thisSound.onSoundComplete = function() {
  11.     thisSound.stop();
  12. };
  13. btn.onRollOver = function() {
  14.     if (Sound1added == false) {
  15.         thisSound.stop();
  16.         thisSound.attachSound("Sound1");
  17.         thisSound.start();
  18.         Sound1added = true;
  19.     }
  20. };
  21. btn.onRollOut = function(){
  22.     thisSound.stop();
  23. }
Al botón ponle como nombre de instania: btn.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/