Hi there,

When an item is selected an change event is broadcasted.
MenuBar broadcasts an event object with this properties
menuBar,menu,menuItem,groupName,type and target.
For what you need you can use it like this:

  <mx:Script>
     <![CDATA[

         function myfunction(event)
         {
            //atribute to be used as an URL and the target
            var myHyperlink = event.menuItem.attributes.url;
            var myTarget = event.menuItem.attributes.target; 
            getURL(myHyperlink,myTarget);
            
         }
     ]]>
  </mx:Script>

<mx:MenuBar change="myfunction(event)">

Your xml should look like this:

 <node>
 <menu label="Accueil" data="main3.mxml"/>
 <menu label="Mon compte" url="some.html" target="_blank"/>
 <menu label="Nouveau projet" url="http://www.macromedia.com/";
target="_self"/>
 <menu label="Mes projets"/>
 <menu label="Outils">
   <menu label="Feuilles d'aide">
   <menu label="Ar�na"/>
  </menu>
 </node>




--- In [email protected], "Ghislain Simard" <[EMAIL PROTECTED]>
wrote:
> 
> How to get an item in my menu bar hyperlinked?
> 
> Here is my XML where my MenuBar is refering to:
> <node>
>  <menu label="Accueil" data="main3.mxml"/>
>  <menu label="Mon compte"/>
>  <menu label="Nouveau projet"/>
>  <menu label="Mes projets"/>
>  <menu label="Outils">
>   <menu label="Feuilles d'aide">
>   <menu label="Ar�na"/>
>  </menu>
> </node>
> 
> Thanks





 
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/
 



Reply via email to