Tank Game- Rotation of cannon problem


I am a complete newbie in creating flash games. I have been trying to create this tank game and am trying to rotate the cannon towards the mouse cursor. But the rotation is not happening correctly. I have copied the rotation code from here- http://www.emanueleferonato.com/2007/04/28/create-a-flash-artillery-game-step-1/. But have changed the code and put in a class named as “Cannon”.

Can someone please have a look and tell me whats going wrong. I have attached a zip file with the fla and actionscript as files.