OGGordon
11-05-2009, 09:37 AM
hey guys,
so i downloaded this template and it has 3 buttons on the navigation. i added another one and in the AS i added it but for some reason now the entire navigation doesnt work.
Here is the code of one button:
onClipEvent (load) {
num = 2;
this.hitArea=area;
title1.gotoAndStop(num);
title2.gotoAndStop(num);
title3.gotoAndStop(num);
title4.gotoAndStop(num);
}
on (rollOver) {
if (_root.link<>num) {
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>num) {
this.gotoAndPlay("s2");
}
}
on (release) {
if (_root.link<>num and _root.animation == 1) {
_root.animation = 0;
_root.link_prev = _root.link;
_parent["item"+_root.link].gotoAndPlay("s2");
_root.link = num;
_root.play();
}
}
I just changed "num=2" to 1,3,4 for each button. Im not sure what i am doing wrong.
so i downloaded this template and it has 3 buttons on the navigation. i added another one and in the AS i added it but for some reason now the entire navigation doesnt work.
Here is the code of one button:
onClipEvent (load) {
num = 2;
this.hitArea=area;
title1.gotoAndStop(num);
title2.gotoAndStop(num);
title3.gotoAndStop(num);
title4.gotoAndStop(num);
}
on (rollOver) {
if (_root.link<>num) {
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>num) {
this.gotoAndPlay("s2");
}
}
on (release) {
if (_root.link<>num and _root.animation == 1) {
_root.animation = 0;
_root.link_prev = _root.link;
_parent["item"+_root.link].gotoAndPlay("s2");
_root.link = num;
_root.play();
}
}
I just changed "num=2" to 1,3,4 for each button. Im not sure what i am doing wrong.