Page 1 of 1

Need help coming up with an equation

Posted: Tue Sep 06, 2011 3:31 pm
by jfrey
Ok, so you have a scale like so. 380 from end to end, or -190 to 0 to 190.

|------------------------|---------------------------|

Your pointer starts at the middle. You have choices A, B, C, and D.

B, C, and D are correct. A is incorrect.

If you select A but not B, C, or D the pointer should move all the way to the left (0 or -190).

If you select B, C, and D, but not A the pointer should move all the way to the right (380 or 190).

If you select A, B, C, and D the pointer should move half to the right (in other words 95 from center, or 285 from the left).

Etc.

So, think of it like this:

if (correct)
{
pointer move equation
}
else
{
pointer move equation
}

If you understand code, think of it like this:

cbListener.click = function(evt_obj:Object)
{
if (evt_obj.target == checkBox1)
{
if (checkBox1.selected == correctAnswer1)
{
answerMeasure._x += :idk:;
}
else
{
answerMeasure._x -= :idk:;
}
}
if (evt_obj.target == checkBox2)
{

........

etc.

Re: Need help coming up with an equation

Posted: Tue Sep 06, 2011 3:56 pm
by Schlatte
hmm... i have done something similar in Java once.. but I can't remember the API i used for the whole scale thing... I think i even just used a panel and overrode the paint.component() method... but it's doable in java pretty easily. idk in what language you want to script it?

Re: Need help coming up with an equation

Posted: Tue Sep 06, 2011 3:58 pm
by jfrey
Schlatte wrote:hmm... i have done something similar in Java once.. but I can't remember the API i used for the whole scale thing... I think i even just used a panel and overrode the paint.component() method... but it's doable in java pretty easily. idk in what language you want to script it?

AS2.

This company operates in the 90's so we don't use AS3...

Re: Need help coming up with an equation

Posted: Tue Sep 06, 2011 4:03 pm
by Schlatte
oh.. so you wanna do that whole thing all fancy web based and stuff... ok.. i'm out :D
I only have java, labview and c programming classes in school and not much jsp/html stuff so.. you know.. i could have programmed you a java executable from the future :p but that wouldn't have matched up with your 90s technology anyways :lol: (btw java :!!!: is the good stuff)

Re: Need help coming up with an equation

Posted: Tue Sep 06, 2011 8:32 pm
by snipelfritz
I started learning C. Then I decided that I wanted to major in communications.

Re: Need help coming up with an equation

Posted: Wed Sep 07, 2011 12:30 am
by jfrey
So... anybody have a solution?