I have a movie that plays inside of my stage for the menu. I have made many FLASH projects and websites, but this is the first time I attempted a dynamic menu instead of making each button individually. Everything works, mouseover plays the animation, and rollout works great as well. I even fixed the ONRELEASE so it stops on a specific frame indicating it had been clicked.
Where I am running into a problem is actually getting the menu to work and go to 6 different URLs. My first attempt using the “IF” command would launch 6 pages, one for each button, even if I only clicked one item. I realize I could easily fix this by going back and doing it the OLD way, but I really want to learn this actionscript stuff. Right now, no matter what I click, it only takes me to 1 page, even though I have all 6 programmed.
Button 1 is a separate button from the rest and it works great. Here is my actioscript for the remaining 2-6. The buttons “work” but when I press button 2, it takes me to what I programmed for 3 and the rest all just go to where I have button 2 programmed for.
You can see it HERE
Could someone tell me what I’m doing wrong?
**on (rollOver) {
if (_root.link != num) {
gotoAndPlay(2);
}
// end if
}
on (releaseOutside, rollOut) {
if (_root.link != num) {
gotoAndPlay(11);
}
// end if
}
on (release) {
if (_root.link != num) {
_parent[“but”+_root.link].gotoAndPlay(“s2”);
}
_root.link = num;
if (_root.link != 2) {
getURL(“http://google.com”);
} else if (_root.link != 3) {
getURL(“http://cklivin.com”);
} else if (_root.link != 4) {
getURL(“http://ebay.com”);
} else if (_root.link != 5) {
getURL(“http://kgw.com”);
} else if (_root.link != 6) {
getURL(“http://cklivin.com/a.gif”);
}
// end if
}
**