Advanced as3 buttons

Okay. I have a button that looks like this: http://www.swfcabin.com/open/1265348657

so when you rollover, it plays an animation, and when you rollout, it plays the exit animation.

And if you rollout before the the enter animation is over, it will jump straight to the exit animation.

the swf right there works perfectly, exactly how i want it, so i popped it in as2 and it will not function, so I decided to come here, I need to know how to do this is as3. how can i make this work in cs3? Thank you.