您的位置:首页 > 其它

flex的一些东西!

2010-08-16 11:28 387 查看
程序下的xml文件下的<transparent></transparent>这个标签是说明背景能否透明的!true为可以透明。

另外我还想弄一个在任务栏上不显示程序标签的功能,这段代码实现了这个功能。
private function init():void
{				    newwindow.systemChrome=NativeWindowSystemChrome.NONE;
newwindow.transparent=true;
newwindow.type = NativeWindowType.LIGHTWEIGHT;
newwindow.open();
this.nativeWindow.close();
}


在这个<s:Window (这是一些窗体属性)></s:Window>标签下可以绘制新的窗体为其添加组件等等,这个标签在<s:WindowedApplication></s:WindowedApplication>之间添加。

这段代码是一些效果可以为窗体加载时增加动画效果

<s:Fade id="chuxian" alphaFrom="0" alphaTo="1" duration="2000" target="{newwindow}"/>


可以在<s:Window creationComplete="chuxian.play()"></s:Window>中增加代码实现效果

下面这段代码实现一个弹出窗体的绘制,我用的是表格的结构。

<s:TitleWindow id="titleWin"
title="今日提醒"
width="380" height="320"
close="titleWin_closeHandler(event);"  backgroundAlpha="0.64">
<mx:Grid x="0" y="0" horizontalGap="-58">
<mx:GridRow verticalAlign="top" paddingLeft="10" paddingRight="10"
paddingTop="10" paddingBottom="0">
<mx:GridItem width="300" height="20">
<s:Label text="日期:" fontSize="16" />
<s:Label id="riqi" fontSize="16" width="200" height="19" enabled="true"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow verticalAlign="top" paddingLeft="10" paddingRight="10"
paddingTop="0" paddingBottom="0" >
<mx:GridItem width="100" height="18">
<s:Label text="今天要做的事:" fontSize="16"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow verticalAlign="top" paddingLeft="10" paddingRight="10"
paddingTop="0" paddingBottom="10" >
<mx:GridItem width="355" height="180">
<s:TextArea id="sj" fontSize="16" width="355" height="180"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow verticalAlign="top" paddingLeft="10" paddingRight="10"
paddingTop="0" paddingBottom="10">
<mx:GridItem width="220" height="25">
<s:Button label="确定" width="60" height="25"  fontSize="16"  click="xiugai();"/>
</mx:GridItem>
<mx:GridItem width="80" height="25">
<s:Button label="取消" width="60" height="25"  fontSize="16"  click="gbtj();"/>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</s:TitleWindow>


打开文件用这段代码实现地址路径

var file:File=new File(File.applicationDirectory.resolvePath("data//"+wj).nativePath);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: