Code not working on a MC but works on a Button?

Hey’a,
So I’ve been working with the tutorial http://kirupa.com/developer/mx2004/transitions2.htm

How do I get this piece of code:


on (release) {
    if (_root.currMovie == undefined) {
        _root.currMovie = "webdesign/flashindex";
        container.loadMovie("webdesign/flashindex.swf");
    } else if (_root.currMovie != "webdesign/flashindex") {
        if (container._currentframe>= container.midframe) {
            _root.currMovie = "webdesign/flashindex";
            container.play();
        }
    }
}

To work with a MoveClip. If I create a Button and put this on it works, if I create a MovieClip with this on it doesn’t :(I really need it to work with a MovieClip as I have Up/Down animation based over time.