:-)

-TH

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Maybe a custom MenuBarItemRenderer would solve this. Just guessing,
> though.
>
> Tracy
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of Tracy Spratt
> Sent: Friday, September 26, 2008 8:57 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Listen itemClick Event on MenuBar
>
>
>
> Hmm, I have use the "click" event with top-level menu items with no
> children and it fires, but the click event does not fire on sub menu
> items with children.
>
>
>
> I couldn't get MouseDown or up to fire either.
>
>
>
> I am stumped.
>
>
>
> Tracy
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of Andres Serral
> Sent: Friday, September 26, 2008 8:45 AM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Listen itemClick Event on MenuBar
>
>
>
> Tracy.
>
> Maybe I don't explain very well.
>
>
>
> Look in the next menu structure... I want to capture the event click
on
> "SubMenu 1.1"
>
>
>
> Menu
>
> ->SubMenu 1
>
> -> "SubMenu 1.1"
>
> -> SubMenu 1.1.1
>
> -> SubMenu 1.1.2
>
> -> SubMenu 1.2
>
> -> SubMenu 1.2.1
>
> -> SubMenu 1.2.2
>
> ->SubMenu 2
>
> -> SubMenu 1.1
>
> -> SubMenu 1.2
>
>
>
> I looked at the SDK source that the itemClick event only is dispatched
> when the node hasn't childrens
>
>
>
> here is an example
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
> <http://www.adobe.com/2006/mxml> " layout="absolute"
> creationComplete="initCollections();"
> >
>
> <mx:Script>
> <![CDATA[
> import mx.collections.XMLListCollection;
> import mx.events.MenuEvent;
>
> private function menuItemClickHandler(event:MenuEvent):void {
>
> trace([EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] );
> }
>
> private function initCollections():void {
> menuBarCollection = new XMLListCollection(menubarXML);
> }
>
>
>
> [Bindable]
> public var menuBarCollection:XMLListCollection;
>
>
>
> private var menubarXML:XMLList =
> <>
> <menuitem label="Sub Menu 1">
> <menuitem label="Sub Menu 1.1">
> <menuitem label="MenuItem 1.1.1"/>
> <menuitem label="MenuItem 1.1.2"/>
> </menuitem>
> <menuitem label="Sub Menu 1.2" />
> </menuitem>
> <menuitem label="Sub Menu 2">
> <menuitem label="Sub Menu 2.1" />
> <menuitem label="Sub Menu 2.2" />
> </menuitem>
> </>;
>
>
> ]]>
> </mx:Script>
>
>
> <mx:MenuBar
> labelField="@label"
> dataProvider="{menuBarCollection}"
> itemClick="menuItemClickHandler(event)"
> />
>
> </mx:Application>
>
>
>
> Andres
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of Tracy Spratt
> Sent: Thursday, September 25, 2008 9:34 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Listen itemClick Event on MenuBar
>
> This is an aggravating aspect of Menu.
>
> You have to listen for both itemClick and click.
>
> Tracy
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of Andres Serral
> Sent: Thursday, September 25, 2008 3:54 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Listen itemClick Event on MenuBar
>
> Hello people
>
> I have a problem... someone maybe can help me
>
> The MenuBar control doesn't dispatch the "itemClick" event on items
that
> has childrens.
>
> Anybody knows how can I capture the click event on any item (with
> childrens or without them)?
>
> Thanks
>
> Andres
>



Reply via email to