# How to add a tween to a textfield, in a movieclip, on the stage

**URL:** <https://forum.kirupa.com/t/how-to-add-a-tween-to-a-textfield-in-a-movieclip-on-the-stage/322386>\
**Category:** Uncategorized\
**Created:** [May 19, 2011, 9:48pm UTC](https://forum.kirupa.com/t/how-to-add-a-tween-to-a-textfield-in-a-movieclip-on-the-stage/322386 "2011-05-19T21:48:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![serain](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@serain](https://forum.kirupa.com/u/serain)\
**Post date:** [May 19, 2011, 9:48pm UTC](https://forum.kirupa.com/t/how-to-add-a-tween-to-a-textfield-in-a-movieclip-on-the-stage/322386/1 "2011-05-19T21:48:50Z")

</div>

hi,

im struggling a bit with syntax here – i’m trying to add a method to my multiplayer flash games then when an arrow hits an enemy, it will display the dmg, while scrolling up and dropping off alpha.

I seem to be having some linkage problems this is what i have:

=========================================  
var dmgwin:dmgtxt = new dmgtxt() //movieclip that will contain textfield  
var dmgwinsub:TextField = new TextField(); //textfield that has dmg #  
var tween:Tween = new Tween(dmgwinsub, “alpha”, None.easeOut, 1, 0, 2, true); //an alpha fade tween that i know works

[//dmgwinsub.addChild](https://dmgwinsub.addChild)(tween) //(this wont work)

dmgwinsub.text = “30”  
dmgwin.addChild(dmgwinsub)

dmgwin.x = 600  
dmgwin.y = 300  
stage.addChild(dmgwin)

==========================================

if i put that tween directly in the AS class [dmgwin] and put a vector oval graphic in the drawing screen, the oval will fade and the ‘30’ will not. I understand this is because im fading the movieclip and the textfield simply follows the dissipating clip – but the important question is, how do _how do I extend the tween onto my textfield, thats in a movieclip, thats on a stage?_

also, it should be noted, while i was trynig different things trying to get it to work I saw an error I recognized, it said my textfield was static (and i know that it needs to be made dynamic) however, i dont know how to dynamically make a static textfield dynamic.
