# Animate instance of a movieClip

**URL:** https://forum.kirupa.com/t/animate-instance-of-a-movieclip/320655
**Category:** Uncategorized
**Created:** [March 29, 2011, 2:41pm UTC](https://forum.kirupa.com/t/animate-instance-of-a-movieclip/320655 "2011-03-29T14:41:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tails](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tails](https://forum.kirupa.com/u/tails)
#### Post date: [March 29, 2011, 2:41pm UTC](https://forum.kirupa.com/t/animate-instance-of-a-movieclip/320655/1 "2011-03-29T14:41:02Z")

</div>

Hey,  
Im new to this forum and to AS3. I was wondering if some of you could point me in the right direction for a problem i’ve been strugling with for some time.  
I’ve been looking trought forums and tuturials but cant seem to find the right answer.

In this example i created 3 movieclips and added 10textFields into it.After this i want to be able to let these 3 movieclips tween…  
Atleast this is what i want but i cant seem to get it right.

```auto

import flash.display.MovieClip;
import fl.transitions.Tween;
import fl.transitions.easing.*;

 for (var b:Number = 0; b < 3; b++){
        var mc:MovieClip = new MovieClip();   
        mc.name = "mClip" + b;
        mc.graphics.beginFill(0xCCCCCC);  
        mc.graphics.drawRect( 10 * b, 30 * b, 50, 50 );  
        mc.graphics.endFill();  

                for (var i:Number = 0; i<10; i++)
                {
                    var tf:TextField = new TextField;
                    tf.name = "tf" + i;
                    tf.textColor = 0xA5C71B;
                    tf.x = i * 5;
                    tf.y = i* 10;
                    tf.text = "text" + i;
                    addChild(tf);
                    mc.addChildAt(tf,i);
                 }
            parent.getChildByName("mClip" + b);

 var TweenX:Tween = new Tween(mc, "x", Strong.easeOut, 200,5,5,true);
    
                stage.addChildAt(mc,b); 
    
} 

```
