TypeError: Error #1034: forced conversion type failed: The flash. events: MouseEvent @ 73b7c0 cannot be converted to mx. events. ItemClickEvent .,
1. Error description
TypeError: Error #1034: forced conversion type failed: The flash. events: MouseEvent @ 73b7c0 cannot be converted to mx. events. ItemClickEvent.
2. Error cause
/*** Query button click function */protected function search_clickHandler (event: MouseEvent): void {search. addEventListener (MouseEvent. CLICK, radiogroup_itemClickHandler);}/*** CLICK function */protected function radiogroup_itemClickHandler (event: ItemClickEvent): void {if (event. currentTarget. selectedValue = "apple") {apple. visible = true; banana. visible = false; appleRate. visible = true;} else if (event. currentTarget. selectedValue = "banana") {apple. visible = false; banana. visible = true; appleRate. visible = false ;}}
Event Conversion error
3. Solution
TypeError: Error #1010: the term is not defined yet, and no attribute is an Error. 'generally, when
Generally, undefined variables and methods are used, such:
Var a: uint = 0;
B = a + 3; this B is not defined, so an error occurs!
Btn. addEventListener (MouseEvent. CLICK, A); only method B in the Code does not have method A, so an error occurs!
Function B (e: MouseEvent): void {
}
TypeError: Error #1009 FLASH AS30
Why is there no error when I copy it?
Follows the mouse and hides the mouse
When you encounter enemy, you can hide it.
......
1009 because the data type is not declared ~ You should have not instantiated ~ Or the API is not declared during the call.
Do not declare that the data type is a personal encoding style preference. The return type, parameter, or variable of the function has no type declaration. However, if the type declaration is used, the compiler can compile more effective code and detect more errors during compilation. Enable this warning if you are prompted when you cannot use the type declaration.