/***********************
* 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_01}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("pop_up_01").play(1);
         
         // Mostrar un elemento 
         sym.$("pop_up_01").show();
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_boton_02}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("pop_up_02").play(1);
         
         // Mostrar un elemento 
         sym.$("pop_up_02").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_boton_03}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("pop_up_03").play(1);
         
         // Mostrar un elemento 
         sym.$("pop_up_03").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_boton_04}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("pop_up_04").play(1);
         
         // Mostrar un elemento 
         sym.$("pop_up_04").show();

      });
      //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().getSymbol("pop_up_04").$(soundId)[0].currentTime;
         var duracion= sym.getComposition().getStage().getSymbol("pop_up_04").$(soundId).duration;
         //console.log("soundId="+soundId);
         if (duracion== currentAudio){
         sym.stop("up");
         }
         
         sym.getComposition().getStage().getSymbol("pop_up_04").$(soundId).on('ended', function() {
         sym.stop("up");
         sym.getComposition().getStage().getSymbol("pop_up_04");
         });
         
         //console.log("currentAudio="+currentAudio);
         //console.log("duracion="+duracion);
         // Definir un conmutador para reproducir o pausar una pista de audio 
         if (sym.getComposition().getStage().getSymbol("pop_up_04").$(soundId)[0].paused) {
         	sym.getComposition().getStage().getSymbol("pop_up_04").$(soundId)[0].play();
         	sym.stop("down");
            sym.getComposition().getStage().getSymbol("pop_up_04");
         } else {
         //activar para pausar en vez de reiniciar
         	sym.getComposition().getStage().getSymbol("pop_up_04").$(soundId)[0].pause();
         	sym.stop("up");
            sym.getComposition().getStage().getSymbol("pop_up_04");
         }

      });
      //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: 'text_01'
   (function(symbolName) {   
   
   })("text_01");
   //Edge symbol end:'text_01'

   //=========================================================
   
   //Edge symbol: 'pop_up_01'
   (function(symbolName) {   
   
      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         // Ocultar un elemento 
         sym.getSymbolElement().fadeOut("slow");
         
         sym.playReverse();
         

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'pop_up_1'
   (function(symbolName) {   
   
      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrarCopy}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         // Ocultar un elemento 
         sym.getSymbolElement().fadeOut("slow");
         
         sym.playReverse();
         

      });
      //Edge binding end

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

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

   //=========================================================
   
   //Edge symbol: 'bt_cerrar'
   (function(symbolName) {   
   
      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

      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

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

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

   //=========================================================
   
   //Edge symbol: 'pop_up_1'
   (function(symbolName) {   
   
      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrarCopy}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         // Ocultar un elemento 
         sym.getSymbolElement().fadeOut("slow");
         
         sym.playReverse();

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'pop_up_1'
   (function(symbolName) {   
   
      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrarCopy}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         // Ocultar un elemento 
         sym.getSymbolElement().fadeOut("slow");
         
         sym.playReverse();
         

      });
      //Edge binding end

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

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

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