Skip to main content
Participant
February 27, 2013
Answered

How do I make all buttons on stage unclickable, while a certain movie clip is visible?

  • February 27, 2013
  • 1 reply
  • 1372 views

Hi,

I have a button on stage which opens a popup (movie clip is popup + several other buttons). The movie clip and the buttons on it take up most of the stage.

The problem is that the buttons which are on the stage, and are behind the movie clip, remain clickable (you can click through the movie clip!). How may I disable this?

Basically, I need to make it that you cannot click through the movie clip.

Thanks in advance!

PS I am using CS5 and AS2.

This topic has been closed for replies.
Correct answer Ned Murphy

One way would be to make the movieclip clickable.  That would make it block the other objects behind it...

     mc.onRelease = function(){ }

     mc.useHandCursor = false; // to hide the hand cursor

Another way would be to disable the buttons while the movieclip is present...

     btn.enabled = false;

Another way would be to build conditional code into the button clicking code to not work if the movieclip is visible.

     btn.onRelease = function(){

          if(!mc._visible){

                // okay to do stuff

          }

     }

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
February 27, 2013

One way would be to make the movieclip clickable.  That would make it block the other objects behind it...

     mc.onRelease = function(){ }

     mc.useHandCursor = false; // to hide the hand cursor

Another way would be to disable the buttons while the movieclip is present...

     btn.enabled = false;

Another way would be to build conditional code into the button clicking code to not work if the movieclip is visible.

     btn.onRelease = function(){

          if(!mc._visible){

                // okay to do stuff

          }

     }

Participant
February 27, 2013

ty! resolved!

Ned Murphy
Legend
February 27, 2013

You're welcome