/***********************
* 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, "${_btn_1_GELATINA}", "click", function(sym, e) {
         sym.$("pop_1").show();
         sym.getSymbol("pop_1").play(1);

      });
      //Edge binding end

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

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_2_PLASTILINA}", "click", function(sym, e) {
         sym.$("pop_2").show();
         sym.getSymbol("pop_2").play(1);

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_3_CALCOMANIAS}", "click", function(sym, e) {
         sym.$("pop_3").show();
         sym.getSymbol("pop_3").play(1);

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_4_ROBOT}", "click", function(sym, e) {
         sym.$("pop_4").show();
         sym.getSymbol("pop_4").play(1);

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

   //=========================================================
   
   //Edge symbol: 'pop_1'
   (function(symbolName) {   
   
      Symbol.bindElementAction(compId, symbolName, "${_btn_calentar}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("btn_calentar").play("estado_1");
         
         
         sym.getSymbol("llama_azul").play("inicio_fuego");
         sym.getSymbol("text_pop_1").play("inicio_texto");
         sym.getSymbol("estado_gelatina").play("animacion");
         // Mostrar un elemento 
         sym.$("bt_cerrar").show();
         

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();
         
         sym.getSymbol("btn_calentar").stop("inicio");
         
         
         sym.getSymbol("llama_azul").stop("inicio");
         sym.getSymbol("text_pop_1").stop("inicio");
         sym.getSymbol("estado_gelatina").stop("inicio");

      });
      //Edge binding end

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();
         
         sym.getSymbol("btn_moldear").stop("inicio");
         
         
         sym.getSymbol("plastilina").stop("inicio");
         sym.getSymbol("text_pop_2").stop("inicio");
         sym.getSymbol("manos").stop("inicio");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_moldear}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("btn_moldear").play("estado_1");
         
         
         sym.getSymbol("plastilina").play("animacion");
         sym.getSymbol("text_pop_2").play("inicio_texto");
         sym.getSymbol("manos").play("animacion");
         // Mostrar un elemento 
         sym.$("bt_cerrar").show();
         

      });
      //Edge binding end

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

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

      });
         //Edge binding end

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

      });
         //Edge binding end

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();
         
         sym.getSymbol("btn_apagar").stop("inicio");
         
         
         sym.getSymbol("lampara").stop("inicio");
         sym.getSymbol("text_pop_3").stop("inicio");
         sym.getSymbol("calcomanias").stop("inicio");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_apagar}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("btn_apagar").play("estado_1");
         
         
         sym.getSymbol("lampara").play("animacion");
         sym.getSymbol("text_pop_3").play("inicio_texto");
         sym.getSymbol("calcomanias").play("animacion");
         // Mostrar un elemento 
         sym.$("bt_cerrar").show();

      });
      //Edge binding end

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

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

      });
         //Edge binding end

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

      });
         //Edge binding end

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_bt_cerrar}", "click", function(sym, e) {
         sym.playReverse();
         
         sym.getSymbol("btn_humedad").stop("inicio");
         
         
         sym.getSymbol("ROBOT").stop("inicio");
         sym.getSymbol("text_pop_4").stop("inicio");
         sym.getSymbol("chorro").stop("inicio");

      });
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "${_btn_humedad}", "click", function(sym, e) {
         // introducir aquí código para clic de ratón
         sym.getSymbol("btn_humedad").play("estado_1");
         
         
         sym.getSymbol("ROBOT").play("animacion");
         sym.getSymbol("text_pop_4").play("inicio_texto");
         sym.getSymbol("chorro").play("animacion");
         // Mostrar un elemento 
         sym.$("bt_cerrar").show();
         

      });
      //Edge binding end

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

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

      });
         //Edge binding end

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

      });
         //Edge binding end

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

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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