My code isn't working. trace(num) gives 0. Any suggestions?
var WeightTI:TextInput = new TextInput();
var tf:TextFormat = new TextFormat();
var weight = String(WeightTI.text);
var num = Number(weight);
WeightTI isn't going to have any text input by a user when that code executes. you need to wait until there's input. ie, use a listener.
What would the new code look like?