FLASH MX 2004 Make Magnifier effect

Source: Internet
Author: User
Amplification

One, Effect preview

Second, the establishment of four layers, as shown in the following figure

In this tutorial, to achieve the effect in the preview through the following as statement, you need to set the coordinates to (0,0).

(1) Set the x and Y coordinates (0,0) of the circular, four times times image in this element (Mask,large) respectively. As shown in figure:

(2) Set the position coordinates of the size two pictures on the scene (0,0), as shown in figure:

Three, fill in as

Algorithm Explanation:

the radius of the Mask._y=_ymouse-[mask circle and the radius of the Mask._x=_xmouse-[mask circle are used to enable the shaded circle to move with the mouse, while positioning the mouse pointer over the center point of the shaded circle mask. Principle explanation as shown in figure:

If the x,y coordinate of the circle in the component is at the center of the circle, you do not need to subtract r, and the code is modified to: mask._x=_xmouse;mask._y=_ymouse;

large._x=[1-magnification]*_xmouse and large._y=[1-magnification]*_ymouse is used to achieve large picture movement with the mouse movement, its coordinates are the mouse coordinates [1-magnification] times. Principle diagram:

[• Source files Download ·]



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.