# attachMovieclip

**URL:** https://forum.kirupa.com/t/attachmovieclip/6694
**Category:** flash
**Created:** [October 14, 2002, 2:45pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694 "2002-10-14T14:45:53Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![flashjohan](https://avatars.discourse-cdn.com/v4/letter/f/f17d59/32.png) [@flashjohan](https://forum.kirupa.com/u/flashjohan)
#### Post date: [October 14, 2002, 2:45pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/1 "2002-10-14T14:45:53Z")

</div>

Hi!

I have attached a clip which contains other clips. I can make these clips move but if I want to use them as buttons it doesn’t seem to work. I have tryed to use the myMovieClip.onRollOver but without success. What do I have to do to make them react on the mouse?

HELP!

Thankx

Johan

---

<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: [October 15, 2002, 2:30am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/2 "2002-10-15T02:30:52Z")

</div>

can you please post your code or your fla. Much easier to see what you’re doing. 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: [October 15, 2002, 10:26am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/3 "2002-10-15T10:26:03Z")

</div>

Hi,

Have u made sure u r using the right paths (myMovie.itsChild.onMouseover)

Cheers

---

<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: [October 15, 2002, 11:12am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/4 "2002-10-15T11:12:29Z")

</div>

> \*Originally posted by eki \*  
> \*\*Hi,

Have u made sure u r using the right paths (myMovie.itsChild.onMouseover)

Cheers \*\*

hi,

it’s very bizarr, because it seems, that if I use the attachMovie in a hierarchie like: \_root.movie1.movie2.attachMovie… the buttons that the attachted movie contains work. But if I have a 3rd movie (\_root.movie1.movie2.movie3.attachMovie…) the buttons wont react to the mouse anymore. But I can still manipulate them with ex. \_x, or \_xscale. The 3rd movie is a small tween animation which triggers the attachMovie at a cartain frame. The attached clip appears as it should do but the buttons it contains are “dead”.

How does the target path look like in attached movies?

JJ

---

<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: [October 15, 2002, 11:13am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/5 "2002-10-15T11:13:17Z")

</div>

> \*Originally posted by Iammontoya \*  
> \*\*can you please post your code or your fla. Much easier to see what you’re doing. Thanks. \*\*

hi,

it’s very bizarr, because it seems, that if I use the attachMovie in a hierarchie like: \_root.movie1.movie2.attachMovie… the buttons that the attachted movie contains work. But if I have a 3rd movie (\_root.movie1.movie2.movie3.attachMovie…) the buttons wont react to the mouse anymore. But I can still manipulate them with ex. \_x, or \_xscale. The 3rd movie is a small tween animation which triggers the attachMovie at a cartain frame. The attached clip appears as it should do but the buttons it contains are “dead”.

How does the target path look like in attached movies?

JJ

---

<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: [October 15, 2002, 11:27am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/6 "2002-10-15T11:27:35Z")

</div>

Hi,  
I’m posting an example of the kind:  
myMov.itsChild.itsGranChild.attachMovie.

Hope it’s usefull

---

<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: [October 15, 2002, 11:51am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/7 "2002-10-15T11:51:07Z")

</div>

> \*Originally posted by Iammontoya \*  
> \*\*can you please post your code or your fla. Much easier to see what you’re doing. Thanks. \*\*

Ok.  
This is the code in the attached clip used on a peace of text which I converted in to a another movieclip in order to target it (it’s not a button-clip):

on (rollOver) {  
this.onRollOver = function() {  
trace(“rolled over”);  
}  
}

I’m not sure about the “this” but I have no idea how the target path looks like for attached clips.

This is the code for the attaching itself:

\_root.navigation.navEingang.attachMovie(“AktuellesBut”, “AktuellesBut1”, 1);

The “navEingang” is a small tween-animation which triggers the above code on a certain frame.

It’s weard, because when I attach the clip to the “navigation” it works.

This drives my nuts!!!

Please help!

JJ

---

<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: [October 15, 2002, 11:56am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/8 "2002-10-15T11:56:35Z")

</div>

Have u look at the fla I’ve posted?  
I think it answers ur problems or I don’t understand ur question.

SHO

---

<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: [October 15, 2002, 12:09pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/9 "2002-10-15T12:09:31Z")

</div>

> \*Originally posted by eki \*  
> \*\*Have u look at the fla I’ve posted?  
> I think it answers ur problems or I don’t understand ur question.

SHO \*\*

Thanx for the trouble! But I got that far my self. Now try to position a another Movieclip in side your “rr” and try to make that one react on the mouse. I would be sooooo greatful if you now how to do it…

Thanx again for your help!

JJ

---

<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: [October 15, 2002, 12:12pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/10 "2002-10-15T12:12:59Z")

</div>

> \*Originally posted by eki \*  
> \*\*Have u look at the fla I’ve posted?  
> I think it answers ur problems or I don’t understand ur question.

SHO \*\*

correction: put a movieclip inside the clip you attached and try to make that on react on the mouse… (got confused about which one was the “rr”. Sorry)

JJ

---

<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: [October 15, 2002, 12:35pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/11 "2002-10-15T12:35:53Z")

</div>

Hi, that’s all rigth!

I’m posting an updated fla where I put a MC inside the attached MC that reacts as a butt

Cheers

SHO

Is this it?

---

<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: [October 15, 2002, 12:44pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/12 "2002-10-15T12:44:10Z")

</div>

> \*Originally posted by eki \*  
> \*\*Hi, that’s all rigth!

I’m posting an updated fla where I put a MC inside the attached MC that reacts as a butt

Cheers

SHO

Is this it? \*\*

There’s nothing attached… Is it on it’s way? 🙂

JJ

---

<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: [October 15, 2002, 2:01pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/13 "2002-10-15T14:01:54Z")

</div>

Oh!

Sorry mate!

---

<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: [October 15, 2002, 2:02pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/14 "2002-10-15T14:02:49Z")

</div>

:o

---

<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: [October 15, 2002, 2:30pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/15 "2002-10-15T14:30:04Z")

</div>

> \*Originally posted by eki \*  
> \*\*:o \*\*

Hi again!

I changed it the way I have done it. As soon you make a tween animation aut of the MC that you attach, it doesn’t work any more. Check it out…

JJ

---

<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: [October 15, 2002, 3:55pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/16 "2002-10-15T15:55:16Z")

</div>

Hi,

The problem is that the but MC needs to exist from the beginning  
so just place it offstage in the first frame (or make it alpha 0 )  
I’m attaching the file back with tween and working.

Hope this time it’s what u need:)

