Perfect- thanks for clearing that up.
Here's one solution:
In a class that extends the list based class:
public class TransparentTileList extends TileList
{
public function TransparentTileList() {
super();
}
override protected function
mouseUpHandler(event:MouseEvent):void{
super.mouseUpHandler(event);
var evt:ListEvent;
var item:IListItemRenderer =
mouseEventToItemRenderer(event);
var pt:Point = itemRendererToIndices(item);
evt = new ListEvent(ListEvent.CHANGE);
evt.itemRenderer = item;
if (pt)
{
evt.columnIndex = pt.x;
evt.rowIndex = pt.y;
}
dispatchEvent(evt);
}
}
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Known bug. Fixed in Moxie. Not sure of a workaround. Maybe get
> mouseUp in capture phase and send change event.
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED]
On
> Behalf Of bick
> Sent: Sunday, September 09, 2007 2:14 PM
> To: [email protected]
> Subject: [flexcoders] List component selectedIndex not updating when
> selecting and rolling off
>
>
>
> The list component (Flex 2) selectedIndex is not updating when
> selecting and rolling off a list item. However, the selection
> indicator appears over the rolled off item.
>
> You can see this strange behavior with a simple test:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
> <http://www.adobe.com/2006/mxml> "
> layout="vertical">
> <mx:List id="tl" width="150" >
> <mx:dataProvider>
> <mx:Object label="item 1"/>
> <mx:Object label="item 2"/>
> <mx:Object label="item 3"/>
> </mx:dataProvider>
> </mx:List>
> <mx:Label text="Selected Index = {tl.selectedIndex}"/>
> </mx:Application>
>
> Steps to reproduce:
>
> 1. Select item 1 normally by clicking on it.
> 2. Roll over item 2, mouse down on item 2, move the mouse off the
> list, and release.
>
> Notice the "Selected Index" text still states '0' even though item 2
> appears selected.
>
> Anyone else see this and know why? Any work around?
>