There is no php. It's just php tags to get coloring in the code samples (check this forum's guidelines)

And your friend's code look ok.

The method i proposed is just easier to read when you have a lot of re-positionning to do, that's all.

You probably have a problem with another mc because:
a) its instance name is wrong or misspelled
b) you call the mc but it's not present on that timeline's keyframe when called. For example, if you call the mc on keyframe1 and that mc is on keyframe2 it won't work.

gparis