steadi
05-01-2004, 05:51 AM
Hi there, please forgive me this question as I know it's probably very basic but it's got me stumped.
Here's what I'm trying to do:
I have a couple of buttons that work as a main menu of sorts (buttonGimbal, buttonMon, etc.), a listbox (itemSel) and two text boxes.
When a user selects one of the buttons the contents of the listbox change to provide options for the selected subject.
If the user then selects an item from the listbox, the two textboxes (itemDescr and itemPrice) show information and pricing details for that subselection.
All the data comes from a data.txt which is populated as such:
&gimbal1=name|5000|2|0|descriptive text here&
&gimbal2=name|3400|3|12|descriptive text here&
where the second item is price and the fourth item is the description
So far I can import the data and populate the listboxes just fine (loaded the textfile into several arrays with 4 variables each) but I can't figure out how to get the item description/price to come up.
I thought of declaring a new variable and filling that with the imported data by changing the contents for each selected main item, but I don't know how to get this to work.
I should warn you that this is my first attempt at programming with actionscript, having come from Visual Basic, so I've picked up some nasty habits that don't work here.
So please be gentle with me...
Thanks, Ruben
Here's what I'm trying to do:
I have a couple of buttons that work as a main menu of sorts (buttonGimbal, buttonMon, etc.), a listbox (itemSel) and two text boxes.
When a user selects one of the buttons the contents of the listbox change to provide options for the selected subject.
If the user then selects an item from the listbox, the two textboxes (itemDescr and itemPrice) show information and pricing details for that subselection.
All the data comes from a data.txt which is populated as such:
&gimbal1=name|5000|2|0|descriptive text here&
&gimbal2=name|3400|3|12|descriptive text here&
where the second item is price and the fourth item is the description
So far I can import the data and populate the listboxes just fine (loaded the textfile into several arrays with 4 variables each) but I can't figure out how to get the item description/price to come up.
I thought of declaring a new variable and filling that with the imported data by changing the contents for each selected main item, but I don't know how to get this to work.
I should warn you that this is my first attempt at programming with actionscript, having come from Visual Basic, so I've picked up some nasty habits that don't work here.
So please be gentle with me...
Thanks, Ruben