# Can't reset ScrollBar position

**URL:** <https://forum.kirupa.com/t/cant-reset-scrollbar-position/181347>\
**Category:** Uncategorized\
**Created:** [March 8, 2006, 3:39pm UTC](https://forum.kirupa.com/t/cant-reset-scrollbar-position/181347 "2006-03-08T15:39:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![UberMan](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@UberMan](https://forum.kirupa.com/u/UberMan)\
**Post date:** [March 8, 2006, 3:39pm UTC](https://forum.kirupa.com/t/cant-reset-scrollbar-position/181347/1 "2006-03-08T15:39:47Z")

</div>

ok - i’m totally confused here… this is probably a stupid noob question…

just recently got flash 8 - upgrading from mx2004, but had previously been using flash 6 components and AS1, due to files that had already been written in mx…

my problem is this - i have a dynamic text field, populated with data from a LoadVars object. When a button is pressed, different data is loaded into the text field, and the scrollBar is supposed to reset to the top (position=0)

old school, i’d just use ScrollBar.setScrollPosition(1) - now, i’m using ScrollBar.scrollPosition=1

if i don’t load new text into the text field, the scrollBar resets - but if i load text AND try to reset the scrollBar, the bar flashes to the top and then resets back to whatever previous position it was in…

Here’s my code - i really dumbed it down to the basics, just to test it out - i’ve got a text field on the stage called pageText, a UIscrollBar called ScrollBar, and a simple button

**Frame 1:**

[SIZE=1] LoadText=new LoadVars()  
LoadText.load(“template.txt”)[/SIZE]

\*\* Frame 5:\*\*  
[SIZE=1] pageText.htmlText=LoadText.txt0\_0  
stop()[/SIZE]

\*\* on the button on frame 5, i’ve got this code\*\*

[SIZE=1] on(release){  
pageText.htmlText=LoadText.txt1\_0  
ScrollBar.scrollPosition=1  
}[/SIZE]

I’m totally stumped - i can’t understand why it works when i’m not loading text… PLEASE help - i want to update multiple customer sites, but can’t do a thing if i can’t get the scrollBar working…
