# AttachMovie-LoadMovie-setMask...help

**URL:** https://forum.kirupa.com/t/attachmovie-loadmovie-setmask-help/186058
**Category:** flash
**Created:** [April 18, 2006, 7:01pm UTC](https://forum.kirupa.com/t/attachmovie-loadmovie-setmask-help/186058 "2006-04-18T19:01:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![el\_endemoniau](https://avatars.discourse-cdn.com/v4/letter/e/50afbb/32.png) [@el\_endemoniau](https://forum.kirupa.com/u/el_endemoniau)
#### Post date: [April 18, 2006, 7:01pm UTC](https://forum.kirupa.com/t/attachmovie-loadmovie-setmask-help/186058/1 "2006-04-18T19:01:49Z")

</div>

I have a movieclip (“thumb”) whith 2 layers. In the top layer a movieclip to be used as mask (“foto\_mascara”) of the bottom layer movieclip (“foto\_contenedor”) and try this:

\_root.attachMovie(“thumb”,“thumb2”,\_root.getNextHighestDepth ());  
nueva\_foto=eval(“thumb2”);  
loadMovie(fotos\*,nueva\_foto.foto\_contenedor);  
nueva\_foto.foto\_contenedor.setMask(nueva\_foto.foto\_mascara);

but the problem is that the “foto\_contenedor” movieclip shows the entire image under the “foto\_mascara” movieclip.

And if i do this ,the mask works right:

\_root.attachMovie(“thumb”,“thumb2”,\_root.getNextHighestDepth ());  
nueva\_foto=eval(“thumb2”);  
nueva\_foto.foto\_contenedor.createEmptyMovieClip(“foto”,nueva\_foto.foto\_contenedor.getNextHighestDepth());  
loadMovie(fotos\*,nueva\_foto.foto\_contenedor.foto);  
nueva\_foto.foto\_contenedor.setMask(nueva\_foto.foto\_mascara);

is that the way to do it?..creating an empty movieclip inside the container?..
