In this tutorial we'll create a magnifying glass effect, demonstrating use of the displacementMapFilter. The effect can be achieved in a relatively short space of time and with very little code.
Final Result Preview
Let's take a look at what we're aiming for:
Step 1 - Brief Overview
We're going to work with two layers, plus an additional optional layer. The first will hold an image which will contain the visual graphics, this can be anything. The second layer will be the color map which will control the pixel pushing. The third layer will hold the ActionScript.
An optional fourth layer will be an overlaying graphic acting as the frame or lens surround.
Lets look into it!
Step 2 - Document Setup
First thing we need to do is make a new ActionScript 3.0 Flash file - make the document size 530px X 400px with a framerate of 30fps.

Step 3 - Import Resources
Next we need to import an image that we can use for this effect - I found a cool, freely available desktop image at 1024px X 768px.
Import this to stage and name the layer "Image".

Now let's scale the image down to 50% and center it.

Step 4 - Scripting the Filter
Create a new layer on top and call it "Actions". Then let's bring the actions panel out and start coding the effect. First we need the filter for the image so let's create a new filter object and call it "dFilter". We'll leave the filter free of parameters as there are quite a few to set.
var dFilter:DisplacementMapFilter = new DisplacementMapFilter ();
Next we need to set these filter parameters in listed view.
Step 5 - Effect Scale
Let's start with the easiest ones and set the scales to around 50. This is the amount to which the magnifier will zoom in. It can also be set to a negative value, but in this case we need it to zoom in, not out.
Additional lines: 3,4
var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50
Note: this is not the actual order in which the filter normally accepts the parameters. However, in this case we can add them as we wish because we're using the listed view for a better overview.
Step 6 - Color Channel Components
Next we'll set the component color channels for X and Y - this dictates which colorchannels in the control map (which we'll create in a second) the filter will listen to.
If you're familiar with the RGB hex code #RRGGBB, we can choose from BitmapDataChannel.RED, BitmapDataChannel.GREEN and BitmapDataChannel.BLUE. To make it easier we can also just write 1 (red), 2 (green) or 4 (blue) - (and no I didn't make a spelling mistake, the blue is 4; this is set from the actual channel position in the hex code). In this example we'll just stick to red (1) and green (2)- but we'll come back to more about this when we design the actual displacement map.
Additional lines: 5,6
var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2
Step 7 - Displacement Mode
Next we need to set the mode to determine how the pixels will react if they are pushed further than the image boundaries. Here we can choose from:
DisplacementMapFilterMode.COLOR / DisplacementMapFilterMode.WRAP / DisplacementMapFilterMode.CLAMP / DisplacementMapFilterMode.IGNORE
Again we can simplify this by writing "color", "clamp", "wrap", "ignore". I won't get any further into these in this tutorial, so lets just use "color" which works best in most cases.
Additional lines: 7
var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color"
This mode allows pixels to continue beyond the image boundary (in case the filter pushes the pixels further than the edge of the image).
Step 8 - Surrounding Color and Alpha
Now let's set the surrounding color to 0x000000 and alpha to 0. This is 100% transparent, so nothing is displayed outside the image except the source pixels.
Additional lines: 8,9
var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0
Step 9 - Filter Effect Position
Now we need to set the position where the filter will affect the image; our lens position. This has to be set as a Point object containing the x and y value. We'll begin by creating the point object so it's ready for use when we assign it to the displacementMapFilter. Let's call it "dPoint" and set it to 0, 0 as initial values. We'll come back to this in a moment when we need to instruct this point to follow the mouse.
Next we assign "dPoint" to the "dFilter's" point position.
Additional lines: 1,11
var dPoint:Point = new Point(0, 0); var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0 dFilter.mapPoint = dPoint;
Step 10 - BitmapData
Last but not least we need to assign the control map to the filter. This is the map which contains the colored pixels that the componentX and Y listen to.
Additional lines: 13
var dPoint:Point = new Point(0, 0); var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0 dFilter.mapPoint = dPoint; dFilter.mapBitmap =
Here we also need a BitmapData object to act as a data container for our color-map.
Step 11 - Designing the Color Map
First we create a 100px X 100px, red to black, linear gradient square. This will take the current pixels and push them left and right as we set the componentX to red. Let's make this a movieclip called "redMap"
Then we do the same again - but this time with a green to black linear gradient square, again 100px X 100px. This time we'll also rotate it 90°. You might remember we set the component for the Y axis displacement as green (componentY = 2) so the gradient goes along the y axis. Once again we'll convert it to a movieclip, this time calling it "greenMap"

