Show/Hide scrollbar

Hi all,

  1. I’ve downloaded the Source for MX included in the “Hide/View the Scrollbar Component” page of 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

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 ;).

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.

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 :slight_smile:
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.