hi guys,
i am new to edge animate and know virtually no code. i am trying to get greensock's draggable spin feature to work for me in edge animate. watching a paul trani tutorial, i followed his instructions but still no go.
+ paid to become a "shockingly green" member to get the throwprops plug in.
+ uploaded the js scrips (tweenmax, throwprops and draggable) in the scrips panel
+ made my image a symbol called "dial" (want to do it on a SVG from illustrator but read may be issues. so to test, i just created a circle in edge)
+ double clicked to isolate it (greys out)
+ in the property menu, clicked on open actions/creation complete
+ pasted this code from greensock, where i replaced the name of my symbol "dial"
var rotationSnap = 90;
- Draggable.create("dial", {
type:"rotation", //instead of "x,y" or "top,left", we can simply do "rotation" to make the object spinnable!
throwProps:true, //enables kinetic-based flicking (continuation of movement, decelerating after releasing the mouse/finger)
snap:function(endValue) {
//this function gets called when the mouse/finger is released and it plots where rotation should normally end and we can alter that value and return a new one instead. This gives us an easy way to apply custom snapping behavior with any logic we want. In this case, we'll just make sure the end value snaps to 90-degree increments but only when the "snap" checkbox is selected.
return Math.round(endValue / rotationSnap) * rotationSnap;
}
});
+ saved, went to file/preview in browser.
and...nothing. please tell me what else i need to add to make it work? it sounded in the tutorial that this is all i need to do to make it work.
thank you for any help you can give.