# Scrolling dynamically loaded text with css

**URL:** <https://forum.kirupa.com/t/scrolling-dynamically-loaded-text-with-css/194121>\
**Category:** Uncategorized\
**Created:** [July 20, 2006, 5:27pm UTC](https://forum.kirupa.com/t/scrolling-dynamically-loaded-text-with-css/194121 "2006-07-20T17:27:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![janjan32](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/janjan32/32/2578_2.png) [@janjan32](https://forum.kirupa.com/u/janjan32)\
**Post date:** [July 20, 2006, 5:27pm UTC](https://forum.kirupa.com/t/scrolling-dynamically-loaded-text-with-css/194121/1 "2006-07-20T17:27:18Z")

</div>

I found the following tutorials helpful, but now I want to combine them, but I don’t know how.

[http://www.kirupa.com/developer/mx/dynamic\_scroller.htm](http://www.kirupa.com/developer/mx/dynamic_scroller.htm)

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

code for the scroller  
[COLOR=“Navy”]loadText = new loadVars();  
loadText.load(“answers.txt”);  
//creating the loadVarsText function  
loadText.onLoad = function() {  
scroller.text = this.answer;  
};[/COLOR]

code for the css  
[COLOR=“Navy”]var format = new TextField.StyleSheet();  
var path = “css.css”;  
format.load(path);  
format.onLoad = function(loaded) {  
if (loaded) {  
output.styleSheet = format;  
myLoadVar = new LoadVars ();  
myLoadVar.load(“answers.txt”)  
myLoadVar.onLoad = function (success){  
if (success == true) {  
output.variable = “answer”  
output.htmlText=myLoadVar.answer;  
}  
}  
} else {  
output.text = “Error loading CSS file!”;  
}  
};  
stop();[/COLOR]  
what do I need to change to make this code work together?  
thanks for any help!  
:sure:  
actual files are located at  
[http://homepage.mac.com/graphicmuse/dynamicscroller\_CSS.zip](http://homepage.mac.com/graphicmuse/dynamicscroller_CSS.zip)
