Help with Caps Lock Function - CS3

Hey, I just need this simple function to change a movie script depending on wether the caps lock button is pressed or not,
I have this so far is AS2 which works -

var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
    if (Key.isDown(Key.CAPSLOCK)) {
	_root.my_mc.gotoAndStop("on");
	}
}
Key.addListener(keyListener);
  • but what can I add so that the my_mc goes back to “off”

I’ve tried

else {
 _root.my_mc.gotoAndStop("off");
	}

but this doesn’t help, any advice? thanks!