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

Flex Tree组件Demo

这个DEMO可以创建一个全新的树型结构,让我感到奇怪的是,虽然我用XML而不是XMLListCollection/ArrayCollection作为Tree的数据源,但对XML的更新依然会在Tree中反映出来——这似乎和Flex的文档有冲突,下面是引用Flex文档的一段内容:
Raw objects are often not sufficient if you have data that changes, because the data provider component does not receive a notification of any changes to the base object. The component therefore does not get updated until it must be redrawn due to other changes in the application, or if the data provider is reassigned. At that time, it gets the data again from the updated raw object.
Here is the demo(怎么插入swf文件?用embed标签?)
Source code here:
<?xml version="1.0"?>
<!-- dpcontrols/TreeSimple.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
import mx.collections.XMLListCollection;

[Bindable]
private var list:XML = <list/>;

public function onBtnAddNodeClick(e:Event):void
{
var newNodeName:String = nodeName.text;
if(newNodeName.length == 0)
return;

var currentNode:XML = XML(tree.selectedItem);
if(currentNode == null || currentNode.@type!=1)
return;

var newNode:XML = <node/>;
newNode.@label = newNodeName;
newNode.@type= 1;
newNode.@isBranch = true;

currentNode.appendChild(newNode);
}

public function onBtnAddTopNodeClick(e:Event):void
{
var newNodeName:String = nodeName.text;
if(newNodeName.length == 0)
return;

var newNode:XML = <node/>;
newNode.@label = newNodeName;
newNode.@type= 1;
newNode.@isBranch = true;
list.appendChild(newNode);
}

public function onBtnDelNodeClick(e:Event):void
{
var currentNode:XML = XML(tree.selectedItem);
if(currentNode == null)
return;
var sibling:X


相关文档:

flex 获得客户端信息


flash.system. Capabilities.os;//客户端系统版本
flash.system.Capabilities.language;//客户端语言
flash.system.Capabilities.version;//播放器版本
flash.system.Capabilities.playerType;//播放器类型
flash.system.Capabilities.screenResolutionX&Y;//分辨率 ......

去掉Flex蓝色选中状态

 其实一般的情况下是不会用到这种情况的,一般在程序里,比如选中要填写的项目,都喜欢有一个选中的状态,但是现在我们来个反其道而行,如果我不想要这个状态该怎么办呢?
      参考了些资料,其实也简单,有好几种方法,但是发现了一个最有用的方法,首先我们在舞台上随意放几个TEXTINPUT ......

Flex技巧:计算器源代码

问题描述:
输入一个数,然后按某个运算符,再输入另一个数,按等号即可得出结果。只按照输入顺序计算结果,而非按照运算符优先级来得出结果,即,如果按顺序输入2+8*3=会得到30,而非26.
算法描述:
定义三个全局变量,分别是first(Number), second(Number), symbol(String)
first代表二目运算中第一个数,se ......

Flex/AS3类库资源大全


1、as3ebaylib
http://code.google.com/p/as3ebaylib/
2、as3youtubelib
http://code.google.com/p/as3youtubelib/
3、as3flickrlib
http://code.google.com/p/as3flickrlib/
4、Yahoo ASTRA Flash Components
http://developer.yahoo.com/flash/astra-flash/
5、facebook-as3
http://code.google.com/p/faceboo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号