0 Replies Latest reply on Sep 10, 2014 3:40 PM by szuro

    Coincidental Draggable



      I'm making an interactive analog clock using Adobe Edge. The hands of the clock can be dragged to any particular time. When dragged, the movement of the hands coincide with each other. I was able to code the "hour" hand that when dragged the "minute" hand moves accordingly (with 12 times the rotation). I used GreenSock's GSAP and it works flawlessly (see code below).



      var hourHand = sym.$('Clock_H');

      var minHand = sym.$('Clock_M');


      Draggable.create(hourHand, {



        onDrag: syncMinHand,

        onThrowUpdate: syncMinHand

      } )

      var hourDraggable = Draggable.get(hourHand);

      function syncMinHand() {

        TweenLite.set(minHand, {rotation:hourDraggable.rotation * 12});




      However, I want to be able to accomplish the same effect for the "minute" hand. When the "minute" hand is dragged the "hour" hand moves accordingly (12 times slower). But I want to be able to independently move either hand at any point with the other hand corresponding appropriately. Any help is greatly appreciated!