You may do it by the easiest way.
- Make the head and 2 or 3 body parts;
- Set the origin point of each image to be at bottom or right, or left, or up, but keep the same for all of them;
- Add a new point on the opposite side;
- Set their X and Y origin to match the second point of the sequenced body part, example, the first body part will pin to the head, then, ahead;
- Make a number instance variable for the body parts and call it by "ID";
- The body parts and head on the canvas, you'll set their ID manually, but each time the snake eat a apple, you'll need to add one to the ID count and set to create a new body part, attaching it to the body part with the ID-1;
You can improve it by doing a tail on a new frame animation for the body parts, and checking if it's the highest ID, if so, change its sprite number, also, make the animation speed to 0.
For more information, please, read this tutorial, it may help understand how to get a specific item on the canvas and for future projects! =]
scirra.com/tutorials/361/understanding-uid-iid-health-of-enemies-and-rocket-smoke-trail