Changing frames depending on mouse position

I know this can’t be to hard too achieve, but my actionscript skills aren’t quite up to it yet.

  • I have 5 frames within a MC.
  • In this MC there is text saying “center”, “left”, “right”, “up”, “down” on each frame.
  • All I want to be able to do is make the MC change to frame 3 “right” when my mouse moves to the right of the MC.

I know the script below is wrong, but would it go something like, this. Would I have to use angle and math or is there a simpler way to achieve this?

onClipEvent (mouseMove)
get x position
get y position
if statement x= > -180 and y=> 0 (something like that)

I know a similar problem appeared a while ago, but didn’t help me to much.

Any help would be much appreciated.
Thanks, Juxtapozed.