I'm trying to determine the width of a string that will change dynamically.

// create LoadVars object
myLoadVar = new LoadVars();
myLoadVar.onLoad = function (success){
if (success == true) {

//get length of string
my_str = myLoadVar.texty;
my_fmt = newsbox.getTextFormat();
metrics = my_fmt.getTextExtent(my_str);
newslength = metrics.textFieldWidth;
This codes seems to find the width of my dynamic text box(called newsbox), but it returns the length of the dynamic string's placeholder text UNLESS i let the movie run again without stopping. Then it will return the correct length of the text I set from the file. I tried to directly set string to lookup from the LoadVar(that is the my_str variable) but it returns undefined. Any ideas seriously appreciated!