# How to unload an external movieClip with a tweenOut effect

**URL:** <https://forum.kirupa.com/t/how-to-unload-an-external-movieclip-with-a-tweenout-effect/310248>\
**Category:** flash\
**Created:** [June 5, 2010, 4:59pm UTC](https://forum.kirupa.com/t/how-to-unload-an-external-movieclip-with-a-tweenout-effect/310248 "2010-06-05T16:59:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony\_z](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@anthony\_z](https://forum.kirupa.com/u/anthony_z)\
**Post date:** [June 5, 2010, 4:59pm UTC](https://forum.kirupa.com/t/how-to-unload-an-external-movieclip-with-a-tweenout-effect/310248/1 "2010-06-05T16:59:31Z")

</div>

Basic TweenLite question. How to unload an external movie clip from a loader with a tweenOut effect, with using only AS2, no timeline.

here’s my simplified scenario:

I have 3 movieclips. “main\_mc”; “blue\_mc”; “green\_mc”.

- main\_mc has 2 buttons and a loader.  
Clicking the first button (“blue\_btn”) loads “blue\_mc” into the loader.  
Clicking the second button (“green\_btn”) loads “green\_mc” into the loader.

- “blue\_mc” and “green\_mc” have 1 circle symbol each, tweening into the stage.

So when I click “blue\_btn” a blue circle tweens in. When I click “green\_btn” after, I want the blue circle tween out, not just suddenly disappear and then to load “green\_mc” with a tweenIn effect.

Basically, I want “blue\_mc” and “green\_mc” to trigger a tweenOut effect when they get unloaded.

I am looking for the simplest solution. If that involves timeline, that’s fine as well.  
I attached a sample file for better understanding. If you can update the files, that would be great. Thanks!

```auto

// main_mc script

blue_btn.onPress=function(){
    trace("blueClick")
    loader.loadMovie("blue_mc.swf");
}

green_btn.onPress=function(){
    trace("greenClick")
    loader.loadMovie("green_mc.swf");
}

// blue_mc script

import com.greensock.*;
import com.greensock.easing.*;

TweenLite.from(blue_mc, 1.3, {_y:-800, _alpha:0, ease:Elastic.easeInOut});

// green_mc script
 
 import com.greensock.*;
 import com.greensock.easing.*;
 
 TweenLite.from(green_mc, 1.3, {_y:-800, _alpha:0, ease:Elastic.easeInOut});
 

```
