Flash Code and IF statement ?*&%^$
Author |
Message |
jtplayte
|
Posted: Thu Jun 07, 2007 1:09 pm Post subject: Flash Code and IF statement ?*&%^$ |
|
|
Hi Folks,
very new to flash, learning lots, traditional procedural programmer (i.e. Turing in the 80's)
The following piece of code is not the program, just the part I am having trouble with.
I want the code to enter the "else" section, but it does not
var ticks = 10;
var m = 3;
var b = 1;
var numbpt = 0;
y = ticks;
x = (y-b)/m;
if ((x>-ticks) && (x<ticks)) {
numbpt = numbpt+1;
if (numbpt=2) {
point2x = x;
point2y = y;
trace("numbpt=2 business");
} else {
trace ("Should be here, but not!!!!");
trace(x);
trace(y);
point1x = x;
point2y = y;
}
}
Any help would be appreciated.
jtp
p.s. Program is a game that involves plotting y=mx+b equations on a grid |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|