I can't figure out the code

hey de nuevo
i am doing a sort of the original snack game but i have a problem 2 make the parts of the snack follow the head i made the code but it didn’t work
help…!any way here is the source & i bookmarked the code

There’s so much wrong with your code …
Never use more than one (1!) onEnterFrame.
If you have multiple functions to execute, put them in order in just one onEnterFrame.

You had better use object oriented code, read all about it here on Kirupa.
good luck!