# FMX - Mask Magnifying

**URL:** https://forum.kirupa.com/t/fmx-mask-magnifying/9183
**Category:** flash
**Created:** [December 6, 2002, 5:25pm UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183 "2002-12-06T17:25:49Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![chalkboard2](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@chalkboard2](https://forum.kirupa.com/u/chalkboard2)
#### Post date: [December 6, 2002, 5:25pm UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/1 "2002-12-06T17:25:49Z")

</div>

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?

---

<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: [December 6, 2002, 5:33pm UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/2 "2002-12-06T17:33:37Z")

</div>

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!

🙂

---

<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: [December 6, 2002, 5:34pm UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/3 "2002-12-06T17:34:56Z")

</div>

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!

---

<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 15, 2003, 4:33am UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/4 "2003-08-15T04:33:41Z")

</div>

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

---

<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 15, 2003, 5:46am UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/5 "2003-08-15T05:46:17Z")

</div>

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?

---

<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 15, 2003, 6:13am UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/6 "2003-08-15T06:13:02Z")

</div>

Check out this link: [http://proto.layer51.com/d.aspx?f=660](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://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary568.html)  
[http://proto.layer51.com/d.aspx?f=845](http://proto.layer51.com/d.aspx?f=845)

:beam: 😛

---

<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 15, 2003, 6:50am UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/7 "2003-08-15T06:50:08Z")

</div>

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

---

<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 15, 2003, 1:36pm UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/8 "2003-08-15T13:36:35Z")

</div>

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/

---

<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 15, 2003, 2:36pm UTC](https://forum.kirupa.com/t/fmx-mask-magnifying/9183/9 "2003-08-15T14:36:25Z")

</div>

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](http://www.macromedia.com) for the parameters and uses of this action!
