swapDepths tutorial code not working

i did the tutorial


on this site, but no joy…

only relevant code i can see in demo file is:

on (press, release, dragOver, dragOut) {
_root.x += 2;

which i adapted to:

on (press) {
_root.x += 7;

where pic7mov is an mc on the main timeline with a invButton on top layer with the code in it.

where is the code for the function x (which the tutorial says “resides on the main timeline”)… surely without it the code doesnt work… like javaScript it should relate to a function n’est pas?? i couldnt find it on example but example works ??