# setMask not working on replay

**URL:** <https://forum.kirupa.com/t/setmask-not-working-on-replay/163460>\
**Category:** flash\
**Created:** [September 22, 2005, 3:16pm UTC](https://forum.kirupa.com/t/setmask-not-working-on-replay/163460 "2005-09-22T15:16:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jillymo](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jillymo](https://forum.kirupa.com/u/jillymo)\
**Post date:** [September 22, 2005, 3:16pm UTC](https://forum.kirupa.com/t/setmask-not-working-on-replay/163460/1 "2005-09-22T15:16:43Z")

</div>

I have a movie that starts off using setMask to mask a scrolling loaded jpeg:

```auto
this.createEmptyMovieClip("holder", 1);
holder._x = -2048;
holder._y = 112;
function loadIn(movie) {
        holder.loadMovie(movie);
		_root.attachMovie("mask_mc","mask",10);
mask._x = 150;
mask._y = 216;
myInterval = setInterval(preloadf, 50);
function preloadf() {
if (holder._width>0) {
clearInterval(myInterval);
holder.setMask(mask);
}
}
        clearInterval(loadInterval);
}
loadInterval = setInterval(loadIn, 965, "scroll.jpg");

stop();

```

Works great on the first time through the movie. BUT when played the second time through, it does not work- actual mask is shown rather than the masked image.

This is code I have at the end of my movie to replay:

```auto
function reStart (){
	clearInterval(reStart);
unloadMovie(_root.bar);
unloadMovie(_root.panel2);
unloadMovie(_root.phrase1);
unloadMovie(_root.name);
gotoAndPlay("start");
}
reStart = setInterval(reStart, 176500);

```

I know that setMask can only be used once (on one mc) but I hope that does not mean it only works once and not again if the movie is replayed. :diss:
