# Alignment and Colors of the text in the scroll

**URL:** https://forum.kirupa.com/t/alignment-and-colors-of-the-text-in-the-scroll/307
**Category:** flash
**Created:** [July 12, 2002, 10:41pm UTC](https://forum.kirupa.com/t/alignment-and-colors-of-the-text-in-the-scroll/307 "2002-07-12T22:41:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Balitas](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@Balitas](https://forum.kirupa.com/u/Balitas)
#### Post date: [July 12, 2002, 10:41pm UTC](https://forum.kirupa.com/t/alignment-and-colors-of-the-text-in-the-scroll/307/1 "2002-07-12T22:41:43Z")

</div>

I made this scroll according the instructions of the Scroll Tutorial using Flash MX. I didn’t have any problem to made it (it’s very easy).

But I have other problem now. I need to use different colors in the text of the scroll. I make the changes without any problem in the FLA file, but when I export the file (swf), the changes that I made doesn’t have effect. I mean the FLASH MX consider only a text using only one color or one type of letter. At the same time when I export the file, the Flash MX not consider the “justify” alignment, only the left, center or right.

Please help me because I wiil use this scroll solution in a site that I making.

THANKS¡

---

<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: [July 13, 2002, 5:27pm UTC](https://forum.kirupa.com/t/alignment-and-colors-of-the-text-in-the-scroll/307/2 "2002-07-13T17:27:31Z")

</div>

Hi my friends. Happily I solve the problem. I send the FLA file and the SWF with a txt file.

With pacience I solve the problem. If you check the code in the actions panel of the FLA file, I call to the profile.txt file. And in the [COLOR=blue]profile.txt[/COLOR] file, I put the text, but in HTML format. But before make thi, I select the “render text as html” option in the Properties Panel of the Text Field (named “texto”)

The code is:

loadVarsText = new loadVars();  
loadVarsText.load("[COLOR=blue]profile.txt[/COLOR]");  
//assign a function which fires when the data is loaded:  
loadVarsText.onLoad = function(success) {  
if (success) {  
trace(“done loading”);  
//Now that we know the data is loaded,  
//set the text content of the Text Field  
//with the instance name “scroller” equal to the  
//contents of the variable  
[COLOR=blue]texto[/COLOR].html = true;  
[COLOR=blue]texto[/COLOR].htmlText = this.[COLOR=blue]var1[/COLOR]  
} else {  
trace(“not loaded”);  
}  
};

Thanks=)

PD: “[COLOR=blue]texto[/COLOR]” in the code is the name of the text instance. “[COLOR=blue]var1[/COLOR]” is the variable inside the [COLOR=blue]profile.txt[/COLOR] file.
