Need help with intervals

Hi there,

Here I am once again with some problems with my farm site. I already asked some help with it, but the problem hasn’t been solved yet, so I’m gonna try once more.

So when ppl visit the stable, scroll around, leave the stable area, and revisit it, then the stable moves again to the last position where that user was. (with an move function using interval).

What should happen is that everytime you visit the stable, you should start on the first view (the sheep and pigs).

I tried to reset the interval everytime that swf is loaded, but that doesn’t seem to do any good.

Here’s the code for the move function:

function movePicture(xValue):Void {
	mcStal._x += Math.round((xValue - mcStal._x)/4);
	if(mcStal._x == xValue) {
		clearInterval(nIntervalPicture);
	}
}

Here is the code for the arrow:

mcArrow.onRelease = function()
clearInterval(nIntervalPicture);
		nIntervalPicture = setInterval(movePicture, 50, xValue3);
}

And finally here is the url of the work in progress:
http://www.earfocus.com/kinderboerderij/flash/index.htm

Any help is greatly appreciated :smiley: