/***********************
* 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) {
      
      
      

      

      

      

      

      

      

      

      

      

      

      

      

      

      

      

      Symbol.bindElementAction(compId, symbolName, "${_boton_1}", "click", function(sym, e) {
         sym.$("pop_A").show();
         sym.getSymbol("pop_A").play(1);
         
         
         // Ocultar un elemento 
         sym.$("boton_1").fadeOut("slow");
         sym.$("boton_2").fadeOut("slow");
         sym.$("boton_3").fadeOut("slow");
         sym.$("boton_4").fadeOut("slow");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_boton_2}", "click", function(sym, e) {
         sym.$("pop_B").show();
         sym.getSymbol("pop_B").play(1);
         
         
         // Ocultar un elemento 
         sym.$("boton_1").fadeOut("slow");
         sym.$("boton_2").fadeOut("slow");
         sym.$("boton_3").fadeOut("slow");
         sym.$("boton_4").fadeOut("slow");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_boton_3}", "click", function(sym, e) {
         sym.$("pop_C").show();
         sym.getSymbol("pop_C").play(1);
         
         
         // Ocultar un elemento 
         sym.$("boton_1").fadeOut("slow");
         sym.$("boton_2").fadeOut("slow");
         sym.$("boton_3").fadeOut("slow");
         sym.$("boton_4").fadeOut("slow");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_boton_4}", "click", function(sym, e) {
         sym.$("pop_D").show();
         sym.getSymbol("pop_D").play(1);
         
         
         // Ocultar un elemento 
         sym.$("boton_1").fadeOut("slow");
         sym.$("boton_2").fadeOut("slow");
         sym.$("boton_3").fadeOut("slow");
         sym.$("boton_4").fadeOut("slow");

      });
      //Edge binding end

   })("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: 'pop_A'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.getSymbolElement().hide();
         
         // Mostrar un elemento 
         sym.getComposition().getStage().$("boton_1").show();
         sym.getComposition().getStage().$("boton_2").show();
         sym.getComposition().getStage().$("boton_3").show();
         sym.getComposition().getStage().$("boton_4").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'bt_info_1'
   (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

      Symbol.bindElementAction(compId, symbolName, "${_hot_spot_1}", "click", function(sym, e) {
         sym.stop("down");
         
         // Mostrar un elemento 
         sym.getComposition().getStage().getSymbol("slide_2").getSymbol("contenido2").$("pop_info").show();
         sym.getComposition().getStage().getSymbol("slide_2").getSymbol("contenido2").getSymbol("pop_info").play("inicio");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_hot_spot_2}", "click", function(sym, e) {
         sym.stop("up");
         

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'pop_A_1'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.getSymbolElement().hide();
         
         // Mostrar un elemento 
         sym.getComposition().getStage().$("boton_1").show();
         sym.getComposition().getStage().$("boton_2").show();
         sym.getComposition().getStage().$("boton_3").show();
         sym.getComposition().getStage().$("boton_4").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'card_1'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_1}", "click", function(sym, e) {
         sym.play(1);
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_1_text}", "click", function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'card_2'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_2}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         // Reproducir la línea de tiempo en un momento o etiqueta específicos. Por ejemplo:
         // sym.play(500); o sym.play("myLabel");
         sym.play(1);
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_2_text}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.playReverse();
         

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'card_3'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_2}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         // Reproducir la línea de tiempo en un momento o etiqueta específicos. Por ejemplo:
         // sym.play(500); o sym.play("myLabel");
         sym.play(1);
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_3_text}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.playReverse();

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'card_4'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_1}", "click", function(sym, e) {
         sym.play(1);
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_card_4_text}", "click", function(sym, e) {
         sym.playReverse();
         

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'pop_A_1'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.getSymbolElement().hide();
         
         // Mostrar un elemento 
         sym.getComposition().getStage().$("boton_1").show();
         sym.getComposition().getStage().$("boton_2").show();
         sym.getComposition().getStage().$("boton_3").show();
         sym.getComposition().getStage().$("boton_4").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'pop_C_1'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.getSymbolElement().hide();
         
         // Mostrar un elemento 
         sym.getComposition().getStage().$("boton_1").show();
         sym.getComposition().getStage().$("boton_2").show();
         sym.getComposition().getStage().$("boton_3").show();
         sym.getComposition().getStage().$("boton_4").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

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