# \[AS\]Disable the scrollbar

**URL:** <https://forum.kirupa.com/t/as-disable-the-scrollbar/186285>\
**Category:** Uncategorized\
**Created:** [April 20, 2006, 9:44am UTC](https://forum.kirupa.com/t/as-disable-the-scrollbar/186285 "2006-04-20T09:44:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![btibia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/btibia/32/1625_2.png) [@btibia](https://forum.kirupa.com/u/btibia)\
**Post date:** [April 20, 2006, 9:44am UTC](https://forum.kirupa.com/t/as-disable-the-scrollbar/186285/1 "2006-04-20T09:44:32Z")

</div>

[FONT=Tahoma]Hi,

I have a small problem, i used the tutorial from kirupa ( [http://www.kirupa.com/developer/mx2004/hide\_scrollbar.htm](http://www.kirupa.com/developer/mx2004/hide_scrollbar.htm) ) for my scrollbar, but it’s not working. I load the text dynamically from a text file with a typewrite effect. Here it’s the code:

```auto

//[/FONT][FONT=Tahoma]scroller = UIscrollBar
//current_home = dynamically text field
[/FONT][FONT=Tahoma]scroller._visible = (current_home.maxscroll > 1);
current_home.onChanged = function() {
    scroller._visible = (current_home.maxscroll > 1);
};
//
var str:String;
var sInt;
var count:Number = 0;
function writeIt () {
    current_home.text = str.substring (0, count);
    count += 1;
    if (count > str.length)
    {
        clearInterval (sInt);
    }
}
loadText = new LoadVars ();
loadText.load ("home.txt");
loadText.onLoad = function () {
    str = this.home;
    sInt = setInterval (writeIt, 10);
};
current_home.embedFonts = true;
System.useCodepage = true;

```

Do you have anyidea how can i manage to do this to work?

Thank you, BTIBIA  
[/FONT]

---

<div class="post-metadata">

**Author:** ![btibia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/btibia/32/1625_2.png) [@btibia](https://forum.kirupa.com/u/btibia)\
**Post date:** [April 20, 2006, 9:47am UTC](https://forum.kirupa.com/t/as-disable-the-scrollbar/186285/2 "2006-04-20T09:47:57Z")

</div>

take out the \<font\>\</font\>, this is not in the as. :lol:

[AS]  
//scroller = UIscollBar  
//current\_home = dynamically text  
scroller.\_visible = (current\_home.maxscroll \> 1);  
current\_home.onChanged = function() {  
scroller.\_visible = (current\_home.maxscroll \> 1);  
};  
//  
var str:String;  
var sInt;  
var count:Number = 0;  
function writeIt () {  
current\_home.text = str.substring (0, count);  
count += 1;  
if (count \> str.length)  
{  
clearInterval (sInt);  
}  
}  
loadText = new LoadVars ();  
loadText.load (“home.txt”);  
loadText.onLoad = function () {  
str = this.home;  
sInt = setInterval (writeIt, 10);  
};  
current\_home.embedFonts = true;  
System.useCodepage = true;  
[/AS]
