how would I use something like setInterval to load that movie a second after on(release)
I have four buttons like this. How best to unloadMovie when a different button is pressed?
eg. a button called “style” loads one movie, a button called “travel” loads a different movie into the same location. If “style” has loaded and I want to go to “travel,” would I put unloadMovie as the first line on the “travel” button? Or no?=)
*Originally posted by Guig0 *
**re:#1 - its very complicated, and i´m in a hurry (off to home now). do a search here @ kirupa on setinterval, senocular already had made this here… **
Woah…complicated? Well basicaly The setInterval function is used to create an event that repeats continuously until the Flash movie is closed or the clearInterval function is passed.
Anywho, i didn’t see senocular’s post, but here you go:
Simply, just insert your loading process into a function, and then on load, (which i’ll be working on it now) clear that interval! after the function, set an interval to that function for something like, 5000 millisecond. I’ll try making a code for that one now!
*Originally posted by jcs * function pause(){
_root.loadMovie(“style.swf”, “container”);
clearInterval(delay);
}
delay = setInterval(pause, 6000);
ehh emm, no! Your clearing the interval this way, and therefore, your file will never get loaded, the example in my above post shows the working way, as i said, when your file get loaded, then the interval will be cleared!
HA! It’s gota be amusing for those of you in the know watching newbies like myself stumble through some tidbits of code! :beam:
works like a charm, except:
a couple seconds after the function is called and the movie loaded, the movie on main movie reloads behind the emptyMovieClip. Only does it once, that I can tell.
Thoughts?
*Originally posted by jcs *
**a couple seconds after the function is called and the movie loaded, the movie on main movie reloads behind the emptyMovieClip. Only does it once, that I can tell.
Thoughts? **
Did you add a stop action in the last frame of your main movie?