# Error msg on MC control command

**URL:** <https://forum.kirupa.com/t/error-msg-on-mc-control-command/312357>\
**Category:** flash\
**Created:** [August 1, 2010, 1:30am UTC](https://forum.kirupa.com/t/error-msg-on-mc-control-command/312357 "2010-08-01T01:30:46Z")\
**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 1, 2010, 1:30am UTC](https://forum.kirupa.com/t/error-msg-on-mc-control-command/312357/1 "2010-08-01T01:30:46Z")

</div>

I am trying to create a function that sets my scaling tool on my stage to set itself. The instance name is slide\_mc. Its a movie clip. I am getting the following error:

Expected a field name after ‘.’ operator.

```auto

scalelot = function(){
	[COLOR="Red"]slide_mc.onClipEvent(load){[/COLOR]

	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()
}
[COLOR="red"]slide_mc.onClipEvent(mouseMove){[/COLOR]
	if (dragging){
		_x = Math.min(Math.max(_parent._xmouse,scrollMax),scrollMin)
		SetScale()
		updateAfterEvent();
	}
}
};

```
