flashmx2k4: using combobox in form

asm0deus

Golden Member
Aug 18, 2003
1,181
0
76
so i got this form in a movie im creating and have a bunch of text input boxes that should work fine, but i cant figure out how to get the combobox (from the components panel) variable to post to the php script. is there some actionscript i need to do to convert the variable or something? its just a 5 selection combo

thanks for any help!! it is very much appreciated.
 

asm0deus

Golden Member
Aug 18, 2003
1,181
0
76
thanks drakkon!! now if only i knew where to put it and what it did, i'd be on point ;)
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
lol put it in the main code area for your movie...variable names left fairly descriptive so hopefully should transfer easily

What you have is a listener for when your submit button is pressed, when it is pressed it creates LoadVars objects (Whcih is what is used to "post" data). The send object is applied the value of "name" with whatever is in your combo box (you can also do send_lv.var1, send_lv.var2...in PHP each of them will show up as _POST["var1"], etc)
The onload function is just a way of testing if the page loaded and what is got back (i.e. the welcomemessage variable)
 

asm0deus

Golden Member
Aug 18, 2003
1,181
0
76
**Error** Scene=Scene 5, layer=Code, frame=1:Line 1: The class 'object' could not be loaded.
var submitListener:eek:bject = new Object();

**Error** Scene=Scene 5, layer=Code, frame=1:Line 2: The class 'object' could not be loaded.
submitListener.click = function(evt:eek:bject) {

what should i change to fix those? and should myComboBox be changed to the instance name of the combo box?
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
make sure all objects are capitolized (Object) and yes change names from myComboBox to the instance of your combo box