0

我想阻止用户单击弹出窗口后面的按钮。我该怎么做?

到目前为止,这是我的代码:

<?xml version="1.0" encoding="utf-8"?>
<s:SkinnablePopUpContainer xmlns:fx="http://ns.adobe.com/mxml/2009" backgroundAlpha="0"     contentBackgroundAlpha="0" width="100%" height="100%" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:scripts="scripts.*">
<fx:Script>
    <![CDATA[
        protected function close_clickHandler(event:MouseEvent):void
        {
            this.close();
        }

    ]]>
</fx:Script>
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Panel title="Optional Notes for Report" backgroundAlpha=".6" backgroundColor="#120242" width="100%" height="100%">
    <s:layout>
        <s:VerticalLayout horizontalAlign="center" verticalAlign="top"/>
    </s:layout>
    <s:HGroup height="100" width="100%">
    <s:TextArea id="notesTextArea" width="100%" height="100%" fontSize="14" styleName="labelWhite2" opaqueBackground="#200772" />
    </s:HGroup>
    <s:HGroup horizontalAlign="center">
        <s:Image click="close_clickHandler(event)" fillMode="scale" scaleMode="letterbox" width="30%" 
                 smooth="false" smoothingQuality="high" source="@Embed('/assets/images/ok_button.png')"/>
    </s:HGroup>
</s:Panel>
</s:SkinnablePopUpContainer>
4

2 回答 2

2

创建弹出窗口时,请确保它是模态的:

它是PopUpManager的createPopUp()addPopUp()方法的属性

于 2013-05-21T14:21:21.547 回答
0

open()调用方法时可以设置modal属性

var popup:MyPopUp = new MyPopUp();
popup.open(this,true);  
于 2013-05-22T07:00:25.480 回答