Hi,
I'm working on a menu bar and I found some code lines that might help me...
thing is I don't understand few lines: _root.link != page and _root["btn" +
_root.link]
Please help me if you can, I need this done right now
[code]on (rollOver)
{
if (_root.link != page)
{
this.gotoAndPlay("over");
}
}
[/code]
[code]
on (release)
{
_root["btn" + _root.link].gotoAndPlay("out");
_root.link = page;
}
[/code]
Cor - 09 Jul 2008 07:49 GMT
The on(rollOver) checks if _root.link is not equal to the page and if
not it gooe to the frame named "over".
If it is equal that button or movieclip does not need to react because
the current page is showing.
The on(release) function plays the gotoAndPlay("out") wich belongs to
the root["btn" + _root.link]
Doing this is the way to reuse the same code for every button or
movieclip.
HTH
Kind regards
Cor