I'm trying to create a simple page transition. Please ignore everything but the timer in red. Everything works flawlessly EXCEPT that after the transition is made the timer is not cleared with the clearInterval command. Is there something wrong with my if statement?
stop();
function loadPage() {
_root.mcCover.gotoAndPlay(2);
_root.logoFader.gotoAndPlay(2);
function loadURL() {
_root.mcHolder.loadMovie("http://www.labohemeny.com/flash/main.swf", "mcHolder");
nTimes++;
if(nTimes >=1) {
clearInterval(timer);
}
}
var nTimes:Number = 0;
var timer:Number = setInterval(loadURL, 900);

}