In development of Flash/Flex application I've came across weird thing: button placed over transparent panel button remains transparent even with alpha="1".
<mx:HBox backgroundColor="#444444" alpha="开发者_C百科0.8">
<mx:Button width="34" height="34" toolTip="Home" icon="{homeIcon}" alpha="1" />
</mx:HBox>
Is there any way to make button not transparent?
If you are setting the alpha of your panel to 0, the children will also be affected. If you really want a transparent panel with a fully opaque child component, you can create a custom skin that does not draw the background of the panel (although you may need to fill with a fill alpha of 0, otherwise Flash may interpret an empty area as being truly empty). If it's just the background of the panel (and not the frame/titlebar) that you want transparent, you may be able to simply set the backgroundAlpha of the panel to 0. Hope that helps.
EDIT: Based on your updated code, you need to change the alpha property on your HBox to backgroundAlpha, then all should work as expected.
精彩评论