setInterval- Should be easy
Hey all. So I'm making a website, all flash. I have a content window where my external .swf's are loaded into. I'm using kind of a verticle wiping look to transition between .swf's. I want my button to wipeout the current .swf (already set up) wait 2 seconds, then wipe in the .swf corresponding to the button I pressed. I'm a little confused on where to put the function, and exactly how to call it froma button.
I have this on the first frame of my movie:
code:
funtion newswait() {
loadMovie("news.swf",this.contents.holder);
trace("GOGOGOGO");
clearInterval(myTimer);
}
myTimer=setInterval(newswait,1500);
...and I have this on the button that I want to call the function:
code:
on(press) {
//This wipes out the loaded .swf
this.contents.holder.play();
//I want a 2 second wait here, then execute the function.
newswait();
}
http://www.theautumnrun.com/diagram.jpg
What am I doing wrong? Thanks in advance!