attachMovieclip

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

can you please post your code or your fla. Much easier to see what you’re doing. Thanks.

Hi,

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

Cheers

*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

*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

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

Hope it’s usefull

*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

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

SHO

*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

*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

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?

*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? :slight_smile:

JJ

Oh!

Sorry mate!

:o

*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

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

*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

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

*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

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