# Scrolling an Externally Loaded txt file with CSS Load

**URL:** <https://forum.kirupa.com/t/scrolling-an-externally-loaded-txt-file-with-css-load/199842>\
**Category:** flash\
**Created:** [September 6, 2006, 4:13pm UTC](https://forum.kirupa.com/t/scrolling-an-externally-loaded-txt-file-with-css-load/199842 "2006-09-06T16:13:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nymyth](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nymyth](https://forum.kirupa.com/u/nymyth)\
**Post date:** [September 6, 2006, 4:13pm UTC](https://forum.kirupa.com/t/scrolling-an-externally-loaded-txt-file-with-css-load/199842/1 "2006-09-06T16:13:33Z")

</div>

I have followed three of the scripts in the tutes section, but cannot get this to scroll:

1. First followed [THIS TUTE](http://www.kirupa.com/developer/mx2004/css.htm)
2. Then [THIS TUTE](http://www.kirupa.com/developer/mx2004/cssfile.htm)
3. Then tried to add [THIS TUTE](http://www.kirupa.com/developer/mx/dynamic_scroller.htm) to get it to scroll.

The css loads fine, however I cannot get this thing to scroll the text. Can anyone help me.

This is what is in my first keyframe. Where SCROLLER is the instance name of my text box.

```auto
var format = new TextField.StyleSheet();
var path = "http://www.amyhedrick.com/css/flash.css";
format.load(path);
format.onLoad = function(loaded) {
    if (loaded) {
        scroller.styleSheet = format;
        myLoadVar = new LoadVars ();
        myLoadVar.load("tv.txt")
        myLoadVar.onLoad = function (success){
    if (success == true) {
        scroller.variable = "tvtext"
        scroller.htmlText=myLoadVar.tvtext;
    }
}
    } else {
        scroller.text = "Error loading CSS file!";
    }
};
//creating the loadVarsText function
myLoadVar.onLoad = function() {
        scroller.text = this.tvtext;
};

```

Thanks.
