# Multiple selections in a ComboBox

**URL:** <https://forum.kirupa.com/t/multiple-selections-in-a-combobox/254453>\
**Category:** flash\
**Created:** [March 12, 2008, 10:21am UTC](https://forum.kirupa.com/t/multiple-selections-in-a-combobox/254453 "2008-03-12T10:21:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Germaris](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Germaris](https://forum.kirupa.com/u/Germaris)\
**Post date:** [March 12, 2008, 10:21am UTC](https://forum.kirupa.com/t/multiple-selections-in-a-combobox/254453/1 "2008-03-12T10:21:21Z")

</div>

Hi there!

Is it possible to make multiple selections in a ComboBox ?  
i.e. make n consecutive selections and store them in an array  
or make n selections in the open list of the CB by using (for example) the click-Shift Key keystroke

Purpose is to allow the user to select multiple different issues of a magazine with a maximum ease of use…  
(Code I use is attached below)

Many thanks for your help!

Best regards,  
Gerry

```auto
//import mx.controls.ComboBox; // imported in Parameters --> first frame
//----------------
CBBUY.addItem("Choose your issues...", "");
var myMainIssues = new LoadVars();
myMainIssues.onLoad = function() {
	issues_array = this.myissues.split(";");
	issuesdata_array = this.myissuesdata.split(",");
	for (i = 0; i < issues_array.length; i++) {
		CBBUY.addItem(issues_array*, issuesdata_array*);
	}
};
myMainIssues.load("Issues/issues.txt");
var CBBUYListener:Object = new Object();
CBBUYListener.change = function(evt:Object) {
	// This will ouput the label of the selected item
	var mainissues = new LoadVars();
	mainissues = evt.target.selectedItem.label;
	if (mainissues != "") {
	// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY 
	// FOR STORING A LIST OF THE LABELS OF THE SELECTED ISSUES
	// (LIST WHICH I CAN DISPLAY LATER IN ORDER SUMMARY
	// AND USE AS A RECAP IN THE BILL)
		trace(mainissues); // ??
	}
	// This will ouput the data of the selected item                               
	var mainissuesData = new LoadVars();
	mainissuesData = evt.target.selectedItem.data;
	if (mainissuesData != "") {
		// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY 
		// FOR STORING THE DATA OF THE SELECTED ISSUES
		// (LIST WHICH I CAN USE LATER FOR COMPUTING THE AMOUNT
		// OF THE PURCHASE)
		trace(mainissuesData); // ??
	}
};
CBBUY.addEventListener("change", CBBUYListener);

```
