Line 16 happened before mytext.txt was loaded, you have to trace line 16 after the text file is loaded.

PHP Code:
onSelfEvent (load) {   
    var 
n:Number=0;//Declare n outside of the function.    = _root.n
    
loadV = new LoadVars();                        
    
MyArray = new Array();
    
loadV.load("mytext.txt");  
    
loadV.onData = function(s) {
        
s.split('&');              
        for(
i=1p.lengthi++) {            
            
MyArray[i]=p[i].split('|'); 
        }
        
parseFloat(MyArray[1][0]);
        
_root.main.=n
trace
(_root.main.n)// here true value
   
ready();//Call ready after the loaded text file loop.
}

function 
ready(){//Check _root.main.n after text file is loaded
trace(_root.main.n
}


download v3 (swish)