Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Search the Community

Showing results for tags 'rotation snap'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. var dial:Sprite; var radius:Number = 0; var angle:Number = 0; var angleConvert:Number = 180 / Math.PI; init(); function init():void { makeDial(); makeOrb(); } function onMove(e:MouseEvent):void { angle = Math.atan2(mouseY - dial.y, mouseX - dial.x); volumeMC.rotation = angleConvert * angle + 90; } function onOrbDown(e:MouseEvent):void { stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove); stage.addEventListener(MouseEvent.MOUSE_UP, onOrbUp); } function onOrbUp(e:MouseEvent):void { stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMove); stage.removeEventListener(MouseEvent.MOUSE_UP, onOrbUp); } function makeDial():void { dial = new Sprite(); var g:Graphics = dial.graphics; g.lineStyle(2, 0x333333); g.drawCircle(0, 0, radius); dial.x = 170; dial.y = 370; addChild(dial); } function makeOrb():void { volumeMC.buttonMode = volumeMC.useHandCursor = true; volumeMC.addEventListener(MouseEvent.MOUSE_DOWN, onOrbDown); } Hi I have a volumeMC dial that drags and drops great, but I want to use the rotation snap in tweenMax to make this better. All I want it to do is .... 1] drag rotate volumeMC around its own centre from 0-360deg in 10deg intervals. 2] to trace the current rotation value to I can adjust the sound. here is what I have that works but I don't like it ... hope someone can help Steven
×