# Transitions between movieclips in a container

**URL:** <https://forum.kirupa.com/t/transitions-between-movieclips-in-a-container/166907>\
**Category:** Uncategorized\
**Created:** [October 23, 2005, 11:38pm UTC](https://forum.kirupa.com/t/transitions-between-movieclips-in-a-container/166907 "2005-10-23T23:38:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedeno](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@cedeno](https://forum.kirupa.com/u/cedeno)\
**Post date:** [October 23, 2005, 11:38pm UTC](https://forum.kirupa.com/t/transitions-between-movieclips-in-a-container/166907/1 "2005-10-23T23:38:57Z")

</div>

My buttons are inside movieclips. Each button attaches another movieclip from the library into a container. Everytime I try the swf by pressing any button, it attaches perfectly to the container. The problem is that once a movieclip is attached, if I press another button, the new movieclip does not substitute the previous one.

Furthermore, I am also trying to have a nice transition between movieclips as per this tutorial:

[http://www.kirupa.com/developer/mx2004/transitions.htm](http://www.kirupa.com/developer/mx2004/transitions.htm)

The only difference is that this tutorial is for external swf and in my example, all the movieclips are already in the library.

Please help me. Here is the actions I have for the on release state:

on (release) {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “contact”;  
\_root.container.attachMovie(“contact”, “contact”, 1);  
} else if (\_root.currMovie != “contact”)  
{  
if (\_root.container.\_currentframe \>=  
\_root.container.midframe) {  
\_root.currMovie = “contact”;  
\_root.container.play();

}  
}  
}
