# External Load w/ CSS Tutorial

**URL:** <https://forum.kirupa.com/t/external-load-w-css-tutorial/179511>\
**Category:** flash\
**Created:** [February 20, 2006, 10:48pm UTC](https://forum.kirupa.com/t/external-load-w-css-tutorial/179511 "2006-02-20T22:48:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganoen](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@Ganoen](https://forum.kirupa.com/u/Ganoen)\
**Post date:** [February 20, 2006, 10:48pm UTC](https://forum.kirupa.com/t/external-load-w-css-tutorial/179511/1 "2006-02-20T22:48:18Z")

</div>

I read a couple of tutorials under the Flash MX 2004 portion of the site, namely the one about loading a CSS file to influence a text field, and also to do the same while loading the text field’s content from an external file. The first tutorial (use external CSS file, use hard-coded content in the text-field) went fine, but the second one in which the text field’s content is brought in from a .txt file I wasn’t able to get working.

Here’s the exact code I have:

```auto
var format = new TextField.StyleSheet();
var path = "flash.css";
format.load(path);
format.onLoad = function(loaded) {
	if(loaded) {
		output.styleSheet = format;
		myLoadVar = new LoadVars();
		myLoadVar.load("test.txt");
		myloadVar.onLoad = function(success) {
			if (success == true) {
				output.variable = "kirupa";
				output.htmlText = myLoadVar.kirupa;
			}
		}
	} else {
		output.text = "Failed";
	}
};

```

The test.txt file’s content is:

```auto
kirupa=<p>test test test</p>

```

The file names are correct, and the text field has been named to output, set to Dynamic, multi-line no wrap, render text as HTML. Every time I load the movie though, the text field remains blank.