Step 12 - Preparing the Map for Capture Phase
We now have two separate color images; we need just one, so set the blendmode of the greenMap to "screen". Every color from the greenMap will then shine through on the redMap. Place the greenMap on top of the redMap and make sure they align correctly.
Select both movieclips by clicking on the layer "Map" and convert the two into one movieclip called "colorMap". Then set the instance name to "colorMap_mc".

Step 13 - Map Container
Now let's return to the code and continue by capturing the colorMap movieclip in a bitmapData.
Go to the top of the code and create a new BitmapData object. Let's call it "dMap" and set the size of it to match the size of our colorMap (in this case 100px X 100px, but this can be almost anything). We'll set transparent to "true" and color to 0x808080. This ensures that any remaining pixels in the bitmapData are neutral.
Additional lines: 3
var dPoint:Point = new Point(0, 0); var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080) var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0 dFilter.mapPoint = dPoint; dFilter.mapBitmap =
Step 14 - Capture Phase
We need to draw the colorMap's content into the bitmapData. Once that's done, we'll be able to use script to delete the colorMap from the stage. This is possible as the colorMap image will be contained within the bitmapData code.
Additional lines: 5, 7
var dPoint:Point = new Point(0, 0); var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080) dMap.draw(colorMap_mc) removeChild(colorMap_mc) var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0 dFilter.mapPoint = dPoint; dFilter.mapBitmap =
Step 15 - Assigning the Map to the Filter
Add the bitmapData dMap to the displacementMapFilter by setting the last parameter in the list (mapBitmap) to "dMap".
Modified lines: 19
var dPoint:Point = new Point(0, 0); var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080) dMap.draw(colorMap_mc) removeChild(colorMap_mc) var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0 dFilter.mapPoint = dPoint dFilter.mapBitmap = dMap
Step 16 - Add Filter to Image
The filter is complete! We now need to add it to the image, so select the image and make sure it has an instance name - lets call it "Image_mc". That done, we're able to set the filter on the image. We do this at the end of the code by setting the Image filters parameter as an array like this:
Image_mc.filters = [dFilter]
Additional lines: 21
var dPoint:Point = new Point(0, 0); var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080) dMap.draw(colorMap_mc) removeChild(colorMap_mc) var dFilter:DisplacementMapFilter = new DisplacementMapFilter (); dFilter.scaleX = 50 dFilter.scaleY = 50 dFilter.componentX = 1 dFilter.componentY = 2 dFilter.mode = "color" dFilter.color = 0x000000 dFilter.alpha = 0 dFilter.mapPoint = dPoint dFilter.mapBitmap = dMap Image_mc.filters = [dFilter]
OK, let's export the movie and see how the filter is affecting the image. It should look something like this:
Step 17 - Interactivity
What we have so far isn't very exciting, so let's try to make the lens follow the mouse.
First we add the "enterFrame" loop code like this:
Additional lines: 23,25,27
var dPoint:Point = new Point(0, 0);
var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080)
dMap.draw(colorMap_mc)
removeChild(colorMap_mc)
var dFilter:DisplacementMapFilter = new DisplacementMapFilter ();
dFilter.scaleX = 50
dFilter.scaleY = 50
dFilter.componentX = 1
dFilter.componentY = 2
dFilter.mode = "color"
dFilter.color = 0x000000
dFilter.alpha = 0
dFilter.mapPoint = dPoint
dFilter.mapBitmap = dMap
Image_mc.filters = [dFilter]
Image_mc.addEventListener(Event.ENTER_FRAME, onFrame)
function onFrame(e:Event){
}
Step 18 - Follow the Mouse
Next we set the values of our dPoint's X and Y to follow the mouse. Additionally, we'll reassign the newly changed dPoint to the dFilter again and reassign the filter to the image.
Additional lines: 26,27,28,29
var dPoint:Point = new Point(0, 0);
var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080)
dMap.draw(colorMap_mc)
removeChild(colorMap_mc)
var dFilter:DisplacementMapFilter = new DisplacementMapFilter ();
dFilter.scaleX = 50
dFilter.scaleY = 50
dFilter.componentX = 1
dFilter.componentY = 2
dFilter.mode = "color"
dFilter.color = 0x000000
dFilter.alpha = 0
dFilter.mapPoint = dPoint
dFilter.mapBitmap = dMap
Image_mc.filters = [dFilter]
Image_mc.addEventListener(Event.ENTER_FRAME, onFrame)
function onFrame(e:Event){
dPoint.x = mouseX
dPoint.y = mouseY
dFilter.mapPoint = dPoint
Image_mc.filters = [dFilter]
}
Lets test it again. It should look like this:
Step 19 - Finalizing
It's still not exactly how we want it, so lets make the center of the displacement follow the mouse and also add a small easing to the movement. To do that we change the following code:
dPoint.x = mouseXdPoint.y = mouseY
Modified lines: 26,27
var dPoint:Point = new Point(0, 0);
var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080)
dMap.draw(colorMap_mc)
removeChild(colorMap_mc)
var dFilter:DisplacementMapFilter = new DisplacementMapFilter ();
dFilter.scaleX = 50
dFilter.scaleY = 50
dFilter.componentX = 1
dFilter.componentY = 2
dFilter.mode = "color"
dFilter.color = 0x000000
dFilter.alpha = 0
dFilter.mapPoint = dPoint
dFilter.mapBitmap = dMap
Image_mc.filters = [dFilter]
Image_mc.addEventListener(Event.ENTER_FRAME, onFrame)
function onFrame(e:Event){
dPoint.x += ((mouseX-colorMap_mc.width/2)-dPoint.x)*0.3
dPoint.y += ((mouseY-colorMap_mc.height/2)-dPoint.y)*0.3
dFilter.mapPoint = dPoint
Image_mc.filters = [dFilter]
}
To sum up: we subtract half the size of the map from the map position, so it centers. Then we add a basic tweening function, which can be written like this:
this += (that-this)*speed
Step 20 - Adding Custom Graphics
To top it off, I added a magnifying glass graphic that I prepared in photoshop. I converted it into a movieclip, gave it an instance name and made it follow the point that we use for the displacemenMapFilter.

