# Trouble using setMask with loadMovie

**URL:** <https://forum.kirupa.com/t/trouble-using-setmask-with-loadmovie/168803>\
**Category:** flash\
**Created:** [November 10, 2005, 4:46am UTC](https://forum.kirupa.com/t/trouble-using-setmask-with-loadmovie/168803 "2005-11-10T04:46:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)\
**Post date:** [November 10, 2005, 4:46am UTC](https://forum.kirupa.com/t/trouble-using-setmask-with-loadmovie/168803/1 "2005-11-10T04:46:53Z")

</div>

Hey all,

I have something wrong with my code here. I’m guessing with levels or something is out of order. If I do this and omit the loadMovie it works fine. What I get now is the movie loads with the mask set on top of it without masking.

[AS]  
function loadIllustration(){  
\_root.attachMovie(“imageholder”,“image\_mc”,this.getNextHighestDepth(),{\_x:280,\_y:47});  
image\_mc.loadMovie(“snowmelt.swf”, this.getNextHighestDepth());  
setMask();  
};  
loadIllustration();

function setMask() {  
\_root.attachMovie(“imagemask”,“imagemask\_mc”,this.getNextHighestDepth(),{\_x:280,\_y:47});  
image\_mc.setMask(imagemask\_mc);  
};  
[/AS]
