# Mask a runtime created gradient fill

**URL:** https://forum.kirupa.com/t/mask-a-runtime-created-gradient-fill/223476
**Category:** flash
**Created:** [April 23, 2007, 6:12am UTC](https://forum.kirupa.com/t/mask-a-runtime-created-gradient-fill/223476 "2007-04-23T06:12:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anubhav](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@anubhav](https://forum.kirupa.com/u/anubhav)
#### Post date: [April 23, 2007, 6:12am UTC](https://forum.kirupa.com/t/mask-a-runtime-created-gradient-fill/223476/1 "2007-04-23T06:12:15Z")

</div>

I m having problems in masking a gradient fill created at runtime. Actually i had a movieClip an then at runtime created three movieClips  
1.gradient filled rectangle mcGrad,  
2.loader to load an image mcLoader  
3.a curved rectangle mcMask

trying to mask mcGrad and mcLoader with mcMask  
image gets masked but mcGrad not, i m writing as-:

mcGrad.setMask(mcMask);  
mcLoader .setMask(mcMask);
