Skip to main content
Participating Frequently
May 3, 2006
Question

Help with changing properties of textbox

  • May 3, 2006
  • 3 replies
  • 255 views
I created a textfield on the stage with the following properties specified in the property inspector:

type: Dynamic Text
instance name: events_txt
line type: multiline
font: _sans
character position: normal
font-size: 24
text color: black
align: left
selectable button, render text as html button, and show border button are all active

When I write the following code, it does not work:
events_text._alpha = 85;

Also, the only way I could get the following line to work was when I clicked the show border button (was not originally selected).
events_txt.setStyle("backgroundColor", 0xCCCCCC); // this only works when clicking border button in property inspector

This code is in frame 1 of scene 1 in my move. I am using a component in my movie as well, and this textbox is supposed to be on top of the movie, with the background of the textbox slightly transparent. I am fairly new to flash and actionscript, and I am supposed to be modifying an existing document. Most things have been easy enough to do, but for some reason I can't get this to work.

Can anyone tell me something what I am doing wrong?


This topic has been closed for replies.

3 replies

Participating Frequently
May 3, 2006
In the property box there will be a button on the far right labeled "Embed". Use this button to select the characters of the font you have selected from the Font pulldown menu, to embed in the TextField.

It has something to do with turning the Text into a graphic by using the embedded fonts or something like that. Just know that when you use dyanmic or input textfields and want to do animations/tweens with those fields or put them under a Mask then you will need to have the font embedded into the program.

There are other methods to embed fonts. Do a quick search in the help files for "embedding fonts".

Tim
woodtahAuthor
Participating Frequently
May 3, 2006
Thanks for the info.

For anyone else reading this, I found the following link to be helpful:

http://www.flash-mx.com/news/archives/000136.cfm
woodtahAuthor
Participating Frequently
May 3, 2006
Can you give me a quick sample of how I do that?

Sorry if this is a dumb question, but why do I have to embed the font in order to get the textbox to be semi-transparent?
Participating Frequently
May 3, 2006
You will have to embed the font.

Tim