/***********************
* Acciones de composición de Adobe Edge Animate
*
* Editar este archivo con precaución, teniendo cuidado de conservar 
* las firmas de función y los comentarios que comienzan con "Edge" para mantener la 
* capacidad de interactuar con estas acciones en Adobe Edge Animate
*
***********************/
(function($, Edge, compId){
var Composition = Edge.Composition, Symbol = Edge.Symbol; // los alias más comunes para las clases de Edge

   //Edge symbol: 'stage'
   (function(symbolName) {
      
      
      

      

      

      

      

      

      

      

      

      

      

      

      

      

      

      

   })("stage");
   //Edge symbol end:'stage'

   //=========================================================
   
   //Edge symbol: 'Precargador'
   (function(symbolName) {   
   
   })("Precargador");
   //Edge symbol end:'Precargador'

   //=========================================================
   
   //Edge symbol: 'flecha_bt'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         // introducir código aquí
         sym.stop();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 250, function(sym, e) {
         // introducir código aquí
         sym.stop();

      });
      //Edge binding end

   })("flecha_bt");
   //Edge symbol end:'flecha_bt'

   //=========================================================

   //=========================================================

   //=========================================================
   
   //Edge symbol: 'bt_audio'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         // introducir código aquí
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_ht_spot}", "click", function(sym, e) {
         var soundId = sym.getSymbolElement().attr( "title" );
         var currentAudio=sym.getComposition().getStage().$(soundId)[0].currentTime;
         var duracion= sym.getComposition().getStage().$(soundId).duration;
         console.log("soundId="+soundId);
         if (duracion== currentAudio){
         sym.stop("up");
         }
         
         sym.getComposition().getStage().$(soundId).on('ended', function() {
         sym.stop("up");
            // enable button/link
         });
         
         console.log("currentAudio="+currentAudio);
         console.log("duracion="+duracion);
         // Definir un conmutador para reproducir o pausar una pista de audio 
         if (sym.getComposition().getStage().$(soundId)[0].paused) {
         	sym.getComposition().getStage().$(soundId)[0].play();
         	sym.getComposition().getStage().$(soundId)[0].volume=0.7;
         	sym.stop("down");
         
         } else {
         //activar para pausar en vez de reiniciar
         	sym.getComposition().getStage().$(soundId)[0].pause();
         	sym.stop("up");
         }

      });
      //Edge binding end

      

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 250, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      

   })("bt_audio");
   //Edge symbol end:'bt_audio'

   //=========================================================
   
   //Edge symbol: 'girl_explorer'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 7500, function(sym, e) {
         sym.play("girl");

      });
      //Edge binding end

   })("girl_explorer");
   //Edge symbol end:'girl_explorer'

   //=========================================================
   
   //Edge symbol: 'Owl'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 10500, function(sym, e) {
         sym.play("head_owl");

      });
      //Edge binding end

   })("Owl");
   //Edge symbol end:'Owl'

   //=========================================================
   
   //Edge symbol: 'owl_head'
   (function(symbolName) {   
   
   })("owl_head");
   //Edge symbol end:'owl_head'

   //=========================================================
   
   //Edge symbol: 'owl_eyes'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 7345, function(sym, e) {
         sym.play("eyes_owl");

      });
      //Edge binding end

   })("owl_eyes");
   //Edge symbol end:'owl_eyes'

   //=========================================================
   
   //Edge symbol: 'Ducks'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 83000, function(sym, e) {
         sym.play("Ducks");

      });
      //Edge binding end

   })("Ducks");
   //Edge symbol end:'Ducks'

   //=========================================================
   
   //Edge symbol: 'Bat'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 10903, function(sym, e) {
         sym.play("Bat");

      });
      //Edge binding end

   })("Bat");
   //Edge symbol end:'Bat'

   //=========================================================
   
   //Edge symbol: 'butterfly'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 18750, function(sym, e) {
         sym.play("vuelo");

      });
      //Edge binding end

   })("butterfly");
   //Edge symbol end:'butterfly'

   //=========================================================
   
   //Edge symbol: 'Wings'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 250, function(sym, e) {
         sym.play("Wings");

      });
      //Edge binding end

   })("Wings");
   //Edge symbol end:'Wings'

   //=========================================================
   
   //Edge symbol: 'luciernaga'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 12331, function(sym, e) {
         sym.play("vuelo");

      });
      //Edge binding end

   })("luciernaga");
   //Edge symbol end:'luciernaga'

   //=========================================================
   
   //Edge symbol: 'luciernaga_brillo'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2641, function(sym, e) {
         sym.play("light");

      });
      //Edge binding end

   })("luciernaga_brillo");
   //Edge symbol end:'luciernaga_brillo'

   //=========================================================
   
   //Edge symbol: 'bubble_text'
   (function(symbolName) {   
   
   })("bubble_text");
   //Edge symbol end:'bubble_text'

})(jQuery, AdobeEdge, "EDGE-94063035");