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…