4 Replies Latest reply on Aug 15, 2009 3:47 PM by WillKHolla

    Button Question

    WillKHolla

      I created a flash menu for my site's homepage. It initially shows up as my company's logo but changes to a different page link when a section is rolled over. I'm having a problem figuring out the best way to make each section link to the specific page it describes. I have one button that acts as a rollover but i'm not sure if i can use that same button as a link or if i need to create a new one

        • 1. Re: Button Question
          Ned Murphy Adobe Community Professional & MVP

          You can probably use the same button, but you're the only one who knows what you are working with at this point.  If you can show a picture of what you're talking about, describe the pieces, and show the code you're currently using, it may make it easier for someone to be able to help.

          • 2. Re: Button Question
            WillKHolla Level 1

            this is part of the code i'm using to create the rollover action. i've also attached a pdf of the menu itself

             

            news_btn.addEventListener(MouseEvent.ROLL_OVER, rollnews);
            this.faq_btn.addEventListener(MouseEvent.ROLL_OVER, rollfaq);
            this.forum_btn.addEventListener(MouseEvent.ROLL_OVER, rollforum);
            this.team_btn.addEventListener(MouseEvent.ROLL_OVER,rollteam);

             

            function rollnews(event:MouseEvent):void{
                resetAllPanels();
                newspanel_mc.play();
                /*if(newspanel_mc.currentFrame <<2){
                    newspanel_mc.play();
                } else{
                    newspanel_mc.gotoAndPlay(15);
                }*/
            }

             

            function rollfaq(event:MouseEvent):void{
                resetAllPanels();
                faqpanel_mc.play();
                /*if(faqpanel_mc.currentFrame ==30){
                    faqpanel_mc.play();
                } else{
                    faqpanel_mc.gotoAndPlay(44);
                }*/
            }

             

            function rollforum(event:MouseEvent):void{
                resetAllPanels();
                forumpanel_mc.play();
                /*if(forumpanel_mc.currentFrame ==60){
                    forumpanel_mc.play();
                } else{
                    forumpanel_mc.gotoAndPlay(74);
                }*/
            }

             

            function rollteam(event:MouseEvent):void{
                resetAllPanels();
                teampanel_mc.play();
                /*if(teampanel_mc.currentFrame ==90){
                    teampanel_mc.play();
                } else{
                    teampanel_mc.gotoAndPlay(114);
                }*/
            }

             

            function resetAllPanels() {
                for(var p:* in panelList) {
                    if(panelList[p].currentFrame != 1) {
                        panelList[p].play();

            • 3. Re: Button Question
              Ned Murphy Adobe Community Professional & MVP

              Yeah, I can't see why you wouldn't use the same buttons, so just add more event listeners and event handler functions for them.

               

              news_btn.addEventListener(MouseEvent.CLICK, clicknews);

               

              function clicknews(evt:MouseEvent):void{

                   // whatever

              }

              • 4. Re: Button Question
                WillKHolla Level 1

                Actually I figured it out. I appreciate your help though. Thanks