# Setting color from loaded variable in textfile

**URL:** https://forum.kirupa.com/t/setting-color-from-loaded-variable-in-textfile/76613
**Category:** flash
**Created:** [January 19, 2005, 10:19pm UTC](https://forum.kirupa.com/t/setting-color-from-loaded-variable-in-textfile/76613 "2005-01-19T22:19:06Z")
**Posts on this page:** 1
**Page:** 1

<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: [January 19, 2005, 10:19pm UTC](https://forum.kirupa.com/t/setting-color-from-loaded-variable-in-textfile/76613/1 "2005-01-19T22:19:06Z")

</div>

I have a text file that set’s some color values I would like to use in my flash movie. bascially its a config file for movieclips rollovers(set’s the colors)

my textfile reads as follow

```auto

textOut=0x3F6075&baseOut=0xFFFFFF&outLineOut=0xE19C14

```

My Flash is as follows:

```auto

/* loadconfig file */
myTest = new LoadVars();
myTest.load("button_styles.txt");
myTest.onLoad = function(){
	trace(this.textOut + newline + this.baseOut + newline + this.outLineOut);
}

/* function that actually changes the colors */
function insideElement(){
	myOutline.setRGB(this.outLineOut);
	myText.setRGB(this.textOut);
	myBase.setRGB(this.baseOut);
}

```

Now when I trace the values its fine, but when i apply them to my movieclips, it turns black :hr:

any ideas? thanks

edit: of course i am calling the function, figured you would assume so,
