2 Replies Latest reply on Jul 26, 2013 12:05 PM by Mahueles

    How can I create an "exit" pop up in Flex Mobile?

    Mahueles Level 1

      Ok, I'm creating an app that has an "exit" button in all views, and when that button is clicked the only thing that I do is use "navigator.popToFirstView()", this works perfect, but I don't want people to exit right away, I want to have a pop up that asks if you are sure you want to exit, below is the code that I have for the skinnable pop up container:




                                                   import mx.events.FlexEvent;


                        protected function yesExit(event:MouseEvent):void









                               <s:Label text="Are you sure you want to exit?" width="100%"  />

                               <s:HGroup width="100%" horizontalAlign="center" >

                                              <s:Button label="Yes" click="yesExit(event)" width="40%"  />

                                              <s:Button label="No" click="this.close()" width="40%"  />




      I tried using something like "parent.poptofirstview" but that doesn't work, and right now I'm stuck. Any help would be appreciated. thanks!