Hi Igor,
This would work for sub-menu items. For top level menu items, you'll have to add logic based on the click event.
-TH
<mx:Script>
<![CDATA[
import mx.events.MenuEvent;
public function handleItemClick(event:MenuEvent):void
{
[EMAIL PROTECTED]
}
]]>
</mx:Script>
<mx:MenuBar alpha="0" id="itensdoMenu" labelField="@label"
itemClick="handleItemClick(event);">
<mx:XMLList>
<menuitem label="Home" currentState="">
</menuitem>
<menuitem label="Sobre o Flex" currentState="sobreFlex">
<menuitem label="O que é Flex?" currentState="sobreFlex"/>
<menuitem label="Tecnologias usadas"/>
<menuitem label="Soluções ENG"/>
</menuitem>
</mx:XMLList>
</mx:MenuBar>
--- In flexcoders@yahoogroups.com, "Daniel Freiman" <[EMAIL PROTECTED]> wrote:
>
> Look at the example on livedocs at the bottom of the page. In short, you're
> using listening for an itemclick event:
> http://livedocs.macromedia.com/flex/2/langref/mx/controls/Menu.html
>
> On 8/10/06, Igor Costa [EMAIL PROTECTED] wrote:
> >
> > Hi list
> >
> > How should I create a event into the mx:menuBar to add some transitions
> > between my states?
> >
> > here's what I have
> > <mx:MenuBar alpha="0" id="itensdoMenu" labelField="@label">
> > <mx:XMLList>
> > <menuitem label="Home" itemClick="currentState=''">
> > </menuitem>
> > <menuitem label="Sobre o Flex"
> > click="currentState='sobreFlex'">
> > <menuitem label="O que é Flex?"
> > click="currentState='sobreFlex'"/>
> > <menuitem label="Tecnologias usadas"/>
> > <menuitem label="Soluções ENG"/>
> > </menuitem>
> > </mx:XMLList>
> > </mx:MenuBar>
> >
> > So, I tried to put click event to do that but no sucess, I have to create
> > a event into AS3 to do that?
> >
> > Who could help me?
> >
> > --
> > ----------------------------
> > Igor Costa
> > www.igorcosta.com
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
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.
__,_._,___