# Mask 4 buttons

**URL:** <https://forum.kirupa.com/t/mask-4-buttons/11378>\
**Category:** Uncategorized\
**Created:** [January 16, 2003, 10:39am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378 "2003-01-16T10:39:49Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![victim](https://avatars.discourse-cdn.com/v4/letter/v/7bcc69/32.png) [@victim](https://forum.kirupa.com/u/victim)\
**Post date:** [January 16, 2003, 10:39am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/1 "2003-01-16T10:39:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 16, 2003, 5:42pm UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/2 "2003-01-16T17:42:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 7:39am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/3 "2003-01-17T07:39:11Z")

</div>

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.

cheers

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 7:42am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/4 "2003-01-17T07:42:03Z")

</div>

\_root.b1.enabled = true

Should work.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 7:47am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/5 "2003-01-17T07:47:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 7:50am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/6 "2003-01-17T07:50:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 7:54am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/7 "2003-01-17T07:54:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 7:59am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/8 "2003-01-17T07:59:30Z")

</div>

What is the code on your close button?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 8:04am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/9 "2003-01-17T08:04:37Z")

</div>

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

on (release) {  
unloadMovieNum(2);  
}

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 8:08am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/10 "2003-01-17T08:08:04Z")

</div>

```auto
on (release) {
_root.b1.enabled = true;
unloadMovieNum(2);
}

```

That doesn’t work?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 8:26am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/11 "2003-01-17T08:26:15Z")

</div>

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;  
unloadMovieNum(2);  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 8:53am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/12 "2003-01-17T08:53:40Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 17, 2003, 12:24pm UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/13 "2003-01-17T12:24:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 18, 2003, 5:08am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/14 "2003-01-18T05:08:58Z")

</div>

Duh me… lol, I got it now…

```auto
on (release) {
	_level0.b1.enabled = true;
	unloadMovieNum(2);
}

```

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 19, 2003, 12:44am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/15 "2003-01-19T00:44:21Z")

</div>

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;  
\_level0.news.enabled = false;  
}

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 19, 2003, 2:27am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/16 "2003-01-19T02:27:17Z")

</div>

my mistake, yeh it does…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 19, 2003, 4:59am UTC](https://forum.kirupa.com/t/mask-4-buttons/11378/17 "2003-01-19T04:59:13Z")

</div>

Glad you got it all working now 🙂
