Flex中利用CSS样式改变原有的toolTip风格

<mx:Style>
        ToolTip {
            backgroundColor: black;
            backgroundAlpha: 1.0;
            cornerRadius: 0;
            color: white;
        }
</mx:Style>
 

mxml里的转义字符

[ 2010-10-21 15:02 | by 草山湖 ]
mxml也就是xml,有些特殊字符是不能直接写的,不然就破坏xml的结构了。下面就是需要转义的字符。
点击在新窗口中浏览此图片
Tags:

Flex组件生命周期

[ 2010-10-19 17:47 | by 草山湖 ]
1. Initlization

Construction
Construction是组件构造阶段,组件的构造器不能有必须的参数。在构造函数中可以添加事件监听器,初始化属性。这个阶段只做很少的事情。

Configuration
Configuration是组件的配置阶段,组件的属性,事件回调函数,样式和效果定义都在这个阶段完成。你不应该把这些任务推迟到Attachment和Initlization阶段之后。

Attachment
Attachment阶段是把该组件追加到显示列表当中,一个Flex组件会被一个Flex容器IContianer以addChild方法添加到显示列表当中。

Initlization
在Initlization初始化阶段,组件会执行一次完整的invalidation/validation周期。这个阶段做的工作流程是:

发出preinitialize事件。
执行方法createChildren()
发出initialize事件。
行一次完整的invalidation/validation周期。
发出creationComplete事件。
最简单的办法:可以用CSS样式来修改,最主要的是要准备一个 cursor.swf 文件
本站提供18个cursor文件,
下载文件 (已下载 290 次)

这里是FLA源码,可以根据个人需要进行更改,
下载文件 (已下载 265 次)

点击在新窗口中浏览此图片


CursorManager
{
 busyCursor: Embed("/assets/skins/cursor.swf");
}
Tags: ,
Flex中利用SortField和Sort类对ArrayCollection进行排序的例子
主要代码如下:
var dataSortField:SortField = new SortField();
dataSortField.name = "data";
dataSortField.numeric = true;

/* Create the Sort object and add the SortField object created earlier to the array of fields to sort on. */
var numericDataSort:Sort = new Sort();
numericDataSort.fields = [dataSortField];

/* Set the ArrayCollection object's sort property to our custom sort, and refresh the ArrayCollection. */
arrColl.sort = numericDataSort;
arrColl.refresh();
分页: 1/11 第一页 1 2 3 4 5 6 7 8 9 10 11 下页 最后页 [ 显示模式: 摘要 | 列表 ]