PDA

View Full Version : nested button


Cyberdyne
12-15-2002, 05:17 PM
Hey guys.... ok, i made an animated dropdown menu, and now the buttons at the end of the animation, dont work..... all they do when you click on them is disapear and stay on the frame that i've got the stop action on. everything worked b4 i nested these buttons inside the dropdown menu.

I do have an invisible button around the menu, to reset it when your rollout of the menu area. would that have anything to do with making the buttons not work? For the invisible button, i'm using the code

on (rollOver) {
HowToInvisible.useHandCursor = false;
gotoAndStop(1);
}

to make the cursor stay as an arrow, rather then turning into a hand over the invisible button.

that code is inside the movie clip, not on the main timeline

as for the buttons on the last frame of the dropdown menu, i'm using just the basic code of

on (release) {
gotoAndPlay("How To Fix Your Bike", 1);
}

so i'm completely confused as to why the buttons do not work.... they did b4, and not now. i'm sure its cause i've probably got another stop action or something somewhere else that i cant see that is causing the playhead to stick on that one frame.

Any ideas?


Cyberdyne

jubei
12-15-2002, 10:36 PM
How does your dropdown menu work?

If you have one large button sitting over the whole thing with an on(rollOut) function telling it to hide the menu, then that will be your problem. When the cursor rolls over another button, even though the large one is behind it, it counts as a rollOut.

If you don't have that, then sorry :) You're gonna have to explain the situation more clearly, or else post the file somewhere (that makes it about a million times easier to troubleshoot :))

Cyberdyne
12-16-2002, 12:33 AM
well, i took out all the stuff you don't need, and left just the button for ya.

Hope this helps (you and me :)

Thanks.

jubei
12-16-2002, 01:05 AM
Ah, i understand now. The problem is not in the drop down button, it's in your link.

I'm not sure why it wouldn't work, but for some reason putting a goto scene command in a movie clip kills the command. However, i do have a solution.

On your button, put

on (release) {
_root.gotoFixBike()
}

Then, on the first frame of the root timeline you need

function gotoFixBike() {
gotoAndPlay("How To Fix Your Bike", 1);
}

You'll need to repeat that for the other button. That basically places the goto command on the root timeline, so it works, and your button (which can be wherever) calls it.

Cyberdyne
12-16-2002, 01:37 AM
SWEET!!!!!

got it to work with the 2 buttons i wanted to..... thanks again man!

been trying to figure that out for days.

Cyberdyne