Flex Panel,Group click through和mouseChildren

时间:2011-06-08 07:27:28

标签: flex panel flex-spark click-through

我有Panel(或Group / VGroup / HGroup),背景透明(backgroundAlpha = 0)并且没有任何嵌入的背景图像。除了一些儿童按钮,我想要“点击”。如果我只设置mouseEnable = false,则面板仍然会收到鼠标单击。但是将mouseEnable和mouseChildren都设置为false我无法单击按钮。我想有一些 所以我如何让孩子按钮接收鼠标事件和面板仍然有“点击”。

更新

通常源代码如下,按钮需要接收鼠标事件。我想在面板上点击,因此主容器将接收鼠标事件以移动我的头像。

<s:Panel borderVisible="false" backgroundAlpha="0.0" 
     contentBackgroundAlpha="0.0" x="37" y="412" width="316" height="71">
<s:layout>
    <s:HorizontalLayout/>
</s:layout>
<s:Button id="shop_btn" width="55" height="30"/>
<s:Button id="inventory_btn" width="55" height="30"/>
<s:Button id="mail_btn" width="55" height="30" />
<s:Button id="buddy_btn" width="55" height="30" />
<s:Button id="quit_btn" width="55" height="30" /></s:Panel>

0 个答案:

没有答案