Skip to main content
Known Participant
April 14, 2018
Question

Re: text input Denominator division by pressing a button

  • April 14, 2018
  • 17 replies
  • 1595 views

How do i make a counter like for a survey to add up points if each one counts as one, do i make two boonlean textinputs to be false next to a text input, and a button.

And say if text input1 = textinput2 that text input eqauls 1.

?

And a final total text input that on the same button is the sum of textinput 3 and if i did the same 3 inanother question that it would be textinput 6....(3+6= 2 or 1 depending if there was a match.

This topic has been closed for replies.

17 replies

Known Participant
April 18, 2018

hi can i use something something similar, to set qscore, in a code similar bt accurate to

: go1.onReleasee = function(){

set ("qscore","1" if q1teacherAnswer.text == q1STudentAnswerrecieved.text )

Known Participant
April 18, 2018

can you please help me correct this :

go1.onRelease = function(){

tf_display.text = (q1teacherAnswer.text == q1STudentAnswerrecieved.text )

qscore.text = "1" if tf_display.text = "true";

}

Known Participant
April 18, 2018

my "student side of the screen has a go button to send the answer to the teacher to mark per question, this is the new buttons code

go1._visible = true;

go1.onRollOut = function(){

q1STudentAnswerrecieved.text = q1STudentAnswer.text;

q1STudentAnswer.text = q1STudentAnswer.text;

}

go1.onRelease = function(){

tf_display.text = ( q1teacherAnswer.text == q1STudentAnswerrecieved.text )

}

score++

ive added a picture of how it displays now, it going to a true or false text input.

under it is the mark allocation, just 1 point is allocated, i want to add the code on the students go button, as a on.Release, and to allocated either a zero or a 1 in the mark allocation text input called "qscore"

Known Participant
April 18, 2018

HI, i downloaded a pdf, that had an example in it, and said AS 1.0 was available, so im havent used it this it :

Example

var bool1:Boolean = Boolean(false);

// converts it to the number 0 trace(1 + bool1); // outputs 1

// converts it to a string trace("String: " + bool1); // outputs String: false

is this as 1.0 or As 2.0

can u help me use it in AS 2.0 please to make my text output where false or true currently occurs say to be either 1 or 0.

Known Participant
April 18, 2018

is this is to make it 1 :

var myNum:Number; myNum = 1 + true; trace(myNum); // output: 2

Known Participant
April 17, 2018

ok so iv got two text inputs, the students one reflects perfectly back to the teachers one and if identical says true, now im going to add another text input and i want the text input to say true,

how do i code the text input field to say true ?

and after that if that text input field called "true.text = the text field that says either true or false, how do i get it to do things like goto another frame, or to dispaly 0 or 1 in a text box "display" ?

Known Participant
April 17, 2018

i just downloaded this pdf  from : http://homepage.divms.uiowa.edu/~slonnegr/flash/ActionScript2Reference.pdf

i hope it will help me learn alot more than these little things im trying to do.

Known Participant
April 17, 2018

okay help me through this please, ill create a button called go3, ill code on the button what exactly?

how many text inputs do i need for this? the teachers answers, is 1 and the students annser is another being the second, and the button go2, currently gives me a true or false answer.... so now if i use the two text inputs again with go3, and have another text input field for an answer to appear in, help me through this please.

kglad
Community Expert
Community Expert
April 17, 2018

you should step back and look at your overall project.  you have some tasks ahead of you (database creation and server-side coding) that require pretty sophisticated expertise and you're getting repeatedly stuck on novice level tasks.

so i can't see how you're going to get this done unless you invest a few months studying or someone else does this for you.  right now i feel like you're trying to get me to do your work for you.

Known Participant
April 17, 2018

I know im learner, i want to have the words right or wrong instead of the current true or false, from the code u sent me and want to show the student afterwards which questions were wrong, and then i can reflect there the correct answer.

Known Participant
April 16, 2018

For example a drivers licence test here in rsa, is on the municipal computers and cannot be accessed from the internet as far i know, perhaps only by officials or administrators. And a different company may offer passwords to login from anywhere to fill in the test and to then logout again.

Known Participant
April 16, 2018

No student has used my apple mac pro tower yet, how would it differ if my pc was used to capture the students answer or wether it was done by a internet cafe or from their home ?

kglad
Community Expert
Community Expert
April 16, 2018

if you're not using the same computer to review a student's answers you'll need to use a server, data-base and server-side coding.

Known Participant
April 16, 2018

Ok that makes sense, and add it onto the buttons to having it present to review after its been stored, is it possible to make a code : for the two text inputs that may at times not be identical and at times may be that give a resultant textfield a value, or word ?

Suxh as if ( a.text == b.text) then r.text = 1 if a.text == b.text) or if a.text does not == b.text ) that r.text  0

Known Participant
April 15, 2018

go._visible = true;

go.onRelease = function(){

instructionsrecieved.text = instructions.text;

instructions.text = instructions.text;

headingrecieved.text = heading.text;

headingrecieved.text = heading.text;

q1recieved.text = q1.text;

q1.text = q1.text;

heading1recieved.text = heading1.text;

heading1.text = heading1.text;

}

is my teacher go button so far,

and this is the students go1 button so far :

go1._visible = true;

go1.onRollOut = function(){

q1STudentAnswerrecieved.text = q1STudentAnswer.text;

q1STudentAnswer.text = q1STudentAnswer.text;

}

go1.onRelease = function(){

if( q1teacherAnswer.text == q1STudentAnswerrecieved.text )

score++

}

i saw on a previous code  i had :

go1.onRelease = function(){

if( q1teacherAnswer.text == q1STudentAnswerrecieved.text ){

score++

}

but changed it to the one on the go1 button but the score ++ doesnt display again, do i need to do something with a border to display, is it similar to the create text field code where it showed when the border was put on ?

Known Participant
April 15, 2018

im the teacher to be, and can allow a student to use my pc, and if in this case so, when the swf is played it stores nothing in both the right and left side,  the create text field we looked at much earlier in the week if thats added on and a code is used to select the created text fields to use for the left part, the teachers side perhaps it will be better for me to select the questions out of, and then to use a button to preload the text inputs that i would have used to create the create textfield with, however earlier in the week i did see that everytime the swf played/tested it has no memory of its previous play/test.

and i would like students to be  able to use a computer from anywhere to answer the questions.

kglad
Community Expert
Community Expert
April 16, 2018

how can a student both "..use my pc.." and "...use a computer from anywhere.."? 

is your pc a laptop that you're lending?