# Masking (attachMovie)

**URL:** <https://forum.kirupa.com/t/masking-attachmovie/200002>\
**Category:** flash\
**Created:** [September 7, 2006, 10:22pm UTC](https://forum.kirupa.com/t/masking-attachmovie/200002 "2006-09-07T22:22:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![livestyle](https://avatars.discourse-cdn.com/v4/letter/l/48db29/32.png) [@livestyle](https://forum.kirupa.com/u/livestyle)\
**Post date:** [September 7, 2006, 10:22pm UTC](https://forum.kirupa.com/t/masking-attachmovie/200002/1 "2006-09-07T22:22:34Z")

</div>

Hi,  
I need to mask a text or mc by the attached mc from the library.  
I used this code, but it doesn’t work to me:

[COLOR=DarkSlateBlue]  
i = 0;  
function makeMask() {  
\_root.attachMovie(“mc”, “mc”+i, i);  
\_root[“mc”+i].i = i;  
\_root[“mc”+i].num = i+1;  
\_root[“mc”+i].\_x = 60;  
\_root[“mc”+i].\_y = 50+16\*i;  
\_root[“mc”+i].asBut();  
i++;  
if (i\>6) {  
clearInterval(id);  
}  
}  
id = setInterval(makeMask, 200);  
Text.setMask(mc);[/COLOR]

Could someone please help me?  
Thank you.
