# When swf is finished play next swf

**URL:** https://forum.kirupa.com/t/when-swf-is-finished-play-next-swf/116679
**Category:** Uncategorized
**Created:** [July 20, 2004, 3:27pm UTC](https://forum.kirupa.com/t/when-swf-is-finished-play-next-swf/116679 "2004-07-20T15:27:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![moho01](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@moho01](https://forum.kirupa.com/u/moho01)
#### Post date: [July 20, 2004, 3:27pm UTC](https://forum.kirupa.com/t/when-swf-is-finished-play-next-swf/116679/1 "2004-07-20T15:27:48Z")

</div>

Hello there.

I have 4 external swfs that i want to load into 4 different empty movieclips on mainscene.  
First i want 1.swf to load and when its finished i want 2.swf to play and after it is finished 3.swf and finally 4.swf.  
This is the intro…

On release i want to do the same, but i want to reuse 2.swf and 4.swf which i use as transitions. Until know i worked/used these two functions. But they does’nt seem to work.

function loadmovieClip(playClip, playMc, nextClip, nextMc) {  
this[playMc].loadMovie(playClip);  
//this i a preloader, of course.   
preload(this[“playMc”]);  
this[nextMc].loadMovie(nextClip);  
preload(this[“nextMc”]);  
}  
function controlMc(playMc, nextMc) {  
trace(“this is “+playMc);  
trace(“this is “+nextMc);  
checker = nextMc;  
//\_root.nextMc = nextMc;  
this[playMc].gotoAndPlay(“start”);  
trace(playMc+” is playing”);  
this.onEnterFrame = function() {  
//trace(“currentframe =”+this[playMc].\_currentframe);  
//trace(“enterframe”);  
if (finishedClip == 60) {  
trace(nextMc+” is playing”);  
//this[playMc].\_visible = false;  
//this[nextMc].loadMovie(nextClip);  
//preload(nextClip);  
this[nextMc].gotoAndPlay(“start”);  
trace(“hey efter 60”+nextMc);  
checker = nextMc;  
delete this.onEnterFrame;  
}  
finishedClip = 0;  
//playMc = 0;  
//nextMc = 0;  
};  
}

So on release i want this to happen

Play/load 5.swf -\> 2.swf -\> 7.swf -\> 4.swf

But on another button this might happen…

Play/load 6.swf-\> 4.swf-\> 8.swf -\>2.swf

I need a dynamic function, in which i can play and load a lot of swfs.

I hope that somebody out there can help me…
