Undefined problems

Hi all

I have a dynamic text field call mybox_txt
it works fine when publishing with within CS4 but when I open the swf locally or publish it to a webserver I get a undefined message
any help would be appriciated or if anyone can get the same results using as3 would also be good

 
var lv:LoadVars = new LoadVars();
lv.onData = function(thetext:String) {
 mybox_txt.text = thetext;
}
lv.load("http://mysite.co.uk/flash/text/?name=myName&variable=number");  

Thanks for any help given

Ston