Thanks for the reply Ryan. I had already tried what you suggested, and that's how I determined that the Button wasn't registering that the mouse pointer was over it. I figured something was blocking or intercepting the mouse position, I just couldn't figure out what.
It ended up being a style sheet issue. The root Panel had a style that set header-height to 30. Once I set that to 0 my button worked. BTW, if I set it to something like 10, only the lower 1/2 of the button would register that the mouse was over it. I would have never figured that out if it weren't for the fact that I saw this happen on another UI, but I could moseOver the bottom few pixels of the Button because it hadn't been positioned correctly. So, lesson learned. Don't set a header-height if you're going to stick buttons up in the header area. Thanks, Geoff --- In flexcoders@yahoogroups.com, "Ryan Graham" <ryan.gra...@...> wrote: > > > You need to define handlers for those components in the HBox if you want > them to listen for those specific mouse events. Right now the button in > the HBox is only listening for click events. Try writing handler > functions for those additional events to start debugging: > > > > <mx:Button id="backButton" click="onClick(event)" > mouseOver="onMouseOver(event)" mouseOut="onMouseOut(event)" width="24" > height="20"/> > > > > ... > > > > private function onMouseOver(event:MouseEvent):void > > { > > > trace("mouseOver"); > > } > > > > private function > onMouseOut(event:MouseEvent):void > > { > > > trace("mouseOut"); > > } > > > > HTH, > > Ryan > > > > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On > Behalf Of Geoffrey > Sent: Monday, February 02, 2009 3:16 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] MouseOver Event Not Firing > > > > I have a Button that doesn't seem to know the mouse is over it. It > doesn't dispatch MouseOver/Out/click events. > > I have a Panel that has an HBox(Label/Spacer/Button) and a Canvas. > the Canvas gets stuff added to it dynamically via Actionscript. > > <pre> > <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" > height="100%"> > > <mx:HBox id="titleBox" verticalAlign="middle" width="100%" > height="24"> > <mx:Label text="Your Tasks"/> > <mx:Spacer width="100%"/> > <mx:Button id="backButton" click="onClick(event)" width="24" > height="20"/> > </mx:HBox> > > <mx:Canvas id="dynamicContainer" width="100%" height="100%"/> > > </mx:Panel> > </pre> > > This component is displayed after a transition effect that 'swishes' > it in from the right. I've done some debugging and it seems that > everything is getting mouseOver events except everything within the > HBox. > > Any ideas? Because I have run out of ideas. > > Thanks, > Geoff > > > > > > This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system. >