Skip to main content
Known Participant
October 21, 2008
Answered

ScrollPane scrollbar won't update

  • October 21, 2008
  • 3 replies
  • 535 views
Hello,

Problem: Using ScrollPane to scroll a movieclip vertically. Works perfectly. Then using buttons to "jump" to sections within the ScrollPane using (e.g.: my_sp._y = 200). This works just fine. Problem is I can't get the scrollbar within the ScrollPane to update it's position.

I've looked everywhere on the web, this forum, many others, Flash's help, google, etc...and can't seem to find the answer. I did try using my_sp.invalidate(); to refresh the ScrollPane, which it does, but it just jumps the moviclip in the scrollpane back to x=0, y=0. I don't want it to reset the whole thing, just the scrollbar to the movieclip's vertical position. Anyone have an idea what's missing here?

Much appreciated.

dave
This topic has been closed for replies.
Correct answer Newsgroup_User
You're trying to move the content or the scrollPane? If you want to move the
content vertically, and have the scroller change to match, use the vPosition
property.

mySp.vPosition = 20;

will move the content up 20, and adjust the scroller to match...

--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


3 replies

Known Participant
October 22, 2008
Thanks, it worked perfectly. I was trying to use a movieclip method to move the content, which works, but doesn't control the scrollbar, the vPosition seems to do both. It's never very clear in Flash Help when and where to use specifice items and I was trying to use myScollpane.content to move the content, which it did, just not the scrollbar.

One more question, when and should I use myScrollpane.invalidate()?

thanks again,

dave
Known Participant
October 22, 2008
Thanks, I'll give it a try!

dave
Newsgroup_UserCorrect answer
Inspiring
October 21, 2008
You're trying to move the content or the scrollPane? If you want to move the
content vertically, and have the scroller change to match, use the vPosition
property.

mySp.vPosition = 20;

will move the content up 20, and adjust the scroller to match...

--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/