Help with snake game - Head and Tail

Hello,

I’ve made a simple snake game from a tutorial and it works fine for a quick fun game, it uses this actionscript: http://maro2194.tripod.com/Snake_Actionscript.txt

But I really wanted to know how to make a snake game where the head and the tail follow the direction of the arrows too, and then only the middle (body) get’s longer when the head goes over food -

so there would be 3 graphics, a head, a body piece (that duplicates when ‘food’ is collected) and a tail.

can anyone help me out?

thanks in advance!