Hello I need some assistance with my class file. What I am doing is I have a quiz with different subjects in a combo box that the user can select (Math, chemistry, social studies..). What I want is to attach a separate class fiel for each subject that will display the problem and check the users anwer. Here is what I have so far, but its not working properly. My questions work fine within flash but when I use the class file it doesn't function. Thanks for your help.

Actionscript:
//This what I have modified to try to make it work in .as file
//Class Math ()
//This is variable set up to get the users infor
var youranswer:String;
function Math()
{
}
//This displays the question
private function displayequation()
{
var myEquations:Array = [];
var myOperators:Array = ["+", "-", "*", "/"];
for (var i:Number = 0; i < 10; i++)
{
var num1:Number = Math.round((Math.random() * 50) + 1);
var num2:Number = Math.round((Math.random() * 50) + 1);
var randOp:Number = Math.round(Math.random() * (myOperators.length - 1));
var temp:String = num1.toString() + " " + myOperators[randOp] + " " + num2.toString();
//var temp:String = num1.toString() + myOperators[randOp] + num2.toString();
trace("this is random string " + i + ": " + temp);
myEquations.push(temp);
}
var currentEq:Number = 0;
var setEquation:Function = function ()
{
eq_txt.text = myEquations[currentEq];
};
var checkFunction:Function = function ()
{
var ta:Array = myEquations[currentEq].split("");
trace("here's ta: " + ta);
var tmp:Number;
switch (ta[1])
{
case "+" :
trace("we're adding");
tmp = parseInt(ta[0]) + parseInt(ta[2]);
break;
case "-" :
trace("we're subtrating");
tmp = parseInt(ta[0]) + parseInt(ta[2]);
break;
case "*" :
trace("we're multiplying");
tmp = parseInt(ta[0]) + parseInt(ta[2]);
break;
case "/" :
trace("we're dividing");
tmp = parseInt(ta[0]) + parseInt(ta[2]);
break;
}
trace("and tmp is: " + tmp);
if (tmp.toString() == ans_txt.text)
{
trace("Correct!");
ans_txt.text = "";
currentEq++;
setEquation();
}
else
{
trace("wrong!");
}
};
}
setEquation();
check_mc.onRelease = checkFunction;