2 Replies Latest reply on Oct 27, 2008 1:27 PM by 0degreesK

    Referencing a ComboBox Dynamically in Function

    0degreesK
      I'm trying to add items from an XML datasheet to all of the ComboBox components in a movie. I'm trying to go through a for() loop that calls a function for the name of each ComboBox stored in an array. I've tried multiple things, but I keep getting no result or the same error "The class or interface 'ComboBox' could not be loaded"... this way returned an error:

      function addComboBoxItem(ccbName:ComboBox,strDesc:String,strID:String):Void {
      ccbName.addItem(strDesc,strID);
      };

      I tried something else by sending the ComboBox instance name as a string, but this has no result or error:

      function addComboBoxItem(strCBName:String,strDesc:String,strID:String):Void {
      [strCBName]addItem(strDesc,strID);
      };