1 Reply Latest reply on Aug 5, 2006 7:28 AM by kglad

    button scripting question??

    Westside London Level 1
      Hi ive managed to get my buttons working in the way i want them to using this script. They work as a rollover and when clicked become selected and disabled untill another button is pressed, then the other buttons re set and the selected button becomes highlighted. The only problem i have now is i dont know where to add the script to make the button got to another scene or frame... Any help would be amazing.

      gotoAndStop("normal");
      this.enable = function() {
      this.enabled = true;
      this.gotoAndStop("normal");
      };
      this.onRollOver = function() {
      if (_parent.selectedItem != this) {
      this.gotoAndStop("highlighted");
      }
      };
      this.onRollOut = function() {
      if (_parent.selectedItem != this) {
      this.gotoAndStop("normal");
      }
      };
      this.onPress = function() {
      this._parent.selectedItem.unselect();
      this._parent.selectedItem = this;
      this.gotoAndStop("selected");
      this.disable();
      };
      this.unselect = function() {
      this.gotoAndStop("normal");
      if (_parent.selectedItem == this) {
      _parent.selectedItem = NULL;
      }
      };