Swing problem

HI
there are 4 (1,2,3,4)circles and user have to swing on those circle placed side by side having 10 pixel gap in between

but when he is in swing motion on circle 1 , the moment he press up key , he should rotate and move to 2nd ,

but i got stuck in 2 circle swing movement, how the transition will be done from 1st circle to 2nd.

in game play , user is fixed and BG is moving ,

any help…