Loop and mouseover function

Hey, extremely new to flash and trying to get a simple function working in CS4.

I have two animations on the timeline- one from say frame a to b and second from frame c to d.
I would like the first animation to loop indefinitely till mouse moves over it, which triggers the second animation to start and loop until mouse it moved away.

Any help on how to code this in actionscript 3.0 or any other way to do this would be much appreciated.