1 Reply Latest reply on Jan 31, 2007 7:51 AM by SymTsb

    Button Problem

      I have a page on my site that has 4 buttons on each side...movie clip over a
      button...looks like a bar with a small arrow movie clip on the end. I am sure
      you know what I mean. When you roll the mouse pointer over the page it
      obviously is supposed go through its actions and alert user there is a link. If
      I put my code on the movie clip, you have to move the mouse over the arrow to
      show the link. If I put my code on the button layer, it causes all 8 of the
      buttons to have the same action/link and if I change one it changes all.

      What am I doing wrong? I can't seem to figure it out. Here is the code...
      on (rollOver) {
      _root.position = _root.slide["b"+num]._x;
      if (_root.l<>num) {
      on (releaseOutside, rollOut) {
      _root.position = _root.slide["b"+_root.l]._x;
      if (_root.l<>num) {
      on (release) {
      if (_root.l<>num) {
      _root.l = num;
        • 1. Re: Button Problem
          SymTsb Level 2
          How are you adding the actions to the buttons???

          If modifying the action on the button is changing it for all 8 and your button isn't embedded in a movie clip, my guess is you added you AS inside the actual button.

          Fix - remove the AS from inside the button. Add it by selecting the button from the stage and opening the actions panel.

          If the button is embedded inside a movie clip, and you have 8 instances of that button on stage, the same problem will occur.

          Fix - modify the movie clip by giving the button an instance name (btn will do). give each movie clip on the stage a unique instance name. Make your calls to the buttons from the main timeline like this...