I have modified a multichoice quiz I use in school and would like to add an element whereby the user places a bet before answering. He starts with 200 points and inputs the proportion of this he would like to bet before pressing True or False (he can't bet more than he has). If he is right, the amount bet is added to the 200 and if he’s wrong, the amount is taken away, and so on.
The relevant bit of script is this, but I’ve no idea how to change the ‘var pointsToEarn’ element to accept a number from the betting input.

System.useCodePage = true;
var randomNum;
var pointsToEarn = 1;
var pointsToLose = 1;
a = new String(null);
b = new String(null);
c = new String(null);
d = new String(null);
var numOfQuestions;
question = new String(null);
var spotA;
var spotB;
var spotC;
var spotD;
var score = 200;
var index = 0;
if (list == undefined) {
list = new LoadVars();
list.load("questions.txt");
}
gotoAndPlay(2);



Here's the Fla
http://www.proenglish.es/betting_quiz.zip (I wasn't able to attach)


I'll pay $50 dollars if you are able to add the relevant bit to Fla.
Thanks