add object in the list
hi
how are you guys ? i hope you all fine ..
here ...
iam trying to show the list items in the list .. but i couldn.t here
first i created object and array object
var za:int = 0
var itemsinfo:Object = new Object()
var da:Array = new Array (100)
...
then in another place i set the properties for the object , andi made them arrays objects like this
itemsinfo.name1 = new Array()
itemsinfo.price1 = new Array()
after that i,ve crated 2 text boxes , one for the item value and the second for the price
additemsvar = additems.text
addpricevar = int (addprice.text)
then i checked the values in the object
for (var z:String in itemsinfo){
trace (z + ":" + itemsinfo
}
and every thing is good , but the probelm is when i add these arrays to to the list object, it doesn,t work
i.ve tried with 3 deffrent ways
listbox1.addItem ({label:String(itemsinfo.name1[za])}) //displaying undefined in the list
listbox1.addItem ({label:(itemsinfo.name1[za])}) //displaying nothing and it just take a place
listbox1.addItem (itemsinfo.name1[za]) // nothing happend
thank you
