View SWF online
I've been working on this for an entire afternoon.
And finally...it's done!!
It's simply a component making usage of the DisplacementMapFilter.
Anytime I want to use this effect, I find it quite painful.
Since I have to recreate every code and elements from scratch.
So I decided to make this into a component.
To use MagnifierFX, all you have to do is drag it out from the component library.
(Be sure to add the SWC file into your Flash's comopnent directory)
There're only four parameters for you to adjust:
1. outerRadius - the outer radius of the magnifier.And remember to call refresh() to redraw the effect by yourself!!
2. innerRadius - the inner radius of the magnifier.
(this is quite difficult to explain, actually. just watch the SWF demo above.)
3. strength - how strong this effect is aplied.
4. target - the DisplayObject to be used with this effect
(not that this DisplayObject has to be in the same parent as MagnifierFX)
(this is for CPU-efficiency's sake)