# Tween class - multiple instances

**URL:** <https://forum.kirupa.com/t/tween-class-multiple-instances/211667>\
**Category:** flash\
**Created:** [January 4, 2007, 1:18am UTC](https://forum.kirupa.com/t/tween-class-multiple-instances/211667 "2007-01-04T01:18:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![walflash](https://avatars.discourse-cdn.com/v4/letter/w/5daacb/32.png) [@walflash](https://forum.kirupa.com/u/walflash)\
**Post date:** [January 4, 2007, 1:18am UTC](https://forum.kirupa.com/t/tween-class-multiple-instances/211667/1 "2007-01-04T01:18:46Z")

</div>

Hey everyone,

I’ve built a simple tween class animation which drops a card (on a slight angle which is randomized) onto the screen.

my code:

import mx.transitions.Tween;  
import mx.transitions.easing.\*;

var random\_num:Number = Math.round(Math.random()\*80) + (-40);  
//trace(random\_num);

var xScaleT:Tween = new Tween(badge\_mc, “\_x”, Strong.easeOut, 100, 150, .7, true);  
var xScaleT:Tween = new Tween(badge\_mc, “\_y”, Strong.easeOut, 100, 60, .7, true);  
var xScaleT:Tween = new Tween(badge\_mc, “\_height”, Strong.easeOut, 2000, 123, .7, true);  
var xScaleT:Tween = new Tween(badge\_mc, “\_width”, Strong.easeOut, 2000, 133.6, .7, true);  
var xScaleT:Tween = new Tween(badge\_mc, “\_rotation”, Strong.easeOut, 0, random\_num, 1.2, true);

Right now one single card is animated in, then disappears and another animates in.

I wish to have each card remain on the screen. have one animate in and remain on screen, then another animate down on top of the first and remain, etc until I have perhaps 15 cards on screen at once.

I think the listener object is my route, but I don’t understand the syntax… I’ve tried a ton of different code attempts with no success.

you can see my source here: [block\_tweenClass\_test.fla](http://www.walfredo.com/flash/block_tweenClass_test.fla)

any help would be greatly appreciated. Cheers.
