Animation
The
AdvancedTree component can be instructed to animate when opening and closing nodes. By default, the component animates on both the x and y axes using custom easing functions. You can turn off animation horizontally by setting
animateX to
false in either the IDE Parameters panel or using the ActionScript property. This will keep nodes at their true indentation when opening and closing as opposed to tweening horizontally to their indentation. Likewise, you can set
animateY to
false in the same manner. This will prevent nodes from tweening vertically into position when opening or closing. The
animationTime parameter and property controls the number of milliseconds the tweens will take.
If you wish to change the easing function nodes use to tween into position, you can pass easing functions to the
easeX and
easeY properties which are only accessible through ActionScript. If you are using Flash, you can find easing classes in the your Flash install under Configuration > ActionScript 3.0 > Classes > fl > motion > easing. Any of the methods of these classes can be passed as valid easing functions.
import fl.motion.easing.Elastic;
import fl.motion.easing.Exponential;
tree.easeX = Exponential.easeOut;
tree.easeY = Elastic.easeOut;
tree.animationTime = 800;
If you are using Flex, you can find easing classes in the mx.effects.easing package.