Just put a button called "button" on your stage... and code:

One_cb.addItem({data:1, label:"One"});
One_cb.addItem({data:2, label:"Two"});
One_cb.addItem({data:3, label:"Hello"});
One_cb.addItem({data:4, label:"Yes"});
One_cb.addItem({data:5, label:"It works"});

button.onRelease = function():Void {
   for (var i:Number=0;i<One_cb.length;i++) {
      var subObject:Object = One_cb.getItemAt(i);
      var itemObject:Object = new Object();
      trace("------");
      for (var j:String in subObject) {
          trace("j: "+j+"-->"+subObject[j]);
          itemObject[j] = subObject[j];
      }
      Two_cb.addItem(itemObject);
   }
}

May be there is something more simple...

David Buff

----- Original Message ----- From: "Laurent CUCHET" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Thursday, October 19, 2006 2:15 PM
Subject: [Flashcoders] >> ComboBox


There is 2 combobox on the stage, One_cb and two_cb

One_cb.addItem({data:1, label:"One"});
One_cb.addItem({data:2, label:"Two"});

How can I do to fill two_cb (data and label) with a button ?

Thank you for your tips, Laurent
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to