易截截图软件、单文件、免安装、纯绿色、仅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 no.3

--------------ex3_01_solution  -----------------------Using text controls
在嵌套的EmployeeOfTheMonth中
    <s:Scroller width="100%">
       
  <!-- Use a RichEditableText control -->
     &nbs ......

flex 右键菜单管理工具类

/*============使用==========*/
var contextmenu:ContextMenuManager=new ContextMenuManager();
contextmenu.add("最大化",menuHandle);//menuHandle处理函数
/**==================ContextMenuManager.as==========================*/
package file
{
    import flash.display.Interact ......

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号