# Masking Problems

**URL:** <https://forum.kirupa.com/t/masking-problems/168320>\
**Category:** Uncategorized\
**Created:** [November 6, 2005, 4:41am UTC](https://forum.kirupa.com/t/masking-problems/168320 "2005-11-06T04:41:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiminma50](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jiminma50](https://forum.kirupa.com/u/jiminma50)\
**Post date:** [November 6, 2005, 4:41am UTC](https://forum.kirupa.com/t/masking-problems/168320/1 "2005-11-06T04:41:12Z")

</div>

Ok… here goes…

this is “container\_mc5” on layer 5… [![](http://www.uploadhouse.com/images/403903715greyVolume.png)](http://www.uploadhouse.com/)

this is “container\_mc6” on layer 6… [![](http://www.uploadhouse.com/images/962492221colorVolume.png)](http://www.uploadhouse.com/)

Now, I have a movieclip called “blueMask” that is just a blue box… I’m trying to use it as a way to mask “container\_mc6” to get the following result:

[![](http://www.uploadhouse.com/images/283193738result.gif)](http://www.uploadhouse.com/)

So as the user slides around, the “container\_mc6” will be shown.

But, as you can guess, this isn’t what I’m getting… below is the result that I’m getting:

[![](http://www.uploadhouse.com/images/583671980bad%20result.gif)](http://www.uploadhouse.com/)

Here is the code that I’m using:

```auto

//--------------------------[volume Control]------------------\\
this.container_mc5.onPress = function() {
	this.onEnterFrame = function() {
		if(_root._xmouse >= container_mc5._x && _root._xmouse <= (container_mc5._x + container_mc5._width)) {
			curTrackVolume = Math.round(_root._xmouse - container_mc5._x);
			mysound.setVolume(curTrackVolume);
			var blueMask =_root.attachMovie("blueMask","blueMask1",99);
			container_mc6.setMask(blueMask);
			blueMask._x = container_mc6._x;
			blueMask._y = container_mc6._y;
			blueMask._height = container_mc6._height;
			blueMask._width = curTrackVolume;
		}
	}
}
this.container_mc5.onRelease = function() {
	delete container_mc5.onEnterFrame;
}
this.container_mc5.onReleaseOutside = function() {
	delete container_mc5.onEnterFrame;
}
//--------------------------[/volume Control]------------------\\

```
