/***********************
* 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}", "click", function(sym, e) {
         sym.$("_03_02_04a").fadeIn("slow");
         sym.$("hand_mouse").fadeOut("slow");
         sym.$("hotspot").hide();
         

      });
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
         $(sym.lookupSelector("descripcion")).html("Haz clic sobre el icono para conocer las características del carro con referencia <i>Granvía</i>.");

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

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

   //=========================================================
   
   //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", 2500, function(sym, e) {
         sym.playReverse();

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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

      });
      //Edge binding end

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

      });
      //Edge binding end

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

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