PDA

View Full Version : Buttons clickable behind movie clips


puggle
01-27-2007, 12:56 AM
Hi all

I'm having a problem with buttons in my flash app that i'm building: if there is a movie clip in front of a button (see example below), the buttons are still clickable behind the movie clip. Is there a way to make it so that the button isn't clickable without manually disabling it? In the app that i'm building, there is a lot of buttons.

Cheers

Mark

(example at http://www.markdaviesmm.com/button_example.swf)

Cota
01-27-2007, 04:20 AM
disable the button. ButtonName.enabled = false;

happycoder242
01-27-2007, 06:07 PM
also you can use an if statement to say if there is a movie clip with a higher depth value then disable the button for ex
if(top_movieclip.getDepth()>bottom_movieclip.getDepth){
bottom_movieclip.enabled = false
}

taken from the help in Flash 8:

Returns the depth of the movie clip instance.

Each movie clip, button, and text field has a unique depth associated with it that determines how the object appears in front of or in back of other objects. Objects with larger values for depths appear in front. Content created at design time (in the authoring tool) starts at depth -16383.