1 Reply Latest reply on Jun 30, 2010 3:57 AM by rootsounds

    How to override functions



      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
                   trace("Mouse Click");
              override  protected function mouseDownHandler(event:MouseEvent):void
                   trace("Mouse Down");

      Can someone please help .