# Urgent Help with Flash Actionscript Combo Box

**URL:** <https://forum.kirupa.com/t/urgent-help-with-flash-actionscript-combo-box/57496>\
**Category:** Uncategorized\
**Created:** [July 13, 2004, 7:25pm UTC](https://forum.kirupa.com/t/urgent-help-with-flash-actionscript-combo-box/57496 "2004-07-13T19:25:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aspnewbee](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@aspnewbee](https://forum.kirupa.com/u/aspnewbee)\
**Post date:** [July 13, 2004, 7:25pm UTC](https://forum.kirupa.com/t/urgent-help-with-flash-actionscript-combo-box/57496/1 "2004-07-13T19:25:21Z")

</div>

Hi I’m trying to insert some data into my DB from two Combo Boxes in Flash. I’m not quite sure how to go about it. I have no idea how to give the combo box a ‘var’ value like we do for a regular textfield. I have other pages where I have regular text fields that work fine as I can specify the ‘var’ value in the properties but not for combo boxes. I’m new to actionscript so please bear with me. Can anyone help me please…  
Thank you all in advance.

Action Script for my button:

```auto

on (press) {
 loadVariablesNum
 ("http://localhost/Test/acadForm.asp",0, "post");
 nextframe();
}

```

ASP CODE:

```auto
  <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
strMajor = Request.Form("major")
strCollege = Request.Form("college")
'Response.Write(strMajor) & "<br>"
'Response.Write(strCollege) & "<br>"
MyPath=Server.MapPath("uginfo.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & MyPath
SQL = "INSERT INTO acad_choices (major, college) VALUES('"&strMajor&"', '"&strCollege&"')"
'Response.Write(SQL)
conn.Execute(SQL)
%>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 14, 2004, 6:47am UTC](https://forum.kirupa.com/t/urgent-help-with-flash-actionscript-combo-box/57496/2 "2004-07-14T06:47:12Z")

</div>

Hello,

I’m not ASP programmer but can help you about Flash code.

suppose that you have a ComboBox instance at stage named **myCB** just place this code in the frame actions:

```auto
myDP = new Array({label:"Kirupa", data:"USA"}, 
	 {label:"Kitiara", data:"UK"}, 
	 {label:"pcMan", data:"Mexico"}, 
	 {label:"RennaisanceGirl", data:"Where?"});
myCB.dataProvider = myDP;
myLV = new LoadVars();
myLV.onLoad = function(ok) {
 if (ok) {
  trace("just done =)");
 } else {
  trace("error while loading remote script");
 }
};
myCB.change = function(eo) {
 val = eo.target.value;
 // here you can send values to yous file.asp by using LoadVars Class
 myLV.load("something.asp?value="+val);
 trace(eo.target.text+" is from: "+val);
};
myCB.addEventListener("change", myCB);

```

and you have to add the rest in the ASP code.

So i hope can fe useful for you :cons:  
Regards
