I want to create a Menu that opens when clicked on a button, and that closes ONLY when clicked on that button. I suppose I need to override the mouse down handler of the menu class, but I don't know how to do this . Can someone please help.
I tried to create a class that extends menu and inside it I created the menu instance like this:
public class FileMenu extends Menu
private var menuItems:Array = new Array();
private var menu:Menu = new Menu();
And then I tried to override the mouse down and click handlers, but it doesn't work.
override protected function mouseClickHandler(event:MouseEvent):void
override protected function mouseDownHandler(event:MouseEvent):void
Can someone please help .
I'm guessing it's because those handler functions don't actually exist with the names you provided in the Menu class.
You may have an easier time triggering a pop-up window with a button similar to what is discussed here: