Flex canvas provide a style attribute backgroundImage which allow us to set an image as background. Compare with the background in Html5 and CSS, this feature is not that user friendly. In CSS, we can not only set the background image, but also tell the css how to render the background image if the image is not big enough to cover the whole display object like DIV. This is a so basic feature while the Flex canvas style doesn’t support it. If we want to get this feature done, we have to write the code by ourself. First, let’s see what the background image effect I am talking about.
Create Customized Drop Down Menu in Flex
In Flex 3, there are two flex components can be used to create dropdown menu. But none of them are easily customized and change styles. Menu is the default component in Flex for us to create menu utility. ComboBox and PopUpButton looks the same. There are only a little different between them. The ComboBox is designed for data selection. When you click the ComboBox, it will show the dropdown list by default. PopUpButton performs as a button with an extra small drop down icon. When you click the drop down icon, it will show you a drop list. Here is the dropdown menu what I want to implement in my project.
Change TextArea Vertical Scrollbar Style in Flex 3
There are too many tutorials teaching us how to change textArea styles in Flex 4 with Spark theme styles. It is unlucky for people like me who are still working on legacy Flex 3 project. It cost me several hours to change the textarea component styles in Flex 3. In my project, I want to change the Flex TextArea vertical scrollbar truck style, drag thumb style, and hide the scroll arrow. First, I create the scrollbar truck skin and thumb skin in flash and publish as swc file, then change the Textarea vertical scrollbar style by following code:
Read more
Change CheckBox Style in Flex 3
These days, I am working on a new Flex 3 project. Since new Flex SDK 4.6 was released several months ago, it is very hard to find any resources for Flex 3, especially for the Flex 3 Skin tutorials. All Flex 3 components are using the halo theme styles. After Flex 4.0, the new spark theme styles are involved and the process to customize skin become much more flexible. The spark theme styles allow programmer to change more styles, but it also becomes more complicated to create and apply new style. Changing checkbox style in Flex 3 is a very simple job. If you know how to change Button style in Flex 3, there will not be any problems for you to change CheckBox style.
Read more
Create Right Click Menu in Multiple Parent-Child Layer
In Flash, creating right click menu is easy and simple. In one display object which has several cascade children display objects, we can define different right click menu for display objects in different levels. Here I will show a simple example. In this example, I will create a three level display object. The blue color displayObject is the most out parent, which has a child displayobject in green color, and the green color displayObject has one red color child display object.
Read more