# Scrollpane's scrollbar issue

**URL:** <https://forum.kirupa.com/t/scrollpanes-scrollbar-issue/182411>\
**Category:** Uncategorized\
**Created:** [March 17, 2006, 9:23pm UTC](https://forum.kirupa.com/t/scrollpanes-scrollbar-issue/182411 "2006-03-17T21:23:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [March 17, 2006, 9:23pm UTC](https://forum.kirupa.com/t/scrollpanes-scrollbar-issue/182411/1 "2006-03-17T21:23:19Z")

</div>

Hello, I’m doing this:

my\_sp.contentPath = “loader”; // loaded from the library (is this really necessary?)  
var content\_mc:MovieClip = my\_sp.content;

…then I am looping through some arrays and attaching textfields and radio buttons to “content\_mc”.

It all works except the vertical scrollbar isn’t appearing when it needs to. How do i update the visiblity of the scrollbar after ive dynamically attached my stuff? I only want it visible when it is necessary.

Thanks

edit: I’ve tried just manually setting the vScrollPolicy to “on” after the scripts that do the attaching run, but the scrollbar doesn’t scroll far enough?

edit edit: I traced the \_height of “content\_mc” and it was only slightly higher than the scrollpanes height, which is not what I expected because there are several textfields/button off the bottom of the scrollpane… what in the world is going on!!!

edit edit Edit: I found that i could work around this by adding a movieclip to “loader” in the library, setting it’s alpha to 0, and then scaling it taller using the \_y position of the last attached button+its height and plus about 50 pixels because it still wasn’t scrolling all the way down. This works, but is a sloppy, pathetic, embarrassing, hack…SHAME… I must be missing something.

---

<div class="post-metadata">

**Author:** ![sandeep\_cdac200](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sandeep\_cdac200](https://forum.kirupa.com/u/sandeep_cdac200)\
**Post date:** [March 20, 2006, 11:23am UTC](https://forum.kirupa.com/t/scrollpanes-scrollbar-issue/182411/2 "2006-03-20T11:23:11Z")

</div>

hi,

When working with scrollpane component and and with dyamic data with this components. try to use invalidate method of this component.

scrollpaneComponentInstanceName.invalidate();

Actually this is a uiObject class method and this method redraws the component.

with regards  
sandeep(^\_^)

---

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [March 20, 2006, 1:57pm UTC](https://forum.kirupa.com/t/scrollpanes-scrollbar-issue/182411/3 "2006-03-20T13:57:22Z")

</div>

thanks for the reply,

I tried that, but the scrollpane will only scroll down to a certain point, but not all the way to reveal the rest of the content. Do I need to do some sort of check to see if everything is loaded before i do the “invalidate” ? Im loading data from an XML object thats already loaded into the player…

---

<div class="post-metadata">

**Author:** ![sandeep\_cdac200](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sandeep\_cdac200](https://forum.kirupa.com/u/sandeep_cdac200)\
**Post date:** [March 21, 2006, 6:09am UTC](https://forum.kirupa.com/t/scrollpanes-scrollbar-issue/182411/4 "2006-03-21T06:09:32Z")

</div>

hi

its always better to call this method when the data in the scrollpane is completely loaded.then before loading next content try to call “invalidate” method of flash.

with regards  
sandeep(^\_^)
