# Button inside Movieclip error!

**URL:** https://forum.kirupa.com/t/button-inside-movieclip-error/270940
**Category:** Uncategorized
**Created:** [September 16, 2008, 1:57pm UTC](https://forum.kirupa.com/t/button-inside-movieclip-error/270940 "2008-09-16T13:57:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anix](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anix](https://forum.kirupa.com/u/anix)
#### Post date: [September 16, 2008, 1:57pm UTC](https://forum.kirupa.com/t/button-inside-movieclip-error/270940/1 "2008-09-16T13:57:01Z")

</div>

Hi i have designed a site where the user can move elements around the stage, and within some of these elements(movieclips) there are buttons insde them that link to various frame labels that are located on the main movieclips time line. The action to control the button is on the main movieclip time line and not within the element itself. These code used is:

```auto
paper2.webBttn.addEventListener(MouseEvent.CLICK, webButton);

function webButton(e:MouseEvent):void
{
    gotoAndPlay("web");
}

```

the error i keep getting is:

```auto
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/setChildIndex()
    at FlashAS3Portfolio2_fla::holder_14/doDrag()

```
