Timer

on a buttons i am adding 300 to my mc and taking 300 away with a forward and back button. but i want to have a timer that adds 300 to targetX after 30 second. The problem is i want to use the if statement so when it is at the end or at its maxWidth have it go back.

so basiclly trying to build the actions of the buttons into a timer have it go forward and back?

section_mc.onEnterFrame = function() {
	this._x += (targetX-this._x)/7;
};
forward_btn.onRelease = function() {
	if (targetX>-(maxWidth-300)) {
		targetX -= 300;
	}
};
back_btn.onRelease = function() {
	if (targetX< 0) {
		targetX += 300;
	}
};