Air 窗体透明和随意拖动效果实现

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="96" height="97" showFlexChrome="false">
	<mx:Script>
		<![CDATA[
			import mx.controls.*;
		
			private function appTest():void
			{
				Alert.show("Test", "Test");
			}
		]]>
	</mx:Script>
	<mx:Button  id="TestButton" x="10" y="10" label="Button" width="70" height="70" mouseDown="this.nativeWindow.startMove()"/>
	
</mx:WindowedApplication>

XML配置文件中:

 

代码
1 <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
2 <systemChrome>none</systemChrome>
3
4 <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
5 <transparent>true</transparent>
6
7 <!-- Whether the window is initially visible. Optional. Default false. -->
8 <visible>false</visible>

 

posted @ 2010-09-26 11:13  noevil  阅读(625)  评论(0编辑  收藏  举报