TypeError: Error #1034: forced conversion type failed: The flash. events: MouseEvent @ 73b7c0 cannot be converted to mx. events. ItemClickEvent .,

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.