Need help coming up with an equation

General discussion at the Wang Bar.

Moderator: Ghost Hip

Post Reply
User avatar
jfrey
Supporter
Supporter
Posts: 5240
Joined: Wed Apr 14, 2010 10:58 am
Location: Boston, MA

Need help coming up with an equation

Post 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.
D.o.S. wrote:You're like a walking Mad Men episode.
BitchPudding wrote:DO WHAT MUST BE DONE, LORD JFREY.
friendship wrote:one cool thing about living is that things get worse and worse and worse until you die
My music rec Twitter: https://twitter.com/MostlyEssential
User avatar
Schlatte
IAMILF
IAMILF
Posts: 2667
Joined: Mon Aug 08, 2011 3:27 pm
Location: Austria

Re: Need help coming up with an equation

Post 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?
Good Deals with: All these fine people!

MOM-D Shark Tank is back! Open Source Designs for musical pleasure! Back in the Tank! Go check it out!
User avatar
jfrey
Supporter
Supporter
Posts: 5240
Joined: Wed Apr 14, 2010 10:58 am
Location: Boston, MA

Re: Need help coming up with an equation

Post 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...
D.o.S. wrote:You're like a walking Mad Men episode.
BitchPudding wrote:DO WHAT MUST BE DONE, LORD JFREY.
friendship wrote:one cool thing about living is that things get worse and worse and worse until you die
My music rec Twitter: https://twitter.com/MostlyEssential
User avatar
Schlatte
IAMILF
IAMILF
Posts: 2667
Joined: Mon Aug 08, 2011 3:27 pm
Location: Austria

Re: Need help coming up with an equation

Post 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)
Good Deals with: All these fine people!

MOM-D Shark Tank is back! Open Source Designs for musical pleasure! Back in the Tank! Go check it out!
User avatar
snipelfritz
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 11703
Joined: Fri Dec 31, 2010 7:28 pm
Location: Milwaukee

Re: Need help coming up with an equation

Post by snipelfritz »

I started learning C. Then I decided that I wanted to major in communications.
BOOM-SHAKALAKALAKA-BOOM-SHAKALAKUNGA
Behndy wrote:i don't like people with "talent" and "skills" that don't feel the need to cover their inadequacies under good time happy sounds.
User avatar
jfrey
Supporter
Supporter
Posts: 5240
Joined: Wed Apr 14, 2010 10:58 am
Location: Boston, MA

Re: Need help coming up with an equation

Post by jfrey »

So... anybody have a solution?
D.o.S. wrote:You're like a walking Mad Men episode.
BitchPudding wrote:DO WHAT MUST BE DONE, LORD JFREY.
friendship wrote:one cool thing about living is that things get worse and worse and worse until you die
My music rec Twitter: https://twitter.com/MostlyEssential
Post Reply