# removeMovieClip() with TweenMax onComplete

**URL:** <https://forum.kirupa.com/t/removemovieclip-with-tweenmax-oncomplete/326764>\
**Category:** flash\
**Created:** [January 10, 2012, 9:36pm UTC](https://forum.kirupa.com/t/removemovieclip-with-tweenmax-oncomplete/326764 "2012-01-10T21:36:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [January 10, 2012, 9:36pm UTC](https://forum.kirupa.com/t/removemovieclip-with-tweenmax-oncomplete/326764/1 "2012-01-10T21:36:08Z")

</div>

Hi - this should be an easy one …  
I have an onEnterFrame function, and when the clip goes passed a certain x value, it tweens alpha to 0, and then on complete, it removes its listener and is removed from the stage … here’s the loop :::

```auto
function loop(e:Event):void
{
        function bye(me:MovieClip):void	{
		me.removeEventListener(Event.ENTER_FRAME,onEnter);
		removeChild(me);
	}
	if(e.target.x > fibset.x)
	{
		var me:MovieClip = e.target;
		var tw:TweenMax = new TweenMax(e.target, 1, {alpha:0.1,onComplete:bye(me)})
	}
}

```

e.target wont be passed through on the onComplete function … hmm am i on the right lines?!
