# Scrolling externally loaded dynamic text

**URL:** <https://forum.kirupa.com/t/scrolling-externally-loaded-dynamic-text/248693>\
**Category:** flash\
**Created:** [January 10, 2008, 8:05pm UTC](https://forum.kirupa.com/t/scrolling-externally-loaded-dynamic-text/248693 "2008-01-10T20:05:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BOTH](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@BOTH](https://forum.kirupa.com/u/BOTH)\
**Post date:** [January 10, 2008, 8:05pm UTC](https://forum.kirupa.com/t/scrolling-externally-loaded-dynamic-text/248693/1 "2008-01-10T20:05:42Z")

</div>

Hello,  
I have a dynamic text box into which I am loading external XML and a CSS file. I have up and down scroll buttons working that scroll through the text box content. This is what the code looks like so far (there are two text boxes on the stage called varText\_txt and bothText\_txt:

function textLoader() {  
varData = new LoadVars();  
varData.onLoad = function() {  
varText\_txt.html = true;  
varText\_txt.htmlText = this.myVariable;  
};  
bothData = new LoadVars();  
bothData.onLoad = function() {  
bothText\_txt.html = true;  
bothText\_txt.htmlText = this.myBothText;  
};  
varData.load(“images/claudeText.txt”);  
bothData.load(“images/bothText.txt”);  
}  
var myCSS = new TextField.StyleSheet();  
myCSS.load(“myStyle.css”);  
myCSS.onLoad = function() {  
varText\_txt.styleSheet = myCSS;  
bothText\_txt.styleSheet = myCSS;  
textLoader();  
};  
scrollBtn\_up01.onRelease = function(){  
bothText\_txt.scroll–;  
}  
scrollBtn\_dwn01.onRelease = function(){  
bothText\_txt.scroll++;  
}  
scrollBtn\_up02.onRelease = function(){  
varText\_txt.scroll–;  
}  
scrollBtn\_dwn02.onRelease = function(){  
varText\_txt.scroll++;  
}

This is all working great. Now I would like to add a custom draggable scroll bar. Does anyone know how this is done or have sample code that I can pick apart.  
Thank you.
