Simple scrollbar + xml menu = I'm screwed

Hey all -

I’ve made a custom scrollable xml driven menu using the simple custom scrollbar tutorial from kirupa with a customized xml menu structure from elsewhere. The problem I’m having is in getting the contentMC within the scrollbar movieclip to get the correct height for the generated menu. The buttons generated by the xml are 40 pixels tall, and the number of buttons can be gotten from the names array which pulls in text for the buttons. So the content height should be defined by something like this, I’m thinking:

in the root timeline actions:

var heightNum:Number = names.length;

and then in the contentMC actions:

var contentHeight = (_root.heightNum * 40);

When I do this and trace out contentHeight I’m getting the ol’ NaN response. I’m pretty sure this is happening because the content height var is trying to do math before the heightNum var has been created. But I can’t seem to sort it out. Can anyone take a look at my files to figure out a way to make this work?