PDA

View Full Version : problems with text field


DuRanG
04-13-2003, 05:27 AM
createEmptyMovieClip("mcconteudo", 1)
mcconteudo.createTextField("conteudo", 1, 0, 14, 9999, 20)
mcconteudo.conteudo.font = "Verdana"
mcconteudo.conteudo.embedFonts = true
mcconteudo.conteudo.text = "Teste testando, teste testando, teste teste, testando!";


look at this code. as you can see in line 4, i used embedFonts, but it just doesn´t work. (when its true, the textfield disapears)

anyone?

CyanBlue
04-13-2003, 07:09 AM
Howdy...

Try this code...// You will need to have a font symbold in the
// library with the linkage identifier set to
// 'Verdana' to get this code working...
contentFormat = new TextFormat();
contentFormat.align = "center";
contentFormat.color = 0xff0000;
contentFormat.bullet = false;
contentFormat.font = "Verdana";
contentFormat.size = 14;
contentFormat.underline = true;

this.createEmptyMovieClip("contentMC", 10);
contentMC.createTextField("contentTF", 20, 50, 50, 250, 25);
contentMC.contentTF.border = true;
contentMC.contentTF.embedFonts = true;
contentMC.contentTF.text = "Welcome to ActionScript.org!!!";
contentMC.contentTF.setTextFormat(contentFormat);I n your code, you have one invalid line of code which is line 3... 'Font' can be specified in the TextFormat object, not the text field itself...

As it is stated in the manual, 'embedFonts' controls whether to use embedded font to render the text or not... Know the difference now??? ;)

DuRanG
04-13-2003, 04:07 PM
thanks ;)