Mask 4 buttons

hi all

is it possible to create a mask over an existing button to disable it.

e.g- if I load a JPG directly over a button, the button is still active underneath the JPG. can the JPG have a mask attatched to it or even an invisible button that covers the the existing button so it becomes inactive.

…similar prblem to the guy a couple of threads down, but slightly different situaton.

all input appreciated.

Just disable it.

I don’t know if it works for button symbols (I don’t think it does), but it works on movieclip symbols that are acting as buttons.

_root.yourButtonName.enabled = false;

Tah Dah, disabled.

thanks dude,

yeh it works, i’ve used…

on (release) {
loadMovieNum(“ple image1.swf”, 2);_root.b1.enabled = false;

but one prob,
when I close (‘ple image1.swf,2’) the button is still disabled and i want it enabled when i close the loaded swf’s and the code has no affect in the swf i’m loading on level to.

how can i enable it again.


_root.b1.enabled = true

Should work.

but that code has to go with the close button in the loaded SWF which will have no affect on the mian movie.
is that correct.

because where would i apply it in the main movie?

Well the _root of your loaded movie because the _root of the movie you are loading in.

So with that said… _root.b1.enabled = true; should work, even if done inside the movie.

I think. Worth a try eh?

but i want to tell it to enable once Swf level 2 is closed, which i close in Swf level 2.

how will the main movie know when i close level 2 swf?

…bare with me, i’m new to this.

What is the code on your close button?

the code on the close button… (close button SWF level 2)

on (release) {

…and on this release I’d like it to enable buttons on the main movie, I’ve had no luck so far.

on (release) {
_root.b1.enabled = true;

That doesn’t work?

no it didn’t…

the code in SWF 2 didn’t reactivate the button in the main SWF…

I dunno, I thoought it would do it…

here’s both codes…

Main SWF… button B1

on (release) {
loadMovieNum(“ple image1.swf”, 2);_root.b1.enabled = false;

SWF level 2, close button…

on (release) {
_root.b1.enabled = true;

I tried to recreate the situation. It didn’t help much. I don’t know what to do.

Maybe the answer will come to me in the morning. I am kinda tired right now (3:50am).

get some sleep bro, I think the last time u helped me out on a problem it was about that time aswell…

Duh me… lol, I got it now…

on (release) {
	_level0.b1.enabled = true;

I didn’t test it, but I am pretty sure it will work.

yep, right on the money…
appreciate ure responses.

while it’s working fine theres still 1 problem,

on (release) {
loadMovieNum(“ple image1.swf”, 3);loadMovieNum(“ple back.swf”, 2);
_root.b1.enabled = false;
_root.text.enabled = false; = false;

the root in this situation is also level 1 on another SWF, so on the last line of code, = false; I want it to disable the news button and shouldn’t that code do it??
because it’s not.

my mistake, yeh it does…

Glad you got it all working now :slight_smile: