/***********************
* 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.bindTriggerAction(compId, symbolName, "Default Timeline", 1590, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_NEXT}", "click", function(sym, e) {
         sym.getSymbol("faces2").play();
         
         sym.getSymbol("globos").playReverse();
         
         
         
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_BACK}", "click", function(sym, e) {
         sym.getSymbol("faces2").playReverse();
         
         sym.getSymbol("globos").playReverse();
         
         
         sym.getSymbol("faces2").$("Text3").hide();
         sym.getSymbol("faces2").$("Text3Copy").hide();
         sym.getSymbol("faces2").$("Text3Copy2").hide();
         sym.getSymbol("faces2").$("Text3Copy3").hide();
         sym.getSymbol("faces2").$("Text3Copy4").hide();
         sym.getSymbol("faces2").$("Text3Copy5").hide();

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'faces'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 835, function(sym, e) {
         // introducir código aquí
         sym.stop();
         
         sym.getComposition().getStage().$("btn_BACK").show();
         
         
         
         // Ocultar un elemento 
         sym.getComposition().getStage().$("globo_Text_01").fadeOut("slow");
         sym.$("bt_ampliar").show();
         sym.$("Rectangle").show();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.stop();
         
         // Ocultar un elemento 
         sym.getComposition().getStage().$("btn_BACK").hide();
         
         //sym.getComposition().getStage().$("btn_BACK").fadeoOut("slow");
         
         sym.getComposition().getStage().$("globo_Text_01").fadeIn("slow");
         
         sym.$("bt_ampliar").hide();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 1670, function(sym, e) {
         sym.stop();
         sym.$("bt_ampliar").show();
         sym.$("RectangleCopy").show();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2505, function(sym, e) {
         sym.stop();
         sym.$("bt_ampliar").show();
         sym.$("RectangleCopy2").show();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3340, function(sym, e) {
         sym.stop();
         sym.$("bt_ampliar").show();
         sym.$("RectangleCopy3").show();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 4175, function(sym, e) {
         sym.stop();
         
         sym.getComposition().getStage().$("btn_NEXT").show();
         
         sym.$("bt_ampliar").show();
         sym.$("RectangleCopy4").show();

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5010, function(sym, e) {
         sym.stop();
         
         sym.getComposition().getStage().$("btn_NEXT").hide();
         
         //sym.getComposition().getStage().$("btn_NEXT").fadeOut("slow");
         
         sym.$("bt_ampliar").show();
         sym.$("RectangleCopy5").show();

      });
      //Edge binding end

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_RectangleCopy4}", "click", function(sym, e) {
         // Mostrar un elemento 
         sym.$("Text3Copy4").show();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_RectangleCopy5}", "click", function(sym, e) {
         // Mostrar un elemento 
         sym.$("Text3Copy5").show();

      });
      //Edge binding end

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

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

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

   //=========================================================
   
   //Edge symbol: 'bt_info'
   (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");

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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