Hi,
I would like add some sound to each of my combo boxes when clicked on:
Would the code be something along the lines of this(ive already got my listener):
var my_sound:Sound = new Sound();
var myListener:Object = new Object();
myListener.change = function(){
my_sound.attachSound("CLICK1C");//clickSound is an mp3 file in the library
my_sound.start();
Heres my current code for combo box 1:
// combo box 1
listener1 = new Object(); // create an object to monitor the combo box
listener1.change = function() { //when the item selected in the combo box changes....
selNum[0] = num1.selectedIndex; // chosen number not available for selection in next combo box
num2.removeAll(); // clear the combo box
// swap enabled combo boxes
num2.enabled = true;
num1.enabled = false;
j = 0; // reset number for combo box
for (i=0; i<50; i++) { // numbers available for selection
num2.addItem(j, i); // add items 1 - 49 to the second combo box
j++; //increment item for second combo box
}
for (i=0; i<2; i++) { // numbers to be removed from the second combo box
num2.removeItemAt(selNum*); // remove the i(th) item from the combo box
}
gotoAndStop(2); // next frame
};
num1.addEventListener("change", listener1); // monitor the combo box
Thanks