This section adds an asterisk, borrow black feather words: "The content of this section is somewhat difficult, if do not understand, can temporarily do not look, wait for later encounter similar problem, come to consult again"
Let's use the graphic method to explain the example below.
Ideas:
1. The Fish Eye Magnifier is composed of several tapering circles;
2. So that each circle to mask a larger picture to achieve, inside the small round mask larger than the picture, outside the large circle mask smaller picture;
3. There is also a final important step is "focus", because the picture is growing, so the mouse is a point of the small image may be the head, and for the larger picture may be out of the field, then show the effect is wrong. Use "focus" to let the mouse point to the small image is the head, the larger picture also if the head, so that gives you an impression, please see the diagram below.
Graphic:
1. First put two film clips on the stage, one of which is the picture, the instance name "Pic", the registration point on the left (0,0), the other is the circle, the size: 200*200, the instance name "Ball", the registration point in the center;
2. Fish Eye magnifying Glass is a number of gradually small circle composition, so that these circles as lenses, overlapping together, while imaging, the number of circles (lenses), the more detailed imaging effect, the figure of 3
The code is as follows:
var Count:Number = 3;
//复制圆(镜片)的数量
for (var i = 0; i
< Count; i++) {
var b = ball.duplicateMovieClip("B"+i, i*2+1);
//复制圆
b._xscale = b._yscale=(1-i/Count)*100;
//圆的缩放= (1-第i个圆/圆的数量)*100,例:100~90~80~70
}