You probably want to do it when the renderer is passed to removeChild(). Also, in the MouseEvent.CLICK handler, make sure to use event.currentTarget to ensureMessage 1 of 7 , Aug 9, 2011View SourceYou probably want to do it when the renderer is passed to removeChild().Also, in the MouseEvent.CLICK handler, make sure to use event.currentTarget to ensure that you're dispatching ListEvent.ITEM_CLICK for the correct renderer.
- JoshOn Tue, Aug 9, 2011 at 1:56 PM, Jason <jlampitt@...> wrote:
Ah! I was close! I did create a MouseEvent.MOUSE_CLICK event listener and handler but missed the idea of dispatching the ListEvent.ITEM_CLICK.
Makes sense now. I'll give it a go and report back.
In reference to when the renderer is destroyed, would that be when a CarouselItem is not visible in the carousel? Hmmm... what event would that be?
--- In email@example.com, Josh Tynjala <joshtynjala@...> wrote:
>> When the cell renderer is created, add an event listener for
> MouseEvent.MOUSE_CLICK. In the event handler, dispatch ListEvent.ITEM_CLICK.
> Be sure to remove the listener when the renderer is destroyed.
> - Josh