Thanks you! Finally something I can use to learn flash.
However im running into problems (noob problems) can you help me get the script working.
So far I have 4 dynamic text fields, one for the first random number, another for + or - the third for the second random number and one for the input. I have 10 buttons (0-9) which will be the input and an enter button
the script so far is
function genrandom(min:Number, max:Number):Number {
var number:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return number;
}
var firstnumber:Number = genrandom(0, 100);
var secondnumber:Number = genrandom(0, 100);
if (genrandom(1, 2) == 1) {
this.addorsubtract = "+";
}
else {
this.addorsubtract = "-";
}
this.Zerobutton.onRelease = function() {
this.answer = 0;
}
However both the + or - field (addorsubtract) or the zerobutton press is working. both of the fields are set and the right variable but I cant get it to work. can you help me out.
Ive tried var addorsubtract:string = "+'; and many other.