How do I stop buttons on a lower layer from being clickable in the top layer?

I am finding this difficult to explain though it seems like it shouldn't be a hard problem to solve.  I have a movie called loader.swf that calls a series of other movies.  Everything seems to be working well except for one issue.  If movie A is playing on a layer above a previously loaded movie B, then the buttons from movie B are still clickable even though they are not viewable and only movie A is being shown.

What I want to have happen is for those movies to be disabled but not unloaded (so that they can remain cached).  Any suggestions would be great.  Please let me know if I need to explain myself better.
fast0neAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh ChopraCTOCommented:
A simple solution is here:

movie A (which is visible on top) should have a button of stage size on last layer.

suppose movie A size is 400x300,
place a button of 400x300 on the last layer of movie A and give it instance name, lets say "tempButton"
make it alpha =0,
and add the following line of code on first frame
tempButton.useHandCursor = false;

now because it is on last layer, it will not effect any of the existing button event.. but will not let mouse event go down to the movie B.
and as alpha is set 0, so it will not be visible.
and because we have also set "useHandCursor=false", hence, mouse icon also will not change to hand cursor on mouseOver.


I hope it will be clear.

Rgds
Aneesh

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fast0neAuthor Commented:
Will this just make the hand cursor go away or will it also make the buttons not clickable too?  I wouldn't want them to just go clicking around and accidently click on a button they didn't realize was there.
Aneesh ChopraCTOCommented:
If flash have two button one on the top of other, event only goes to the top button,,

hence, it will stop all click event upto itself.

Its like using iron to cut the iron
here we are using button to stop the event reaching to lower level buttons.
teddysetiawanCommented:
Try disable the button

instance_name.enabled=false;

ex : you have a button called "my_btn"  , you can disable it using my_btn.enabled=false; each time its under another movie clip . And you can enable it again using my_btn.enabled=true;
fast0neAuthor Commented:
aneeshchopra,
Your solution worked great!  Thanks.

Teddy,
Your solution may have worked but it wouldn't have been feasible since I would have many, many, many buttons to disable.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.