flex 笔记(更新中。。。。)
1、如果要设置Validator验证组件里面提示字的大小,可以在mxml中加入
<mx:Style>
<!--[CDATA[
.errorTip
{
fontSize: 12;
}
]]-->
</mx:Style>
2、设置tooltip中的样式(如字体大小,颜色)可在mxml中的creationComplete的initApp()加入
StyleManager.getStyleDeclaration("ToolTip").setStyle("fontSize",15);
StyleManager.getStyleDeclaration("ToolTip").setStyle("backgroundColor","#F7F1F1");
相关文档:
通过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 ......
No.1 某字符器放到粘贴版:
System.setClipboard(strContent);
No.2 复制数组:
//dummy solution( well, it works )
var bar:ArrayCollection = new ArrayCollection();
for each ( var i:Object in ac ){
bar.addItem( i );
}
// fantastic ! //
var bar:ListCollectionView = new ListCollectionVi ......
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
对包含自定义命名空间的XML 进行分析是比较困难的, 它要求该命名空间一定要在任何XML 返回前被申明, 同时要在该命名空间内进行分析。比如对于以下的一个xml:
test.xml
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle= ......
1、arraycollection转化为xml,代码如下:
//动态生成树形结构
public static function flatArrayToXML(arr:Object,rootname:String=null,nodename:String=null, outputString:Boolean=false):Object{
if (arr is Array){
......