Jump to content
Search Community

dudetteontheedge

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by dudetteontheedge

  1. Awesome. Indeed it was the version of draggable. Sometimes I pull my hair because of my own doing–in this case a wrong verson! Thanks for being so alert!
  2. I cannot get this to work. I suppose I need the plugin before it works, right? Also another question: I added the function directly on the onDrag because I have something else going on with it. Adapted code below: sym.$("info").hide(); var smallWheel = sym.$('smallWheel'); var bigWheel = sym.$('bigWheel'); var rotationSnap = 45; Draggable.create(smallWheel, { type:"rotation", throwProps:true, snap:function(endValue) { return Math.round(endValue / rotationSnap) * rotationSnap; }, onDrag :function() { sym.$("rattle")[0].play(); sym.$("info").hide(); TweenLite.set(bigWheel, {rotation:smallDraggable.rotation}); }, //onDrag: syncBigWheel, onThrowUpdate: syncBigWheel, onDragEnd: function(){ sym.$("rattle")[0].pause(); sym.$("info").show(); } }); var smallDraggable = Draggable.get(smallWheel); function syncBigWheel() { TweenLite.set(bigWheel, {rotation:smallDraggable.rotation}); }
  3. Thank you very much for the answer. I will try to get this going.
  4. Ok. Using onDragEnd instead of onRelease, the sound does stop. Now the only problem is syncing the 2 wheels.
  5. I am working in edge animate version 2014 I am wondering if it is possible to have one wheel start spinning in sync with another wheel when it is dragged. I would like these wheels to be synchronized. Next - I added sound but when the wheel is released the sound does not stop. Below is my code: var smallWheel = sym.$('smallWheel'); var bigWheel = sym.$('bigWheel'); Draggable.create(smallWheel, { type:"rotation", throwProps:true, onDrag :function() { sym.$("rattle")[0].play(); Draggable.create(bigWheel, {type:"rotation", throwProps:true}); }, onRelease :function(){ sym.$("rattle")[0].pause(); } });
×
×
  • Create New...