# FMX masking question

**URL:** <https://forum.kirupa.com/t/fmx-masking-question/10403>\
**Category:** flash\
**Created:** [December 31, 2002, 10:41am UTC](https://forum.kirupa.com/t/fmx-masking-question/10403 "2002-12-31T10:41:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)\
**Post date:** [December 31, 2002, 10:41am UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/1 "2002-12-31T10:41:39Z")

</div>

ok so heres the problem:

i have some buttons that are suppose to attach a movie clip on stage after you press it. This works perfectly, but after i mask it, the masking box blocks it so i can’t click on anything.

i hope you understood what i’m saying, and i’ve tried using the ‘setmask’ code, but that doesn’t work either.

Any ideas anyone?

thx

---

<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:** [December 31, 2002, 11:11pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/2 "2002-12-31T23:11:06Z")

</div>

You got an FLA? [flashHelp@xonesix.com](mailto:flashHelp@xonesix.com)

---

<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 1, 2003, 3:12am UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/3 "2003-01-01T03:12:56Z")

</div>

ok, so basically if you open the file i attatched and click test movie, pressing the green box doesnt’ work.

But after you unmask the pink box and move it away from the green box, the green box works (it duplicates itself) as you should see.

so anyone know how i can fix this so that the masking layer doesn’t affect pressing buttons under it?

---

<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 1, 2003, 8:42am UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/4 "2003-01-01T08:42:54Z")

</div>

I don’t see an attached file…

---

<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 1, 2003, 2:49pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/5 "2003-01-01T14:49:06Z")

</div>

whoops that was dumb of me 🙂

---

<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 1, 2003, 3:02pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/6 "2003-01-01T15:02:44Z")

</div>

you are masking your testbox. This means that anything in testbox will only be seen if under the mask. All duplicated clips are kept within the scope of the original. So if you duplicate your green box in testbox, the duplicate stays in testbox. This means the duplicate is being masked just the same as everything else in testbox.

Alternatives to this would be using setMask to control your masking or attaching your mox in root instead of in testbox or having the mask within testbox itself masking only the greenbox and not all of testbox

---

<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 1, 2003, 3:15pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/7 "2003-01-01T15:15:17Z")

</div>

to use the setmask thing the code is jsut

testbox.setmask(mask);

right?  
i just tried it but its not working for some reason, i put it in the root.

i also tried putting that in ‘testbox’ and same with using the mask in testbox instead of the main thing. but it doesn’t seem to work!!!

help me plz!!!

---

<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 1, 2003, 3:24pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/8 "2003-01-01T15:24:57Z")

</div>

I think it really boils down to what you are trying to accomplish in the long run. What is it exactly that all of this is for and how should it function in the end.

---

<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 1, 2003, 3:26pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/9 "2003-01-01T15:26:29Z")

</div>

its basically suppose to be something like the infinite menu except changed a bit on this site, except when you click on the buttons they duplicate themselves into like a big picture

---

<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 1, 2003, 5:57pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/10 "2003-01-01T17:57:21Z")

</div>

Correct me if I’m wrong but you are trying to attach an instance of pic1 when you click the testBox button/moveclip. Like Senocular said you are attaching it inside your testBox movie in an area that can’t be seen through the mask. You can attach it the main timeline instead and avoid the masking issue.

```auto
on (release) {
	bigpic1 = _root.attachMovie("pic1", "bigpic1", 2);
	setProperty("bigpic1", _x, 250);
	setProperty("bigpic1", _y, 250);
	setProperty("bigpic1", _xscale, 250);
	setProperty("bigpic1", _yscale, 250);
}

```

Or you could shorten your code a bit…

```auto
on (release) {
	props = {_x:250, _y:250, _xscale:250, _yscale:250};
	bigpic1 = _root.attachMovie("pic1", "bigpic1", 2, props);
}

```

You may need to change the 250 now since you were positioning it relative to your testBox before.

---

<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 1, 2003, 6:20pm UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/11 "2003-01-01T18:20:16Z")

</div>

Here’s an illustrated example tryinto show what was happening. When you mask something you can only see what is behind that shape. In this case it is the red rectangle labeled “Viewable Area.” You were attaching your pic1 movieclip outside of that area. Anything not within the viewable area, or behind your pink rectangle in this case, will not be seen.  
 ![](http://www.xonesix.com/forums/mask.gif)

---

<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 2, 2003, 3:35am UTC](https://forum.kirupa.com/t/fmx-masking-question/10403/12 "2003-01-02T03:35:32Z")

</div>

ah cool thx for the detailed explanation i think iv’e got it working now thx 🙂
