易截截图软件、单文件、免安装、纯绿色、仅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时序图示例

<?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;
......

Flex与服务器交互之一(URLRequest +URLLoader应用)

   由于Flex只是一种客户端技术其本身并不能直接同数据库交互,在实际的应用开发过程中Flex提供了如URLRequest、HTTPService、RemoteObject、WebService等类以实现同服务器的通讯和数据交互,下面做一些介绍和实例解析:
   1、使用URLRequest向服务器发送请求,使用URLLoader接收服务器返回的数据:
& ......

去掉Flex蓝色选中状态

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

Flex与java整合问题

问个问题 最近在学习Flex。。。照着网上资料,在MyEclipse中完成了Flex与web项目整合
在做普通Flex运行测试是是没有问题的,但如果想调用java类,按照网上的做法,是要更改该目
录下的remoting-config.xml,但是我自动生成的WebRoot/WEB_INFO/flex目录下面仅仅只有
services-config.xml一个文件,这是什么原因??我的是 ......

Flex技巧:计算器源代码

问题描述:
输入一个数,然后按某个运算符,再输入另一个数,按等号即可得出结果。只按照输入顺序计算结果,而非按照运算符优先级来得出结果,即,如果按顺序输入2+8*3=会得到30,而非26.
算法描述:
定义三个全局变量,分别是first(Number), second(Number), symbol(String)
first代表二目运算中第一个数,se ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号