Almost have a follower/pendulum - bamboozled

**Hi everyone/anyone!

**I’m struggling with this idea; Its a mouse following, rotational pointer with easing. That part works fine - but the bit which I’m trying to get to work (obviously unsuccessfully), is described below:

When the mouse rolls out of the underlying area_btn (the part which, when rolled over, tells the pointer to start follwing the mouse), the pointer is supposed to ‘flop’ or swing back down towards the bottom of the stage. I want it ideally to behave like a pendulum, swinging past the point directly below the center of rotation and then back again and so on, losing angle and speed as it does so, like a conker hanging from a rigid string.

I have got as far as the pointer returning to the bottom, but it is quick and doesnt swing… I thought the mathx/code was right, but it doesn’t work how i planned.

Also, I have copied and pasted part of the code for the second function (the rollout function) from the first function (the rollover), and I’m sure that this could be cut or modified so that the 1st function passes the angle variable to the 2nd function; so the vars are only needed once or something. I’m new to this - and I can’t seem to pass variables between two ‘onEnterFrame’ functions.

I’d be extremely grateful if someone could help me out! You’ll see what I mean if you preview/test the attached file. Also, slowing down the frame rate of the .fla helps, to see what its doing.

Cheers in advance,
Ben