Magnifing Glass Effect

Ok, i have this character, lets take a robot for example. And I have this magnifying glass. Which is a circle. How do I make it so that when you press and drag the glass the magnifying glass automatically locks onto the center of ur mouse while the mouse is hidden (mouse.hide) - And also, the magnifier zooms (makes bigger) in whatever part you move it to.

How would I do this? And please dont give me tutorial from, i’ve went there, and the one perfect tutorial I found messed up.

I deleted this thread from the Flash MX forums, and thought it would be better to post it on the Flash Actionscript forums.

Come on Guys! PLEASE HELP ME. I’m really trying to learn this thing.

I know it has to do with MC’s, masks consisting of the character 50% scaled in one layer and 100% in the other. Well, I took a big wild shot at something like it, it works and all, but the magnifying glass doesnt show, I know it doesnt cause its masked. Any idea to show it?

you use a circle inside the hourglass, not the hourglass as mask. That should give you the desired effect.

your mask doesnt actually show… just its shape shows through… so draw your magnifying glass… cut out the circle part… put it in the mask layer and put the rest in another layer…the circle wont show up but the frame of it will…
only trick you will have to mess with is making sure the things are lined up right

Ok, i’ve got an idea -

Whats the action script for if instance “1” starts to drag,
instance “2” drags also???

desired effect?


Your “link” doesnt work.

Sharif, there isn’t any. startDrag() only lets you drag one element at a time, so you’re gonna have to “drag” the movieclip yourself, by setting it’s position to the one of the mouse. For example:

myMovieClip.onPress = function() {
  this.drag = true;
myMovieClip.onRelease = function() {
  this.drag = false;
myMovieClip.onMouseMove = function() {
  if (this.drag) {
    this._x = this._parent._xmouse;
    this._y = this._parent._ymouse;

should work now…

Yea Fluid One!!! Thats the exact effect I want. But I dont want it to just lock on the mouse as soon as the movie loads, I want the person to be able to drag it, and when released, stop the drag.

Please tell me you can do that.


Take a look at my gallery, if its what you want then tell me, and i’ll tell you how to do it, .


Awesome site layout. Loved the gallery. That is one very cool effect. Yea, I guess thats what I can use. Teach me how. Thanks.

Was just reading the other posts, you said fluid one has the EXACT effect you wanted, here’s a link that will show you what to do.


P.S Thanks for the compliments.


Magnifying Lens FLA from Ultrashock:

hey ko2n, thats the exact tutorial I went to, at the end, the actionscript got confusing, i got frustrated and gave up…i’ll try it again I guess.