# How to set these masks?

**URL:** <https://forum.kirupa.com/t/how-to-set-these-masks/18301>\
**Category:** Uncategorized\
**Created:** [April 15, 2003, 11:14am UTC](https://forum.kirupa.com/t/how-to-set-these-masks/18301 "2003-04-15T11:14:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deamothul](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@deamothul](https://forum.kirupa.com/u/deamothul)\
**Post date:** [April 15, 2003, 11:14am UTC](https://forum.kirupa.com/t/how-to-set-these-masks/18301/1 "2003-04-15T11:14:13Z")

</div>

Hey ASscripters,:tb:

I have a problem, i want 2 mask a certain shape.  
So i want the shape to show through a few other shapes.  
i tried it with setmask, but i can’t seem 2 get the shape2Mask to show up under all the masks.  
Yesterday it kept on showing up through one mask and the others were ignored.  
Hope it’s all clear what i mean, still early, still sleepy.

My script is below, i put some comments into it.

```auto

MovieClip.prototype.drawShape=function(r,x,y,w,c,a,fc,fa,style){
	this.lineStyle(w,c,a);
	this.beginFill(fc,fa);
	this.moveTo(x+r,y);
	a = Math.tan(style*Math.PI/180);
	for(var angle=45;angle<=360;angle+=45){
		var endX = r*Math.cos(angle*Math.PI/180)
		var endY = r*Math.sin(angle*Math.PI/180)
		var cX = endX + r*a*Math.cos((angle-90)*Math.PI/180)
		var cY = endY + r*a*Math.sin((angle-90)*Math.PI/180)
		this.curveTo(cX+x,cY+y,endX+x,endY+y);
	}
	this.endFill()
}

//this is the clip that i want 2 show throught the mask

shape2Mask=createEmptyMovieClip("shape2Mask",1)
shape2Mask.drawShape(150,0,0,3,0x0000aa,100,0x000066,100,22.5);
shape2Mask._x=250
shape2Mask._y=250
shape2Mask.onEnterFrame=function(){
	shape2Mask._x=Math.sin(angleX+=0.2)*350+250
}

// these are 4 shapes i want set as mask, so that shape2Mask
// will only be seen through these shapes.	:confused: 

Mask1=createEmptyMovieClip("Mask1",2)
Mask1.drawShape(40,0,0,3,0xeeddee,100,0xaaeeaa,50,52.5);
Mask1._x=100
Mask1._y=250

Mask2=createEmptyMovieClip("Mask2",3)
Mask2.drawShape(40,0,0,3,0xeeddee,100,0xaaeeaa,50,52.5);
Mask2._x=200
Mask2._y=250

Mask3=createEmptyMovieClip("Mask3",4)
Mask3.drawShape(40,0,0,3,0xeeddee,100,0xaaeeaa,50,52.5);
Mask3._x=300
Mask3._y=250

Mask4=createEmptyMovieClip("Mask4",5)
Mask4.drawShape(40,0,0,3,0xeeddee,100,0xaaeeaa,50,52.5);
Mask4._x=400
Mask4._y=250

```

// HOPE somebody’s out there who knows what i mean.

GREETINGZZ 2 ALL From DEAMOTHUL - THE SCRIPT KEEPER -

---

<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:** [April 15, 2003, 12:05pm UTC](https://forum.kirupa.com/t/how-to-set-these-masks/18301/2 "2003-04-15T12:05:18Z")

</div>

;( 😠 :skull:
