October 8th, 2007 by Kyle
Tags: ActionScript, Flex, mask, masking, menu, menubar, rounded-menu
Posted in: ActionScript, Flex
I had a customer that was trying to use masking to make menus appear with rounded corners. I had gotten this to work, but there was something I could not figure out that caused a flicker as menus were selected and appeared. I put this on the back shelf for a while and recently revisited it. To my surprise, the issue I had previously seen had gone away. Either something in the Flex framework had changed or a more recent version of the player had a beneficial effect. Whatever the cause, I decided it was good enough and that I should post this code.
In this sample, I extended the default MenuBar, so I could get a handle on new menus as they are shown to apply the mask. I also implemented a new style “corner-radius” and a custom menuItem renderer.
Browse the source of this example.
Download a zipfile containing the source to this sample.
10 Comments »

Recent Comments