I have a movie that starts off using setMask to mask a scrolling loaded jpeg:
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:
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: