Hello, I am building a form for my project using ActionScript 3. In Flash pro on stage i have asome comboboxes a checkbox, and, a radio button.

When i run the application in real-time i get this one error. 1046: Type was not found or was not a compile-time constant: ComponentEvent.

I am unsure what caused this error because, i have already imported the ComponentEvent.

The code is below. Can you please tell me how to resolve this error. Thank You.

package {

public class Flash_Main {



import fl.motion.MotionEvent;
import flash.events.Event;
import flash.text.TextFormat;
import fl.data.DataProvider;
import fl.ComponentEvent;

public function Flash_Main() {
// Building the components

var tf:TextFormat = new TextFormat();
tf.font = "Arial";
tf.size = 16;
tf.color = 0x000000;

var monthA=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

monthCB.dataProvider.dp;

var dataA:Array = [];
setDatesF(31);
function setDatesF(n:int):void {

for (var i:int=1; i<=n; i++) {

dataA.push(i);

}

dp=new DataProvider(dataA);

dateCB.dataProvider=dp;

}

var yearA:Array = [];
for (var i:int= 1910; i<2014; i++) {

yearA.push(i);

}

dp = new DataProvider(yearA);

yearCB.dataProvider=dp;


monthCB.addEventListener(Event.CHANGE,monthF);

function monthF(e:Event):void {

var date = new Date(yearCB.selectedLabel,1+monthA.indexOf(monthCB .selectedLabel),0);

setDatesF(d.date);

}

var items:Array = [
{label:"London", data:"LondonData"},
{label:"Paris", data:"ParisData"},
{label:"New York City", data:"New York CityData"},
{
];
aBb.DataProvider = new DataProvider(items);

aBb.addEventListener(ComponentEvent.ENTER, onAddItem);

function onAddItem(event:ComponentEvent):void {
var newRow:int = 0;
if (event.target.text == "Add") {
newRow = event.target.length + 1;
event.target.addItemAt({label:"" + newRow, data:"Data" + newRow},
event.target.length);
}
}

aCb.addEventListener(MouseEvent.CLICK, clickHandler);

aCd.enabled = false;
aCe.enabled = false;

function clickHandler(event:MouseEvent):void{
aCd.enabled = event.target.selected;
aCe.enabled = event.target.selected;
}
}

}

}