PDA

View Full Version : I want to deactivate Main stage buttons while movie clip runs


kunafish
07-29-2002, 09:52 PM
I'm creating a sort of Jeopardy game. This seems like such a simple question, but:

I have buttons on the main stage that, when clicked, it tellTargets a corresponding mc, a box containing the answer and the three possible questions. (Remember this is Jeopardy). Now, when that box appears, the buttons on the main stage are still working (i.e when you rollover them, they work.)

this causes quite a problem due to the fact that the (question)box also has buttons in it, overlapping the ones on the main stage. If the user clicks on the question, and that mc button isn't where he/she clicked, the main stage button activates another mc (question box).

What I want is to, i guess, "deactivate" the main stage buttons, while the mc is running, so that only the buttons in the mc will be active.

When then question is answered (or vice versa ... jeopardy) the mc fades out and returns to the main stage, where the buttons should be activated again.

Does this make any sense to anybody?

Grifter
07-29-2002, 10:29 PM
maybe you could put the buttons for the answers into a movie clip, which has two frames, one where they are active and one where they're not? and do the same for the stage as well?

maybe you could use a variable which gets switched when the user starts answering questions and then changes when they stop answering (or get it wrong)? So put this on the stage MC:

//NB. with active buttons on frame 1, and non-active on frame 2
onClipEvent(enterFrame){
if(_root.stageActive){
gotoAndStop(1);
} else {
gotoAndStop(2);
}
}

and vice versa for the question MC (containing the buttons).

one of the few American shows we don't get in England is Jeopardy (i think), so for those of us who don't really know much about it, could you compare it to an English show or explain it a little. Thanks.

Hope this helps, and i'm sure someone else will come up with a better solution.
Grifter

Grifter
07-29-2002, 10:31 PM
stupid me. :rolleyes: i knew there would be a better solution.
you can just create the variable stageActive and use that in the code for the buttons - i.e. if stageActive is true then do the action:
on(release){
if(stageActive){
//do stage action
}
}

i really need to go to bed now.
:o

Grifter

Billy T
07-30-2002, 12:34 AM
yeah but that will still give the user the finger when they are over the buttons

if you are using mx then you can turn off your buttons with

button1.enabled=false;

if you are using flash 5 then grifters first suggestion is the way to go (tell the button in frame 2 of the mc to act as a graphic)

cheers