# Buttons in movieclips

**URL:** https://forum.kirupa.com/t/buttons-in-movieclips/243113
**Category:** Uncategorized
**Created:** [November 2, 2007, 9:34pm UTC](https://forum.kirupa.com/t/buttons-in-movieclips/243113 "2007-11-02T21:34:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ArmoredSandwich](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ArmoredSandwich](https://forum.kirupa.com/u/ArmoredSandwich)
#### Post date: [November 2, 2007, 9:34pm UTC](https://forum.kirupa.com/t/buttons-in-movieclips/243113/1 "2007-11-02T21:34:05Z")

</div>

They are… driving me nuts.

This is the second time I encountered this problems, buttons inside movieclips cant or hardly can be pressed.

In my very difficult and complicated project i have some kind of menu. Movieclips inside movieclips have to be pressed to get something done.

now in that project this will not work:

```auto

_root.inter.crNFU.onRelease = function ()
            {
trace ("Called");
            }
        }

```

However if you test this out in a new fla, quickly created to see if it should work. And it DOES work!

```auto

_root.one.two.onRelease = function ()
    {
trace ("called");
    }

```

This is all jolly good fun and all. But what is going on here? The only difference is that in the first, not working, example the code is inside a class. And in the second easy, working, example the code is just on the mainframe. And in the second example i allready had the movieclip one on stage.

Last time i googled for solutions but i couldnt find any good solutions (sure hittesting mouse with the movie clip is nice, but way to much work). Strange enough i had to completely dynamical create every “button” with attachMovie. This time the movie is allready completely created the same way.

This seems to me like a random error, bug perhaps. I have no explanation.

Can anyone tell me what the reason is for this seemingly random malfunction in my code, thx.

edit:  
k, it is working on the mainframe. Just not in classes (objects).

WHY ppl, WHY?!!
