Here is my old code....
Good luck!
function CloseAll() {
var i:Number;
var j:Number;
j = this.length;
for(i = 0; i < j; i++) {
var oNode:XMLNode = this.getTreeNodeAt(i);
if(oNode != undefined && this.getIsBranch(oNode)) {
this.CloseNode(oNode);
i=0;
j = this.length;
}
}
}
function CloseNode(oNode:XMLNode) : Void {
if(this.getIsBranch(oNode) and this.getIsOpen(oNode)) {
if(oNode != this.getTreeNodeAt(0)) {
this.setIsOpen(oNode, false);
}
if(oNode.childNodes.length > 0) {
var j:Number;
for(j = 0; j < oNode.childNodes.length; j++) {
var oSubNode:XMLNode = oNode.childNodes[j];
this.CloseNode(oSubNode);
}
}
}
}
Lieven Cardoen a écrit :
Does anybody have a function to close all branches in tree
component???(V2 component Flash)
Thx, Lieven Cardoen
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
===============================================================
Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]
===============================================================
Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de
confidencialidad <http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com