Hi, I'm hoping someone can help!

I have an mc placed on the main stage that I'm trying to control through a separate button. I want the mc to play until a certain frame number is reached and then stop. I've got the following actionscript on the button instance:

Code:
on(rollOver){
if (mc._currentframe == 10){
mc.stop()
}
else{
mc.play()
}
}
This is not working at all - the mc is not stopping at frame 10, just looping continuously - am I missing something?

Thanks for any help!