MovieClip button question

I am trying to make intros and outros in my external .swf files using this code for the buttons. Now I don’t use the regular Button, but instead use MovieClip buttons with rollOver/rollOut actions and would like this code to work with the MC buttons.

If I have a regular button with the following actions it works well.

[COLOR=Blue][COLOR=RoyalBlue]on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = “section2”;
container.loadMovie(“section2.swf”);
} else if (_root.currMovie != “section2”) {
if (container._currentframe>= container.midframe) {
_root.currMovie = “section2”;
container.play();
}
}
}[/COLOR]

[COLOR=Black]But if I use a MovieClip as button and use the following actions it wont work at all.

[COLOR=RoyalBlue]this.onRelease = function() {
if (_root.currMovie == undefined) {
_root.currMovie = “section3”;
container.loadMovie(“section3.swf”);
} else if (_root.currMovie != “section3”) {
if (container._currentframe >= container.midframe) {
_root.currMovie = “section3”;
container.play();
}
}
}[/COLOR]

I know there’s a bit of code lacking underneath the this.onRelease action but I can’t figure out what.
[/COLOR][/COLOR]