Mouse rotation/attraction effect

Hello everyone:hugegrin:

I need some help…:hr:
I am trying to create a effect using AS3. The effect is that several arms should rotate towards the mouse, and rotate less when their further away from the mouse cursor.
This picture explains better:

So i tried to solve the problem by using Math.atan2 to find how much the arm nedd to rotate to point against the mouse, and then substract the distance from the mouse.(look at the following picture)

For example, if Math.atan2 returns 100 and the distance from the mouse is 40, the arm would rotate 60. Thats what i thought.
But i cant get it to work. I attached the source files if you want to help :slight_smile:
Note:A blue ring in the source file indicates the distance.

Thanks in advance :smiley: