# Component HEADLAB-NEWSFLASH v1.0

**URL:** <https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411>\
**Category:** flash\
**Created:** [June 3, 2003, 8:53pm UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411 "2003-06-03T20:53:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Bastos](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@Felipe\_Bastos](https://forum.kirupa.com/u/Felipe_Bastos)\
**Post date:** [June 3, 2003, 8:53pm UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411/1 "2003-06-03T20:53:54Z")

</div>

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?

🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 8:56pm UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411/2 "2003-06-03T20:56:45Z")

</div>

embed a font with accents to use on that textfield

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 12:45am UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411/3 "2003-06-04T00:45:03Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 6, 2003, 2:16pm UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411/4 "2003-06-06T14:16:33Z")

</div>

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  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 6, 2003, 9:25pm UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411/5 "2003-06-06T21:25:47Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 6, 2003, 10:56pm UTC](https://forum.kirupa.com/t/component-headlab-newsflash-v1-0/22411/6 "2003-06-06T22:56:41Z")

</div>

Here is the code that generate the textfield:

```auto
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.  
I`m using miniml fonts and in this textfield I`m 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 🙂
