微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

flex4 TiltleWindow

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow 
	xmlns:mx="http://www.adobe.com/2006/mxml" 
	layout="absolute" width="400" height="300"
	close="close()" showCloseButton="true">
	<mx:Script>
		<![CDATA[
			import mx.managers.PopUpManager;
			[Bindable]
			public var myPopUpvar:Array = new Array();
			public var logs:String = "";
			private function close():void
			{
				PopUpManager.removePopUp(this);    
			}
			private function sendMessage():void
			{
				var outgoingEvent:Event = new Event("pop",false);
				logs = labelPosition.selectedItem.toString();
				dispatchEvent(outgoingEvent);
				close();
			}
			public function setData(str:Array):void
			{
				myPopUpvar = str;
			}
		]]>
	</mx:Script>
	
	<mx:Form cornerRadius="5" indicatorGap="5" paddingBottom="5" 
			 paddingLeft="5" paddingRight="5" paddingTop="5" id="basicPropertyPane" width="100%" >
		<mx:Label text="Label Properties" fontStyle="italic" width="100%" fontWeight="bold"/>
		<mx:FormItem label="Name:">
			<mx:TextInput width="90%" id="labelName"/>
		</mx:FormItem>
		<mx:FormItem label="Color:">
			<mx:ColorPicker id="labelColor"/>
		</mx:FormItem>
		<mx:FormItem id="locationForm" label="Location(X,Y):">
			<mx:NumericStepper minimum="0" maximum="1000" id="locationX" />
			<mx:NumericStepper minimum="0" maximum="1000" id="locationY"/>
		</mx:FormItem>
		<mx:FormItem label="Position:">
			<mx:ComboBox id="labelPosition" dataProvider="{myPopUpvar}" />
		</mx:FormItem>
		<mx:FormItem label="Offset(X,Y):">
			<mx:NumericStepper minimum="-200" maximum="200" id="labelOffsetX" />
			<mx:NumericStepper minimum="-200" maximum="200" id="labelOffsetY"/>
		</mx:FormItem>
		<mx:Button label="send" right="10" bottom="10" click="sendMessage()"/>
	</mx:Form>
</mx:TitleWindow>

mxml代码

public var firstwindow:Firstwindow = new Firstwindow();
			public var linetwindow:LineRender = new LineRender();
			//使用组件对象打开弹出式窗口的最大好处是可以重用组件并保持所以的状态值.
			private function createWindow(e:MouseEvent):void
			{
				firstwindow.addEventListener("pop",getwindowData);
				PopUpManager.addPopUp(firstwindow,this,false);
				PopUpManager.centerPopUp(firstwindow);
				//windowInnerStartDragging(e);
				
				
			}
			private function getwindowData(e:Event):void
			{
				//createNodeforward(e);
				
			}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