1 Reply Latest reply on Feb 6, 2007 7:19 AM by MotionMaker

    Change value of variable in array

      I'm working with a prebuilt form component that uses several other components on the stage to pass values to a php page. The problem I'm having is I need to pass a couple of values to a prebuilt array that is comprised of variables. How do I set the value of a variable that is already in an array?
        • 1. Re: Change value of variable in array
          MotionMaker Level 1
          An array that contains elements as Numbers and Strings is simply changed by setting the element.

          myArray[10] = "AString"
          myArray[11] = 1234;

          Your array could have objects or other arrays as values and thus we would need to see that structure to know what to do.


          To set the values in the object at index 1
          myArray[1].colorName = "Red";
          myArray[1].colorHex = 0xff0000;