_root.link question? Dont get it

Hey Guy’s

I’ve purchased template from template monster, just so i could ripp the ■■■■ thing apart and see how they put there sites together. But then I’ve come across this code for one of the buttons:

on (rollOver) {
gotoAndPlay(“s1”);

}
on (rollOut, releaseOutside) {
gotoAndPlay(“s2”);

}
on (release) {
if (_root.link<>2) {
_root.link = 2;
_root.play();
}
}

WHAT?

ok, these are the things am confused on:

  • the button has an instance name of: item1
  • there is a frame label on the main timeline called “s1”, “s2”, “s3”…
  • i know what _root is
    so…

where da hell does .link come from? Whats it used for? what’s the point on having am instance name of item1 if I can’t even see it anywhere in the code?

I just dont get this part of the code:

on (release) {
if (_root.link<>2) {
_root.link = 2;
_root.play();
}
}

can anyone help?

Thanks :thumb2: