# 2 more more Tweener tweens at once

**URL:** <https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604>\
**Category:** flash\
**Created:** [June 7, 2008, 4:19pm UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604 "2008-06-07T16:19:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daidai](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daidai/32/3087_2.png) [@daidai](https://forum.kirupa.com/u/daidai)\
**Post date:** [June 7, 2008, 4:19pm UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604/1 "2008-06-07T16:19:45Z")

</div>

I have completley forgotten how to tween two at once, its something like

```
 ActionScript Code:
 [LEFT]Tweener.[COLOR=#000080]addTween[/COLOR] [COLOR=#000000][[/COLOR][COLOR=#000000]([/COLOR]sprite1, [COLOR=#000000]{[/COLOR] [COLOR=#0000ff]time[/COLOR]:[COLOR=#000080]1[/COLOR], y:[COLOR=#000080]20[/COLOR], transition:[COLOR=#ff0000]"easeInOutExpo"[/COLOR] [COLOR=#000000]}[/COLOR] [COLOR=#000000])[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000000][[/COLOR][COLOR=#000000]([/COLOR]sprite2, [COLOR=#000000]{[/COLOR] [COLOR=#0000ff]time[/COLOR]:[COLOR=#000080]1[/COLOR], y: -[COLOR=#000080]20[/COLOR], transition:[COLOR=#ff0000]"easeInOutExpo"[/COLOR] [COLOR=#000000]}[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]][/COLOR];

```

[/LEFT]

but its not that, i can remember that there’s []'s in there, but I just cant remember where  
thanks

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 7, 2008, 7:15pm UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604/2 "2008-06-07T19:15:47Z")

</div>

Why don’t you just stick them on two lines?

---

<div class="post-metadata">

**Author:** ![daidai](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daidai/32/3087_2.png) [@daidai](https://forum.kirupa.com/u/daidai)\
**Post date:** [June 7, 2008, 9:07pm UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604/3 "2008-06-07T21:07:55Z")

</div>

i need them to fire at the same time

---

<div class="post-metadata">

**Author:** ![snickelfritz](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@snickelfritz](https://forum.kirupa.com/u/snickelfritz)\
**Post date:** [June 7, 2008, 9:58pm UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604/4 "2008-06-07T21:58:42Z")

</div>

TweenMax has the “onStart” and “onComplete” params.  
You can use onStart to target a function that contains your second tween.

---

<div class="post-metadata">

**Author:** ![brookisme](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@brookisme](https://forum.kirupa.com/u/brookisme)\
**Post date:** [June 7, 2008, 10:22pm UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604/5 "2008-06-07T22:22:43Z")

</div>

the code you are writing looks similar to tweenlite (rather than the built-in tween package)

[http://blog.greensock.com/tweenliteas3/](http://blog.greensock.com/tweenliteas3/)

i´ve just started using it and it makes me happy, i´d recommend downloading it and using it. if you do want to use the built in package the closest i can think to have a simultaneous firing is:

import fl.transitions.Tween  
import fl.transitions.easing.Regular  
var a:Array = new Array(new Tween(your\_mc,“x”,Regular.easeIn,boxmc.x,300,1,true),  
new Tween(boxmc,“y”,Regular.easeIn,your\_mc.y, 300,1,true))

as a side note: i´ve found putting tweens in an array like this seems to fix some of the problems i´ve run into when i do the more standard thing:

var twn1:Tween = new Tween(…)  
var twn2:Tween = new Tween(…)

sometimes when removing tweens, adding listeners, etc… this will run into problems. i think it has something to do with the garbage collector… anyway putting tweens in arrays gets rid of such problems

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 8, 2008, 12:17am UTC](https://forum.kirupa.com/t/2-more-more-tweener-tweens-at-once/262604/6 "2008-06-08T00:17:34Z")

</div>

> [@daidai;2338674](#):
>
> i need them to fire at the same time

If you just do something like:

```auto

Tweener.addTween(myObject, {myParams});
Tweener.addTween(myObject2, {myParams});
Tweener.addTween(myObject3, {myParams});

```

They’ll all fire at the same time. I think you’re either misunderstanding how it works or you’re not articulating why they need to be in the same declaration.
