# Points on a picture

**URL:** <https://forum.kirupa.com/t/points-on-a-picture/22734>\
**Category:** Uncategorized\
**Created:** [June 7, 2003, 8:50pm UTC](https://forum.kirupa.com/t/points-on-a-picture/22734 "2003-06-07T20:50:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris9902](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@chris9902](https://forum.kirupa.com/u/chris9902)\
**Post date:** [June 7, 2003, 8:50pm UTC](https://forum.kirupa.com/t/points-on-a-picture/22734/1 "2003-06-07T20:50:39Z")

</div>

sorry about the topic but i could not think of anyhting to call it.

i need help, i have a picuter that is in mask (so it is not all visible) but i want it so when i press a button it goes to part of the picture of moves the picture so it is visible in the mask.

anyone think then can help.:-\

EXAMPLE: think you are looking down at a map but not all is visble, you press a button and the map move to be visble.:sigh:

---

<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:** [June 8, 2003, 5:32am UTC](https://forum.kirupa.com/t/points-on-a-picture/22734/2 "2003-06-08T05:32:55Z")

</div>

So when a button is pressed the whole map gets visible ? Then you’ll just have to ease the mask out of sight I guess.

---

<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:** [June 8, 2003, 6:02pm UTC](https://forum.kirupa.com/t/points-on-a-picture/22734/3 "2003-06-08T18:02:08Z")

</div>

no the mask stays the same just the part of the map you can see changes

---

<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:** [June 8, 2003, 6:47pm UTC](https://forum.kirupa.com/t/points-on-a-picture/22734/4 "2003-06-08T18:47:37Z")

</div>

Ahh I see. Add this code to a new mc on the stage.

[AS]  
onClipEvent(enterFrame){  
\_root.maskedobject.\_x = \_root.tarX-(\_root.tarX - \_root.maskedobject.\_x)/1.2;  
\_root.maskedobject.\_y = \_root.tarY-(\_root.tarY - \_root.maskedobject.\_y)/1.2;  
}  
[/AS]

And add this to the button:

[AS]  
on (release){  
\_root.tarX = targetXposition;  
\_root.tarY = targetYposition;  
}  
[/AS]

You’ll have to replace [COLOR=BLUE]targetXposition[/COLOR] and [COLOR=BLUE]targetYposition[/COLOR] with the X and Y value of the masked object when at the place where it should move to.

I can’t test it tho cuz I ain’t got Flash on this pc.

---

<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:** [June 8, 2003, 9:24pm UTC](https://forum.kirupa.com/t/points-on-a-picture/22734/5 "2003-06-08T21:24:21Z")

</div>

thanks i will test it later:)
