-
Compile error plz help me
Hello All, This compile error has been driving me nuts for hours:
1046: Type was not found or was not a compile-time constant: ComponentEvent.
I am using a component event for my combobox. It sounds like to me i have not imported the correct class but whatever i try i still get this annoying error message.
This is part my code and all my imports: Any suggestions would be appreciated.
import flash.text.TextField;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLLoader;
import fl.controls.Button;
import fl.controls.TextInput;
import fl.data.DataProvider;
import fl.controls.ComboBox;
import flash.text.TextFormat;
aBb.dataProvider = new DataProvider(items);
aBb.addEventListener(ComponentEvent.ENTER, onAddItem);
function onAddItem(event:ComponentEvent):void { <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);
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|