Hello. I am a newbie to this list, so I am sorry if this message is
off-topic. If it is, I would be obliged if anyone could direct me to the
correct place.

I am a veteran programmer but I am new to actionscript. I have come across
some strange behaviour which is driving me mad. Following is a part of my
code :

...[snip]...
private var pnt:Point = new Point();
private var dirp:int;
private var fastp:int;
private var i:int;
private var pathB:Array;
...[snip]...
for (dirp=fastp; dirp<=i; dirp++) {
   // BUG!!! If I UNCOMMENT 1 of the 2 following lines, code gets mixed up.
   // pnt.x=pathB[dirp][0].x+pathB[dirp][2].x;
   // pnt.y=pathB[dirp][0].y+pathB[dirp][2].y;
            pnt=new
Point(pathB[dirp][0].x+pathB[dirp][2].x,pathB[dirp][0].y+pathB[dirp][2].y);
            if (addElement(pnt, dirp, pathB[dirp][2], pathB[dirp][3]+1))
return pathF;
}

As I mention above, if I uncomment //pnt.x=... or //pnt.y=... or if I even
replace them with something like pnt.x=pnt.x+1;
then my code gets mixed up and returns wrong results.

This is driving me nuts because these two lines shouldn't have any effect
since right below them there is
pnt=new Point(...);
which supposedly "cancels" the 2 previous instructions. Right?

Could anyone, please, show me the obvious that I can't see?

Many thanks in advance,

Bill Kotsias
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to