# Show/Hide scrollbar

**URL:** <https://forum.kirupa.com/t/show-hide-scrollbar/65552>\
**Category:** flash\
**Created:** [September 27, 2004, 6:28pm UTC](https://forum.kirupa.com/t/show-hide-scrollbar/65552 "2004-09-27T18:28:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmorenoramiro](https://avatars.discourse-cdn.com/v4/letter/f/ac91a4/32.png) [@fmorenoramiro](https://forum.kirupa.com/u/fmorenoramiro)\
**Post date:** [September 27, 2004, 6:28pm UTC](https://forum.kirupa.com/t/show-hide-scrollbar/65552/1 "2004-09-27T18:28:06Z")

</div>

Hi all,

1. I’ve downloaded the Source for MX included in the “Hide/View the Scrollbar Component” page of [kirupa.com](http://kirupa.com). It simply doesn’t work when I open the file and publish it. I’m using Flash MX 2004, … has anyone experienced the same problem and solved it?

2. I’ve been able to set the scroll visibility with an external dynamic text using several procedures. One of them is:  
[indent][color=red]SB1[/color].setScrollTarget(\_root.[color=red]Texto1[/color]);  
if ([color=red]Texto1[/color].maxscroll \> 1) {  
[color=red]SB1[/color].\_visible = true;  
};

_Were [color=red]SB1[/color] is the scrollbar instance, and [color=red]Texto1[/color] the dynamic text instance._  
[/indent]All works fine in my PC, but it doesn’t work when I load it in the server (the scrollbar cannot be visualized).

Does anyone know if there’s a bug or a rational explanation for this problem?:h:  
Thank you in advance,  
Fernando

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 7:30pm UTC](https://forum.kirupa.com/t/show-hide-scrollbar/65552/2 "2004-09-27T19:30:21Z")

</div>

textto1 isn’t loaded instantly. It takes time for it to load… but the rest of the script gets executed right away.  
So… texto1.maxscroll is 0… when the if get’s executed.  
You should wait for the varaibles to load before using that if statement ;).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 10:55am UTC](https://forum.kirupa.com/t/show-hide-scrollbar/65552/3 "2004-09-28T10:55:35Z")

</div>

Thanks. The trouble is that it does load in my PC, but not when I put it in the server, even if I wait for some… hours.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 11:50am UTC](https://forum.kirupa.com/t/show-hide-scrollbar/65552/4 "2004-09-28T11:50:45Z")

</div>

The problem is with your flash the server is fine… As long as you can see the flash and not the text.  
You didn’t understood me at all, did you ? :D.  
the text is loaded [color=blue]almost[/color] instantly but you do the checking … with that if statement before it gets to load. The IF is faster 🙂  
You must wait - inside the flash… for the text to load … before you check it.  
you must execute your AS… either on an event as onLoad or with some gotoandPlay’s and checkings either if \_root.textto1 is loadded  
Something like this was posted before… i’ll run search. You should try it yourself.
