    package flare.vis.controls
    {
        import flare.animate.Transitioner;
        import flare.vis.Visualization;
        import flare.vis.data.NodeSprite;

        import flash.display.InteractiveObject;
        import flash.events.MouseEvent;

        /**
         * Interactive control for expaning and collapsing graph or tree nodes
         * by clicking them. This control will only work when applied to a
         * Visualization instance.
         */
        public class ExpandControl extends Control
        {
            private var _cur:NodeSprite;

            /** Update function invoked after expanding or collapsing an item.
             *  By default, invokes the <code>update</code> method on the
             *  visualization with a 1-second transitioner. */
            public var update:Function = function():void {
                var vis:Visualization = _object as Visualization;
                if (vis) vis.update(1).play();
            }

            // --------------------------------------------------------------------

            /**
             * Creates a new ExpandControl.
             * @param filter a Boolean-valued filter function for determining which
             *  item this control will expand or collapse
             * @param update function invokde after expanding or collapsing an
             *  item.
             */
            public function ExpandControl(filter:*=n