[LEFT][FONT=Arial][SIZE=2][COLOR=#000000]This is script for my portfolio page menu. I have 3 main menu buttons and one sub menu button. Clicking on the sub menu (“graphicDes”) button should cause the 3 main menu buttons to transition out of sight WHILE causing hidden sub menu buttons to transition in to sight. [/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000]So far the 3 main menu buttons load their pages. But the sub menu button does nothing when clicked. AND the animated menu change never happens no matter what I click. [/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000]I’ve taken the script as far as I can think to take it. Can someone please take a look and help me?[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000]this is the main AS3:[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]stop();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]mainPortMenu_mc.stop();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.stop();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.graphicDes_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.freelance_btn.addEventListener(MouseEvent.CLICK, navigationClicked)[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.trifolds_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.campaigns_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.backtomain_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]mainPortMenu_mc.photoManip_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]mainPortMenu_mc.fineArt_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]mainPortMenu_mc.Anim_btn.addEventListener(MouseEvent.CLICK, navigationClicked);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]/////////////////////////////////////////////////////////////////////[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]// Sub Event Handlers.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]/////////////////////////////////////////////////////////////////////[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]function navigationClicked(Event:MouseEvent):void [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//We’ll use this to store the Frame Label’s name.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]var frmLabel:String = ‘’;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//Determine what Frame Label to use based on which [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//button was clicked.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]switch (Event.target)[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case subBtnMenu_mc.graphicDes_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “graphicDes_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case subBtnMenu_mc.freelance_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “freelance_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case subBtnMenu_mc.trifolds_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “trifolds_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case subBtnMenu_mc.campaigns_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “campaigns_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case subBtnMenu_mc.backtomain_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “main_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case mainPortMenu_mc.photoManip_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “photoManip_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case mainPortMenu_mc.fineArt_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “fineArt_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]case mainPortMenu_mc.Anim_btn :[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frmLabel = “anim_frm”;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]///////////Find the frame number by Frame Label.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]var frmGoto:Number = this.getFrame(frmLabel);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//Don’t do anything on requested page.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]if (currentFrame != frmGoto) [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[FONT=Arial][COLOR=#000000][/COLOR][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][FONT=Verdana][COLOR=#990000]//Get Home page frame number.[/COLOR][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]var frmHome:Number = this.getFrame(“main_frm”);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//If our requested page is the Home page, flying menu needs to go home[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]if(frmGoto == frmHome)[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]mainPortMenu_mc.goHome();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]if(frmGoto == frmHome)[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.goHome();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//Else, if on the Home page and are leaving, then leave home[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]else if(currentFrame == frmHome)[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]mainPortMenu_mc.leaveHome();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]else if(currentFrame == frmHome)[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]subBtnMenu_mc.leaveHome();[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//Go to the requested page.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]gotoAndPlay(frmGoto);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]///////////////////////Functions///////////////////////[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]function getFrame(frameName:String):Number [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]var frame:Number = 1;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]//Loop through all Frame Labels to find requested frame.[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]for (var i = 0; i < currentLabels.length; i++) [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]if (currentLabels*.name == frameName) [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]frame = currentLabels*.frame;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]break;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]return frame;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]function getFrameLabel(frame:Number):String [/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]var frmLabel:String = ‘’;[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[FONT=Arial][COLOR=#000000][/COLOR][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000]This bit of code appears in the timeline for the animated main and sub menu buttons themselves:[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=2][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]function goHome():void[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]gotoAndPlay(20);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000][/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]function leaveHome():void[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]{[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]gotoAndPlay(1);[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=2][COLOR=#990000]}[FONT=Arial][COLOR=#000000][/COLOR][/FONT][/COLOR][/SIZE][/FONT][/LEFT]