This is achieved by setting the new lens_frame_image X and Y position equal to the dPoint position. Then subtract the offset for the graphics edge, so that it aligns perfectly with the filter effect.
Additional lines: 4,5
function onFrame(e:Event){
dPoint.x += ((mouseX-colorMap_mc.width/2)-dPoint.x)*0.3
dPoint.y += ((mouseY-colorMap_mc.height/2)-dPoint.y)*0.3
lens_mc.x = dPoint.x-8
lens_mc.y = dPoint.y-8
dFilter.mapPoint = dPoint
Image_mc.filters = [dFilter]
}
Now our result should look like this:
Conclusion
When you have learned to create this effect yourself it shouldn't take more than 15 minutes to setup. Remember; if you forget what the parameters for the displacementMapFilter are you can always look them up on "help". There you will get the listed order and what each parameter does.
For quick experimentation you can go to my website and look in the "flash" section under "test / labs" - I have a bunch of displacementMapFilter test environments you can try out.
I hope you can find use for this filter in your creative work!













User Comments
( ADD YOURS )Raphael April 8th
wow cool effect!
( )MaZZo April 8th
Nice tut!!! Tks!!
( )inLine April 8th
Nice
( )First !!
inLine April 8th
2nd
( )Andre April 8th
why few people still use the document class for actionscript 3??
( )nice job, but with document class could be better
Alex April 8th
I couldn’t agree more.
Interesting effect though.
( )Marvin April 8th
very nice. cool function!
( )Richard S Davies April 8th
Very nice. Consise and well written code, and in AS3! Looking forward to trying out this evening, thanks!
( )gilan April 8th
thank you, thank you, thank you
( )Isis April 8th
I loved it! Can you answer me a thing? If I want a blur, instead the zoom, what shold I do?
Thanks, I’m new at flash but I’ll try this!
=)
( )Philip April 8th
well the blurfilter does not have the effect field of the map size that the displacementMapFilter has so there you will need to create a second layer and mask it and then apply the blur filter on that second layer mc.filters = [new BlurFilter(4, 4, 2)] and move the mask around.
( )André April 9th
Learn about BitmapData, Bitmap and Matrix class and you wont need to mask anything neither work with another layer, someday when i have a bit of time i will post a tutorial how to work with those classes, the BitmapData.draw method working with the Matrix class you can take a shot of just the rectangle you want, so you will have another little bitmap that you can apply anything you want there…
Philip April 25th
well i know exactly how to use the bitmapData and thw matrix classes using the scale prop – but first of all this was a tutorial on using the displacementMapFilter with a working displacementMap – this was ment for a basic understanding of how it works for people to be able to follow further tutorials on displacementmaps – second, you can bend an image with matrix – so the fun end there – for displacementMap the fun starts here…
manS April 8th
wow… veri nice awesome… tq for tutorial…
( )Deepu November 19th
Thanks
( )lawrence77 April 8th
cool!
( )I love the background and also the effect!
Dario Gutierrez April 8th
Cool effect, I love it. Thanks for sharing.
( )Philip April 8th
I rarely use the document class if if only want to obtain 1 effect – i do alot of labs and tests – i need no oop structure for that
its fast code for fast result – but ill take your advise up for my next planed tutorial for this effect
http://www.thonbo.com/tempShowCase/push2Pinch.html
( )Esteban April 8th
Excellent tutorial. Very nice explained.
And great use of the Displacement class.
I would add Math.round() to the mouse x and y values in order to get exact pixels, and avoid blurry lines, but that’s just a maniac detail of mine…
Thank you very much for sharing this.
( )rendyo April 8th
its great
( )imsraaia April 8th
nice..
( )Philip April 9th
if any of you are wondering how far you can zoom in and why it is so blurry:
the basis of the tutorial was to show use of the displacementMapFilter – rather than showing a great magnifying effect – because you cant really zoom in with the displacementMapFilter – because everytime you use a filter in flash it automaticly use “cacheAsBitmap” wich means that it take the original object and draws it into a bitmapdata in the size it is displayed – so no matter how you scale the original down as soon as it uses cacheAsBitmap on it – that will be the original size that the filter will be shown on – but i encourage people to try to add a #808080 radian gradiant going from alpha 100 on the egde to alpha 0 in the center on top of the map – then you can see the best use of the displacementmap filter
see an example here:
http://www.thonbo.com/tempShowCase/sphear3.html
(where i simply went a step further and made the 808080 layer invert the colors beneath)
( )André April 9th
woww, its a very nice effect, congratulations for your jobs, but i still recommend you to use the document class for AS3, not because of you, but the people who will follow the tutorial will familiarize using the timeline instead of document class, which is much better then programming in timeline, and maybe you can create a class for your effect, wich i think that many people would use your classes…
But now i will wait for your next job here, i can see that you will make very nice effects here, and i cant wait for the tutorial for the sphear3.html, i liked it very much, congratulations, and thanks for sharing this.
( )Good Boy!!! July 28th
hey boss! your tempshowcase is accessible to all. Restrict the direct access to http://www.thonbo.com/tempShowCase/. so that u can save ur resources.
( )By my true heart havnot take anything. others can! be carefull.
RUGRLN April 9th
This is totally awesomeee!!! Well done! Loved it!!!!
( )Might I add a suggestion to Collis or whoever, since these tuts get so many comments, how about a collapsable Spry kinda thingie for the comment so we don’t have to scroll down so much to get to the Add Comment section..
Diego SA April 9th
I’ve tried it before, but it’s too hard to get this effect. What I really tried to get is something like a window that you can drag over all the window, and the background behind it gets something like a blur effect. I’ve already found a tut about this effect, but never found out how to apply it to my website.
Well, maybe this is not similar to this tut, but it just reminds me about it.
Well, looks like I have to try this tut, but without the zoom appearance. Thanks a lot!
( )Mike April 9th
Great tut.
I made a similar effect but with a sphere and some elasticity : http://www.supadezign.com/2008/12/28/spherize-deformation/
It seems the displacementmap filter is more powerful than we think
( )Rob April 9th
Could someone tell me how to create a circular bitmap, similar to these spheres, so that I can produce the magnifying effect with a traditional looking magnifying glass. When I tried to make my colorMap_mc into a circle it drew corners around everything (I’m assuming because I’m defining a rectangle shape for my bitmap in the AS).
Any help would be greatly appreciated. Thanks for this tut it’s really awesome and it’s definitely helping me wrap my head around bitmaps and filters better!
( )Philip April 10th
use color : 808080 for neutral displacement så – mask with this color (also gradient masking for cool effect
) but keep the map rect
( )Wolf September 17th
Wow, great work.
I would like to use also a circular bitmap, as Rob before, but I don’t know how to handle the masking. Where do you apply the 0×808080 to? And how do you mask?
Can you please briefly explain.
Many thanx,
Wolf
Wolf September 17th
Oh sorry, I found out myself. The mask you talked about is just shape in 0×808080 on a layer above the map layers in the colorMap_mc.
I was trying to mask the layers and mask the map itself, what, of course, didn’t work.
Anyway, great work and thanks for your input…
Cheers, Wolf
Franky April 9th
Yo this is sooooo cooooolio.
( )I cant wait to do it. And then kill it so badddd!!!
Castiel April 9th
Excellent
Easy Tutorial but very useful information. I just wonder if it would be cool to blur everything and you can only see certain things under the “magnifying glass”
Like it lets you see things in other words its your “contact lens”
( )macias April 9th
very nice works / the best i’ve seen of this type o FLAzoom
( )Rohan April 9th
This effect looks cool, but I can’t really get it to work properly, its not following my mouseX or Y coordinates, and the magnifying area is much smaller than the total colorMap_mc size…
Also, I can’t open your source file in Flash CS3 professional, it says unexpected file format??
( )Philip April 9th
its cs4 _ and have you tried to set the dPoint.x = mouseX and dPoint.y = mouseY – and remember that it is as3 – but you can do it with as2 like this dPoint.x = _xmouse and remember in as2 you need to import the classes for the flash.geom.Point and flash.display.BitmapData and flash.filters.DisplacementMapFilter
regarding your map size: you need to place the map inside the moveclip you draw at 0,0 cordinates – and then remember to set the exact size in the bitmapData setup – if you still have errors then try to set the size manually – in as3 you can quicly test what your dMap looks like if you write this along you code addChild(new Bitmap(dMap))
( )Philip April 10th
guy thx for trying out my tutorial –
i put up some goodies you can throw into the map to get some cool effect
http://thonbo.com/presentation/sphear.png
http://thonbo.com/presentation/twivl.png
Rohan here is a similar version i used for a flash user group meeting for cs3
http://thonbo.com/presentation/lenseDisplacement.fla
- i have alot of other cool maps but i want to wait untill i have time for my next tutorial to reveal all the goodies
( )Rohan April 12th
Philip, thanks for posting that file, when I looked at it I realized what was causing my problem was the registration of the movieclips!! As soon as I changed them all to be registered in the top left corner instead of in the center, it worked!
Might be good to add that in there…but maybe I was the only one!
Thanks again!
( )Jorgemil April 12th
You rock
( )crativegroup bonn April 12th
thanks for this very detail tutorial…
( )plntgrl April 12th
New to Flash …
Q: If you have a static background, and then an object which sits on top (e.g. soccer ball) that you can drag and drop around the screen, how can you get the lens to read the “mag” of the new position? I find that it will only pick up the image of the original object position and not the “drop” position.
Thanks – and great job!
( )cyberstar April 13th
Thanks dear editor for asking the contributors to share the source file. One thing true about tutorials is no matter how well it was written not all people would understand it, so it really helps to include the source files. Thanks for listening and thanks for the cool tutorial.
( )Philip April 13th
if you scroll to the top of the page there is a big button saing “Source, get the code” – this is for all tutorials – in this case the document was made in the newest version of flash and i shared a similar document for a later version in case any one uses cs3 –
the srouce document was always there for download…
( )Ariful Alam Khan April 13th
I really like this. Thanks
( )Neal April 13th
Suuuuuuuuuuuuuuuuuperb ya!
( )So nice effect!
Suzanne April 14th
thanks for this tut!! But i have one question. What if i want make a movie of the loop, that the loop goes random over the screen and not follow my mouse.!!
( )Philip April 14th
if you wanna animate your map then you have to redraw the map instance on ENTER_FRAME – you can still have it removed from displayList “removeChild(map_mc)” – doesnt matter, it still has the instance in the back that it can capture from.
example of animated map:
http://thonbo.com/tempShowCase/displaceTest4.html
(drawing a dynamic map with the drawing api and radial gradient fill with povit point movement)
if you click and drag around it updates – unfortunately – it looks aweful but that what happens when you blow UP pixels too much
and of course if you dont wanna make it follow the mouse then you just leave the part where you assign the dPoint.x and y to the mouse – you can make it go random around or make it stand still – doesnt matter
( )Edith April 17th
Can the same effects be coded in flex 3?
( )whiteblot April 18th
Hey, thanks for tutorial. Very cool effect and nice way to achieve it. I’ve spent some time to make my own version using code only. The only thing that tutorial lacks is some good explanation on how those filters really work, how are they applied at runtime – it took me a while to understand whole idea behind them (searching in books and other tuts on the web). It wasn’t very difficult for me, but for beginners it might be difficult to grasp from your tutorial.
( )Philip April 19th
the hardest thing to undertstand, is building the map correctly so it makes the propper displacement – i did a whole presentation just on that for a flash user group – and it take some time explaining the concept of the colors and the directions and forces from the colors – it would simply be too much info in one tutorial – so i made it simple for folks to explorere them self – regarding applying the filters – that should be pretty basic – the movieclip.filter parameter is an array – of filter objects – and to add one you ad the array of one object
movieclip.filters = [filterobject]
or if you like –
var myfiltersArray:Array = new Array()
myfiltersArray[0] = filterobject
movieclip.filters = myfiltersArray
i prefere the first one
( )whiteblot April 19th
well i agree, it’s complicated subject – especially for beginners (understanding the process of creating displacement map) so maybe that would be too much for this tutorial. Sounds like a good idea for a new tutorial though
Maybe I’ll give it a try
. Anyway i think understanding it opens up a whole new space for experimenting, thinking new ideas etc. Thnx for tut, I wasn’t into those filters till now… now I’m so excited with them!
SkyintheSea April 22nd
nice tut , thank for sharing with us , though it’s quite complicate at first
( )chanli April 23rd
thank you
( )kate April 27th
did manage to get it right i got lost bt i enjoyed tryinh it will keep on tryin
( )CgBaran Tuts April 27th
Great tutorial thanks
( )Christopher Ross April 27th
That is very cool, thanks for sharing!
( )Pope April 28th
I tell you what, I’m learning the actionscript 3.0 through osmosis, just typing and relaying, and this was an excellent tutorial to help me get up to speed on some of the filters….Still learning, but I ended up with a great result from this, thanks!
( )Akhil April 29th
Fundoo effect … Nice tutuorial …
( )Kevin M May 6th
Brilliantious. What is the final file size? I wonder if a 300×250 banner ad can be built under 30k?
( )Philip May 21st
yes – the effect it self can be obtained withing a kilobyte i belive because you are only using code and 2 vectors
( )Brock May 7th
My question is how can I make it so objects are click-able while using the lens?
( )realturk May 8th
perfecttt i like thiss effect thanx admin
( )realistik May 9th
I had so much fun with this cool little effect. Thanks!
( )fReEkLiSt101 May 21st
Great effect. Exceptional.
How do you set it up so that ‘follow the mouse’ is adjusted to a corner of the magnifying lens, and not the center. This way the image/text etc, won’t always be blocked by the mouse
( )Tinku Tharasing May 29th
Nice Tutorial. Document Class based Tutorials Doesn’t help more for Designer guys who like to do some coding.
( )aaaaa June 3rd
did they make this with flash cs4?
( )turantug June 17th
very good,thanks
( )mridul June 17th
hmmmmm
gr8 tutorial simply hats off………………………..
( )george June 19th
That is very cool, thanks for sharing
( )george June 19th
very good
( )kino June 19th
add a hide mouse to make it better so the glass will be your new mouse
( )Nobody June 20th
How do you add a new filter object? Sorry i’m new to flash.
( )learning June 23rd
Very nice program. I try it out and the effect is superb. Can i ask you 1 question? what if i do not want the magnifying glass to appear at the start , it will only be visible when i press a button for example zoom in button?
( )Lamar July 2nd
Philip
Is there a way to change the magnifying glass’ location from starting point in the upper left corner. I tried changing the “var dPoint:Point = new Point(0, 0);”. Still the magnifying glass’ location wont change. Is there a way?
Thank you
( )David Moreen July 11th
I really like it! Thanks a lot. The only thing that I would like is for the cursor to hide.
( )Sandip July 15th
Very good work… thanks!
( )Sohbet August 17th
thank you. good.
( )Nick August 19th
Hi great tutorial, Im trying to make it possible to turn the filter on and off when a button is clicked. So far I have tried removing it from the background layer with Image_mc.filters = [] but didnt work. Any pointers would be very helpful.
Thanks Nick
( )RJFlash August 27th
sorry, I don’t see any realistic, complex displacement effect.. only a simple zoom.
( which can be easily done without using any bitmap or displacement filters )
why use filters when there are no complex distortions (refraction effect) ?
( )sandy August 29th
nice!
( )Alex Adriano September 6th
What a beautiful view ! I liked very much !!!
( )jmarreros September 16th
Thanks Philip, I learnt how to use displacement in my animations.
( )Fragglerocky October 5th
Wow, looks amazing, just what I’ve been looking for! Will this work with AS 2.0?
( )weiwei November 2nd
Will this work with Actionscript 3.0?
( )web design egypt November 3rd
wow it’s long but amazing
( )thanks very much
Ahmet ALP November 4th
Very Thans.
( )John Lynch November 11th
What a great tutorial, a really helpful piece. I’d love to be able to create a circular filter, but no matter how I try the basic displacement is happening in a square area with the displacement map having it’s desired effect where it should. The result is unsightly square corners (displaced pixels) on a circular “magnified” area.
Anyone know how a circular filter could be applied?
( )Deepu November 19th
Nice….
( )Sam December 10th
Thanks for this its a great tutorial
( )Marshall December 14th
why when I start my application, I have a double square (one inside the other and one more small then the other) and the zoom effect is so bad?
Sorry for my bad english, I’m Italian.
Tnx P.
Marshall
( )Cristi Lazar January 20th
This is so awesome dude…i’ll try to do this imediatlly and i hope it will work … i’m a beginer in flash … but i’d like to learn more , cause html , css i allready know
) thx again man :> !!!
( )