Hi Kleber,
Try this it worked for me, let me know if it works for you,
I have a MenuBar that has a HELP the About MyApp and a Popup with 
show the About Title window here is what I've done.

<mx:Script>
<![CDATA[

        public function menuHandler(oEvent:Object) {
                
                if (oEvent.menuItem.getProperty("label")=='Logout') {
                        onLogoutResult();hideContainers();showWindow
(true);
                        }
                else if 
                        (oEvent.menuItem.getProperty("label")=='About 
ContactManager'){
                                showAbout(true);
                }
                else if 
                        (oEvent.menuItem.getProperty("label")
=='Preferences'){
                                notYet();
                }               
                else if
                (oEvent.menuItem.getProperty("label")==undefined){
                mx.controls.Alert.show('This is option is not 
implemented yet!', 'ContactManager (Ver 1.0.0.2)');
                }
                else {  
                myViewStack.selectedIndex = 
oEvent.menuItem.getProperty("data");
                }
        }

        ]]>     
</mx:Script>

And the showAbout(true)


            import mx.controls.Alert;
            import mx.core.Application;
            import mx.managers.PopUpManager;
            import aboutWindow;       

         public function showAbout(modal:Boolean):void {
                        var aboutWindow:AboutWindow = new AboutWindow
();
                        aboutWindow.addEventListener("logon", 
aboutHandler);
                        PopUpManager.popUpWindow(aboutWindow, this, 
modal);
                        PopUpManager.centerPopUp(aboutWindow);
        }
        
        public function logonHandler():void
        {

        }
        public function aboutHandler():void
        {

        }     

Angelo


--- In flexcoders@yahoogroups.com, "Kleber Voigt" <[EMAIL PROTECTED]> 
wrote:
>
> Hi,
> 
> How can I call a popUp from menuBar?
> 
> I try:
> 
> <mx:Script><![CDATA[
>     import Forms.controleTempos;
>     import mx.managers.PopUpManager;
> 
>     private function MenuHandler(oEvent:Object) {
>             // Create the TitleWindow container.
>             var test="Forms."[EMAIL PROTECTED]; //Forms is a 
folder
> inside my app folder
>             PopUpManager.createPopUp(this, test, false);
>         }
> 
> ]]></mx:Script>
> <mx:MenuBar id="myMenuBar" labelField="@label" showRoot="false" 
x="0" y="0"
> width="100%" change="MenuHandler(event)" >
>         <mx:XML>
>             <menuItem label="Produção">
>                 <menuItem label="Tempos de Produção" 
data="controleTempos"/>
>             </menuItem>
> 
> 
> But don`t works e give me the 1034 error. The object cannot convert 
to a
> class.
> 
> 
> Anyone can help me?
> 
> 
> Thanks!
> 
> Kleber Voigt
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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