PSP style menu with flex
Back in December I saw Tink speak at Flash On the Beach… He showed an application of his where the screens were lined up horizontally, and smoothly “slid” from one to another when navigating. For shits and giggles I decided to reproduce it in a cms project that I’m currently working on.
As I was tinkering (har har) I remembered a project I worked on for PlayStation Portable… I came in late to the project, Serge Jespers had written a menu that mimics the PSP one… I remember that being a few hundred lines of code… It occurred to me that with Flex I could write the same thing with far less…
well, here it is:
I know I know, it’s not EXACTLY the same, but the concept is there (this is a test, not a paid project
) The First two yellow items don’t actually contain “sub menus”, the red ones do, so be sure to click up and down (or use the arrow keys)…
Rather than creating a “Playstation Menu Component” I modeified a Slider component from an older project. The “HorizontalSlider” and “VerticalSlider” extend a baseclass called “Abstract slider” (see the source, psp_menu_clasees.components package).
The Abstract Slider is a “Template Component”, meaning the class allows users to either add “menu items” by placing Tags in mxml, or, through actionscript by using the addSlideItem() method. Search the documentation for “Template Component” for futher details.
The Subclasses (or concrete implementations) are very simple… each places a Box component and direction specific “sliding” instructions.
…sooo, to conclude, the actual code for the menu is around a 100 lines or so… It could have been made with less, but for the sake of cleanliness and functinality it’s what it is…
Right Click “View Source” or click here to see the code…


