Help with slideshow

Hi everyone. I was hoping someone could a newbie with a problem that’s been driving me mad. I’ve got a slideshow which basically consists of one long movie clip symbol which slides from left to right, revealing a total of 6 “slides”. Its all working OK except that I can’t figure out how to stop the slide from moving past the last image or, when I rewind it, stop it from moving back past the first image. Here’s the code I’ve used, if anyone could give me a steer I’d really appreciate it. I wanted to include the FLA bit at 288K, its too big to attach to this thread.

Thanks in advance,

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;


var xPos:Number = highlifeSlide_mc.x;
mask_mc.x = 0;
mask_mc.y = 0;
highlifeSlide_mc.mask = mask_mc;
var slideWidth:Number = 3600;
var maskWidth:Number = 600;
var slTween:Tween = new Tween(highlifeSlide_mc, “alpha”, Regular.easeIn, 0, 1, 1, true);
var forwardBtnIN:Tween = new Tween(forward_btn, “alpha”, Regular.easeIn, 0, 1, 1, true);
var backBtnIn:Tween = new Tween(back_btn, “alpha”, Strong.easeIn, 0, 1, 1, true);

var nTimer:Timer = new Timer(100);
nTimer.addEventListener(TimerEvent.TIMER, checkPosition, false, 0, true);

function checkPosition(e:Event):void
xPos = highlifeSlide_mc.x;

forward_btn.addEventListener(MouseEvent.CLICK, fmClick);
back_btn.addEventListener(MouseEvent.CLICK, bmClick);

function fmClick(e:MouseEvent):void
var xpTween:Tween = new Tween(highlifeSlide_mc, “x”, Strong.easeOut, xPos, xPos + 600, 0.5, true);


function bmClick(e:MouseEvent):void
var xmTween:Tween = new Tween(highlifeSlide_mc, “x”, Strong.easeOut, xPos, xPos - 600, 0.5, true);