Mcs moving into oblivion?

hiya,

i have this movie:
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:


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. :frowning:

cheers,
dual