# Viewfinder/navigator effect attempt

**URL:** <https://forum.kirupa.com/t/viewfinder-navigator-effect-attempt/195690>\
**Category:** Uncategorized\
**Created:** [August 2, 2006, 1:38pm UTC](https://forum.kirupa.com/t/viewfinder-navigator-effect-attempt/195690 "2006-08-02T13:38:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graylensman](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@graylensman](https://forum.kirupa.com/u/graylensman)\
**Post date:** [August 2, 2006, 1:38pm UTC](https://forum.kirupa.com/t/viewfinder-navigator-effect-attempt/195690/1 "2006-08-02T13:38:57Z")

</div>

Here’s what I’m after: there’s a small map with a draggable rectangle (viewfinder, as it were). There’s also a large map, with most of it masked. When the user drags the viewfinder rectangle, the large masked map moves accordingly. Think of the navigator pallette in Photoshop.

So, here’s my code:  
ActionScript Code:  
[FONT=Courier New][LEFT]speed=[COLOR=#000080]5[/COLOR];  
[COLOR=#000000] **function** [/COLOR] dragIt[COLOR=#000000]([/COLOR]dragger, dragged[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]  
dragger.[COLOR=#0000FF]onPress[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
dragger.[COLOR=#0000FF]startDrag[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#0000FF]onEnterFrame[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
dragged.[COLOR=#0000FF]\_x[/COLOR] = COLOR=#000000[/COLOR]/speed;  
dragged.[COLOR=#0000FF]\_y[/COLOR]=COLOR=#000000[/COLOR]/speed;  
[COLOR=#000000]}[/COLOR];  
[COLOR=#000000]}[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[COLOR=#000000] **function** [/COLOR] dragNotCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
dragger.[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
dragger.[COLOR=#0000FF]stopDrag[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_[//dragged.stopDrag](https://dragged.stopDrag)();_[/COLOR]  
[COLOR=#000000]}[/COLOR];  
[COLOR=#000000]}[/COLOR]  
dragIt[COLOR=#000000]([/COLOR]viewFinder, bigMap.[COLOR=#000080]bigTitan[/COLOR][COLOR=#000000])[/COLOR];  
dragNotCOLOR=#000000[/COLOR];  
[/LEFT]  
[/FONT]

I’ve attached my fla.

I’m hitting around the problem, but not quite getting exactly what I’m after. Can anyone point me in the right direction? Thanks!
