PDA

View Full Version : Listbox - Array - PHP


TRPlace
10-20-2004, 08:07 PM
I am having a problem finding information on using listboxes in Flash.
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary241.html
That is the best I have found, and it would help me if I knew how to work with Listboxes a little to begin with. The only thing I have managed to do in my project is use a dataProvider for the listbox linked to my array, so it will show what is in the array in the listbox.
What I am trying to do is create a shopping cart. When something is entered into the cart, it gets entered into my array shoppingBag. When the user clicks on the cart and wants to view its contents, edit (delete) or checkout, I attach my shoppingCart_mc movieclip.

The reason I said edit (delete) is because I am not going to worry about quantity, unless there is a simple way to have multiple quantities stored in my array, displayed in the listbox or another listbox or textbox. Anyways.....

I put down a dynamic textbox I.N. text_txt, to test out what I am doing. I need to find out how to update the text box when the user selects a new index on the listbox. I need to be able to delete it from the listbox and the array if the user clicks delete and I have to pass it to a PHP script. The PHP part I have found some information on so if you want to help me out and focus on the listbox stuff, I can probably figure out the PHP linking from actionscript > PHP and back.
I have a function that updates the prices, subtotal, total, shipping, etc. And a function that extracts the price of the item from arrays that I have for each page. For example I have row[1][0][0];
1 - Page 1
The first 0 - the 'description' row
Second 0 - Item on page, ranges from 2 to 7 on all of the 15 pages.
I made sure the price was always the last characters at the end of the array so I could extract backwards up until the $....haven't figured that out yet but I know it's possible.

I could really use some help, resources, ect on listboxes if anyone can help!

Thank you very much!


-TJ