4 Replies Latest reply on Jun 19, 2007 6:01 AM by asiabackpacker

    Need help passing a variable into a function

    asiabackpacker Level 1
      Somehow, I can never seem to get this to work.

      Here is my function:

      button_rollover = function (buttonNumber) {
      button_bar.targetY = button_[buttonNumber]._y;
      button_bar.targetAlpha="100";
      }

      The action attached to one of my buttons is:

      on(rollOver){
      button_rollover(1);
      }


      but the "button_bar.targetY = button_[buttonNumber]._y;" bit does not seem to be working.

      Any ideas? Is my syntax incorrect?

      I'm a designer...please help!

      Thanks!