5 Replies Latest reply on May 9, 2008 2:25 AM by pandxsg

    variable not working?

    pandxsg
      Hi,

      I defined an array and function on the main layer:

      apple=["a","b","c"];
      function displayFruit(fruit){
      trace(fruit);
      }

      On a movieclip, I've got this function:

      on (release) {
      _parent.displayFruit("apple");
      }

      Upon execution, the output shows "apple". However, if I do a trace(apple) instead, it outputs "a,b,c" which is what I'm trying to achieve. Can anyone help me please?

      Thanks!