# Need some help with transitions

**URL:** <https://forum.kirupa.com/t/need-some-help-with-transitions/115353>\
**Category:** Uncategorized\
**Created:** [July 7, 2004, 10:05pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353 "2004-07-07T22:05:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashPlaya](https://avatars.discourse-cdn.com/v4/letter/f/e274bd/32.png) [@FlashPlaya](https://forum.kirupa.com/u/FlashPlaya)\
**Post date:** [July 7, 2004, 10:05pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/1 "2004-07-07T22:05:06Z")

</div>

Hello I am trying to build a transition just like [this](http://www.barbarajacobsdesign.com/) I kinda got working but I need some pros to help me out I had it working with these actions: I load the first swf:

1. container1.loadMovie(“section1.swf”);

Then my button actions should be:

on (release) {  
container1.loadMovie(“section1.swf”);  
container1.swapDepths(1);  
}

on (release) {  
container2.loadMovie(“section2.swf”);  
container2.swapDepths(1);  
}

on (release) {  
container3.loadMovie(“section3.swf”);  
container3.swapDepths(1);  
}

and so on…

The strange things happen because when I set a mc to a new Depth, the previous mc goes back to its original stacking order which may be under another mc, so it works only in one direction

so now I am trying this:  
which=1

on (release) {  
this[“container”+which].loadMovie(“section1.swf”);  
this[“container”+which].swapDepths(1);  
if (which == 1) {  
which = 2;  
} else {  
which = 1;  
}  
}  
I hope this make sense. Here is my new file sorry about the sloppy file:)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 10:06pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/2 "2004-07-07T22:06:25Z")

</div>

Do you just want to replace the previous swf with the new one?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 10:10pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/3 "2004-07-07T22:10:04Z")

</div>

Yeah but I want to have it mask over the last clip. So it loads over the prev clip.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 10:17pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/4 "2004-07-07T22:17:25Z")

</div>

untested, but I would imagine you could declare a variable “i” as 1, and then use this on your buttons:

on (release) {  
i++  
container1.loadMovie(“section1.swf”);  
container1.swapDepths(i);  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 10:21pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/5 "2004-07-07T22:21:27Z")

</div>

Thanks Adam14,

I am moron, how do you set the var i as 1, and where do I put it? lol

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 10:23pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/6 "2004-07-07T22:23:00Z")

</div>

in your first frame put this:

i=1

that decalres the variable “i” as “1”

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 10:34pm UTC](https://forum.kirupa.com/t/need-some-help-with-transitions/115353/7 "2004-07-07T22:34:37Z")

</div>

Ok I tried that and it so close:) But when you go out of order some happens wiith stack?

Take a look
