AttachMovie Not Working With Tween Class

Hi,

I’m trying to load different images into a container movie clip when buttons are pressed using the code below. The images are in the library and do not need to be preloaded. I would like the sequence to work as follows:

  1. Press button
  2. Fade out container
  3. Attach appropriate image
  4. Fade in container

It seems like the container is fading in and out, but the image is not attaching through the code in the onMotionFinished block.

Any help would be appreciated. Thanks!

///////////////////////////////////////////////

one.onRelease = function()
{
// fade out container
tween_handler = new Tween(container1, “_alpha”, Regular.easeOut, container1._alpha, 0, 1, true);
tween_handler.onMotionFinished = function() {
// unload container
unloadMovie(container1);
// attach appropriate movie clip
container1.attachMovie(“image1”, “image1”, this.getNextHighestDepth());
// fade in container
new Tween(container1, “_alpha”, Regular.easeOut, container1._alpha, 100, 1, true);
}
}

two.onRelease = function()
{
// fade out container
tween_handler = new Tween(container1, “_alpha”, Regular.easeOut, container1._alpha, 0, 1, true);
tween_handler.onMotionFinished = function() {
// unload container
unloadMovie(container1);
// attach appropriate movie clip
container1.attachMovie(“image2”, “image2”, this.getNextHighestDepth());
// fade in container
new Tween(container1, “_alpha”, Regular.easeOut, container1._alpha, 100, 1, true);
}
}