Help with masking

hey
so I’m trying to make dynamic mask that gets bigger by drawing lines to uncover a tree.(as if it is growing).

i’ve written the code to make the movieclip grow to the shape of the tree but when i set it to mask the movieclip that contains the tree every thing just disappears.


var number_of_dots = 9;
var treeArray = new Array(number_of_dots);
var branch = 1;
_root.createEmptyMovieClip("maskLine",0);


for (k=1; k<treeArray.length; k++) {
    treeArray[k] = _root["d"+k];
}

_root.onEnterFrame = function() {
    if (branch<treeArray.length-1) {
        maskLine.moveTo(treeArray[branch]._x,treeArray[branch]._y);
        maskLine.lineStyle(15,0x000000,100);
        maskLine.lineTo(treeArray[branch+1]._x,treeArray[branch+1]._y);
        branch++;
    }
    _root.maskee.setMask(_root.maskLine);  
};

where [“d”+k] are movieclips on the stage so x,y coods can be found and maskee is the movieclip of the tree.

any help would be much appreciated.

thanks in advance grimboto