hi to all,

How to make a transparent background for flash textarea component?

Dani AI

Generated

asked how to make a Flash TextArea transparent; suggested searching. Below are concise, reliable options that work across common Flash workflows (design-time skin edit or runtime property change).

Design-time (recommended when using the built-in component)

  • Open the TextArea symbol/skin in the Library and remove or hide the background artwork. Prefer setting the background graphic's alpha to 0 rather than deleting it so the component keeps its mouse hit area and focus behavior.

Runtime (ActionScript)

  • A plain TextField can be made transparent by turning its background off:
import flash.text.TextField;
import flash.text.TextFieldType;

var tf:TextField = new TextField();
tf.type = TextFieldType.INPUT;
tf.background = false;
tf.border = false;
tf.width = 300;
tf.height = 120;
addChild(tf);
  • For the TextArea component, access the internal TextField and disable its background (this preserves component chrome and scrolling):
import fl.controls.TextArea;

myTextArea.textField.background = false;
myTextArea.textField.border = false;

Notes and gotchas

  • If the surrounding SWF must show the HTML page beneath it, the HTML embed needs wmode="transparent" (the TextArea background only makes the field itself see-through to the SWF background).
  • Avoid removing any invisible hit/shim shapes used by the component; set alpha to 0 instead so focus, mouse events and scrolling continue to work.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.