当前位置: 代码迷 >> Web前端 >> Title Window示范
  详细解决方案

Title Window示范

热度:670   发布时间:2012-11-19 10:18:51.0
Title Window示例
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="14">
	<mx:Script>
		<![CDATA[
			import mx.managers.PopUpManager;
			import mx.containers.TitleWindow;
			import mx.events.FlexMouseEvent;
			private var helpWindow:TitleWindow;
			private function showLogin():void {
				//创建弹出窗口,false表示,其他组件现在可见。
				helpWindow = TitleWindow(PopUpManager.createPopUp(this,
					title2, false));
				//鼠标点击外部时,关闭窗口
				helpWindow.addEventListener("mouseDownOutside", removeForm);
			}
			private function removeForm(event:FlexMouseEvent):void {
				PopUpManager.removePopUp(helpWindow);
			}
		]]>
	</mx:Script>
	<mx:VBox width="300" height="300">  
		<mx:Button click="showLogin();" label="click here to show TitleWindow"/>
	</mx:VBox>
</mx:Application>

?

<?xml version="1.0"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="提示?"
    showCloseButton="true" 
    close="removeMe()" fontSize="14">
	<!--close="removeMe()"设置关闭窗口-->
    <mx:Script>
        <![CDATA[
            import mx.managers.PopUpManager;
            private function removeMe():void {
                PopUpManager.removePopUp(this);
            }
        ]]>
    </mx:Script>
<mx:Text text="text"/>
<mx:Button label="blabel" click="removeMe()"/>
</mx:TitleWindow>

?

  相关解决方案