The clone method must be reconstructed in as3 custom events.

Source: Internet
Author: User
In the following example, the clone () method is the most important. You can use the clone () method to return a copy of the current event object. This clone () method generally does not need to be manually called. When we send an event object repeatedly, the eventdispatcher class will automatically call the clone () method to generate a copy of this event. Send the myevent event repeatedly. In a good understanding, the myevent event is forwarded. If the myevent event is not reconstructed, the clone method called by eventdispatcher is the event clone method during repeated sending, the cloned event is naturally an event class rather than a myevent. Therefore, when you use the E: myevent type to receive the event during listening, an error is reported and cannot be converted to the myevent class.

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.