Changing the image when it turns to a different direction

Hi, I would like to know the actionscript code for when an image (Let’s say it’s facing right) suddenly turns left, then it switches to an image of the similar one facing left. Thanks!

PS. If you want me to be more detailed, the image is following the cursor pointer.