# Compile error 1046

**URL:** <https://forum.kirupa.com/t/compile-error-1046/330564>\
**Category:** flash\
**Created:** [February 9, 2013, 5:27pm UTC](https://forum.kirupa.com/t/compile-error-1046/330564 "2013-02-09T17:27:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickyhay](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rickyhay](https://forum.kirupa.com/u/rickyhay)\
**Post date:** [February 9, 2013, 5:27pm UTC](https://forum.kirupa.com/t/compile-error-1046/330564/1 "2013-02-09T17:27:32Z")

</div>

Hello All, I have been going crazy for hours. I keep getting this compile error:  
1046 Type was not found or was not a compile-time constant: ComponentEvent.  
I think Flash is telling me i have have not imported the proper class. However, when i try and fix the problem the error still keeps popping up:puzzle:.  
This is my code: Im building a combobox on stage do i need a componentEvent? If you can identify were i am going wrong i appreciate it if you could give me some advice. T  
hanks Ricky

aBb.dataProvider = new DataProvider(items);  
aBb.addEventListener(ComponentEvent.ENTER, onAddItem);

function onAddItem(event:ComponentEvent):void { THIS ERROR LINE \<\<\<\<\<\<\<\<\<  
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);  
}  
}
