# Set registration point? Where oh where

**URL:** https://forum.kirupa.com/t/set-registration-point-where-oh-where/312407
**Category:** Uncategorized
**Created:** [August 2, 2010, 6:57pm UTC](https://forum.kirupa.com/t/set-registration-point-where-oh-where/312407 "2010-08-02T18:57:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rserge](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rserge](https://forum.kirupa.com/u/rserge)
#### Post date: [August 2, 2010, 6:57pm UTC](https://forum.kirupa.com/t/set-registration-point-where-oh-where/312407/1 "2010-08-02T18:57:05Z")

</div>

Please see  
[http://www.sergemedia.net/ds2/map/lissarazoomfix.html](http://www.sergemedia.net/ds2/map/lissarazoomfix.html)

Move zoom slider to 200 and back to 50, back and forth.  
Notice how map zooms diagonally to some point in the top left.  
I am trying to get the map to zoom in and out from center of current viewing area. I have been told it has to do with my registration point. I have been told to move to center. I have been moving it round and round trying to get it to co-operate, but not much luck.  
The map is a MC with a gra instance inside. I have set the registration of both to the center, but it still does not seem to work properly. So I have tried moving to other places. The bitmap map image in the gra is located at x=0, y=-600. Does that need to be 0,0?

I hope its not too confusing.

This is the code to my zoom slider, if its related to my problem…

```auto

onClipEvent(load){

	scrollMin = _root.range._x+_root.range._width // minimum _x value possiible for scrollbar
	scrollMax = _root.range._x // maximum _x value possiible for scrollbar

	lowestScale = 50 // lowest desired scale of map in %
	highestScale = 100 // highest desired scale of map in %

	_x = scrollMin + (scrollMax - scrollMin)/25 //starting point

	scaleFactor = Math.pow(highestScale/lowestScale,1/(scrollMax-scrollMin)) // variable for SetScale
	function SetScale(){
		// calculates scale and sets it
		_root.scale = _root.map_mc._xscale = _root.map_mc._yscale = lowestScale * Math.pow(scaleFactor,(scrollMax-_x))
	}
	SetScale()
}
onClipEvent(mouseMove){
	if (dragging){
		_x = Math.min(Math.max(_parent._xmouse,scrollMax),scrollMin)
		SetScale()
		updateAfterEvent();
	}
}

```
