Scripting a Button inside a MovieClip

I know this is a pretty basic problem that I am having, and I have searched the forums before posting this. I have found a lot of info about this topic, but none of it seems to answer my question.

I have a movieClip on my main timeline, that I have scripted as follows:


//IT Button
this.IT_mc.onRollOver = function ()
{
    _root.IT_mc.gotoAndPlay("over");
};
this.IT_mc.onRollOut = function ()
{
    _root.IT_mc.gotoAndPlay("out");
};

Basically this just makes the movie clip fade to a different color when rolled over. This works fine, but I also have individual buttons inside the movieclip that don’t work. They don’t rollover, or activate. As if they weren’t really buttons. How do I script the internal buttons to “getURL”? I have tried the standard “on(Release)” format of doing it, and that doesn’t work.

Please let me know, or point me in the direction of a good resource on this topic.

Thanks! :cyclops:

A common mistake I make is when I animate a movieclip, and give a instance name to it after that. If you have different keyframes, the mc on each keyframe needs to have the same instance name or AS won’t work.

If it’s not that, I’m not sure if it’s even possible to have a button inside a button. Same as when you have two buttons that overlap. The button on the top layer/depth will work and the one beneath it won’t.

Do the buttons inside the main button work if the main button doesn’t have any buttonhandlers assigned to it?

[quote=Rasper;1985255]A common mistake I make is when I animate a movieclip, and give a instance name to it after that. If you have different keyframes, the mc on each keyframe needs to have the same instance name or AS won’t work.

If it’s not that, I’m not sure if it’s even possible to have a button inside a button. Same as when you have two buttons that overlap. The button on the top layer/depth will work and the one beneath it won’t.

Do the buttons inside the main button work if the main button doesn’t have any buttonhandlers assigned to it?[/quote]

Yes the buttons do work if there are no buttonhandlers on the movie clip, but I am looking to have the background of the entire navigation area change color on rollOver, but still be able to click on individual buttons. Seems like there should be a fairly simple way to do this. Does anyone know how to script the internal buttons to work? Or somehow to script the main movieClip in a different way as to create the desired effect?

Please let me know.

Thanks! :ear:

This should help you out

http://senocular.com/flash/tutorials/buttoncapturing/

[quote=Digitalosophy;1985289]This should help you out

http://senocular.com/flash/tutorials/buttoncapturing/[/quote]

Alright, I thouroughly read through how to do the Event capturing looked at the sample files, and added the code to my file. And it doesn’t even trace an event on the the main movieClip. Doesn’t seem to do anything. I am including my .fla maybe someone can take a look and let me know what I am doing wrong. The “Managed Services” button is the only one that is scripted and setup.

The main idea is that when you rollover the area of the main movieClip itriggers the button to change colors, and then there will be links inside that movieCLip that will link using “getURL” links.

Please help!