# Mcs moving into oblivion?

**URL:** https://forum.kirupa.com/t/mcs-moving-into-oblivion/148725
**Category:** Uncategorized
**Created:** [May 23, 2005, 1:20am UTC](https://forum.kirupa.com/t/mcs-moving-into-oblivion/148725 "2005-05-23T01:20:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dualaud](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@dualaud](https://forum.kirupa.com/u/dualaud)
#### Post date: [May 23, 2005, 1:20am UTC](https://forum.kirupa.com/t/mcs-moving-into-oblivion/148725/1 "2005-05-23T01:20:19Z")

</div>

hiya,

i have this movie:  
[http://www.staatsakt.de/test/sketch.html](http://www.staatsakt.de/test/sketch.html)

and when i scroll to the right and leave the browser window and click on my desktop and click back into the browser window, my scrolling movieclips are all gone to some weird coordinates.:\*(  
also, if i scroll to the right or left, the images show their boundaries, which they are supposed not to.

my code to move one layer:

```auto

onClipEvent (enterFrame) {
	if (_root.move == 1) {
	if (_root.mainVarX == 0) {
		
		homeX = (-_root._xmouse*1)+328;
		homeY = (-_root._ymouse*1)+400;
		
	} else {
		
		homeX = (-_root.mainVarX);
		homeY = (-_root.mainVarY);
		
	}
	
	thisX = _x;
	thisY = _y;
	diffX = homeX-thisX;
	diffY = homeY-thisY;
	
	if (_root.mainVarX == 0) {
		moveX = diffX/5;
		moveY = diffY/5;
	} else {
		moveX = diffX/5;
		moveY = diffY/5;
	}
	
		_y = thisY+moveY;
		_x = thisX+moveX;

}
}

```

\_root.move and \_.root.mainVarX are just variables to check if certain conditions from other parts of the movie are met.

how can i stop the movieclips from scrolling if the mouse is out of a certain area, namely the visible size of my swf (640px x 400px)?  
how can i keep them from behaving weirdly?

i’d like to achieve a solid scrolling like in this swf:  
www.thebees.info.

any help is greatly appreciated, for this is the only thing, that keeps my flash file from getting done and published. ☹

cheers,  
dual
