易截截图软件、单文件、免安装、纯绿色、仅160KB

个人总结flex应用 II【经典】

Mxml组件的打开和关闭特效
openDuration="1000" openEasingFunction="Bounce.easeOut"
closeDuration="1000" closeEasingFunction="Bounce.easeIn"
//菜单透明效果
background-color:#000000;
background-alpha:0.1;
border-style:solid;
drop-shadow-color:#000000;
drop-shadow-enabled:yes;
//展开所有节点
private function expandAll():void{
//tree.expandChildrenOf(tree.selectedItem,true);
for each(var item:XML in tree.dataProvider){
tree.expandChildrenOf(item,true);
}
}
//关闭所有节点
private function closeAll():void{
tree.openItems=[];
}
//添加右键菜单
private var meunu1:ContextMenuItem;
private var meunu2:ContextMenuItem;
public function init():void{
meunu1=new ContextMenuItem("hello");
meunu2=new ContextMenuItem("word",true);
meunu1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menu1Handle);
meunu2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menu2Handle);
var menu:ContextMenu=new ContextMenu();
menu.hideBuiltInItems();
menu.customItems.push(meunu1);
menu.customItems.push(meunu2);
this.contextMenu=menu;
}
private function menu1Handle(e:ContextMenuEvent):void{
Alert.show("hello");
}
private function menu2Handle(e:ContextMenuEvent):void{
Alert.show(e.target.caption);
}
让TitleWindow不能被拖动
var win:PWindow=PWindow(PopUpManager.createPopUp(this,PWindow));
win.isPopUp=false;//设置这个属性就可以了哦
Tooltip文本换行
Tooltip 在ActionScript 中, 您使用 \n 转义的新行字符。
Tooltip 在 MXML 标签中, 您使用 
//增加DataGrid的行号
private function orderNoLbl(item:Object,column:DataGridColumn):String{
        return (this.userGrid.dataProvider.getItemIndex(item)+1).toString();



相关文档:

Flex使用弹出窗口为DataGrid添加新数据

经常在Demo中会看到列表,表格等方式来显示数据。当然有时候也需要添加数据到这些列表或者表格中。有很多方式提交,这里展示一个弹出窗口的方式来添加新的数据到DataGrid中。
例子展示:
首先,我们开始建设一个基本的界面结构,一个带有“Notes"标题的Panel,一个DataGrid,以及一个用于提交数据的按钮。
<?xml ......

Frame Rate对Flex程序占用系统资源的分析

 Frame Rate对Flex程序占用系统资源的分析,我们通过浏览器不同、Frame Rate不同的情况下,系统资源CPU的利用率比较。
 Frame Rate的设置:
     默认Frame传输速率是24,我们可以这样来设置,mxmlc -defaule-frame-rate 50 HelloWorld.mxml,通过这一语句的设置,
可以使Frame传输速率为5 ......

flex 鼠标悬停离开 控制放大缩小 源码

 
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Zoom effect. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
">
<mx:Style source="style/style.css"/>
    <mx:Scri ......

flex 日期处理工具类

 根据别人写了类,自己又增加了一部分,贴出来分享
 /*获得两个日期之差 */
public static function getDateDiff(startDate:Date, endDate:Date):int
{
var diff:Number = (Number(endDate) - Number(startDate))/(3600000*24);
return diff;
}
/* 获得现在日期 */
public static function getDate() ......

用flex如何显示数字时钟

 通过Flex中的Timer可是实现数字时钟的效果,其效果图如下:
实现的代码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

<mx:Script>
<!--[CDATA[

import mx.formatters.DateFormatt ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号