Numeric Value loaded to Variable from txt file?

Why can’t I assign a numeric value to a variable from a variable in a text file?

text file contains HowManyBands=3

actionscript is as follows:

loadNumVar = new LoadVars();
var NumOfBands:Number = new Number();

loadNumVar.onLoad = function(success) {
if(success) {
NumOfBands = this.HowManyBands;
trace('Number of bands is '+NumOfBands);

within the if statement, the trace reports 3, however, if I try to use the variable later or trace it in the next frame of my video, it thinks it’s 0. How can I get the Variable to hold onto the value throughout my animation?