I’m trying to figure out the best way to create a dynamic and scrollable vertical menu under Flash MX 2004
By dynamic I mean that the elements of the menu will be generated according to a XML source, produced by a PHP script.
Of course, If I stop here, I could use a standard List Component. The point is that the default scrollbars for List component are quite ugly.
I couldn’t find an easy way to override look and feel of MX 2004 component the same way it was possible in MX (basically, modifying the component assets in the Library).
So, I plan to force the scrollbars in the MX 2004 List component to be invisible, and to scroll using ActionScript bound to some buttons placed arond the List component.
My first point is: is it possible to manually scroll a List component using ActionScript ?
My second question would be: Has anyone already managed to build an “infinite menu” (or auto-scroll vertical menu) that would depend on dynamic data.
I know there are XML-driven drop-down menu, so I think it is possible to build a component that would behave much like the Infinite Menu, but would depend on dynamic data.
Using a fixed height size for each cell of the menu, one can determine the total size of the area to scroll ((number_of_elements + spacing) * default_height).
I’ve already managed to port a Flash MX component (MPImageBox, available on Flash Exchange) to ActionScript 2.0 and use it as CellRenderer in a List Component. The point, yet, is that each Cell has to be the same size…