View Full Version : Listbox and Array
TRPlace
10-24-2004, 06:21 PM
I can't find any good sources on how to work with listboxes in flash. I have a listbox and a setDataProvider for the listbox as my Bag array. When I add things to the array during run time, and go to my listbox, it does not repopulate. So I added a setChangedHandler, first of all it's not blue, I thought it was supposed to be, and second it never calls the "display" function I tell it to. So I need help on my dynamic array and listbox, repopulating, when you click on a line in the listbox I am trying to get it to display (for my purposes) to a text box and it always says undefined, and deleting from my dataprovider from the listbox's buttons underneath.
Thanks very much!
-TJ
TRPlace
10-25-2004, 09:31 PM
Ohh I see, you need to also do a for loop to get the data in there as well. I thought you just needed the dataProvider. And this will take care of changes in the array too, interesting. Thanks very much!
-TJ
TRPlace
10-25-2004, 11:35 PM
I have my listbox set up in a movieclip that when you click on a button dynamically puts it on stage [I set the linkage identifier for that]. The delete works for you, but it's not working for me...I tried _root., shoppingBag_mc., and nothing, with the ".removeItemAt(shoppingBag_lb.selectedIndex);" line after all of them. None of them worked, I am not sure why. Can you help me on that?
Also on my main movie, when you drag the yellow shape to the shopping bag (this puts it in the shoppingBag array), the shopping bag is supposed to shake, look at the script even. It does not, can someone help me with this also?
I don't know why I can't upload anything in zip format, every time I try it says document contains no data, anyways I uploaded it to my server, click to download.HERE (http://www.trpsearchit.com/xmas.zip)
Thanks!!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.