# attachMovie and buttons

**URL:** <https://forum.kirupa.com/t/attachmovie-and-buttons/42298>\
**Category:** flash\
**Created:** [February 7, 2004, 2:43pm UTC](https://forum.kirupa.com/t/attachmovie-and-buttons/42298 "2004-02-07T14:43:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danii](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Danii](https://forum.kirupa.com/u/Danii)\
**Post date:** [February 7, 2004, 2:43pm UTC](https://forum.kirupa.com/t/attachmovie-and-buttons/42298/1 "2004-02-07T14:43:19Z")

</div>

Hello!  
I’ve used attachMovie to get an MC onto the stage. now my problem is that there are buttons on that mc but i don’t know how to click on them using AS

here’s my code

[AS]  
\_root.createEmptyMovieClip(“tmp”,1);  
tmp.attachMovie(“myMc”,“myMc2”,1);

```auto

the movieclip is attached but then when i try to get access of the buttons like this,

```

tmp.go.onRelease = function() {  
doStuff;  
}

```auto

where "go" is the instance name of the button, it wont work.

I've also tried typing myMc2.onRelease and that wont work either...
So how do I solve this one???
```

---

<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:** [February 7, 2004, 5:04pm UTC](https://forum.kirupa.com/t/attachmovie-and-buttons/42298/2 "2004-02-07T17:04:35Z")

</div>

try this one  
[AS]tmp.myMc2.go.onRelease = function() {  
trace(“success”);  
};[/AS]

scotty(-:

---

<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:** [February 7, 2004, 5:45pm UTC](https://forum.kirupa.com/t/attachmovie-and-buttons/42298/3 "2004-02-07T17:45:46Z")

</div>

I’ve already tried that, and it doesn’t work…

---

<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:** [February 7, 2004, 6:44pm UTC](https://forum.kirupa.com/t/attachmovie-and-buttons/42298/4 "2004-02-07T18:44:29Z")

</div>

Hmm, here it is working…

scotty(-:

---

<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:** [February 7, 2004, 7:49pm UTC](https://forum.kirupa.com/t/attachmovie-and-buttons/42298/5 "2004-02-07T19:49:36Z")

</div>

Okey thx, Ill look at it when i get home  
(-:
