PDA

View Full Version : Interval between unloading one and loading another external mc


jkjalan
08-06-2004, 06:18 PM
Hello amazin actionscripterzzzz... I must confess I'm better at designing cars than simple programing.

I'm trying to set an interval between 2 function on the same button : first it unloads the movie and then pauses for 5 seconds and then loads in the next one. Ofcourse if you could explain it I'd like to Alpha fade the movie before unloading it and calling in another swf it's be even better

this is what I've done:

on (release) {
//unload Movie Behavior
if(this.sym == Number(this.sym)){
unloadMovieNum(this.sym);
} else {
this.sym.unloadMovie();
}
//End Behavior
{setInterval( loadMovieNum, "scene3.swf", 5000);
}
//load Movie Behavior
if(this.sym == Number(this.sym)){
loadMovieNum("scene3.swf",this.sym);
} else {
this.sym.loadMovie("scene3.swf");
}
//End Behavior
}

Ofcourse the above action was to unload, pause and then load a movie. But somehow if I could alpha fade the movie(secen2), unload it(scene2) and then bring in the next movie(scene3) it'd be FANTASTIC.

thanks a lot. I love this place....
J 8)

doo
01-31-2005, 03:15 PM
Excuse me for entering the thread without having a solution but I wonder if you solved it. I have a similar problem right now.

cancerinform
01-31-2005, 06:41 PM
I don't know exactly what you are trying to accomplish but this would be what you are looking for:

on (release) {
//unload Movie Behavior
if (_root.sym == Number(_root.sym)) {
unloadMovieNum(_root.sym);
} else {
_root.sym.unloadMovie();
}
//End Behavior
myInterval = setInterval(lMovie, 5000);
function lMovie() {
if (_root.sym == Number(_root.sym)) {
loadMovieNum("scene3.swf", this.sym);
clearInterval(myInterval);
} else {
_root.sym.loadMovie("scene3.swf");
clearInterval(myInterval);
}
}
//End Behavior
}