# Transition between swfs

**URL:** <https://forum.kirupa.com/t/transition-between-swfs/65027>\
**Category:** Uncategorized\
**Created:** [September 22, 2004, 10:41am UTC](https://forum.kirupa.com/t/transition-between-swfs/65027 "2004-09-22T10:41:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali\_tdk](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ali_tdk/32/306_2.png) [@ali\_tdk](https://forum.kirupa.com/u/ali_tdk)\
**Post date:** [September 22, 2004, 10:41am UTC](https://forum.kirupa.com/t/transition-between-swfs/65027/1 "2004-09-22T10:41:14Z")

</div>

Using the tutorial found here on kirupa on loading external swfs and transition between them…

I am trying to do the transitons between loaded external swfs… using this code on a button in the main navigation swf…

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

I have successfully made it work, but only when this code is placed on a button on the main timeline- NOT nested inside an MC, withing another MC… Why is that? How can i put this code on a button which is nested twice inside an MC clip?-- my container. MC (the empty MC which i am loading the swf into) is placed on the main timeline, the first frame.

can someone help me ammend my code, so that i am able to nest the code inside a mc inside another mc, yet still target the container MC on the main timeline root.

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:** [September 22, 2004, 2:13pm UTC](https://forum.kirupa.com/t/transition-between-swfs/65027/2 "2004-09-22T14:13:41Z")

</div>

> [@ali\_tdk](#):
>
> Using the tutorial found here on kirupa on loading external swfs and transition between them…
> 
> I am trying to do the transitons between loaded external swfs… using this code on a button in the main navigation swf…
> 
> on (release) {  
> if (\_root.currMovie == undefined) {  
> \_root.currMovie = “aboutus”;  
> container.loadMovie(“aboutus.swf”);  
> } else if (\_root.currMovie != “aboutus”) {  
> if (container.\_currentframe\>=container.midframe) {  
> \_root.currMovie = “aboutus”;  
> container.play();  
> }  
> }  
> }
> 
> I have successfully made it work, but only when this code is placed on a button on the main timeline- NOT nested inside an MC, withing another MC… Why is that? How can i put this code on a button which is nested twice inside an MC clip?-- my container. MC (the empty MC which i am loading the swf into) is placed on the main timeline, the first frame.
> 
> can someone help me ammend my code, so that i am able to nest the code inside a mc inside another mc, yet still target the container MC on the main timeline root.
> 
> thanks

I had the same problem when i did that tutorial. It seems like that script only works when placed on a button, but it wont work when placed on a Mc.

---

<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:** [September 22, 2004, 3:53pm UTC](https://forum.kirupa.com/t/transition-between-swfs/65027/3 "2004-09-22T15:53:12Z")

</div>

use \_root on the container so do something like \_root.container. Add the \_root on all the container AS
