0 Replies Latest reply on May 8, 2007 3:46 PM by idellej

    Rollover Menu - "If" Actionscript

    idellej
      Hi -

      I want to create a complex Roll Over menu that in addition to rolling out a secondary menu, it also changes the entire background. To do this, I thought it be best to create MovieClips that I could call when the main menu buttons are Rolled Over. My problem is, I want the roll over to disappear once the user rolls over another button. I've setup two buttons at this link: http://contagiousmedia.net/PearlStreet/Test/

      The two working buttons that I'm experimenting with are the "Dining Room" and the "Favorite's Corner" buttons (use the "skip" button to pass the intro animation).

      Basically, when the user rolls over "Favorite's Corner" - a menu rolls out and the background image changes. I want to set it up so that when the user rolls over another button (such as "Dining Room") that it will tell the Favories Corner movie clip (Instance Name: ROfav) to go to a frame labled "end" animation where it fades out while the MovieClip for the Dining Room fades in. Of course, I only want this to do this if the Favorite's Corner MovieClip has been activated, so I thought I'd use a "if" function to determine if the MovieClip is activated, and if it is, to send it to the end animation.

      I'm using the following code, but it doesn't seem to be doing the trick. I've doublechecked everything and couldn't figure out why it isn't working. Any help is appreciated!

      This is the button ActionScript assigned to the Dining Room button:

      on (rollOver) {
      if(_root.ROfav.currentframe==10){
      _root.ROfav.gotoAndPlay(end);
      };
      }

      on (rollOver) {
      //Movieclip GotoAndPlay Behavior
      this.ROdin.gotoAndPlay("2");
      //End Behavior


      }