Flash as detection movie clips and mouse conflict resolution

Source: Internet
Author: User

The

Selects the first frame on layer 1 in the timeline. Select Window > action to open the Actions panel (if it is not already open).  
Add the following code in the Actions panel:

  code is as follows copy code

This.createemptymovieclip (" BOX_MC ");

With (BOX_MC) {
    beginfill (0xff0000);
    moveTo;
     LineTo (200, 100);
    LineTo (200, 200);
    lineTo (100, 200);
    lineTo (100, 100);
    Endfill ();
}

This.createtextfield ("Status_txt", 999, 0, 0, MB);

var mouselistener:object = new Object ();
Mouselistener.onmousemove = function (): Void {
    status_txt.text = _level0.hittest (_xmouse, _ Ymouse, True);
}
Mouse.addlistener (MouseListener);


Select Control > Test movie, and then slide the pointer over the movie clip to test the conflict.
The value true is displayed each time the pointer rests on an opaque pixel.

Solutions to the problem of conflict resolution, there is a need to understand friends can enter the reference.

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.