PDA

View Full Version : Magnifing Glass Effect.



REEFˇ
August 7th, 2003, 08:08 PM
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, 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.

REEFˇ
August 7th, 2003, 08:31 PM
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?

Iammontoya
August 7th, 2003, 10:55 PM
you use a circle inside the hourglass, not the hourglass as mask. That should give you the desired effect.

Scootman
August 8th, 2003, 12:25 AM
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

REEFˇ
August 8th, 2003, 11:39 AM
Ok, i've got an idea -

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

fluid_0ne
August 8th, 2003, 05:32 PM
desired effect?

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

REEFˇ
August 8th, 2003, 08:44 PM
Your "link" doesnt work.

brainy
August 8th, 2003, 09:33 PM
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;
}
}

fluid_0ne
August 9th, 2003, 04:50 AM
>>>link (http://fluid.asianillusion.com/kirupa/LUPA1.SWF)<<<
should work now...

REEFˇ
August 9th, 2003, 11:38 AM
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.

kO2n
August 10th, 2003, 12:19 PM
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 .

Regards,
Viru.

REEFˇ
August 10th, 2003, 12:25 PM
Awesome site layout. Loved the gallery. That is one very cool effect. Yea, I guess thats what I can use. Teach me how. Thanks.

kO2n
August 10th, 2003, 12:30 PM
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

Regards,
Viru.

P.S Thanks for the compliments.

radicaljugnu
August 10th, 2003, 12:32 PM
on(press){drag=!drag}
onClipEvent(enterFrame){
if(drag){_y=_root._ymouse;_x=_root._xmouse}
}

mjULTRA
August 10th, 2003, 03:41 PM
Magnifying Lens FLA from Ultrashock:
http://www.ultrashock.com/ff.htm?http://www.ultrashock.com/flas/Detailed/101.html

REEFˇ
August 10th, 2003, 03:49 PM
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.