Could someone help me out some if you have time. I wanted to get a little walkthrough on setting up my buttons on my navigation bar, but done correctly. I have seen tutorials all over the web but none of them are really working for the as3 that I have and would like to use. Im not planning on using any kind of button base, just the word.
Below is what I have for my code. Now I would just like to set the button up properly to function with this.
Thanks
stop();
var frameNum:Number;
var btnLabels:Array =
[
"HOME",
"ABOUT",
"SERVICES",
"PORTFOLIO",
"LOCATION",
];
for (var i:Number = 0; i < btnGroup.numChildren; i++)
{
var btn:MovieClip = MovieClip(btnGroup.getChildAt(i));
btn.id = i;
btn.buttonMode = true;
btn.mouseChildren = false;
btn.btnLabel.text = String(btnLabels);
btn.addEventListener(MouseEvent.CLICK, btnClick, false, 0, true);
}
function btnClick(e:MouseEvent):void
{
frameNum = e.target.id + 1;
gotoAndStop(frameNum)
}
Below is what I have for my code. Now I would just like to set the button up properly to function with this.
Thanks
stop();
var frameNum:Number;
var btnLabels:Array =
[
"HOME",
"ABOUT",
"SERVICES",
"PORTFOLIO",
"LOCATION",
];
for (var i:Number = 0; i < btnGroup.numChildren; i++)
{
var btn:MovieClip = MovieClip(btnGroup.getChildAt(i));
btn.id = i;
btn.buttonMode = true;
btn.mouseChildren = false;
btn.btnLabel.text = String(btnLabels);
btn.addEventListener(MouseEvent.CLICK, btnClick, false, 0, true);
}
function btnClick(e:MouseEvent):void
{
frameNum = e.target.id + 1;
gotoAndStop(frameNum)
}