# Gtween Complete Event not working?

**URL:** <https://forum.kirupa.com/t/gtween-complete-event-not-working/318036>\
**Category:** flash\
**Created:** [January 8, 2011, 8:47pm UTC](https://forum.kirupa.com/t/gtween-complete-event-not-working/318036 "2011-01-08T20:47:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cephyz](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@cephyz](https://forum.kirupa.com/u/cephyz)\
**Post date:** [January 8, 2011, 8:47pm UTC](https://forum.kirupa.com/t/gtween-complete-event-not-working/318036/1 "2011-01-08T20:47:09Z")

</div>

Hey guys, I’ve been trying to run a function after a tween has been completed using gtween. Somehow it doesn’t call the function, any idea why?

```auto

import com.gskinner.motion.*;
import flash.events.Event;
import fl.motion.easing.*;

var myTween= new GTween(my_mc, 2, {x:50, alpha:0}, {ease:Sine.easeInOut});

myTween.addEventListener(Event.COMPLETE, tweenCompleted);

function tweenCompleted(e:Event):void{
    trace("Tween Completed.");
}

```

i can’t figure out the problem at all, can anyone see if there’s something wrong?
