/***********************
* 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, "${_hotspot_1}", "click", function(sym, e) {
         sym.getSymbol("tabla").play(0001);
         sym.$("hotspot_1").hide();
         sym.$("bt_audio").fadeOut("slow");
         sym.$("audio_1")[0].pause();

      });
      //Edge binding end

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

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

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

   //=========================================================
   
   //Edge symbol: 'nina_2'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 4000, function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

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

   //=========================================================
   
   //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) {
         sym.stop("down");
         sym.getComposition().getStage().$("copy_dialogo").show();
         
         

      });
      //Edge binding end

      

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

      });
      //Edge binding end

      

      Symbol.bindElementAction(compId, symbolName, "${_ht_spot2}", "click", function(sym, e) {
         sym.stop("up");
         sym.getComposition().getStage().$("copy_dialogo").hide();

      });
      //Edge binding end

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

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

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

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

   //=========================================================
   
   //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");
         });
         console.log("currentAudio="+currentAudio);
         console.log("duracion="+duracion); 
         
         $("audio").prop("muted", true);
         
         	if (sym.getComposition().getStage().$(soundId)[0].paused) {
         	//elimina el mute del audio
         	sym.getComposition().getStage().$(soundId)[0].muted = false;
         	sym.getComposition().getStage().$(soundId)[0].volume=0.7;
         	sym.getComposition().getStage().$(soundId)[0].play();
         	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: 'cabeza_1'
   (function(symbolName) {   
   
   })("cabeza_1");
   //Edge symbol end:'cabeza_1'

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

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

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

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

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

   //=========================================================
   
   //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: 'tabla'
   (function(symbolName) {   
   
      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         sym.stop();

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();
         sym.getComposition().getStage().$("hotspot_1").show();
         sym.getComposition().getStage().$("bt_audio").fadeIn("slow");

      });
      //Edge binding end

      Symbol.bindSymbolAction(compId, symbolName, "creationComplete", function(sym, e) {
         sym.$("TextArea_1").html("<textarea id='seleccion_1' style='width: 480px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_2").html("<textarea id='seleccion_2' style='width: 480px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_3").html("<textarea id='seleccion_3' style='width: 480px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_4").html("<textarea id='seleccion_4' style='width: 480px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_5").html("<textarea id='seleccion_5' style='width: 480px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_6").html("<textarea id='seleccion_6' style='width: 480px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_7").html("<textarea id='seleccion_7' style='width: 360px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_8").html("<textarea id='seleccion_8' style='width: 360px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_9").html("<textarea id='seleccion_9' style='width: 360px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_10").html("<textarea id='seleccion_10' style='width: 360px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_11").html("<textarea id='seleccion_11' style='width: 360px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");
         sym.$("TextArea_12").html("<textarea id='seleccion_12' style='width: 360px; height: 50px; border: 2px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 32px; font-weight: 400; text-align: left; border-radius: 5px; padding: 2px; resize: none; background: rgba(255, 255, 255, 0.498039);'></textarea>");

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

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

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

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

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