# Loading External Text with CSS

**URL:** <https://forum.kirupa.com/t/loading-external-text-with-css/217645>\
**Category:** flash\
**Created:** [February 28, 2007, 5:30pm UTC](https://forum.kirupa.com/t/loading-external-text-with-css/217645 "2007-02-28T17:30:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lewnyflash](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@lewnyflash](https://forum.kirupa.com/u/lewnyflash)\
**Post date:** [February 28, 2007, 5:30pm UTC](https://forum.kirupa.com/t/loading-external-text-with-css/217645/1 "2007-02-28T17:30:48Z")

</div>

Hi guys,

I’ve been following the below tutorial after completeing Kirupa’s one but for some reason which I don’t understand why it is not picking up the kirupa.txt file that I have contained in the same folder as the .fla. Is there any reason why this is happening. The code is below

```auto
var format = new TextField.StyleSheet();
var path = "http://www.kirupa.com/developer/mx2004/code/flash.css";
format.load(path);
format.onLoad = function(success) {
    if (success) {
        output.styleSheet = format;
        myLoadVar = new LoadVars();
        myLoadVar.load("kirupa.txt");
        myLoadVar.onLoad = function(success) {
            if (success == true) {
                output.variable = "kirupa";
                output.htmlText = myLoadVar.kirupa;
            }
        };
    } else {
        output.text = "Error loading CSS file!";
    }
};

```

[http://www.kirupa.com/developer/mx2004/cssfile.htm](http://www.kirupa.com/forum/../developer/mx2004/cssfile.htm)

Thanks

Lewny :smirk2:
