Delay prob

Hi there,

I used following script found on this forum ( see below). Works fine the only prob. is like when Button 1 loads ‘mymc.swf’ after say a delay of 8000 and when I push button 2 when ‘mymc.swf’ is still not loaded the swf file gets visible. but when I push button2 I don’t want that swf file to be visible.

I have a unloadmoviecode on button2 but that doesn’t seem to work. How solve. Big thx

button1.onPress = function () {
mcInterval = setInterval(mcloader, delay);
function mcloader() {
clearInterval(mcInterval);
loadMovie(“mymc.swf”,“container”);
}
}
delay = 3000;

button2.onPress = function () {
loadMovie(“mymc2.swf”,“container2”);
clearInterval(mcInterval);
unloadMovie(container);
}