You should only need stopImmediatePropagation(), but don't you need that for the mouseOut event AND the mouseOver, not just mouseOver?
Matt -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Bray Sent: Thursday, April 06, 2006 1:59 PM To: [email protected] Subject: [flexcoders] Flex 2: How to get itemRenderer to ignore mouse events of its children? I have a List with a custom itemRenderer (see code below). I want to be able to capture the mouseOver event of a child of the itemRenderer without triggering the mouseOut event of the itemRenderer itself. The code below causes the itemRenderer to flicker between two states when you mouseOver the child (<Label id='info'...). How can I prevent this from happening? You can see from the mouseOverInfo method that I made some wild stabs at it with no luck. <?xml version="1.0" encoding="utf-8"?> <mx:HBox mouseOver="currentState='over'" mouseOut="currentState=''" doubleClickEnabled="true" doubleClick="trace([EMAIL PROTECTED])" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" width="100%" height="100%" verticalAlign="middle"> <mx:Script> <![CDATA[ private function mouseOverInfo(e:MouseEvent):void { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); e.updateAfterEvent(); } ]]> </mx:Script> <mx:Label id="myLabel" text="[EMAIL PROTECTED]"/> <mx:Spacer width="100%" /> <mx:states> <mx:State name="over"> <mx:AddChild> <mx:Label id="info" text="info" color="#0000FF" mouseOver="mouseOverInfo(event)"/> </mx:AddChild> <mx:SetStyle target="{myLabel}" name="textDecoration" value="underline"/> <mx:SetStyle target="{myLabel}" name="color" value="#0000FF"/> <mx:SetStyle target="{myLabel}" name="fontWeight" value="bold"/> </mx:State> </mx:states> </mx:HBox> -- 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 -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

