FMX - Mask Magnifying

i may have posted this earlier but i dont think it showed up, oh well. lets say i have a small image that is difficult to see, and i want a mask the roll over it and when it rolls over it the mask would magnify that part of the image so you could view it better. how would i go about doing that?

put the small picture on a layer. Now make a new layer and copy the small picture onto this layer and make it bigger!
Now make a new layer and draw a circle or sth’. (that would be the mask). Convert it into a movie clip and add the actions on it!

onClipEvent(enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
}

This makes the mask follow the mouse!

:slight_smile:

I almost forgot!
Now after thsese steps right-click on the layer you drew the mask in and select “mask”
that will make it a mask!

How can i get it to mask at a restricted area?

what do you mean? it will mask all the stuff in the layer below! Or do you want The mask to move only in a restricted area?

Check out this link: http://proto.layer51.com/d.aspx?f=660.

Or you could simply use one of these methods instead:
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary568.html
http://proto.layer51.com/d.aspx?f=845

:beam: :stuck_out_tongue:

yep…i just want The mask to move only in a restricted area…how can it be done?

Hey syko, whats the layer order from top to bottom?

mask
-magnifiedpicture
small picture

Don’t you have to add a script to move the magnified picture in the opposite direction of the mouse move so the point being maginfied on the small picture is centered over the same point on the large picture? I thought I read that somewhere/

cosine: the way way you described it is right too but it is only necessary if you’re using flash 5! In flash MX you can directly assign action to masks so it is easier to put the code on the mask!

The layer order is exactly the same order you posted but just make sure the small picture layer <b>is not</b> masked!

mystee: It is better to use startDrag(); View the Flash Help file AS dictionary or the AS dictionary found @ www.macromedia.com for the parameters and uses of this action!