5 Replies Latest reply on Sep 21, 2011 4:30 PM by kglad

    Animation reacting to buttons

    Spawn NZ

      Hi There

       

      I'm building a site where I'd like to have a graphic reacting to the main navigation buttons depending on which page you are in.

       

      Basically I've got six buttons (movie clips with instance names) and I've got six elements that I'd like to animate separately. When someone clicks on button 1 then the element 1 should increase in size and stays enlarged. Once you click on button 2 then element 1 shrinks back to original while element 2 enlarges and so on and so on...

       

      Here's my script for the buttons:

       

      button_about.buttonMode = true;

       

          button_about.onRollOver=function(){

          this.gotoAndPlay("over");

          }

       

          button_about.onRollOut=function(){

          this.gotoAndPlay("up");

          }

       

          button_about.onPress=function(){

          this.gotoAndPlay("hit");

          }

       

          button_about.onRelease=function(){

          gotoAndStop(30);

          this.gotoAndPlay("over");

          }

       

      Thanks,

      PK