Transitions between external swfs with two containers

[COLOR=black][FONT=Arial]Like so many before me, I’ve done the Transitions [/FONT][/COLOR][COLOR=black][FONT=Arial]Between External SWFs by Voetsjoeba, and it worked great in Flash 8. [/FONT][/COLOR]

[FONT=Arial]But what I’d like to do is not have Section1 leave the stage and have Section2 load behind it. In his sample, it’d be like having the orange #1 do its transition, but instead of entirely leaving the stage as the transition, maybe move it to the upper corner, as the orange #2 comes in to land on its midframe point. [/FONT]

[FONT=Arial]I can get partway there. My Section1 loads. My button which is on the main stage is clicked, and Section1 does its transition to the corner. Perfect. But now when Section2 comes in, it replaces Section 1.[/FONT]

[FONT=Arial]My assumption is that two containers are needed on the main stage. Section1 loads in conatiner, and Section2 loads into one with a different Instance Name, like container2. [/FONT]

[FONT=Arial]However I have tried having two containers on the main stage, in different layers or on the same layer, and it doesn’t seem to work.[/FONT]

[FONT=Arial]My button on the main stage has this code. It ends up replacing the contents of container with Section2, instead of loading it underneath.
[/FONT]
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = “section2”;
container.loadMovie(“section2.swf”);
} else if (_root.currMovie != “section2”) {
if (container._currentframe>= container.midframe) {
_root.currMovie = “section2”;
container.play();
}
}
}

My section2 has this code on the last frame:

_root.container.loadMovie(_root.currMovie+".swf")

Where in these two areas would I tell it to load section2 into container2?

Thanks for any info!

Well, I got a bit further. I put the button inside the first swf (Section1) instead of on the main stage. Now I can get the second swf (Section2) to load in container2 on the main stage behind Section1, so both remain on the stage. But, the only thing is, now Section1 doesn’t play its outro animation from the midframe.

on (release) {
if (_this.currMovie == undefined) {
_this.currMovie = “section2”;
_root.container2.loadMovie(“section2.swf”);
} else if (_this.currMovie != “section2”) {
if (_root.container._currentframe >= _root.container.midframe) {
_this.currMovie = “section2”;
_root.container2.play();
}
}
}

Ah, I got it figured out. I got it to the point where it’d load Section 2 into container 2, and play Section1’s outro from the midframe, but it’d then relaod Section1 from the start of that swf right after. In order for it to work, it has to be divided up so that the code has two on(release). If I combine them into one, it doesn’t work. The code on the button is:

on (release) {
if (_this.currMovie == undefined) {
_this.currMovie = “section2”;
_root.container2.loadMovie(“section2.swf”);
} else if (_this.currMovie != “section2”) {
}
}
on (release) {
if (_root.container._currentframe >= _root.container.midframe) {
_root.currMovie = “section2”;
_root.container.play();
}
}

So then in order to stop Section 1 from reloading from the start each time in Container, I had to take out the action script that exists on Section1’s final frame. The kirupa tutorial says to put:

_root.container2.loadMovie(_root.currMovie+".swf");

But I don’t see that it does anything. I changed it to a stop(); and now when the button is clicked, Section2 loads in Container2, and Section1’s outro is played and stops at the end where it should.

So problem solved for now, although perhaps there are better ways!