I’m trying to make a good menu. A reusable menu. I want to have a menu class that handels a group of buttons, listens and knows which is active and respond by going to a frame in a movieclip.
Say I have 4 buttons extending a class MenuButton which handels ROLL_OVER and ROLL_OUT states.
Then I want to have a class Menu that can group all 4 buttons. Only one of the included buttons can be “chosen” at the same time (like radiobuttons). When I press a MenuButton, say button3, I want my Menu to think “ooh, a button pressed! let’s act. Hmm, the button pressed was button1 I have been told. I will now change the active button button3, I’ll disable it and make it glow (or should the button do that himself?)”. “Ooh, the content. MovieClip go to and stop frame 3, please.”
I have been looking into the eventDispatcher but I don’t know if that’s overkill, i actually don’t fully understand it. I then think I’ll have a Menu.as, MenuButton, MenuButtonEvent.
I just want some hints about the best way to make this.
As usual I find it hard to explain what I want…