# How do I apply a tween to an extended textfield()?

**URL:** <https://forum.kirupa.com/t/how-do-i-apply-a-tween-to-an-extended-textfield/322388>\
**Category:** flash\
**Created:** [May 19, 2011, 10:21pm UTC](https://forum.kirupa.com/t/how-do-i-apply-a-tween-to-an-extended-textfield/322388 "2011-05-19T22:21:16Z")\
**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, 10:21pm UTC](https://forum.kirupa.com/t/how-do-i-apply-a-tween-to-an-extended-textfield/322388/1 "2011-05-19T22:21:16Z")

</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?_
