# Overlapping Curved Dynamic Mask prob

**URL:** <https://forum.kirupa.com/t/overlapping-curved-dynamic-mask-prob/108228>\
**Category:** Uncategorized\
**Created:** [April 22, 2004, 8:59pm UTC](https://forum.kirupa.com/t/overlapping-curved-dynamic-mask-prob/108228 "2004-04-22T20:59:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zgame](https://avatars.discourse-cdn.com/v4/letter/z/ed655f/32.png) [@Zgame](https://forum.kirupa.com/u/Zgame)\
**Post date:** [April 22, 2004, 8:59pm UTC](https://forum.kirupa.com/t/overlapping-curved-dynamic-mask-prob/108228/1 "2004-04-22T20:59:39Z")

</div>

hey, im trying to make a script that randomly makes slashes revealing a picture underneath as if it was being painted or something. It sorta works, but the overlapping shapes inverse each other. I tried putting them in individual movie clips within the mask clip, but no luck. Thanks in advance.  
(I have a picture clip called “pic” on the stage")

/////////////initialize//////////////  
onClipEvent(load){

\_root.createEmptyMovieClip(“mask”, 0);  
\_root.pic.setMask(\_root.mask);

}  
///////////////main///events//////

onClipEvent(enterFrame){  
with(\_root.mask){  
lineStyle( 1, 0x0000FF, 100 ); //Why dont lines work as dynamic masks? only filled shapes?  
beginFill(0x0000FF,100);

///////////Create Random Curve locations////////

x1=(random((\_root.pic.\_width_2))(\_root.pic.\_width));  
x2=(random((\_root.pic.\_width_2))-(\_root.pic.\_width));  
y1=(random((\_root.pic.\_height_2))-(\_root.pic.\_height));  
y2=(random((\_root.pic.\_height_2))-(\_root.pic.\_height));

///////////////////find starting point///////////////

xx=((\_root.pic.\_width/2)+(random(60)-30));  
yy=((\_root.pic.\_height/2)+(random(60)-30));

///////////////////////draw it///////////////////////

moveTo(xx,yy);  
curveTo(x1,y1,x2,y2);  
curveTo((x1+random(150)),(y1+random(150)),xx,yy);  
endFill();

}  
}
