# Accessing Tweened object through TweenEvent

**URL:** https://forum.kirupa.com/t/accessing-tweened-object-through-tweenevent/324552
**Category:** flash
**Created:** [August 26, 2011, 2:07pm UTC](https://forum.kirupa.com/t/accessing-tweened-object-through-tweenevent/324552 "2011-08-26T14:07:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![simranzenov](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@simranzenov](https://forum.kirupa.com/u/simranzenov)
#### Post date: [August 26, 2011, 2:07pm UTC](https://forum.kirupa.com/t/accessing-tweened-object-through-tweenevent/324552/1 "2011-08-26T14:07:41Z")

</div>

How would I go about accessing the object I am moving with a tween through TweenEvent? or is this even possible? I think e.currentTarget will give me the tween object instead of the movieclip it is controlling, but I’m not sure.

Example:

```auto

var tweens:Array = new Array();
var aryObjects:Array = {mc1,mc2,mc3,mc4};
function someFunction():void
{
    for(var i:int = 0; i < aryObjects.length; i++)
    {
        var tween:Tween;
        tweens.push(tween);
    }
}
function executeTweenFunction():void
{
    for(var i:int = 0; i < aryObjects.length; i++)
    {
        tweens* = new Tween( aryObjects*, blah blah blah);
        tweens*.addEventListener(TweenEvent.MOTION_FINISH, tweenFinished);
    }
}
function tweenFinished(e:TweenEvent):void
{
     //is it possible to access current mc the tween is moving through TweenEvent here?
}

```

If not possible, how would I pass the current object in the loop to the function?

I had one idea of creating a function within the addEventListener line and passing both the event and current object, but it is not working for some reason.

```auto

tweens*.addEventListener(TweenEvent.MOTION_FINISH, function done(e:TweenEvent){tweenFinished(e,aryObjects*);});

```

Any help or ideas are much appreciated. 🙂

Edit: I know that Tweener or TweenLite would work well but I want to do this without using them.
