I'm trying to write a snake game. It's pretty simple, there's an array of snake segments which are Sprites and they all have
public function update()
// Update snake head
this.segments.x += 10;
for (var i:Number = 1; i < this.segments.length; i++)
// Set the segments position to be the same as the one before it
this.segments[i].x = this.segments[i - 1].x;
this.segments[i].y = this.segments[i - 1].y;
Reverse your loop ( do last segment going to first ).
And do the head last.
Basically, segment i is grabbing i-1's location which has already updated.