易截截图软件、单文件、免安装、纯绿色、仅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的一些样式说明

1、ButtonBar组件:
       firstButtonStyleName: "mybuttonBarFirstButtonStyle"; //第一个按钮的样式
       lastButtonStyleName: "mybuttonBarLastButtonStyle";//最后一个按钮的样式
       buttonStyleNa ......

Flex setter 陷阱

这样的陷阱,谁能不中招?
Flex的setter大家都用过吧,看例子:
主程序:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[

function init():void{
v ......

flex学习笔记5

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Application container. -->
 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    backgroundGradientColors="[0xCCCCCC, 0x66CCFF]"
    backgroundColor="0xCCCC ......

flex 加载gif图片

 使用到的as3gif,请到Google去下载
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" xmlns:file="file.*" xmlns:commont="commont.*">
<mx:TitleWindow title="abc" id="ADwindow" width="400" height="283" >
< ......

flex鼠标移到某组件鼠标的形状变成手型

 比如我要设置当鼠标移动到label上时,鼠标形状变成手型
具体代码
<mx:Label text="click me"  
    useHandCursor="true"    
    buttonMode="true"    
    mouseChildren="false"/>
只要设置:
use ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号