# Calling button within a movieclip

**URL:** <https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425>\
**Category:** Uncategorized\
**Created:** [November 13, 2003, 10:16pm UTC](https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425 "2003-11-13T22:16:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luthan](https://avatars.discourse-cdn.com/v4/letter/l/c6cbf5/32.png) [@luthan](https://forum.kirupa.com/u/luthan)\
**Post date:** [November 13, 2003, 10:16pm UTC](https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425/1 "2003-11-13T22:16:09Z")

</div>

i have a movie clip called menu  
there is a button in the movie clip called button1  
how do i use that button from the main timeline  
i was guessing to do:  
menu.button1.onRelease { whatever action }  
but its not working

how would i do that  
p.s. i need to be able to run the release code in the main timeline, not the button’s timeline

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2003, 10:36pm UTC](https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425/2 "2003-11-13T22:36:42Z")

</div>

add “\_root.” to your code without the quotations of course. \_root refers to the main timeline.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2003, 10:47pm UTC](https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425/3 "2003-11-13T22:47:11Z")

</div>

ok this is exactly what i have

\_root.button3.menu3.onRelease  
{  
\_root.page.loadMovie(“3.swf”);  
}

button menu3 is inside movieclip button3  
and this code is in my actions layer, not on the movieclip or the button

and somehow my main movie loads 3.swf when it starts without any clicks

what am i doing wrong

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2003, 10:53pm UTC](https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425/4 "2003-11-13T22:53:42Z")

</div>

Suppose to look like this:

```auto
_root.button3.menu3.onRelease = function() {
	_root.page.loadMovie("3.swf");
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 4:14pm UTC](https://forum.kirupa.com/t/calling-button-within-a-movieclip/35425/5 "2003-11-14T16:14:48Z")

</div>

to follow up on this:

i tried to just do

```auto

button3.onRelease = function() {
        _root.page.loadMovie("3.swf");
};

```

and this seemed to work  
im not sure if this is good or not because in the end im clickin on the movieclip and not the button, but this is the only way it wanted to work for me  
still not sure why
