Here's the application code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " xmlns="*" layout="absolute" >
<mx:Canvas width="100%" height="100%">
<mx:List width="200" dataProvider="{[{label:'a'},{label:'b'},{label:'c'},{label:'d'}]}" itemRenderer="TestRenderer"/>
</mx:Canvas>
</mx:Application>
And here's the code for TestRenderer.mxml, the custom itemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" width="100%" height="100%" mouseOver="handleMouseOver(event)" mouseOut="handleMouseOut(event)">
<mx:Script>
<![CDATA[
private function handleMouseOver(e:MouseEvent):void
{
trace( "mouse over event for hbox" );
currentState = 'over';
}
private function handleMouseOut(e:MouseEvent):void
{
trace( "mouse out event for hbox" );
currentState = '';
}
private function ignoreEvent(e:MouseEvent):void
{
e.stopImmediatePropagation();
}
]]>
</mx:Script>
<mx:Label id="myLabel" text="{ data.label}"/>
<mx:Spacer width="100%" />
<mx:states>
<mx:State name="over">
<mx:AddChild>
<mx:Label id="info" text="info" color="#0000FF" mouseOver="ignoreEvent(event)" mouseOut="ignoreEvent(event)" mouseMove="ignoreEvent(event)" mouseDown="ignoreEvent(event)" />
</mx:AddChild>
</mx:State>
</mx:states>
</mx:HBox>
Thanks,
-Tom
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

