# Fading out text INSIDE a text area

**URL:** <https://forum.kirupa.com/t/fading-out-text-inside-a-text-area/65303>\
**Category:** Uncategorized\
**Created:** [September 24, 2004, 8:11pm UTC](https://forum.kirupa.com/t/fading-out-text-inside-a-text-area/65303 "2004-09-24T20:11:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrettRT](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@BrettRT](https://forum.kirupa.com/u/BrettRT)\
**Post date:** [September 24, 2004, 8:11pm UTC](https://forum.kirupa.com/t/fading-out-text-inside-a-text-area/65303/1 "2004-09-24T20:11:42Z")

</div>

I have text showing up in a text area, I know I can make the background transparent, but how do I make the actual text showing up an \_alpha of oh say 30 or 40…

I’ve tried…(inside the onClipLoad event of the text area)

this.text.\_alpha = 30;  
this.setStyle(“alpha”, “30”);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 24, 2004, 8:38pm UTC](https://forum.kirupa.com/t/fading-out-text-inside-a-text-area/65303/2 "2004-09-24T20:38:07Z")

</div>

Going through the actionscript dictionary and reading up on the class or object can give alot of great examples for the basic stuff. 🙂

## As per the great resource : [http://livedocs.macromedia.com/flash/mx2004/index.html](http://livedocs.macromedia.com/flash/mx2004/index.html)

TextField.\_alpha  
Availability

Flash Player 6.  
Usage

my\_txt.\_alpha:Number

Description

Property; sets or retrieves the alpha transparency value of the text field specified by my\_txt. Valid values are 0 (fully transparent) to 100 (fully opaque). The default value is 100. Transparency values are not supported for text files that use device fonts. You must use embedded fonts to use the \_alpha transparency property with a text field.  
Example

The following code sets the \_alpha property of a text field named my\_txt to 20%. Create a new font symbol in the library by selecting New Font from the Library options menu. Then set the linkage of the font to my font.Add the following ActionScript to your FLA or AS file:

var my\_fmt:TextFormat = new TextFormat();  
my\_fmt.font = “my font”;  
// where ‘my font’ is the linkage name of a font in the Library  
this.createTextField(“my\_txt”, this.getNextHighestDepth(), 10, 10, 100, 22);  
my\_txt.border = true;  
my\_txt.embedFonts = true;  
my\_txt.text = “Hello World”;  
my\_txt.setTextFormat(my\_fmt);  
my\_txt.\_alpha = 20;

See also

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 1:46pm UTC](https://forum.kirupa.com/t/fading-out-text-inside-a-text-area/65303/3 "2004-09-27T13:46:18Z")

</div>

It’s not quite that simple I’m afraid, I’m working with the text of a textarea, not a textfield.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 2:39pm UTC](https://forum.kirupa.com/t/fading-out-text-inside-a-text-area/65303/4 "2004-09-27T14:39:46Z")

</div>

Update:

I simply created a new layer on top of the text I was trying to fade, created a rectangle with the same bg as my movie, and played with the alpha of that.
