PDA

View Full Version : Text Area Component Scrollbar Not Resetting to Top


inum
12-20-2004, 01:22 AM
I'm building a forms-based application using Flash MX 2004. You can view the site under development here: http://www.finebalancecoaching.com/FBC .

I can't get the scrollbar in the text area to reset to the top of the scroll region when moving from page to page. I'm using instanceName.scroll = 0 (last line in code excerpt below), but that doesn't seem to be working. I also tried instanceName.scrollPosition = 0 and that didn't work either. Maybe the code is in the wrong place?


Home_btn.onPress=function():Void
{
Main.visible=true;
Main.Home.visible=true;
Main.Approach.visible=false;
Main.Testimonials.visible=false;
Main.Inspiration.visible=false;
Main.News.visible=false;
Main.Bio.visible=false;
Interactive.visible=false;
Contact.visible=false;
Main.Home.Home_xc.trigger();
Main.Main_ta.scroll = 0;
};


Any help would be appreciated. I can send you the FLA file if that would be helpful (e-mail me at MunawarAhmed75@hotmail.com). The client wants this up and running tonight, so I need to get this working as soon as possible. Thanks!

inum
01-20-2005, 10:06 PM
SOLUTION:

Use instanceName.vPosition = 0;

This will reset the vertical scrollbar to a position of 0 each time.