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

**URL:** https://forum.kirupa.com/t/code-not-working-on-a-mc-but-works-on-a-button/181273
**Category:** Uncategorized
**Created:** [March 8, 2006, 12:05am UTC](https://forum.kirupa.com/t/code-not-working-on-a-mc-but-works-on-a-button/181273 "2006-03-08T00:05:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mage](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Mage](https://forum.kirupa.com/u/Mage)
#### Post date: [March 8, 2006, 12:05am UTC](https://forum.kirupa.com/t/code-not-working-on-a-mc-but-works-on-a-button/181273/1 "2006-03-08T00:05:01Z")

</div>

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

How do I get this piece of code:

```auto

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.