SHO

---

<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: [October 16, 2002, 3:32pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/17 "2002-10-16T15:32:22Z")

</div>

> \*Originally posted by eki \*  
> \*\*Hi,

The problem is that the but MC needs to exist from the beginning  
so just place it offstage in the first frame (or make it alpha 0 )  
I’m attaching the file back with tween and working.

Hope this time it’s what u need:)

SHO \*\*

Hi again!

I’m very pleased for helping me. I have extracted what I have been working with. And it just doesn’t work. If you can make it work? Only if you feel like it. I would appreaciate any help.

The menu “Aktuelles” has a sub menu. The first line in the submenu is a MC called teamBut. This doesn’t react on the mouse!!! Why? I believe a I have done everything like you told me… grrrrrr!

Thanx!

JJ

---

<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: [October 16, 2002, 5:32pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/18 "2002-10-16T17:32:28Z")

</div>

Hi,

I’ve made it work!(I thought i was going to go :crazy: )

Looks like the problem is to have a button within a button.

I’ve used hitTest in the parent button to get to know if the mouse is over it so that way there’s only the inner button that behaves as it should.

I attach the edited fla

Cheers

SHO

---

<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: [October 16, 2002, 8:26pm UTC](https://forum.kirupa.com/t/attachmovieclip/6694/19 "2002-10-16T20:26:24Z")

</div>

> \*Originally posted by eki \*  
> \*\*Hi,

I’ve made it work!(I thought i was going to go :crazy: )

Looks like the problem is to have a button within a button.

I’ve used hitTest in the parent button to get to know if the mouse is over it so that way there’s only the inner button that behaves as it should.

I attach the edited fla

Cheers

SHO \*\*

Thank you so much for your time!!! I really appreciate it! If you don’t mind, I’ll contact you again fi I get some other problems. Normaly I always solve them but by this I get really stuck. :-/

Have a nice evening!

JJ

---

<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: [October 17, 2002, 9:36am UTC](https://forum.kirupa.com/t/attachmovieclip/6694/20 "2002-10-17T09:36:15Z")

</div>

Hi,

That’s all right!

I’m allways up for a challenge and love weird problems (I’m talking Flash here! ;¬).

And of course I don’t mind you contactacting me, that’s what the forum is all about, isn’t it?

Cheers

SHO
