Try this. Add this property to your button tag: trackAsMenu="true"
Tracy -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of kaibabsowats Sent: Tuesday, May 24, 2005 12:44 PM To: [email protected] Subject: [flexcoders] Panel Mouse Down Problem I have a problem where the mouse doesn't fire off the correct MouseDown event. It only happens when the mouse doesn't move and a new container with a mouseDown event is loaded under it. It seems to remember the last container's mouseDown area and fires that event. I am trying to figure out how to alleviate this problem. Steps to recreate what I am talking about. Copy the Example code into a mxml file. Bring it up. Click on the first panel, dont move the mouse. You'll see a popup stating which Panel was clicked. Then hit the space bar (as the popup has focus) to get rid of the popup. With out moving the mouse click the left mouse button. You'll see that the same popup appears. Clear the popup. Now move the mouse, and click on the panel. You'll see that it properly fires the panel's mouseDown. Any help would be much appreciated Example Code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" > <mx:Script> <![CDATA[ import mx.controls.Alert; function changeView( view ) { Alert.show( view ); if( view == 'firstChild1Panel1' ) { firstChildStack.selectedChild = firstChild2; } if( view == 'firstChild2Panel1' ) { firstChildStack.selectedChild = firstChild1; } } ]]> </mx:Script> <mx:ViewStack id="firstStack"> <mx:Panel id="firstChild" headerHeight="34" verticalGap="0"> <mx:ViewStack id="firstChildStack"> <mx:HBox id="firstChild1" width="100%" height="320" horizontalAlign="center" direction="horizontal" verticalGap="10"> <mx:Panel id="firstChild1Panel1" title="First Child #1 Panel 1" width="210" height="320" initialize="firstChild1Panel1.onRelease=null;first Child1Panel1.useHandCursor=true;" mouseDown="changeView( 'firstChild1Panel1' );" marginLeft="8" marginRight="8" marginTop="8" marginBottom="8"> <mx:ControlBar verticalAlign="middle"> <mx:Label text="Click Here to Enter! " width="100%" textAlign="center" /> </mx:ControlBar> </mx:Panel> <mx:Panel id="firstChild1Panel2" title="First Child #1 Panel 2" width="210" height="320" initialize="firstChild1Panel2.onRelease=null;first Child1Panel2.useHandCursor=true;" mouseDown="changeView( 'firstChild1Panel2' );" marginLeft="8" marginRight="8" marginTop="8" marginBottom="8"> <mx:ControlBar verticalAlign="middle"> <mx:Label text="Click Here to Enter! " width="100%" textAlign="center" /> </mx:ControlBar> </mx:Panel> <mx:Panel id="firstChild1Panel3" title="First Child #1 Panel 3" width="210" height="320" initialize="firstChild1Panel3.onRelease=null;first Child1Panel3.useHandCursor=true;" mouseDown="changeView( 'firstChild1Panel3' );" marginLeft="8" marginRight="8" marginTop="8" marginBottom="8"> <mx:ControlBar verticalAlign="middle"> <mx:Label text="Click Here to Enter! " width="100%" textAlign="center" /> </mx:ControlBar> </mx:Panel> </mx:HBox> <mx:HBox id="firstChild2" width="100%" height="320" horizontalAlign="center" direction="horizontal" verticalGap="10"> <mx:Panel id="firstChild2Panel1" title="First Child #2 Panel 1" width="210" height="320" initialize="firstChild2Panel1.onRelease=null;first Child2Panel1.useHandCursor=true;" mouseDown="changeView( 'firstChild2Panel1' );" marginLeft="8" marginRight="8" marginTop="8" marginBottom="8"> <mx:ControlBar verticalAlign="middle"> <mx:Label text="Click Here to Enter! " width="100%" textAlign="center" /> </mx:ControlBar> </mx:Panel> <mx:Panel id="firstChild2Panel2" title="First Child #2 Panel 2" width="210" height="320" initialize="firstChild2Panel2.onRelease=null;first Child2Panel2.useHandCursor=true;" mouseDown="changeView( 'firstChild2Panel2' );" marginLeft="8" marginRight="8" marginTop="8" marginBottom="8"> <mx:ControlBar verticalAlign="middle"> <mx:Label text="Click Here to Enter! " width="100%" textAlign="center" /> </mx:ControlBar> </mx:Panel> <mx:Panel id="firstChild2Panel3" title="First Child #2 Panel 3" width="210" height="320" initialize="firstChild2Panel3.onRelease=null;first Child2Panel3.useHandCursor=true;" mouseDown="changeView( 'firstChild2Panel3' );" marginLeft="8" marginRight="8" marginTop="8" marginBottom="8"> <mx:ControlBar verticalAlign="middle"> <mx:Label text="Click Here to Enter! " width="100%" textAlign="center" /> </mx:ControlBar> </mx:Panel> </mx:HBox> </mx:ViewStack> <mx:ControlBar height="30"> </mx:ControlBar> </mx:Panel> </mx:ViewStack> </mx:Application> Yahoo! Groups Links 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/

