# Magnifing Glass Effect

**URL:** <https://forum.kirupa.com/t/magnifing-glass-effect/27929>\
**Category:** Uncategorized\
**Created:** [August 8, 2003, 12:08am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929 "2003-08-08T00:08:12Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [August 8, 2003, 12:08am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/1 "2003-08-08T00:08:12Z")

</div>

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 [flashkit.com](http://flashkit.com), 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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2003, 12:31am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/2 "2003-08-08T00:31:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2003, 2:55am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/3 "2003-08-08T02:55:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2003, 4:25am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/4 "2003-08-08T04:25:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2003, 3:39pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/5 "2003-08-08T15:39:52Z")

</div>

Ok, i’ve got an idea -

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2003, 9:32pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/6 "2003-08-08T21:32:19Z")

</div>

desired effect?

\>\>\>[link](http://fluid.asianillusion.com/kirupa/lupa1.html)\<\<\<

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 9, 2003, 12:44am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/7 "2003-08-09T00:44:56Z")

</div>

Your “link” doesnt work.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 9, 2003, 1:33am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/8 "2003-08-09T01:33:55Z")

</div>

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:

```auto
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;
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 9, 2003, 8:50am UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/9 "2003-08-09T08:50:28Z")

</div>

\>\>\>[link](http://fluid.asianillusion.com/kirupa/LUPA1.SWF)\<\<\<  
should work now…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 9, 2003, 3:38pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/10 "2003-08-09T15:38:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 10, 2003, 4:19pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/11 "2003-08-10T16:19:50Z")

</div>

Hi,

Take a look at my gallery, if its what you want then tell me, and i’ll tell you how to do it, [http://www.geocities.com/lostboyviru/gui\_site.html](http://www.geocities.com/lostboyviru/gui_site.html) .

Regards,  
Viru.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 10, 2003, 4:25pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/12 "2003-08-10T16:25:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 10, 2003, 4:30pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/13 "2003-08-10T16:30:27Z")

</div>

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.

[http://www.flashkit.com/tutorials/Special\_Effects/Real\_Tim-Boban\_Kl-144/index.php](http://www.flashkit.com/tutorials/Special_Effects/Real_Tim-Boban_Kl-144/index.php)

Regards,  
Viru.

P.S Thanks for the compliments.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 10, 2003, 4:32pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/14 "2003-08-10T16:32:17Z")

</div>

on(press){drag=!drag}  
onClipEvent(enterFrame){  
if(drag){\_y=\_root.\_ymouse;\_x=\_root.\_xmouse}  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 10, 2003, 7:41pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/15 "2003-08-10T19:41:21Z")

</div>

Magnifying Lens FLA from Ultrashock:  
[http://www.ultrashock.com/ff.htm?http://www.ultrashock.com/flas/Detailed/101.html](http://www.ultrashock.com/ff.htm?http://www.ultrashock.com/flas/Detailed/101.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 10, 2003, 7:49pm UTC](https://forum.kirupa.com/t/magnifing-glass-effect/27929/16 "2003-08-10T19:49:28Z")

</div>

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.
