Fading dynamic text boxes

In some Flash rpg’s I’ve played, when you hit the enemy, a white number (how much damage you did) will appear and then move upwards while fading out.
I’m trying to copy this, but I can’t figure out how to make a dynamic text box fade.
(I hope you understand what I mean.)