Here is my as2
homeText = new LoadVars();
homeText.onLoad = function(success) {
if (success) {
RanNum = Math.ceil(Math.random()*6);
ran = this["quote"+1];
_root.contentMain.home_txt.text = ran;
var sizing:Number = this["size"];
_root.contentMain.home_txt._height = sizing;
}
else {
_root.contentMain.home_txt.text = "The text failed to load due to an error";
}
}
homeText.load("hometext.txt");
Here is my external file
quote1=Sushi is one of my favorite foods but I rarely eat it.Sushi is one of my favorite foods but I rarely eat it&size=400
Why does this:
var sizing:Number = this["size"];
_root.contentMain.home_txt._height = sizing;
not make the text box 400 pixels in height.
If I just put
_root.contentMain.home_txt._height = 400;
it works, but I need to be able to change that number externally in that text file.
Thanks in advance this is driving me crazy.