# Simple animated gradient mask?

**URL:** <https://forum.kirupa.com/t/simple-animated-gradient-mask/327964>\
**Category:** Uncategorized\
**Created:** [April 9, 2012, 3:02pm UTC](https://forum.kirupa.com/t/simple-animated-gradient-mask/327964 "2012-04-09T15:02:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)\
**Post date:** [April 9, 2012, 3:02pm UTC](https://forum.kirupa.com/t/simple-animated-gradient-mask/327964/1 "2012-04-09T15:02:15Z")

</div>

Hi,

Thought i knew this one, a simple animated mask with feather alpha.

I have just a green image and a mask animated from left to right. The mask has a gradient fill.  
Now to get the gradient mask effect i thought i just had to add the following AS

```auto
gradientMask.cacheAsBitmap = true;
green_img_mc.cacheAsBitmap = true;

green_img_mc.setMask(gradientMask);

```

but now the mask isn’t moving.

How can i make this simple effect to work?

regards

ps: if i set publish to AS3 and i use green\_img\_mc.mask =gradientMask; it works but i need a AS2 solution

ps2: publishing for flash player 8 my mask is also movinge (src: [http://www.kirupa.com/forum/showthread.php?335080-Tweened-gradient-mask-not-working-above-flash-8](http://www.kirupa.com/forum/showthread.php?335080-Tweened-gradient-mask-not-working-above-flash-8))
