繁体   English   中英

flex 简单的翻转问题

[英]flex simple rollover problem

我在 panel1 中有一个 panel2。 当我翻转 panel1 时,我希望 panel2 可见,而当 mouseOut 时,panel2 不可见。 使用 mouseOcer 和 MouseOut 事件很简单

当然麻烦是当我翻转panel2(在panel1内)时:它开始闪烁。 我的问题是:如何简单地纠正它? (当然我希望 panel2 内的按钮也可以激活)

问候

为什么这段代码对你不起作用?

<?xml version="1.0" encoding="utf-8"?>
<s:Application minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Script>
    <![CDATA[
        [Bindable]
        private var isOver:Boolean;
    ]]>
    </fx:Script>
    <s:Panel horizontalCenter="0" id="panel1" mouseOut="isOver = false" mouseOver="isOver = true" title="Panel1"
        verticalCenter="0">
        <s:Panel bottom="10" id="panel2" left="10" right="10" title="Panel2" top="10" visible="{isOver}">
            <s:layout>
                <s:VerticalLayout horizontalAlign="center" paddingBottom="10" paddingLeft="10" paddingRight="10"
                    paddingTop="10" verticalAlign="middle" />
            </s:layout>
            <s:Label id="actionResult" />
            <s:HGroup>
                <s:Button click="actionResult.text = 'Button 1 clicked'" label="Button1" />
                <s:Button click="actionResult.text = 'Button 2 clicked'" label="Button2" />
            </s:HGroup>
        </s:Panel>
    </s:Panel>
</s:Application>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM