# Gif with transparancy as a mask

**URL:** <https://forum.kirupa.com/t/gif-with-transparancy-as-a-mask/285881>\
**Category:** flash\
**Created:** [April 7, 2009, 3:53pm UTC](https://forum.kirupa.com/t/gif-with-transparancy-as-a-mask/285881 "2009-04-07T15:53:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xstevey\_bx](https://avatars.discourse-cdn.com/v4/letter/x/91b2a8/32.png) [@xstevey\_bx](https://forum.kirupa.com/u/xstevey_bx)\
**Post date:** [April 7, 2009, 3:53pm UTC](https://forum.kirupa.com/t/gif-with-transparancy-as-a-mask/285881/1 "2009-04-07T15:53:02Z")

</div>

Is it possible to use a gif with a transparent bg as a mask. I have a puzzle that I am creating and I want to use a shaped gif image to create oddly shaped pieces. As it stands just now the whole gif image (including transparent areas) is being used as the mask.

```php

_root.mc_template.createEmptyMovieClip("mc_mask", 4);
loadMovie("images/0/mask_0.gif", _root.mc_template.mc_mask);
_root.mc_options.mc_envelope.mc_image.setMask(_root.mc_template.mc_mask);

```
