Is my code correct?

[font=Tahoma]Hi,

So far I have created a simple interface in Flash 8 where by the you have to selects numbers from 6 combo boxes ranging from 1 – 48.

Heres the code for combo box 1 to 6. Just would like to make sure im using the correct code as im pretty new to Actionscript so my understanding of java helped me out a bit when writing the code.

Combo Box 1:


 
stop();
 
var i = 0;
 
var j = 1;
 
var del,del2,del3,del4,del5 = 0;
 
num2.enabled = false;
 
num3.enabled = false;
 
num4.enabled = false;
 
num5.enabled = false;
 
num6.enabled = false;
 
btnSubmit.enabled = false;
 
j=1; 
 
for (i = 0; i < 48; i++) {
 
num1.addItem(j, i);
 
j++;
 
}
 
// combo box 1
 
listener1 = new Object ();
 
listener1.change = function(){
 
num2.removeAllItems();
 
num2.enabled = true;
 
num1.enabled = false
 
j=0;
 
for (i = 1; i < 50; i++) {
 
num2.addItem(j, i);
 
j++;
 
}
 
del = num1.value;
 
num2.removeItemAt(del);
 
gotoAndStop(2);
 
}
 
num1.addEventListener("change", listener1)
 

Combo Box 2:


 
// combo box 2
 
listener2 = new Object ();
 
listener2.change = function(){
 
num2.enabled = false;
 
num3.removeAllItems();
 
num3.enabled = true;
 
j=1;
 
for (i = 0; i < 49; i++) {
 
num3.addItem(j, i);
 
j++;
 
}
 
del2 = num2.value;
 
num3.removeItemAt(del);
 
num3.removeItemAt(del2);
 
gotoAndStop(3);
 
}
 
num2.addEventListener("change", listener2)
 
 

Combo box 3:


 
// combo box 3
 
listener3 = new Object ();
 
listener3.change = function(){
 
num3.enabled = false;
 
num4.removeAllItems();
 
num4.enabled = true;
 
j = 1;
 
for (i = 0; i < 49; i++) {
 
num4.addItem(j, i);
 
j++;
 
}
 
del3 = num3.value;
 
num4.removeItemAt(del);
 
num4.removeItemAt(del2);
 
num4.removeItemAt(del3);
 
gotoAndStop(4);
 
}
 
num3.addEventListener("change", listener3)
 
 

Combo Box 4:


 
 
// combo box 4
 
listener4 = new Object ();
 
listener4.change = function(){
 
num4.enabled = false;
 
num5.removeAllItems();
 
num5.enabled = true;
 
j = 1;
 
for (i = 0; i < 49; i++) {
 
num5.addItem(j, i);
 
j++;
 
}
 
del4 = num4.value;
 
num5.removeItemAt(del);
 
num5.removeItemAt(del2);
 
num5.removeItemAt(del3);
 
num5.removeItemAt(del4);
 
gotoAndStop(5);
 
}
 
num4.addEventListener("change", listener4)
 
 

Combo Box 5:


 
// combo box 5
 
listener5 = new Object ();
 
listener5.change = function(){
 
num5.enabled = false;
 
num6.removeAllItems();
 
num6.enabled = true;
 
j = 1;
 
for (i = 0; i < 49; i++) {
 
num6.addItem(j, i);
 
j++;
 
}
 
del5 = num5.value;
 
num6.removeItemAt(del);
 
num6.removeItemAt(del2);
 
num6.removeItemAt(del3);
 
num6.removeItemAt(del4);
 
num6.removeItemAt(del5);
 
gotoAndStop(6);
 
}
 
num5.addEventListener("change", listener5)
 
 


 
 
// combo box 6
 
listener6 = new Object ();
 
listener6.change = function(){
 
num6.enabled = false;
 
btnSubmit.enabled = true; 
 
}
 
num6.addEventListener("change", listener6)
 

Heres a link to what it currently looks like

Thanks for your time[/font]