Tag Archives: ActionScript

Flex: ArrayCollection/ListCollectionView 排序

1. 初始化Sort
protected var sortCodes:Sort = new Sort();
2. 设定Sort的compareFunction; sortCodes.compareFunction = compareFuncCodes
/** 对代码进行排序*/
prot

More…

Posted in ActionScript, Flex | Tagged , , , , , | Leave a comment

Flex Tree ToolTip 设定

为节点或叶子设定其特有之ToolTip:
// Constructor
public function TreeForCodeMaintain(codeMaintainService_:ICodeMaintainService) {
super();
_codeMaintainServi

More…

Posted in ActionScript, Flex | Tagged , , , , | 2 Comments

Flex: 获得给定日期在其月份内为第几个day of week

/*

* All Rights Reserved
* Changelog:
* Li Guoliang – 2009-6-5: Initial version
* @liguoliang.com
*/

/**
* 获得给定日期的是该月的第几个day of week. 如2

More…

Posted in Flex | Tagged , , | Leave a comment

Flex 图像处理: 黑白滤镜

需求: 在某些时候, 如客户下线, 须将头像一类的图片变为黑白.
解决: 使用颜色矩阵滤镜.
效果: 如下图:
image
姓名后坠有"/黑白"[Absent]的图像为滤镜使用后的效果
使用方法:
当用户考勤状态为Present时:
//如果没有使用其他滤镜, 直接简写为:
_img.

More…

Posted in ActionScript, Flex | Tagged , , , | 1 Comment

Flex: 自适应大小TextArea, Resizable TextArea

Flex3中: http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/
Flex4 Spark组件已支持自适应高度: http://liguoliang.com/2010/auto-resizable-text-ar

More…

Posted in ActionScript | Tagged , | Leave a comment