">

flex4 TiltleWindow

前端开发 作者: 2024-08-25 17:20:01
<?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>
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);
				
			}
原创声明
本站部分文章基于互联网的整理,我们会把真正“有用/优质”的文章整理提供给各位开发者。本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
本文链接:http://www.jiecseo.com/news/show_68510.html
flex4 flex 4 tiltlewindow