Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-23-2007, 08:09 PM   #1
Richro65
Member
 
Join Date: Jun 2006
Posts: 80
Default Trouble with list box & selectedIndex

I have a list box component and the content of the list is dynamically loaded when a user selects a category. I am trying to get my list box to jump back to the top row when the content is loaded. If they have scrolled down the list and then change the category, the list remains in the same position.

BTW, Flash 8, AS 2.

I have been reading posts all over this forum and some are saying that myListBox.selectedIndex=0 will do the trick. Some users say that it works for them, others say it does not. I have also read that the selectedIndex property cannot be changed but when I change it and then check the value of the property, it has been changed to what I set it to.

So even though the index property does accept the change, the list and scroll bar stay put.

Is there a way to force the list to display the top of the list? Being that the content of the list box is freshly loaded when I wish to scroll back to the top, is there another way around it?

Thanks for your help on this.

Last edited by Richro65; 06-23-2007 at 11:43 PM.
Richro65 is offline   Reply With Quote
Old 06-26-2007, 01:49 AM   #2
Richro65
Member
 
Join Date: Jun 2006
Posts: 80
Default

Well, I finally figured out a way to get the list box to reset back to the top. When the user changes the category of the list I have it going to a blank keyframe right before the keyframe containing the list box, hence removing the list box from the stage for one frame. When the list box returns on the next frame it is blank and needs to be reloaded but that's what I'm doing anyways so it works fine that way.

Last edited by Richro65; 06-26-2007 at 05:10 AM.
Richro65 is offline   Reply With Quote
Old 06-26-2007, 05:36 AM   #3
Richro65
Member
 
Join Date: Jun 2006
Posts: 80
Default

Well, after finding one way around it, I finally found the right way.

myListBox.vPosition=0;
Richro65 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag from list box golden14 Components 6 06-15-2007 01:36 AM
Combo box and list box skinning zns72 Components 1 06-09-2007 04:50 PM
Drag from list box golden14 Components 0 06-08-2007 07:01 AM
Making a List Box Global? Faivon Components 3 04-11-2007 05:13 PM
problem with this image list box stargatesg1 ActionScript 2.0 0 02-01-2007 02:48 PM


All times are GMT. The time now is 04:15 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.