Component HEADLAB-NEWSFLASH v1.0

I`m using the component HEADLAB-NEWSFLASH v1.0 on a cd-rom project.
It loads a external txt file.
The problem is that the text is in portuguese and some words has acentuations.
In some computers the text loads with incorrect acentuation.
Is there a special way to write the text? What should I do?

:slight_smile:

embed a font with accents to use on that textfield

The text field in this component is created dynamically.
How do I add the accented letters to the code?
Here is where the text properties are generated:

with (this.myText) {
	embedFonts = true;
	selectable = select;
	multiline = linebreak;
	wordWrap = linebreak;
	border = false;
	setTextFormat(this.myStyle);
}

Does someone know how to solve this problem?
How do I embed the accented letters?
Is there a special way to write this words in the txt file?

Thankx
:slight_smile:

I’m not too sure whether this will work, as I haven’t worked with dynamically generated textfields much. I do know, though, that this line:

[AS]setTextFormat(this.myStyle);[/AS]

is what sets the font and everything. Is there an object called myStyle in that script? Because if there is, then you’ll have to add this line to it:

[AS]myStyle.font = “string value with name of portuguese font”[/AS]

The name of the font must match the name of a font symbol in the linkage identifier, or the name of a font already exported with a tool in the authoring tool(via Embed option)

Here is the code that generate the textfield:

this.createTextField("myText", 1, centerXpos, centerYpos, dynWidth, dynHeight);
this.myStyle = new TextFormat();
with (this.myStyle) {
	font = "myFont"; // here is the line.
	size = fontsize;
	color = fontcolor;
	align = textpos;
}
with (this.myText) {
	embedFonts = true;
	selectable = select;
	multiline = linebreak;
	wordWrap = linebreak;
	border = false;
	setTextFormat(this.myStyle);
}

It already has the line to embed the font and I had choosen the right one.
Im using miniml fonts and in this textfield Im using kroeger 06_65.
I think the real problem is when the txt file is read in another operacional system. Like when special characters change the letters to “%*&^”, or something crazy like that! But I embeded the font and will try it out in other computers.

Come back soon to check if it worked out!
Thanks :slight_smile: