Weird return to timeline bug

I’m having a strange thing happen. I am loading external swf files into the main movie. At the beginning of each swf I have the code:

dialogue1 = new Sound(EMI01);
dialogue1.loadSound(“MP3s/EMI01.mp3”, true);

And at the end I have:

dialogue1.onSoundComplete = function(){
_root.gotoAndPlay(“dialogue2”);
}
stop();

I have about 10 swfs - all with the exact same code. Now, my problem is that some of them are returning to the timeline as expected, and others are not. Any ideas? I am copying the same code for each so I don’t understand why some are working and some are not. On the main timeline I have several frame labels for each swf with this code attached:

if(this.mcContainer == Number(this.mcContainer)){
    loadMovieNum("dialogue1.swf",this.mcContainer);
} else {
    this.mcContainer.loadMovie("dialogue1.swf");
}

I am going a bit mental here trying to work this out - I really hope someone can help!