NSTTWEF !!
Wednesday, January 30th, 2008Also known as a Non Selectable Transparent Textfield With Embedded Font :).
Some of the V2 Flash Components are less than intuitive now and then. While working on the new trophy tour for Heineken we had to create an application with a transparent textarea with non selectable non editable text using a non standard (embedded) font with Spanish characters (amongst others) ( in Flash 8 ). Oh yeah and the text had to be rendered smoothy using advanced anti-aliasing.
This leaves you with different options. Although I was tempted to simply use a standard textfield, this should be easy to implement using a TextArea component as well, right? Sure. As an easy reference for our own and your convenience, here is a step by step approach.
Creating the test movie
- create a new flash movie, size it 300 x 300, and choose a background other than white
- drag a TextArea on stage, name it ‘ta_test’ and enter some text for the text parameter in the parameter section
- compile the movie, you’ll see a textarea with a border, a white background, whose text is editable and selectable
ActionScript 2, timeline scripting or parameter settings?
You’ll have to decide if you want to approach this using the parameter settings, timeline code or actionscript 2 code. In some cases you can choose, and in some I found timeline code was the easy/only option. This can probably be fixed by waiting a few frames after instantiating the TextArea, but this sounds like a nice exercise for some other time. Let’s keep it simple for now and use whatever works for demonstration purposes.
