Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Math Display 1

Status
Not open for further replies.

Brian56

Programmer
May 29, 2003
66
CA
Hi,

I am trying to create the equivelant of a school blackboard.

The concept is that if a child does not understand the answer to a math problem or gets the wrong answer in a test then clicking 'Help' will bring up a virtual blackboard where the 'teacher' will go through the steps that were involved in obtaining the answer.

I can do this for tests by having prepared answers to display in a pop up window but I would rather have something more interactive where the answer can be created on the fly so that I can extend the 'blackboard' beyond the testing section and have it available throughout the cd.

Any ideas?

Brian
 
you would have to develop this further but what about something like

function showmath(txt) {
math.text += txt + newline;
}

function addem(a,b){
total = a + b;
showmath(a + " + " + b + " = " + total);
return total
}

addem(3,4);
addem(9,1);

with a showmath call each time the script does something then the text box can be used to show the workings. full of problems still though as you will have to work out when to clear the text box and so on.
 
Hi Bill,

I was hoping you would answer. This looks promising and I will take it up on Monday.

Thanks,

Brian
 
Hi Bill,

The 'blackboard' is working out well. I am not there yet but I can see light at the end of tunnel.

One more problem I hope you can help me with is square roots. I cant find the syntax anywhere. Flash can surely calculate square roots. Cant it ?

Brian
 
sq_root = math.pow(9,1/2);
trace(sq_root)//3
cube_root = math.pow(64,1/3);
trace(cube_root)//4
 
Hi,

Thanks once more, Bill.

I had been looking for an SQR statement. I had seen that command but I didnt know what it did. Now I know - Power.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top