Originally Posted By: Lukas
The variable "zmot" is NOT initialized anywhere. Try using var zmot = 0; instead of var zmot;


Duh. That would work, since I am running the while() loop within the function, instead of an earlier script wherein the function was itself called within a while script running the content of the loop once per call. I don't know why I didn't think of that when I changed it to the format as I've described here. lol. thanks. I'll let you know.