Hi all, I am developing a chat application in which I use PopUp Button. When the application is completed creation i am initializing the popup button menu. I am getting PopUp Menu overlap ie; At any point of time any user of the Chat can change the Menu items of the PopUp button menu. When a user is doing so and the other user just has opened his PopUp button menu, The old menu drop down still exits though a new menu is updated. How to get rid of this issue.
Snap of my code: ...... private var PreferencesMenu:Menu; private var PreferencesMenuItems:Array; private function PreferencesMenuInitialization(isReset:Boolean):void { if(isReset) { PreferencesMenu = new Menu(); PreferencesMenuItems /* of String */ = []; PreferencesMenuItems[0] = "operation 1"; PreferencesMenuItems[1] = "operation 2"; PreferencesMenuItems[2] = "operation 3"; PreferencesMenu.addEventListener("itemClick", PreferencesMenuClickHandler); PreferencesMenu.addEventListener(MouseEvent.ROLL_OUT, PreferencesPopUpBtnClose); } PreferencesMenu.dataProvider = PreferencesMenuItems; preferencesPopUpBtn.popUp = PreferencesMenu; } .............. ............ private var PreferencesMenuNew:Menu; private var PreferencesMenuItemsNew:Array; private function PreferencesMenuInitializationNew (isReset:Boolean):void { if(isReset) { PreferencesMenuNew = new Menu(); PreferencesMenuItemsNew /* of String */ = []; PreferencesMenuItemsNew[0] = "operation 1"; PreferencesMenuItemsNew[1] = "operation 2"; PreferencesMenuItemsNew[2] = "operation 3"; PreferencesMenuNew.addEventListener("itemClick", PreferencesMenuClickHandlerNew); PreferencesMenuNew.addEventListener(MouseEvent.ROLL_OUT, PreferencesPopUpBtnClose); } PreferencesMenuNew.dataProvider = PreferencesMenuItemsNew; preferencesPopUpBtn.popUp = PreferencesMenuNew; } <mx:PopUpButton id="preferencesPopUpBtn" label="Preferences" openAlways="true" color="black" textAlign="left" creationComplete="PreferencesMenuInitialization(true)" closeDuration="500" fillAlphas="[0.5, 0.5, 0.0, 0.0]" fillColors="[#0054A5, #82CA9C]"/> Any chat user can change (using PreferencesMenuInitializationNew (true)) so that the menu of that PopUp button for all chat users becomes PreferencesMenuInitializationNew(true) Here, old menu of PreferencesMenu still exist while new menu PreferencesMenuItemsNew updatig as menu Items of PopUp Button Menu Any Idea how to tackle this issue Regards, Pradeep --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---