I have a function that swaps the position of a selected item in a List component upward.
It works fine, but it causes each item;s old position to stay selected.

I want only the new position that the item move into to be selected.
list.selectedIndices = []; and list.selectedIndices = null have no effect with my code:
//======================================
/****
Moves a selected item to a previous index position in a List component.
****/
function moveItemUp(list) {
var index = list.selectedIndex;
var a = list.getItemAt(index);
var b = list.getItemAt(index-1);
if (b == null) {
 return;
}
list.replaceItemAt(index, b);
list.replaceItemAt(index-1, a);
list.selectedIndices = [];
list.selectedIndex = index-1;
}
//========================================

-- Keith H --


----- Original Message ----- From: "Ryan Matsikas" <[EMAIL PROTECTED]>

list.selectedIndices = [];

On 2/12/06, keith <[EMAIL PROTECTED]> wrote:

How can i de-select or unselect all the items in a List component?

I dont see how to do this in Flash 8 documentation.

-- Keith H --
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to