You would need to iterate through each item and add it to the combo box.
Here's an example of how to populate a combo box from an array:
// Considering we had array populated with Labels
// which we use for the Values as well
for (i = 0; i < myArray.length){
comboBoxInstance.addItem(myArray[i],myArray[i]);
}
The syntax for the addItem() function is:
comboBox.addItem(label,data);
Also, Using loadVars() might be a little to exhaustive. Have you looked at
LoadXML.as by Phil Scott? It is a great tool that will allow you to turn an
XML structre into an object, which makes data parsing a breeze. You can get
LoadXML.as from:
http://www.flashkit.com/movies/Scripting/XML/XML_to_O-Phil_Sco-4634/index.sh
tml
Hope this helps!
--
SCOTT VAN VLIET
SENIOR ANALYST
SBC SERVICES, INC
Tel: 858.886.3878
Fax: 858.653.6763
Email: [EMAIL PROTECTED]
-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 9:20 AM
To: CF-Talk
Subject: Flash MX and CF5
We prob need a CF-flashTalk list, but in the meantime I am just now
beginning my journey into dynamic content in flash, and was wondering if
someone had an idea of how to populate a combo box from a query...
I have this so far, please help.
Query
<CFQUERY DATASOURCE="carnivore" NAME="mfg_list">
SELECT *
FROM mfg
</CFQUERY>
<CFSET myList = ValueList(mfg_list.mfgid,",")>
<CFOUTPUT>&mfg=#myList#</CFOUTPUT>
Flash
Button action
on (release) {
loadVariablesNum("http://www.carnivorepc.com/console/qry/qry_mfg_list.cfm",
0, "GET");
mfgList.addItem(mfg);
}
"Success is a journey, not a destination!!"
Doug Brown
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists