all groups > flash actionscript > april 2007 >
You're in the

flash actionscript

group:

combo box compnonent



Re: combo box compnonent dan mode ->Adobe Community Expert
4/20/2007 9:57:13 AM
flash actionscript: Your question is a little unclear on what you are trying to achieve.

The comboBox component has two values you can set: label and data. The
label is what shows up in the drop down.
You can get the values of the comboBox like so:

myComboBox.getItemAt(1).label
myComboBox.getItemAt(1).data

Take a look at the ComboBox class for more info.


--

Dan Mode
--> Adobe Community Expert
*Flash Helps* http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio* http://www.tornadostream.com <--check this

*Must Read* http://www.smithmediafusion.com/blog



[quoted text, click to view]

combo box compnonent dazzclub
4/20/2007 3:38:14 PM
Hi guys and girls

I have a drop down men on my contact form and its the combo box that is
already been built, my question is how can i get the data that the user will
select to appear in my email.

i can do it with with textfields, where by you make both the variable names
the same , but im unsure about the combo box.

the server side langauge i am using is php.

cheers
Re: combo box compnonent kglad
4/20/2007 3:55:31 PM
if you use a loadvars object to call you php you can use:



var lo:Object = new Object();
var lv:LoadVars = new LoadVars();
lo.change = function(eo:Object) {
lv.eo.target = eo.target.selectedItem.data;
};
cb.addEventListener("change", lo); // where cb is your combobox instance name.
Re: combo box compnonent dazzclub
4/24/2007 3:42:33 PM
i well what i want to dois allow the user to select from a drop down menu, and
what ever is chosen. Using the same methods for the standard input textfield.
where by the varibale names in the sf file and the php file are the same , all
is well, and the data is sent to my email account.

i assumed the combox worked the same whereby keeping variable names the same
in your and php.
Re: combo box compnonent kglad
4/24/2007 8:44:55 PM
the code i gave should be:



var lo:Object = new Object();
var lv:LoadVars = new LoadVars();
lo.change = function(eo:Object) {
lv[eo.target] = eo.target.selectedItem.data;
};
cb.addEventListener("change", lo); // where cb is your combobox instance name.
Re: combo box compnonent dazzclub
4/25/2007 12:00:00 AM
Hi there,

Thanks for your speedy reply.

So with the code you had given me, it had published an error

[b]**Error** Symbol=sprite 194, layer=Layer 19, frame=1:Line 16: Statement
must appear within on/onClipEvent handler[/b]

To which i had placed an onClipevent ( should i have done this?? )

now once i did that a new error comes out displaying

[b]**Error** Symbol=sprite 194, layer=Layer 19, frame=1:Line 18: '('
expected[/b]

i believe i may have totally messed up here, sorry
Re: combo box compnonent kglad
4/25/2007 2:25:48 PM
AddThis Social Bookmark Button