3 Replies Latest reply on Jul 8, 2008 11:52 AM by dpark1113

    Using variable/data object as ID?

    dpark1113 Level 1
      I have 15 buttons in mxml with id in each button. I also have same button id in the database as well. I would like to know if I can use a variable or a data object as button id like this,

      arraycollection.getItemAt(0).button_id.styleName = 'blue_button';

      I want to create a for loop with one if statement to change color on all 15 buttons dynamically instead of creating 15 if statements.