# Rotation.... CCW?

**URL:** <https://forum.kirupa.com/t/rotation-ccw/234917>\
**Category:** flash\
**Created:** [August 7, 2007, 6:00am UTC](https://forum.kirupa.com/t/rotation-ccw/234917 "2007-08-07T06:00:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![haider](https://avatars.discourse-cdn.com/v4/letter/h/48db29/32.png) [@haider](https://forum.kirupa.com/u/haider)\
**Post date:** [August 7, 2007, 6:00am UTC](https://forum.kirupa.com/t/rotation-ccw/234917/1 "2007-08-07T06:00:54Z")

</div>

Hi… simple question for most.

What do I do to make this rotate the line\_mc move clip in a counterclockwise rotation when I scroll the mouse wheel up instead of down.

Currently it rotates the movie clip in a clockwise fashion regardless of which way I scrool the mouse wheel.

# code

[COLOR=royalblue]//to use this code create an movie clip on the stage called line\_mc[/COLOR]  
[COLOR=royalblue][/COLOR]  
[COLOR=royalblue]var mouseListener:Object = new Object();  
mouseListener.onMouseWheel = function(delta) {  
clip\_mc.\_x += delta;[/COLOR]  
[COLOR=royalblue]}  
Mouse.addListener(mouseListener);[/COLOR]  
[COLOR=royalblue]//The following example draws a line that rotates when you rotate the mouse wheel. Click the SWF file at runtime and then rotate your mouse wheel to see the movie clip in action.[/COLOR]  
[COLOR=royalblue]line\_mc.moveTo(0, 100);  
line\_mc.lineTo(0, 0);  
line\_mc.\_x = 200;  
line\_mc.\_y = 200;[/COLOR]  
[COLOR=royalblue]var mouseListener:Object = new Object();  
mouseListener.onMouseWheel = function(delta:Number) {  
line\_mc.\_rotation += 30;  
}; [/COLOR]  
[COLOR=royalblue]Mouse.addListener(mouseListener);[/COLOR]

* * *

Thanks in advance.

ps. is there anyway to get this thing to ease when it rotates… instead of the jerky rotation it does now.

Cheers.
