Hi guys.
I’m trying to create an array, and this is the code I’m using:
function create_spiral(len, rad, turns, num, theArray) {
 theArray = [];
 var inx = len/num;
 var iny = ((360*turns)*(Math.PI/180))/num;
 var inz = iny;
 var curx = 0;
 for (var i = 0;i<num;i++) {
  curx += inx;
  cury = Math.sin(iny*i)*rad;
  curz = Math.cos(inz*i)*rad;
  theArray* = [curx, cury, curz]
 }
 trace("done")
}
and I’m calling it with:
create_spiral(200, 10, 3, 100, points)
ideally, I would then have an array, called points, which would be full of numbers.
but when I run a trace it shows as undefined.
I can’t work out for the life of me what I’ve missed, but I’m sure it’s something daft.
Any ideas?