4 Replies Latest reply on Nov 29, 2007 2:24 PM by crazyjoemilan

    simplifying button script

    4pixels Level 1
      this is the script for 24 buttons that play 24 movie clips (its a chronological timeline with thumbnails and popups). The second line calls a function to clear all other buttons than the one clicked, by going to a frame "hidden" in each movie clip. The 3rd is fine. All works. Is there a much shorter way of writing this ie arrays for the button names and the movie clips. I 'm just curious to learn by simplifying the script.


      thumb_1_btn.onRelease = function() {
      _parent._parent.turnOff();
      _root.popUp_1_mc.gotoAndPlay("showing");
      };
      thumb_2_btn.onRelease = function() {
      _parent._parent.turnOff();
      _root.popUp_2_mc.gotoAndPlay("showing");
      };
      thumb_3_btn.onRelease = function() {
      _parent._parent.turnOff();
      _root.popUp_3_mc.gotoAndPlay("showing");

      ..... and on up to 24